Subversion Repositories wimsdev

Rev

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
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_
38
  !if $c_=$empty
39
    !exit
33 reyssat 40
  !endif
12811 obado 41
  !if $u_=supervisor
42
    ut=supervisor
7679 bpr 43
  !else
12811 obado 44
    ut=participant
5006 czzmrn 45
  !endif
12811 obado 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_
15324 bpr 65
    pass_check=!passcheck $p_ and $pck
12811 obado 66
  !endif
15324 bpr 67
  !if $p_=$empty or $pass_check!=yes
12811 obado 68
    !writefile wimshome/$wims_sesdir/lastauth
69
    !set authidp_method=!defof class_authidp in wimshome/log/classes/$c_/.def
70
    !set class_auth=$(authidp_method[1;])
71
    !if $class_auth iswordof cas ldap php
72
      !restart module=adm/class/classes&type=participant
73
    !else
74
      !restart module=adm/class/classes&type=auth$ut&class=$c_&auth_user=$u_&changesession=no
75
    !endif
76
  !else
77
    !read ./var.auth
78
  !endif
33 reyssat 79
!endif