Rev 12459 | Rev 13052 | 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 | |
11228 | guerimand | 8 | propall=secure,colors,css,logo,theme,theme_icon,level,security,supass,exolog,ent,oefdefault |
23 | reyssat | 9 | propagate=!listintersect $propagate and $propall |
10 | |||
11 | !if $propagate=$empty or $confirm=$empty |
||
12411 | bpr | 12 | !exit |
23 | reyssat | 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 |
||
12411 | bpr | 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 |
||
23 | reyssat | 21 | !endif |
22 | !if $subclasses=$empty and $courses=$empty |
||
12411 | bpr | 23 | !exit |
23 | reyssat | 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 |
||
12411 | bpr | 31 | propag=!listcomplement security in $propag |
32 | security=!record 0 of wimshome/log/classes/$wims_class/.security |
||
33 | propag_security=yes |
||
23 | reyssat | 34 | !else |
12411 | bpr | 35 | propag_security=no |
23 | reyssat | 36 | !endif |
37 | |||
38 | !if supass isitemof $propag |
||
12411 | bpr | 39 | propag=!listcomplement supass in $propag |
40 | supass=!defof user_password in wimshome/log/classes/$wims_class/supervisor |
||
41 | propag_supass=yes |
||
23 | reyssat | 42 | !else |
12411 | bpr | 43 | propag_supass=no |
23 | reyssat | 44 | !endif |
45 | |||
11228 | guerimand | 46 | !if oefdefault isitemof $propag |
12411 | bpr | 47 | propag=!listcomplement oefdefault in $propag |
48 | propag_oefdefault=yes |
||
11228 | guerimand | 49 | !else |
12411 | bpr | 50 | propag_oefdefault=no |
11228 | guerimand | 51 | !endif |
52 | |||
12411 | bpr | 53 | |
23 | reyssat | 54 | !defread wimshome/log/classes/$wims_class/.def |
55 | setup= |
||
10682 | bpr | 56 | |
23 | reyssat | 57 | !for s in $propag |
12411 | bpr | 58 | setup=!append line !set class_$s=$(class_$s) to $setup |
23 | reyssat | 59 | !next s |
60 | |||
61 | subclasses=!words2items $subclasses |
||
62 | subclasses=!makelist $wims_class/x for x in $subclasses |
||
63 | !if $courses!=$empty |
||
12411 | bpr | 64 | subclasses=!append item $courses to $subclasses |
23 | reyssat | 65 | !endif |
66 | css=!record 0 of wimshome/log/classes/$wims_class/css |
||
67 | !for s in $subclasses |
||
12411 | bpr | 68 | test=!defof class_defined in wimshome/log/classes/$s/.def |
69 | !if $test=yes |
||
70 | !setdef $setup in wimshome/log/classes/$s/.def |
||
71 | !if css isitemof $propagate |
||
72 | !writefile wimshome/log/classes/$s/css $css |
||
73 | !endif |
||
74 | !if $propag_security=yes |
||
75 | !writefile wimshome/log/classes/$s/.security $security |
||
76 | !endif |
||
77 | !if $propag_supass=yes |
||
78 | !setdef !set user_password=$supass in wimshome/log/classes/$s/supervisor |
||
79 | !endif |
||
80 | !if $propag_oefdefault=yes |
||
81 | !setdef !set user_qnum=$wims_oefdefault_qnum\ |
||
11228 | guerimand | 82 | !set user_qcmlevel=$wims_oefdefault_qcmlevel\ |
83 | !set user_scoredelay=$wims_oefdefault_scoredelay\ |
||
84 | !set user_qcmpresent=$wims_oefdefault_qcmpresent\ |
||
12460 | bpr | 85 | !set user_givefeed=$wims_oefdefault_feed\ |
11228 | guerimand | 86 | !set user_check=$wims_oefdefault_check_\ |
12460 | bpr | 87 | !set user_givegood=$wims_oefdefault_good\ |
88 | !set user_givehint=$wims_oefdefault_hint\ |
||
11228 | guerimand | 89 | !set user_sepow=$wims_oefdefault_sepow\ |
90 | !set user_expow=$wims_oefdefault_expow\ |
||
91 | !set user_precw=$wims_oefdefault_precw\ |
||
92 | in wimshome/log/classes/$s/supervisor |
||
12411 | bpr | 93 | !endif |
11228 | guerimand | 94 | !endif |
23 | reyssat | 95 | !next s |
96 | |||
10981 | bpr | 97 | !exit |
98 | rajouter qui se trouve dans le fichier supervisor |
||
99 | !setdef !set user_qnum=$nw_qnum\ |
||
100 | !set user_qcmlevel=$nw_qcmlevel\ |
||
101 | !set user_scoredelay=$nw_scoredelay\ |
||
102 | !set user_qcmpresent=$nw_qcmpresent\ |
||
12460 | bpr | 103 | !set user_givefeed=$nw_givefeed\ |
10981 | bpr | 104 | !set user_check=$nw_check_\ |
12460 | bpr | 105 | !set user_givegood=$nw_givegood\ |
106 | !set user_givehint=$nw_givehint\ |
||
10981 | bpr | 107 | !set user_sepow=$nw_sepow\ |
108 | !set user_expow=$nw_expow\ |
||
109 | !set user_precw=$nw_precw\ |
||
110 | in wimshome/log/classes/$wims_class/supervisor |