Rev 5273 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
3261 | obado | 1 | # Utilise pour verifier l'existence d'une feuille ou d'un examen |
9909 | obado | 2 | # Check.proc verifie que l'element #$n de type $type existe |
3261 | obado | 3 | |
4 | !if $type=$empty |
||
5 | error no type defined in a check request |
||
6 | !exit |
||
7 | !endif |
||
8 | |||
9 | !if $type=exams |
||
10 | type1=exam |
||
11 | q=!translate internal ./,;?* to $ $ in $qexam |
||
12 | !else |
||
13 | type1=sheet |
||
14 | q=!translate internal ./,;?* to $ $ in $qsheet |
||
15 | !endif |
||
16 | |||
17 | #si le parametre $q contient un caractere special, on abandonne |
||
18 | |||
19 | !if $ $ isin $q |
||
20 | q= |
||
21 | !endif |
||
22 | |||
23 | listfile=wimshome/log/classes/$qclass/$type/.$type |
||
24 | |||
25 | #On compte le nombre d'elements de type $qtype de la classe $qclass |
||
26 | cnt=!recordcnt $listfile |
||
27 | |||
28 | #Si l'element $q n'existe pas, on abandonne |
||
29 | !if $q=$empty |
||
5273 | obado | 30 | error=undefined query id for type $type1 |
3261 | obado | 31 | !exit |
32 | !else |
||
33 | !if $q>$cnt |
||
4176 | obado | 34 | error=element #$q of type $type1 does not exist in this class ($qclass) |
3261 | obado | 35 | !exit |
36 | !endif |
||
37 | !endif |
||
38 | |||
39 | # L'element existe. on initialise la varible wims_$type1 |
||
40 | wims_$type1=$q |
||
41 | qfile=wimshome/log/classes/$qclass/$type/.$type1$q |
||
42 | qproperties=!record $q of $listfile |
||
43 | |||
44 |