Subversion Repositories wimsdev

Rev

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

Rev Author Line No. Line
23 reyssat 1
# Variable calculations should be done in this file.
2
# It is read and interpreted by wims for all valid calls to the module.
3
 
8138 guerimand 4
!if $class_expiration=$empty
14043 bpr 5
  !defread wimshome/log/classes/$wims_class/.def
23 reyssat 6
!endif
7
!if $class_expiration=$empty
14043 bpr 8
  error=bad_class
9
  !exit
23 reyssat 10
!endif
11
 
8138 guerimand 12
!! ----------- analyse d'une demande de modification du jour de démarrage de la période d'affichage
17318 guerimand 13
jdate=!text select char 0123456789 in $jdate
14
jdate2=!text select char 0123456789 in $jdate2
17299 guerimand 15
jyear=!char 1 to 4 of $jdate
17318 guerimand 16
jmonth=!char 5 to 6 of $jdate
17
jday=!char 7 to 8 of $jdate
17299 guerimand 18
jyear2=!char 1 to 4 of $jdate2
17318 guerimand 19
jmonth2=!char 5 to 6 of $jdate2
20
jday2=!char 7 to 8 of $jdate2
14300 guerimand 21
 
8138 guerimand 22
!if $jday!=$empty and $jyear!=$empty and $jyear!=$empty
14043 bpr 23
  jmonth=!char 2,3 of $[abs(floor($jmonth))+100]
24
  !if $[$jday]=0
25
    tst=1
26
    jday=01
27
  !else
28
    tst=0
29
    jday=!char 2,3 of $[abs(floor($jday))+100]
30
  !endif
31
  jyear=!char -4 to -1 of $[abs(floor($jyear))+100000]
32
  !if $jday>=1 and $jday<=31 and $jmonth>=1 and $jmonth<=12 and NaN notin $jmonth$jday$jyear
33
    jour_begin=$jyear$jmonth$jday
34
    jour_end=$jour_begin
35
  !else
36
    error=day_dontexist
37
    job=home
38
    !exit
39
  !endif
23 reyssat 40
!endif
41
 
8138 guerimand 42
!if $jmonth2!=$empty and $jday2!=$empty and $jyear2!=$empty
14043 bpr 43
  jmonth2=$[$jmonth2]
44
  !bound jmonth2 within 1,2,3,4,5,6,7,8,9,10,11,12 default $jmonth
45
  jmonth2=!char 2,3 of $[abs(floor($jmonth2))+100]
46
  jday2=!char 2,3 of $[abs(floor($jday2))+100]
47
  !if $tst=1 and $[$jday2]=0
48
    jday2=31
49
  !endif
50
  jyear2=!char -4 to -1 of $[abs(floor($jyear2))+100000]
51
  !if $[$jyear2]=0
52
    jyear2=$jyear
53
  !endif
54
  !if $jday2>=1 and $jday2<=31 and $jmonth2>=1 and $jmonth2<=12 and N notin $jmonth2$jday2$jyear2 and $jyear2$jmonth2$jday2>=$jour_begin
55
    jour_end=$jyear2$jmonth2$jday2
56
  !endif
23 reyssat 57
!endif
58
 
59
!if $cdt_supervise!=yes
14043 bpr 60
  class_parent=!text select 0123456789/ in $class_parent
61
  courses=!words2lines $ltcourses
23 reyssat 62
!endif
3483 guerimand 63
!readproc proc/mkindex.proc
23 reyssat 64
list=!mexec proc/mk$job.sh
65
nbligne=!linecnt $list