Rev 13320 | 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 |
||
12465 | bpr | 5 | error=bad_usercls |
6 | !reset job,checkuser |
||
7 | !exit |
||
862 | guerimand | 8 | !endif |
23 | reyssat | 9 | !read adm/class/userdef classes,$wims_class,$checkuser |
10 | !readdef $userdef |
||
11 | !if $user_exists != yes |
||
12465 | bpr | 12 | error=bad_user |
13 | !exit |
||
23 | reyssat | 14 | !endif |
15 | |||
2926 | guerimand | 16 | maxexo=0 |
17 | !for k in $activexams |
||
12465 | bpr | 18 | tmp=!recordcnt wimshome/log/classes/$wims_class/exams/.exam$k |
19 | maxexo=$[max($maxexo,$tmp)] |
||
2926 | guerimand | 20 | !next k |
23 | reyssat | 21 | logdir=$wims_home/log/classes/$wims_class/examlog/$checkuser |
22 | !if $checksession=$empty |
||
12465 | bpr | 23 | checksessions=!sh if [ -d $logdir ]; then cd $logdir; ls -tr; 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 ses |
||
39 | !if $checksessions=$empty |
||
13320 | bpr | 40 | !exit |
12465 | bpr | 41 | !endif |
42 | !readproc adm/class/userscore1 $checkuser |
||
16378 | guerimand | 43 | class_examscore_withoutip=!defof class_examscore_withoutip in wimshome/log/classes/$wims_class/.def |
23 | reyssat | 44 | !exit |
45 | !endif |
||
46 | |||
47 | exos=!sh if [ -d $logdir/$checksession ]; then cd $logdir/$checksession; ls; fi |
||
48 | exos=!words2items $exos |
||
49 | logfile=classes/$wims_class/examlog/$checkuser/$checksession/$checkexo |
||
50 | |||
51 | !if _check isin $session |
||
12465 | bpr | 52 | !read adm/class/exocheck |
23 | reyssat | 53 | !endif |