Rev 7679 | Rev 15324 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7679 | Rev 12811 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | !if robot isin $session |
1 | !if robot isin $session |
2 | !exit |
2 | !exit |
3 | !endif |
3 | !endif |
4 | 4 | ||
5 | # search commands carried thru from internet search engines |
5 | # search commands carried thru from internet search engines |
6 | Swords=q p query search MT Keywords |
6 | Swords=q p query search MT Keywords |
7 | 7 | ||
8 | !if $old_session!=$empty and .. notin $old_session and \ |
8 | !if $old_session!=$empty and .. notin $old_session and \ |
9 | / notin $old_session and _ notin $session |
9 | / notin $old_session and _ notin $session |
10 | classdef=!record 0 of wimshome/sessions/$old_session/var.class.prep |
10 | classdef=!record 0 of wimshome/sessions/$old_session/var.class.prep |
11 | !if wims_ notin $classdef |
11 | !if wims_ notin $classdef |
12 | !exit |
12 | !exit |
13 | !endif |
13 | !endif |
14 | wims_ismanager=!defof w_wims_ismanager in wimshome/sessions/$old_session/var |
14 | wims_ismanager=!defof w_wims_ismanager in wimshome/sessions/$old_session/var |
15 | !setdef $classdef in wimshome/$wims_sesdir/var.stat |
15 | !setdef $classdef in wimshome/$wims_sesdir/var.stat |
16 | !writefile wimshome/sessions/$old_session/var.class.prep |
16 | !writefile wimshome/sessions/$old_session/var.class.prep |
17 | n=!linecnt $classdef |
17 | n=!linecnt $classdef |
18 | classdef=!translate = to , in $classdef |
18 | classdef=!translate = to , in $classdef |
19 | !for i=1 to $n |
19 | !for i=1 to $n |
20 | l=!line $i of $classdef |
20 | l=!line $i of $classdef |
21 | n_=!item 1 of $l |
21 | n_=!item 1 of $l |
22 | v_=!item 2 to -1 of $l |
22 | v_=!item 2 to -1 of $l |
23 | $n_=$v_ |
23 | $n_=$v_ |
24 | !next i |
24 | !next i |
25 | !sh cd $wims_home\ |
25 | !sh cd $wims_home\ |
26 | mkdir -p log/classes/$wims_class/score $wims_sesdir/getfile\ |
26 | mkdir -p log/classes/$wims_class/score $wims_sesdir/getfile\ |
27 | rm -f $wims_sesdir/getfile/oefimages\ |
27 | rm -f $wims_sesdir/getfile/oefimages\ |
28 | ln -s $wims_home/log/classes/$wims_class/src/images $wims_sesdir/getfile/oefimages |
28 | ln -s $wims_home/log/classes/$wims_class/src/images $wims_sesdir/getfile/oefimages |
29 | !endif |
29 | !endif |
30 | 30 | ||
31 | !if $user!=$empty and _ notin $session |
31 | !if $user!=$empty and _ notin $session |
32 | !read ./adm/class/authchars |
32 | !read ./adm/class/authchars |
33 | !distribute items $user into u_,c_,p_ |
33 | !distribute items $user into u_,c_,p_ |
34 | c_=!text select $char_alnum/ in $c_ |
34 | c_=!text select $char_alnum/ in $c_ |
35 | u_=!translate internal . to @ in $u_ |
35 | u_=!translate internal . to @ in $u_ |
36 | u_=!text select $char_login in $u_ |
36 | u_=!text select $char_login in $u_ |
37 | p_=!text select $char_passwd in $p_ |
37 | p_=!text select $char_passwd in $p_ |
38 | !if $c_=$empty |
38 | !if $c_=$empty |
39 | !exit |
39 | !exit |
40 | !endif |
40 | !endif |
41 | !if $u_=supervisor |
41 | !if $u_=supervisor |
42 | ut=supervisor |
42 | ut=supervisor |
43 | !else |
43 | !else |
44 | ut=participant |
44 | ut=participant |
45 | !endif |
45 | !endif |
46 | sclass=!defof class_superclass in wimshome/log/classes/$c_/.def |
46 | sclass=!defof class_superclass in wimshome/log/classes/$c_/.def |
47 | !read ./adm/class/userdef logclasses,$c_,$u_ |
47 | !read ./adm/class/userdef logclasses,$c_,$u_ |
48 | !if $sclass!=$empty and $sclass!=$class |
48 | !if $sclass!=$empty and $sclass!=$class |
49 | upartic=!defof user_participate in $userdef |
49 | upartic=!defof user_participate in $userdef |
50 | usuperv=!defof user_supervise in $userdef |
50 | usuperv=!defof user_supervise in $userdef |
51 | !if $class notitemof $upartic and $u_!=supervisor |
51 | !if $class notitemof $upartic and $u_!=supervisor |
52 | pass= |
52 | pass= |
- | 53 | !endif |
|
- | 54 | !endif |
|
- | 55 | !if $p_!=$empty and $c_>0 |
|
- | 56 | pck=!defof user_password in $userdef |
|
- | 57 | pck=!passcrypt $pck |
|
- | 58 | pck=!word 1 of $pck |
|
- | 59 | !endif |
|
- | 60 | !read ./adm/class/authdelay |
|
- | 61 | !if ? isin $auth_password |
|
- | 62 | p_=$auth_password |
|
- | 63 | !else |
|
- | 64 | p_=!passcrypt $p_ |
|
53 | !endif |
65 | !endif |
54 | !endif |
- | |
55 | !if $p_!=$empty and $c_>0 |
- | |
56 | pck=!defof user_password in $userdef |
- | |
57 | pck=!passcrypt $pck |
- | |
58 | pck=!word 1 of $pck |
- | |
59 | !endif |
- | |
60 | !read ./adm/class/authdelay |
- | |
61 | !if ? isin $auth_password |
- | |
62 | p_=$auth_password |
- | |
63 | !else |
- | |
64 | p_=!passcrypt $p_ |
- | |
65 | !endif |
- | |
66 | !if $p_=$empty or $p_!=$pck |
66 | !if $p_=$empty or $p_!=$pck |
67 | !writefile wimshome/$wims_sesdir/lastauth |
67 | !writefile wimshome/$wims_sesdir/lastauth |
68 | !set authidp_method=!defof class_authidp in wimshome/log/classes/$c_/.def |
68 | !set authidp_method=!defof class_authidp in wimshome/log/classes/$c_/.def |
69 | !set class_auth=$(authidp_method[1;]) |
69 | !set class_auth=$(authidp_method[1;]) |
70 | !if $class_auth iswordof cas ldap php |
70 | !if $class_auth iswordof cas ldap php |
71 | !restart module=adm/class/classes&type=participant |
71 | !restart module=adm/class/classes&type=participant |
- | 72 | !else |
|
- | 73 | !restart module=adm/class/classes&type=auth$ut&class=$c_&auth_user=$u_&changesession=no |
|
- | 74 | !endif |
|
72 | !else |
75 | !else |
73 |
|
76 | !read ./var.auth |
74 | !endif |
77 | !endif |
75 | !else |
- | |
76 | !read ./var.auth |
- | |
77 | !endif |
- | |
78 | !endif |
78 | !endif |