Rev 10682 | Rev 11228 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
23 | reyssat | 1 | !if $class_type notwordof 2 3 4 |
2 | error=bad_context |
||
3 | !exit |
||
4 | !endif |
||
10682 | bpr | 5 | !!FIXME propagation for class password should not be done |
6 | !! allows inscription of teachers in portal and of participants in classes |
||
23 | reyssat | 7 | |
10682 | bpr | 8 | propall=secure,colors,css,logo,theme,theme_icon,level,security,supass,exolog,ent |
23 | reyssat | 9 | propagate=!listintersect $propagate and $propall |
10 | |||
11 | !if $propagate=$empty or $confirm=$empty |
||
12 | !exit |
||
13 | !endif |
||
14 | subclasses=!sh cd $wims_home/log/classes/$wims_class\ |
||
15 | find . -type d -name '[0-9]*' |
||
16 | !if $class_typename=program and $class_superclass!=$empty |
||
17 | courses=!sh cd $wims_home/log/classes/$wims_class\ |
||
18 | cat courses icourses 2>/dev/null | cut -d, -f1 | grep . |
||
19 | courses=!words2items $courses |
||
20 | courses=!makelist $class_superclass/x for x in $courses |
||
21 | !endif |
||
22 | !if $subclasses=$empty and $courses=$empty |
||
23 | !exit |
||
24 | !endif |
||
25 | |||
3064 | bpr | 26 | propag=!replace item colors by bgcolor,bgimg,refcolor,ref_menucolor,ref_button_help_color,ref_button_help_bgcolor,ref_button_color,ref_button_bgcolor in $propagate |
23 | reyssat | 27 | propag=!replace item logo by logo,logoside in $propag |
28 | propag=!replace item exolog by exolog,examlog in $propag |
||
29 | |||
30 | !if security isitemof $propag |
||
31 | propag=!listcomplement security in $propag |
||
32 | security=!record 0 of wimshome/log/classes/$wims_class/.security |
||
33 | propag_security=yes |
||
34 | !else |
||
35 | propag_security=no |
||
36 | !endif |
||
37 | |||
38 | !if supass isitemof $propag |
||
39 | propag=!listcomplement supass in $propag |
||
40 | supass=!defof user_password in wimshome/log/classes/$wims_class/supervisor |
||
41 | propag_supass=yes |
||
42 | !else |
||
43 | propag_supass=no |
||
44 | !endif |
||
45 | |||
46 | !defread wimshome/log/classes/$wims_class/.def |
||
47 | setup= |
||
10682 | bpr | 48 | |
23 | reyssat | 49 | !for s in $propag |
50 | setup=!append line !set class_$s=$(class_$s) to $setup |
||
51 | !next s |
||
52 | |||
53 | subclasses=!words2items $subclasses |
||
54 | subclasses=!makelist $wims_class/x for x in $subclasses |
||
55 | !if $courses!=$empty |
||
56 | subclasses=!append item $courses to $subclasses |
||
57 | !endif |
||
58 | css=!record 0 of wimshome/log/classes/$wims_class/css |
||
59 | !for s in $subclasses |
||
60 | test=!defof class_defined in wimshome/log/classes/$s/.def |
||
61 | !if $test=yes |
||
62 | !setdef $setup in wimshome/log/classes/$s/.def |
||
63 | !if css isitemof $propagate |
||
64 | !writefile wimshome/log/classes/$s/css $css |
||
65 | !endif |
||
66 | !if $propag_security=yes |
||
67 | !writefile wimshome/log/classes/$s/.security $security |
||
68 | !endif |
||
69 | !if $propag_supass=yes |
||
70 | !setdef !set user_password=$supass in wimshome/log/classes/$s/supervisor |
||
71 | !endif |
||
72 | !endif |
||
73 | !next s |
||
74 | |||
10981 | bpr | 75 | !exit |
76 | rajouter qui se trouve dans le fichier supervisor |
||
77 | !setdef !set user_qnum=$nw_qnum\ |
||
78 | !set user_qcmlevel=$nw_qcmlevel\ |
||
79 | !set user_scoredelay=$nw_scoredelay\ |
||
80 | !set user_qcmpresent=$nw_qcmpresent\ |
||
81 | !set user_presentsol=$nw_presentsol\ |
||
82 | !set user_check=$nw_check_\ |
||
83 | !set user_sepow=$nw_sepow\ |
||
84 | !set user_expow=$nw_expow\ |
||
85 | !set user_precw=$nw_precw\ |
||
86 | in wimshome/log/classes/$wims_class/supervisor |