Rev 12808 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
23 | reyssat | 1 | examtest=!sh cat $wims_home/$wims_sesdir/examreg.* 2>/dev/null |
2 | !if $examtest!=$empty |
||
12808 | bpr | 3 | et=!words2items $examtest |
4 | !for i in $et |
||
5 | !if $i>0 |
||
6 | error=in_exam |
||
7 | type=none |
||
8 | !exit |
||
9 | !endif |
||
10 | !next |
||
23 | reyssat | 11 | !endif |
12 | |||
13 | !if $wims_user=supervisor |
||
12808 | bpr | 14 | nam=sup |
23 | reyssat | 15 | !else |
12808 | bpr | 16 | nam=part |
23 | reyssat | 17 | !endif |
10747 | bpr | 18 | !read adm/class/userdef classes,$wims_class,$wims_realuser |
19 | !set user_supervisable=!defof user_supervisable in $userdef |
||
20 | !if $user_supervisable=yes |
||
21 | !set user_supervise=!defof user_supervise in $userdef |
||
22 | !endif |
||
12845 | obado | 23 | !if $wims_user=supervisor |
10747 | bpr | 24 | !set user_supervise=!append item $wims_class to $user_supervise |
25 | !endif |
||
26 | !set user_participate=!defof user_participate in $userdef |
||
27 | |||
23 | reyssat | 28 | neib=!defof n_$nam in wimshome/log/classes/$wims_class/neighbors |
29 | pass=!defof user_password in $userdef |
||
30 | pass=!word 1 of $pass |
||
31 | |||
32 | directlist= |
||
9506 | bpr | 33 | |
23 | reyssat | 34 | !if $pass!=$empty |
12808 | bpr | 35 | !for c in $neib |
36 | t=!defof n_$nam in wimshome/log/classes/$c/neighbors |
||
37 | !read adm/class/userdef classes,$c,$wims_user |
||
38 | np=!defof user_password in $userdef |
||
39 | np=!word 1 of $np |
||
40 | np=!passcrypt $np |
||
41 | passc=!passcrypt $pass |
||
42 | !if $wims_class isitemof $t and $np=$passc |
||
43 | !if $auth_method isitemof $auth_method_list |
||
44 | directlist=!append item $c $user_auth_external to $directlist |
||
45 | !else |
||
46 | directlist=!append item $c $wims_user to $directlist |
||
47 | !endif |
||
48 | !endif |
||
49 | !next c |
||
23 | reyssat | 50 | !endif |
51 | |||
52 | directlist=!append item $directlist to $wims_otherclass |
||
53 | directlist=!listuniq $directlist |
||
54 | directlist=!listcomplement $wims_class $wims_user in $directlist |
||
55 | directlist=!nonempty items $directlist |
||
5054 | bpr | 56 | directlist=!sort items $directlist |
23 | reyssat | 57 | directcnt=!itemcnt $directlist |
58 | !if $directcnt>0 |
||
9506 | bpr | 59 | !!! should be commented |
12808 | bpr | 60 | current_pass=$pass |
23 | reyssat | 61 | !endif |