Subversion Repositories wimsdev

Rev

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

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