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