Subversion Repositories wimsdev

Rev

Rev 8311 | Rev 9719 | 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
23
 checksessions=!sh if [ -d $logdir ]; then cd $logdir; ls; fi
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
38
 !next i
39
 !if $checksessions=$empty
40
  !exit
41
 !endif
42
 sc=!record 0 of wimshome/log/classes/$wims_class/score/$checkuser.exam
43
 n=!linecnt $sc
44
 tses=
45
 !for i=1 to $n
46
  l=!line $i of $sc
9470 bpr 47
  !distribute words $l into e_,s_,t__,T_,i_,S_,t_
23 reyssat 48
  score$(S_)$e_=$s_
49
  !if $s_ issametext 00
50
   tses=!append item $S_ to $tses
51
   start$(S_)$e_=$t_
9470 bpr 52
   dur$(S_)$e_=$T_
23 reyssat 53
  !endif
9470 bpr 54
  !if $t__ issametext -1
55
    duree$(S_)$e_=!exec pari divrem($T_ - $(dur$(S_)$e_),60)~
56
  !endif
23 reyssat 57
 !next i
58
 checksessions=!listintersect $tses and $checksessions
59
 !exit
60
!endif
61
 
62
exos=!sh if [ -d $logdir/$checksession ]; then cd $logdir/$checksession; ls; fi
63
exos=!words2items $exos
64
logfile=classes/$wims_class/examlog/$checkuser/$checksession/$checkexo
65
 
66
!if _check isin $session
67
 !read adm/class/exocheck
68
!endif
69