Subversion Repositories wimsdev

Rev

Rev 13868 | Rev 15324 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 13868 Rev 14334
Line 50... Line 50...
50
auth_user=!text select $char_login in $auth_user
50
auth_user=!text select $char_login in $auth_user
51
auth_password=!text select $char_passwd in $auth_password
51
auth_password=!text select $char_passwd in $auth_password
52
now=$wims_now
52
now=$wims_now
53
logfile=wimshome/log/classes/$class/.log.auth
53
logfile=wimshome/log/classes/$class/.log.auth
54
logfiles=wimshome/log/classes/$class/.log
54
logfiles=wimshome/log/classes/$class/.log
55
logline=$now $auth_user  	$$passwd	$httpd_REMOTE_ADDR
55
logline=$now $auth_user   $$passwd	$httpd_REMOTE_ADDR
56
 
56
 
57
!read adm/class/userdef classes,$class,$auth_user
57
!read adm/class/userdef classes,$class,$auth_user
58
 
58
 
59
pass=!defof user_password in $userdef
59
pass=!defof user_password in $userdef
60
 
60
 
Line 139... Line 139...
139
  !endif
139
  !endif
140
!endif
140
!endif
141
 
141
 
142
cps=!passcrypt $current_pass
142
cps=!passcrypt $current_pass
143
!if ($auth_user!=$empty and $class $auth_user isitemof $wims_otherclass) or \
143
!if ($auth_user!=$empty and $class $auth_user isitemof $wims_otherclass) or \
144
	($current_pass!=$empty and $cps iswordof $pass) or \
144
  ($current_pass!=$empty and $cps iswordof $pass) or \
145
	($auth_user=$wims_user and $class isitemof $wims_participate) or \
145
  ($auth_user=$wims_user and $class isitemof $wims_participate) or \
146
	($auth_user=supervisor and $wims_user=supervisor and \
146
  ($auth_user=supervisor and $wims_user=supervisor and \
147
	  (../$wims_class/ isin ../$class/ or $superclass=$wims_class)) or \
147
    (../$wims_class/ isin ../$class/ or $superclass=$wims_class)) or \
148
	($auth_user=supervisor and $class isitemof $wims_supervise)
148
  ($auth_user=supervisor and $class isitemof $wims_supervise)
149
  !goto auth_ok
149
  !goto auth_ok
150
!endif
150
!endif
151
 
151
 
152
!if $auth_password=$empty
152
!if $auth_password=$empty
153
  !exit
153
  !exit
Line 165... Line 165...
165
  !exit
165
  !exit
166
!endif
166
!endif
167
 
167
 
168
:auth_ok
168
:auth_ok
169
!if $auth_user=supervisor and $wims_user!=$empty and $wims_user!=supervisor and \
169
!if $auth_user=supervisor and $wims_user!=$empty and $wims_user!=supervisor and \
170
	$class notitemof $wims_supervise
170
    $class notitemof $wims_supervise
171
  userdef_save=$userdef
171
  userdef_save=$userdef
172
  !read adm/class/userdef classes,$wims_class,$wims_user
172
  !read adm/class/userdef classes,$wims_class,$wims_user
173
  !exchange userdef_save,userdef
173
  !exchange userdef_save,userdef
174
  spv=!defof user_supervisable in $userdef_save
174
  spv=!defof user_supervisable in $userdef_save
175
  !if $spv=yes
175
  !if $spv=yes
Line 254... Line 254...
254
  random=!randint 10^5,10^9
254
  random=!randint 10^5,10^9
255
  !restart session=new.$random&lang=$clang&old_session=$wims_session&module=home
255
  !restart session=new.$random&lang=$clang&old_session=$wims_session&module=home
256
!else
256
!else
257
  !setdef $classdef in wimshome/$wims_sesdir/var.stat
257
  !setdef $classdef in wimshome/$wims_sesdir/var.stat
258
  !sh cd $wims_home\
258
  !sh cd $wims_home\
259
   	rm -Rf $(wims_sesdir)_*\
259
    rm -Rf $(wims_sesdir)_*\
260
  	mkdir -p log/classes/$class/score $wims_sesdir/getfile\
260
    mkdir -p log/classes/$class/score $wims_sesdir/getfile\
261
  	rm -f $wims_sesdir/exam*\
261
    rm -f $wims_sesdir/exam*\
262
  	rm -f $wims_sesdir/getfile/oefimages\
262
    rm -f $wims_sesdir/getfile/oefimages\
263
  	ln -s $wims_home/log/classes/$class/src/images $wims_sesdir/getfile/oefimages
263
    ln -s $wims_home/log/classes/$class/src/images $wims_sesdir/getfile/oefimages
264
  !restart lang=$clang&module=home
264
  !restart lang=$clang&module=home
265
!endif
265
!endif
266
 
266
 
267
:end
267
:end