Subversion Repositories wimsdev

Rev

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