Rev 12845 | 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 |
||
15324 | bpr | 39 | !! both should be crypten |
40 | !! what happens if they were crypten in different ways ? |
||
41 | !! hope not ! |
||
12808 | bpr | 42 | np=!word 1 of $np |
43 | np=!passcrypt $np |
||
44 | passc=!passcrypt $pass |
||
45 | !if $wims_class isitemof $t and $np=$passc |
||
46 | !if $auth_method isitemof $auth_method_list |
||
47 | directlist=!append item $c $user_auth_external to $directlist |
||
48 | !else |
||
49 | directlist=!append item $c $wims_user to $directlist |
||
50 | !endif |
||
51 | !endif |
||
52 | !next c |
||
23 | reyssat | 53 | !endif |
54 | |||
55 | directlist=!append item $directlist to $wims_otherclass |
||
56 | directlist=!listuniq $directlist |
||
57 | directlist=!listcomplement $wims_class $wims_user in $directlist |
||
58 | directlist=!nonempty items $directlist |
||
5054 | bpr | 59 | directlist=!sort items $directlist |
23 | reyssat | 60 | directcnt=!itemcnt $directlist |
61 | !if $directcnt>0 |
||
9506 | bpr | 62 | !!! should be commented |
12808 | bpr | 63 | current_pass=$pass |
23 | reyssat | 64 | !endif |