Rev 17097 | Rev 17145 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
17070 | guerimand | 1 | !! verification de la classe |
2 | !if $wims_class=$empty |
||
3 | !restart module=home |
||
4 | !endif |
||
5 | |||
6 | !! gestion des autorisations sur les variables (securisation) |
||
17097 | guerimand | 7 | wims_prefix=class user swork |
17070 | guerimand | 8 | |
17097 | guerimand | 9 | !! max user in a class to activate this module (maybe can be change with test) |
17070 | guerimand | 10 | maxuser=50 |
11 | |||
12 | !readproc tabletheme |
||
13 | |||
14 | !! --------- gestion des jobs du module |
||
15 | !if $wims_user=supervisor |
||
17097 | guerimand | 16 | listjob=userlist,config |
17070 | guerimand | 17 | defjob=userlist |
18 | !else |
||
19 | listjob=swork |
||
20 | defjob=swork |
||
21 | !endif |
||
22 | !bound job within $listjob default $defjob |
||
23 | |||
24 | !! ------------- traitement commun à tous les jobs du module |
||
25 | nbuser=!recordcnt wimshome/log/classes/$wims_class/.userlist |
||
26 | !if $nbuser>$maxuser |
||
27 | error=toomanyuser |
||
28 | notallowed=1 |
||
29 | !exit |
||
30 | !endif |
||
31 | |||
32 | !if / isin $wims_class |
||
33 | userclass=$wims_superclass |
||
34 | !else |
||
35 | userclass=$wims_class |
||
36 | !endif |
||
37 | |||
38 | !! ------------ log du module |
||
39 | wims_module_log=$job |
||
40 | |||
41 | !! lecture du fichier de langue |
||
42 | !read adm/language lang/names.phtml |
||
43 | |||
17097 | guerimand | 44 | !! ---- read class configuration file for swork |
45 | !read wimshome/log/classes/$wims_class/swork/.def |
||
46 | !bound swork_refreshtiming between 1 and 1000 default 2 |
||
47 | !bound swork_open within 1,0 default 0 |
||
48 | !bound swork_allowrefresh within 1,0 default 0 |
||
49 | !bound swork_nbexo between 1 and 10 default 5 |
||
17098 | guerimand | 50 | !bound swork_minsore between 0 and 10 default 0 |
51 | nbsheet=!recordcnt wimshome/log/classes/$wims_class/sheets/.sheets |
||
52 | listsh=!values v for v=1 to $nbsheet |
||
53 | swork_excludesh=!listintersection $swork_excludesh and $listsh |
||
17070 | guerimand | 54 | |
17097 | guerimand | 55 | !if $wims_user!=supervisor and $swork_open=0 |
56 | error=notopen |
||
57 | notallowed=1 |
||
58 | !exit |
||
59 | !endif |
||
60 | |||
17098 | guerimand | 61 | |
62 | |||
17097 | guerimand | 63 | severity=!record 0 of wimshome/log/classes/$wims_class/sheets/.severity |
64 | formulas=!record 0 of adm/class/sheetformula |
||
65 | |||
17070 | guerimand | 66 | !! lecture du fichier spécifique du job appelé |
67 | !changeto $job.proc |