Subversion Repositories wimsdev

Rev

Rev 16006 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2329 guerimand 1
!!!### language independant
2
!!
23 reyssat 3
# update_field is number of field to update
4
# update_content is the new content.
5
 
6
scnt=!recordcnt wimshome/log/classes/$wims_class/exams/.exams
7
!for s=1 to $scnt
15494 bpr 8
  exam_$s=!record $s of wimshome/log/classes/$wims_class/exams/.exams
9
  exam_$s=$(exam_$s)\
23 reyssat 10
\
11
\
12
\
13
\
14
\
15
\
2329 guerimand 16
\
16006 guerimand 17
\
18
\
17382 guerimand 19
\
23 reyssat 20
 
16006 guerimand 21
 
23 reyssat 22
!next s
23
!if $update_field>0
15494 bpr 24
  exam_$exam=!replace line number $update_field by $update_content in $(exam_$exam)
23 reyssat 25
!else
15494 bpr 26
  !mexec examshift.sh
23 reyssat 27
!endif
28
!writefile wimshome/log/classes/$wims_class/exams/.exams
29
!for s=1 to $scnt
15494 bpr 30
  !if $s!=$exam or $update_field>0
17382 guerimand 31
    sf=!line 1 to 9 of $(exam_$s)
15494 bpr 32
    !appendfile wimshome/log/classes/$wims_class/exams/.exams :$sf
33
  !endif
23 reyssat 34
!next s