Subversion Repositories wimsdev

Rev

Rev 14384 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1215 obado 1
# procedure de listing (utilisee par listsheets et listexams)
2
# pre-requis : $list_type doit etre specifie (exam ou sheet)
3
 
4
!if $error!=$empty
14384 obado 5
  !exit
1215 obado 6
!endif
7
 
8
!if $list_type=$empty
14271 obado 9
  error=error in listing.proc
10
  !exit
1215 obado 11
!endif
12
 
13
!if $list_type=sheets
12957 obado 14
  titleline=3
15
!else
16
  titleline=4
1215 obado 17
!endif
18
 
19
listfile=wimshome/log/classes/$qclass/$list_type/.$list_type
20
cnt=!recordcnt $listfile
21
 
22
list=$empty
23
titles=$empty
14384 obado 24
expirations=$empty
1215 obado 25
nb_hidden=0
26
 
27
!for i=1 to $cnt
14271 obado 28
  current=!record $i of $listfile
1215 obado 29
 
14271 obado 30
  status=!line 1 of $current
31
  !if $status=3
32
    !advance nb_hidden
33
  !endif
34
  title=!line $titleline of $current
16336 obado 35
  title=!replace : by ⁚ in $title
14384 obado 36
  expire=!line 2 of $current
37
  expirations=!append item $expire to $expirations
14271 obado 38
  !if $list=$empty
39
    list=$i
40
    titles=$i:$title:$status
41
  !else
42
    list=$list,$i
43
    titles=$titles$separator$i:$title:$status
44
  !endif
1215 obado 45
!next i