Subversion Repositories wimsdev

Rev

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

Rev 9934 Rev 12465
Line 4... Line 4...
4
!if yes notin $script_reply
4
!if yes notin $script_reply
5
 error=bad_usercls
5
  error=bad_usercls
6
 !reset job,checkuser
6
  !reset job,checkuser
7
 !exit
7
  !exit
8
!endif
8
!endif
9
!read adm/class/userdef classes,$wims_class,$checkuser
9
!read adm/class/userdef classes,$wims_class,$checkuser
10
!readdef $userdef
10
!readdef $userdef
11
!if $user_exists != yes
11
!if $user_exists != yes
12
 error=bad_user
12
  error=bad_user
13
 !exit
13
  !exit
14
!endif
14
!endif
15
 
15
 
16
maxexo=0
16
maxexo=0
17
!for k in $activexams
17
!for k in $activexams
18
 tmp=!recordcnt wimshome/log/classes/$wims_class/exams/.exam$k
18
  tmp=!recordcnt wimshome/log/classes/$wims_class/exams/.exam$k
19
 maxexo=$[max($maxexo,$tmp)]
19
  maxexo=$[max($maxexo,$tmp)]
20
!next k
20
!next k
21
logdir=$wims_home/log/classes/$wims_class/examlog/$checkuser
21
logdir=$wims_home/log/classes/$wims_class/examlog/$checkuser
22
!if $checksession=$empty
22
!if $checksession=$empty
23
 checksessions=!sh if [ -d $logdir ]; then cd $logdir; ls -tr; fi
23
  checksessions=!sh if [ -d $logdir ]; then cd $logdir; ls -tr; fi
24
 checksessions=!words2items $checksessions
24
  checksessions=!words2items $checksessions
25
 !for ses in $checksessions
25
  !for ses in $checksessions
26
  exo=!sh cd $wims_home/log/classes/$wims_class/examlog/$checkuser/$ses; ls
26
    exo=!sh cd $wims_home/log/classes/$wims_class/examlog/$checkuser/$ses; ls
27
  exo$ses=!words2items $exo
27
    exo$ses=!words2items $exo
28
  exo=!words2lines $exo
28
    exo=!words2lines $exo
29
  exo=!translate . to , in $exo
29
    exo=!translate . to , in $exo
30
  exom=!column 1 of $exo
30
    exom=!column 1 of $exo
31
  exom=!listuniq $exom
31
    exom=!listuniq $exom
32
  exam$ses=$exom
32
    exam$ses=$exom
33
  !for xm in $exom
33
    !for xm in $exom
34
   exot=!select $exo where column 1 = $xm
34
      exot=!select $exo where column 1 = $xm
35
   exot=!column 2 of $exot
35
      exot=!column 2 of $exot
36
   exo$(ses)$xm=!sort numeric items $exot
36
      exo$(ses)$xm=!sort numeric items $exot
37
  !next xm
37
    !next xm
38
!next ses
38
  !next ses
39
!if $checksessions=$empty
39
  !if $checksessions=$empty
-
 
40
      !exit
-
 
41
  !endif
-
 
42
  !readproc adm/class/userscore1 $checkuser
40
  !exit
43
  !exit
41
 !endif
-
 
42
 !readproc adm/class/userscore1 $checkuser
-
 
43
 !exit
-
 
44
!endif
44
!endif
45
 
45
 
46
exos=!sh if [ -d $logdir/$checksession ]; then cd $logdir/$checksession; ls; fi
46
exos=!sh if [ -d $logdir/$checksession ]; then cd $logdir/$checksession; ls; fi
47
exos=!words2items $exos
47
exos=!words2items $exos
48
logfile=classes/$wims_class/examlog/$checkuser/$checksession/$checkexo
48
logfile=classes/$wims_class/examlog/$checkuser/$checksession/$checkexo
49
 
49
 
50
!if _check isin $session
50
!if _check isin $session
51
 !read adm/class/exocheck
51
  !read adm/class/exocheck
52
!endif
52
!endif
53
 
-