Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
9687 | guerimand | 1 | !! duplicate an exam |
2 | |||
3 | !if $scnt>=$max_exams |
||
4 | error=bad_maxexams |
||
5 | !reset job |
||
6 | !changeto var.proc |
||
7 | !endif |
||
8 | !bound exam between 1 and $scnt default $empty |
||
9 | |||
10 | !if $exam=$empty |
||
11 | error=bad_exam |
||
12 | !reset job |
||
13 | !changeto var.proc |
||
14 | !endif |
||
15 | |||
16 | exocnt=!recordcnt wimshome/log/classes/$wims_class/exams/.exam$exam |
||
17 | !if $exocnt=0 |
||
18 | !reset job |
||
19 | !changeto var.proc |
||
20 | !endif |
||
21 | |||
22 | !sh cd $wims_home/log/classes/$wims_class/exams/\ |
||
23 | cp .exam$exam .exam$[$scnt+1] |
||
24 | |||
25 | p=!record $exam of wimshome/log/classes/$wims_class/exams/.exams |
||
26 | p=!replace line number 1 by 0 in $p |
||
27 | |||
28 | !appendfile wimshome/log/classes/$wims_class/exams/.exams :$p |
||
29 | |||
30 | scnt=$[$scnt+1] |
||
31 | exam=$scnt |
||
32 | message=$name_duplicateok |
||
33 | !reset job |
||
34 | !changeto var.proc |