Rev 2329 | Rev 16006 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2329 | Rev 15494 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | # update_field is number of field to update |
3 | # update_field is number of field to update |
4 | # update_content is the new content. |
4 | # update_content is the new content. |
5 | 5 | ||
6 | scnt=!recordcnt wimshome/log/classes/$wims_class/exams/.exams |
6 | scnt=!recordcnt wimshome/log/classes/$wims_class/exams/.exams |
7 | !for s=1 to $scnt |
7 | !for s=1 to $scnt |
8 | exam_$s=!record $s of wimshome/log/classes/$wims_class/exams/.exams |
8 | exam_$s=!record $s of wimshome/log/classes/$wims_class/exams/.exams |
9 | exam_$s=$(exam_$s)\ |
9 | exam_$s=$(exam_$s)\ |
10 | \ |
10 | \ |
11 | \ |
11 | \ |
12 | \ |
12 | \ |
13 | \ |
13 | \ |
14 | \ |
14 | \ |
Line 16... | Line 16... | ||
16 | \ |
16 | \ |
17 | dd |
17 | dd |
18 | 18 | ||
19 | !next s |
19 | !next s |
20 | !if $update_field>0 |
20 | !if $update_field>0 |
21 | exam_$exam=!replace line number $update_field by $update_content in $(exam_$exam) |
21 | exam_$exam=!replace line number $update_field by $update_content in $(exam_$exam) |
22 | !else |
22 | !else |
23 | !mexec examshift.sh |
23 | !mexec examshift.sh |
24 | !endif |
24 | !endif |
25 | !writefile wimshome/log/classes/$wims_class/exams/.exams |
25 | !writefile wimshome/log/classes/$wims_class/exams/.exams |
26 | !for s=1 to $scnt |
26 | !for s=1 to $scnt |
27 | !if $s!=$exam or $update_field>0 |
27 | !if $s!=$exam or $update_field>0 |
28 | sf=!line 1 to 7 of $(exam_$s) |
28 | sf=!line 1 to 7 of $(exam_$s) |
29 | !appendfile wimshome/log/classes/$wims_class/exams/.exams :$sf |
29 | !appendfile wimshome/log/classes/$wims_class/exams/.exams :$sf |
30 | !endif |
30 | !endif |
31 | !next s |
31 | !next s |
32 | - |