Subversion Repositories wimsdev

Rev

Rev 4589 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4561 obado 1
# GetExam
2
# Fournit les informations de l'examen qexam
3
 
4
 
5
#Pour commencer, on verifie la classe
6
!read scripts/check.class
7
!if $error!=$empty
8
 !exit
9
!endif
10
 
11
#puis on verifie l'exam qexam
3261 obado 12
type=exams
13
!read scripts/check.proc
14
!if $error!=$empty
15
 !exit
16
!endif
17
 
18
exocnt=!recordcnt $qfile
19
exam_properties=!lines2items $qproperties\
20
 
3996 obado 21
 
3261 obado 22
opening_file=$wims_home/log/classes/$qclass/.E$qexam
23
exam_opening=!sh cat $opening_file
24
exam_properties=$exam_opening,$exam_properties,
25
 
3996 obado 26
exam_status = !line 1 of $qproperties
27
exam_expiration = !line 2 of $qproperties
28
line3 = !line 3 of $qproperties
29
exam_duration= !word 1 of $line3
30
exam_attempts = !word 2 of $line3
31
exam_title = !line 4 of $qproperties
32
exam_description = !line 5 of $qproperties
33
exam_cut_hours = !line 6 of $qproperties
3261 obado 34
 
35
########################
36
#FORMAT OF exam_properties :
37
#exam_properties=opening,status,expiration,Duration & Attempts,Title,Description,cut hours
38
#######################
39
#FORMAT of an EXO in an EXAM :
40
#:WEIGHT
41
#IDSCHEET.IDEXO, IDSCHEET.IDEXO, IDSCHEET.IDEXO, ...
42
#TITLE_EXO
43
#DEPENDENCES
44
#autogen
45
 
46
!for i=1 to $exocnt
47
 exo=!record $i of $qfile
48
 exo_weight=!line 1 of $exo
49
 exo_ids=!line 2 of $exo
50
 exo_title=!line 3 of $exo
51
 exo_dependences=!line 4 of $exo
52
 exo_autogen=!line 5 of $exo
11095 obado 53
 
3261 obado 54
 !if $exolist!=$empty
55
  exolist=$exolist,$i
56
  exotitlelist=$exotitlelist$separator$i:$exo_title
11095 obado 57
 !else
3261 obado 58
  exolist=$i
59
  exotitlelist=$i:$exo_title
60
 !endif
61
!next i
62
 
4589 obado 63
#on ajoute "duration" et "attempts" de mani¸re sˇparˇe
64
examdefs=$examdefs,duration,attempts
3261 obado 65
option=!listintersect $option and $examdefs
66
!if $option=$empty
67
 option=$examdefs
68
!endif