Subversion Repositories wimsdev

Rev

Rev 6651 | Rev 12811 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
33 reyssat 1
!if robot isin $session
2
 !exit
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
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
29
!endif
30
 
31
!if $user!=$empty and _ notin $session
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_
38
 !if $c_=$empty
39
  !exit
40
 !endif
41
 !if $u_=supervisor
42
  ut=supervisor
43
 !else
44
  ut=participant
45
 !endif
46
 sclass=!defof class_superclass in wimshome/log/classes/$c_/.def
47
 !read ./adm/class/userdef logclasses,$c_,$u_
48
 !if $sclass!=$empty and $sclass!=$class
49
  upartic=!defof user_participate in $userdef
50
  usuperv=!defof user_supervise in $userdef
51
  !if $class notitemof $upartic and $u_!=supervisor
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_
65
 !endif
66
 !if $p_=$empty or $p_!=$pck
67
  !writefile wimshome/$wims_sesdir/lastauth
6651 czzmrn 68
  !set authidp_method=!defof class_authidp in wimshome/log/classes/$c_/.def
69
  !set class_auth=$(authidp_method[1;])
7679 bpr 70
  !if $class_auth iswordof cas ldap php
5006 czzmrn 71
   !restart module=adm/class/classes&type=participant
7679 bpr 72
  !else
5006 czzmrn 73
   !restart module=adm/class/classes&type=auth$ut&class=$c_&auth_user=$u_&changesession=no
74
  !endif
33 reyssat 75
 !else
76
  !read ./var.auth
77
 !endif
78
!endif