Subversion Repositories wimsdev

Rev

Rev 10477 | 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
ecnt=!recordcnt wimshome/log/classes/$wims_class/exams/.exam$exam
7
!if $ecnt<$exo
15494 bpr 8
  ecnt=$exo
23 reyssat 9
!endif
10
!for e=1 to $ecnt
15494 bpr 11
  exo_$e=!record $e of wimshome/log/classes/$wims_class/exams/.exam$exam
12
  # weight,choose,name
13
  exo_$e=!line 1 to 7 of $(exo_$e)\
23 reyssat 14
\
15
\
16
\
17
\
18
\
2329 guerimand 19
\
23 reyssat 20
 
21
!next e
10477 guerimand 22
 
23 reyssat 23
!if $update_field>=0
15494 bpr 24
  !if $update_field>0
25
    exo_$exo=!replace line number $update_field by $update_content in $(exo_$exo)
26
  !else
27
    exo_$exo=$update_content
28
  !endif
23 reyssat 29
!endif
30
!writefile wimshome/log/classes/$wims_class/exams/.exam$exam
31
!for e=1 to $ecnt
15494 bpr 32
  !if $e!=$exo or $update_field>=0
33
    ef=!line 1 to 7 of $(exo_$e)
34
    !appendfile wimshome/log/classes/$wims_class/exams/.exam$exam :$ef
35
  !endif
23 reyssat 36
!next e