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