Subversion Repositories wimsdev

Rev

Rev 2329 | 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
10477 guerimand 22
 
23 reyssat 23
!if $update_field>=0
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
29
!endif
30
!writefile wimshome/log/classes/$wims_class/exams/.exam$exam
31
!for e=1 to $ecnt
32
 !if $e!=$exo or $update_field>=0
2329 guerimand 33
  ef=!line 1 to 7 of $(exo_$e)
23 reyssat 34
  !appendfile wimshome/log/classes/$wims_class/exams/.exam$exam :$ef
35
 !endif
36
!next e
37