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