Subversion Repositories wimsdev

Rev

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

Rev Author Line No. Line
23 reyssat 1
wims_exolog_limit=40
2
wims_prefix=class user tmp n sharing sharable
3
wims_pfback=$wims_prefix
4
wims_writable=allow except
5
wims_nw=today empty nonew creatdays backdays warn
5403 bpr 6
!!## useful here to be able to read the error msg
5402 bpr 7
!read adm/class/classlang lang/names.phtml
23 reyssat 8
 
9
!if $wims_user!=supervisor and $wims_ismanager<2
12849 bpr 10
  error=not_supervisor
11
  job=
12
  !exit
23 reyssat 13
!endif
14
 
13318 obado 15
!if $wims_class=$empty
16
  error=bad_class
17
  !exit
18
!endif
19
 
23 reyssat 20
!read adm/class/config.auth
21
!if $error!=$empty or $jobt=auth
12849 bpr 22
  job=$jobt
23
  !exit
23 reyssat 24
!endif
25
 
5194 guerimand 26
!read adm/levelname.phtml
5403 bpr 27
!!## must be read again because $job could be not defined
28
!read adm/class/classlang lang/names.phtml
23 reyssat 29
wims_helper=chapter=3
10617 guerimand 30
!readproc scripts/votemodel.proc
12849 bpr 31
sharelist=user,doc,exo,sheet,exam,forum,sup,motd,cdt,livret,seq,userphoto,tool
32
!if $votemodel!=yes
33
  sharelist=$sharelist,vote
10617 guerimand 34
!endif
12119 guerimand 35
!if $wims_superclass!=$empty
12849 bpr 36
  sharelist=!listcomplement userphoto in $sharelist
12119 guerimand 37
!endif
23 reyssat 38
nosharelist=user,exo,sheet,exam
39
!read adm/class/limits
40
class_bgcolor=$wims_bgcolor
41
class_bgimg=$wims_bgimg
42
class_theme=$wims_theme
1364 bpr 43
class_theme_icon=$wims_theme_icon
23 reyssat 44
class_css=$wims_css
2524 bpr 45
class_ref_menucolor=$wims_ref_menucolor
3064 bpr 46
class_ref_button_bgcolor=$wims_ref_button_bgcolor
47
class_ref_button_color=$wims_ref_button_color
48
class_ref_button_help_bgcolor=$wims_ref_button_help_bgcolor
49
class_ref_button_help_color=$wims_ref_button_help_color
23 reyssat 50
today=!char 1 to 8 of $wims_now
51
!defread wimshome/log/classes/$wims_class/.def
10705 guerimand 52
joballowlist=list,arch,clean,security,grestrict,log,connect,\
53
    present,access,propagate,index,oefdefault,authtype,connectlink
54
!if $class_type!=2
12411 bpr 55
  joballowlist=$joballowlist,neighbor
10705 guerimand 56
!endif
57
!bound job within $joballowlist default new
10288 bpr 58
du=!record 0 of wimshome/log/classes/$wims_class/.du
59
du=!word 1 of $du
60
du1=!char -3 to -1 of $du
61
du2=!char 1 to -4 of $du
11939 bpr 62
!default du2=0
10288 bpr 63
du=$du2.$du1
23 reyssat 64
!read tabletheme
14349 guerimand 65
jquery_defined=!defof jquery_defined in themes/$wims_theme/header.phtml
23 reyssat 66
 
14349 guerimand 67
 
23 reyssat 68
!if $nonew=$empty
12411 bpr 69
  creation=$class_creation
70
  !bound creation between integer 20010101 and $today default 20010101
71
  lastback=$class_backup
72
  !default lastback=$creation
73
  !bound lastback between integer 20010101 and $today default 20010101
74
  warn=
75
  csec=!date -d '$creation' '+%s'
76
  creatdays=$[floor(($wims_nowseconds-$csec)/(3600*24))]
77
  !if $creatdays>340
78
    warn=$warn creation
79
  !endif
80
  lsec=!date -d '$lastback' '+%s'
81
  backdays=$[floor(($wims_nowseconds-$lsec)/(3600*24))]
82
  !bound backdays between integer 0 and 101
83
  !if $backdays>30
84
    warn=$warn backup
85
  !endif
86
  !if ($backdays>7 or $warn!=$empty) and $job2!=import and $job!=log
87
    !read $job.proc
88
    job=new
89
  !endif
90
  nonew=yes
23 reyssat 91
!endif
92
 
93
wims_module_log=$job $job2 $wims_class
9368 guerimand 94
 
23 reyssat 95
!read $job.proc