Rev 16257 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 16257 | Rev 16821 | ||
---|---|---|---|
Line 17... | Line 17... | ||
17 | !bound job within log,llist,list,check,examcheck,erase default list |
17 | !bound job within log,llist,list,check,examcheck,erase default list |
18 | sdir=$wims_home/$wims_sesdir |
18 | sdir=$wims_home/$wims_sesdir |
19 | cdir=$wims_home/log/classes/$wims_class |
19 | cdir=$wims_home/log/classes/$wims_class |
20 | !bound $logsheet between integer 1 and $max_sheets default $ |
20 | !bound $logsheet between integer 1 and $max_sheets default $ |
21 | !bound $logexo between integer 1 and $max_exos default $ |
21 | !bound $logexo between integer 1 and $max_exos default $ |
- | 22 | ||
- | 23 | !if $job=log |
|
- | 24 | !read $job.proc |
|
- | 25 | !endif |
|
- | 26 | ||
22 | !if $job=erase |
27 | !if $job=erase |
23 | !if $source!=$empty |
28 | !if $source!=$empty |
24 | !sh rm $cdir/$source |
29 | !sh rm $cdir/$source |
25 | !endif |
30 | !endif |
26 | job=list |
31 | job=list |
27 | !endif |
32 | !endif |
28 | !if $job=log |
- | |
29 | !if ($logsheet>0 and $logexo>0) or $checkuser=supervisor |
- | |
30 | !if ($logsheet>0 and $logexo>0) |
- | |
31 | ext1=$logsheet.$logexo |
- | |
32 | ext2=-$ext1 |
- | |
33 | ext1=.$ext1 |
- | |
34 | !else |
- | |
35 | !reset ext1 ext2 |
- | |
36 | !endif |
- | |
37 | 33 | ||
38 | wimsnow=$wims_now |
- | |
39 | !sh mkdir -p $cdir/exolog/$checkuser\ |
- | |
40 | cp $sdir/exolog$ext1 $cdir/exolog/$checkuser/$wimsnow-$wims_session$ext2\ |
- | |
41 | rm -f $sdir/exolog$ext1\ |
- | |
42 | list=`ls -r $cdir/exolog/$checkuser | tail -n +$[$wims_class_exolog+1]`\ |
- | |
43 | if [ ! -z "$$list" ]; then rm -f $cdir/exolog/$checkuser/$$list; fi |
- | |
44 | job=list |
- | |
45 | !! replace the name of images by rename by the true name when saving |
- | |
46 | rename_list =!record 0 of wimshome/$wims_sesdir/.rename |
- | |
47 | rename_list_cnt=!linecnt $rename_list |
- | |
48 | !for l=1 to $rename_list_cnt |
- | |
49 | rename_l=!line $l of $rename_list |
- | |
50 | rename_l=!replace internal : by , in $rename_l |
- | |
51 | rename_l=!replace internal ? by \? in $rename_l |
- | |
52 | !sh perl -np -i -e 's:$(rename_l[2]):$(rename_l[1]):g' $cdir/exolog/$checkuser/$wimsnow-$wims_session$ext2 |
- | |
53 | !next |
- | |
54 | !else |
- | |
55 | job=llist |
- | |
56 | !endif |
- | |
57 | !endif |
- | |
58 | 34 | ||
59 | !if $job iswordof check examcheck |
35 | !if $job iswordof check examcheck |
60 | !if _check isin $wims_session |
36 | !if _check isin $wims_session |
61 | !if $checkexo!=file |
37 | !if $checkexo!=file |
62 | !default checkexo=$logcheck |
38 | !default checkexo=$logcheck |