Rev 4176 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
# Utilise pour verifier l'existence d'une feuille ou d'un examen
# Check.proc verifie que l'element #$n de type $type existe
#Pour commencer, on verifie la classe
!read scripts/check.class
!if $error!=$empty
!exit
!endif
!if $type=$empty
error no type defined in a check request
!exit
!endif
!if $type=exams
type1=exam
q=!translate internal ./,;?* to $ $ in $qexam
!else
type1=sheet
q=!translate internal ./,;?* to $ $ in $qsheet
!endif
#si le parametre $q contient un caractere special, on abandonne
!if $ $ isin $q
q=
!endif
listfile=wimshome/log/classes/$qclass/$type/.$type
#On compte le nombre d'elements de type $qtype de la classe $qclass
cnt=!recordcnt $listfile
#Si l'element $q n'existe pas, on abandonne
!if $q=$empty
error=undefined query for type $type1
!exit
!else
!if $q>$cnt
error=element of type $type1 #$q does not exist in class #$qclass
!exit
!endif
!endif
# L'element existe. on initialise la varible wims_$type1
wims_$type1=$q
qfile=wimshome/log/classes/$qclass/$type/.$type1$q
qproperties=!record $q of $listfile