Subversion Repositories wimsdev

Rev

Go to most recent revision | Details | 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
 
16
logdir=$wims_home/log/classes/$wims_class/examlog/$checkuser
17
!if $checksession=$empty
18
 checksessions=!sh if [ -d $logdir ]; then cd $logdir; ls; fi
19
 checksessions=!words2items $checksessions
2848 guerimand 20
 maxexo=0
23 reyssat 21
 !for ses in $checksessions
22
  exo=!sh cd $wims_home/log/classes/$wims_class/examlog/$checkuser/$ses; ls
23
  exo$ses=!words2items $exo
2848 guerimand 24
  tmp=!itemcnt $(exo$ses)
25
  maxexo=$[max($maxexo,$tmp)]
23 reyssat 26
  exo=!words2lines $exo
27
  exo=!translate . to , in $exo
28
  exom=!column 1 of $exo
29
  exom=!listuniq $exom
30
  exam$ses=$exom
31
  !for xm in $exom
32
   exot=!select $exo where column 1 = $xm
33
   exot=!column 2 of $exot
34
   exo$(ses)$xm=!sort numeric items $exot
35
  !next xm
36
 !next i
37
 !if $checksessions=$empty
38
  !exit
39
 !endif
40
 sc=!record 0 of wimshome/log/classes/$wims_class/score/$checkuser.exam
41
 n=!linecnt $sc
42
 tses=
43
 !for i=1 to $n
44
  l=!line $i of $sc
45
  !distribute words $l into e_,s_,t_,T_,i_,S_,t_
46
  score$(S_)$e_=$s_
47
  !if $s_ issametext 00
48
   tses=!append item $S_ to $tses
49
   start$(S_)$e_=$t_
50
  !endif
51
 !next i
52
 checksessions=!listintersect $tses and $checksessions
53
 !exit
54
!endif
55
 
56
exos=!sh if [ -d $logdir/$checksession ]; then cd $logdir/$checksession; ls; fi
57
exos=!words2items $exos
58
logfile=classes/$wims_class/examlog/$checkuser/$checksession/$checkexo
59
 
60
!if _check isin $session
61
 !read adm/class/exocheck
62
!endif
63