Subversion Repositories wimsdev

Rev

Rev 10477 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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