Subversion Repositories wimsdev

Rev

Rev 15494 | Go to most recent revision | 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
\
23 reyssat 19
 
16006 guerimand 20
 
23 reyssat 21
!next s
22
!if $update_field>0
15494 bpr 23
  exam_$exam=!replace line number $update_field by $update_content in $(exam_$exam)
23 reyssat 24
!else
15494 bpr 25
  !mexec examshift.sh
23 reyssat 26
!endif
27
!writefile wimshome/log/classes/$wims_class/exams/.exams
28
!for s=1 to $scnt
15494 bpr 29
  !if $s!=$exam or $update_field>0
16006 guerimand 30
    sf=!line 1 to 8 of $(exam_$s)
15494 bpr 31
    !appendfile wimshome/log/classes/$wims_class/exams/.exams :$sf
32
  !endif
23 reyssat 33
!next s