Rev 5020 | Rev 9506 | 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 |
||
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 | !endif |
||
11 | |||
12 | !if $wims_user=supervisor |
||
13 | nam=sup |
||
14 | !else |
||
15 | nam=part |
||
16 | !endif |
||
17 | !read adm/class/userdef classes,$wims_class,$wims_user |
||
18 | neib=!defof n_$nam in wimshome/log/classes/$wims_class/neighbors |
||
19 | pass=!defof user_password in $userdef |
||
20 | pass=!word 1 of $pass |
||
21 | |||
22 | directlist= |
||
23 | !if $pass!=$empty |
||
24 | !for c in $neib |
||
25 | t=!defof n_$nam in wimshome/log/classes/$c/neighbors |
||
912 | bpr | 26 | !read adm/class/userdef classes,$c,$wims_user |
23 | reyssat | 27 | np=!defof user_password in $userdef |
28 | np=!word 1 of $np |
||
29 | np=!passcrypt $np |
||
30 | passc=!passcrypt $pass |
||
31 | !if $wims_class isitemof $t and $np=$passc |
||
5020 | bpr | 32 | !if $auth_method isitemof $auth_method_list |
33 | directlist=!append item $c $user_auth_external to $directlist |
||
34 | !else |
||
35 | directlist=!append item $c $wims_user to $directlist |
||
36 | !endif |
||
23 | reyssat | 37 | !endif |
38 | !next c |
||
39 | !endif |
||
40 | |||
41 | directlist=!append item $directlist to $wims_otherclass |
||
42 | directlist=!listuniq $directlist |
||
43 | directlist=!listcomplement $wims_class $wims_user in $directlist |
||
44 | directlist=!nonempty items $directlist |
||
5054 | bpr | 45 | directlist=!sort items $directlist |
23 | reyssat | 46 | directcnt=!itemcnt $directlist |
47 | !if $directcnt>0 |
||
48 | current_pass=$pass |
||
49 | !endif |
||
50 |