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