Rev 12460 | Rev 13077 | 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 | |
13052 | bpr | 8 | propall=secure,colors,css,logo,theme,theme_icon,level,security,supass,\ |
9 | exolog,ent,oefdefault,sendmailteacher |
||
23 | reyssat | 10 | propagate=!listintersect $propagate and $propall |
11 | |||
12 | !if $propagate=$empty or $confirm=$empty |
||
12411 | bpr | 13 | !exit |
23 | reyssat | 14 | !endif |
15 | subclasses=!sh cd $wims_home/log/classes/$wims_class\ |
||
16 | find . -type d -name '[0-9]*' |
||
17 | !if $class_typename=program and $class_superclass!=$empty |
||
12411 | bpr | 18 | courses=!sh cd $wims_home/log/classes/$wims_class\ |
19 | cat courses icourses 2>/dev/null | cut -d, -f1 | grep . |
||
20 | courses=!words2items $courses |
||
21 | courses=!makelist $class_superclass/x for x in $courses |
||
23 | reyssat | 22 | !endif |
23 | !if $subclasses=$empty and $courses=$empty |
||
12411 | bpr | 24 | !exit |
23 | reyssat | 25 | !endif |
26 | |||
13052 | bpr | 27 | propag=!replace item colors by bgcolor,bgimg,refcolor,ref_menucolor,\ |
28 | ref_button_help_color,ref_button_help_bgcolor,ref_button_color,ref_button_bgcolor \ |
||
29 | in $propagate |
||
23 | reyssat | 30 | propag=!replace item logo by logo,logoside in $propag |
31 | propag=!replace item exolog by exolog,examlog in $propag |
||
32 | |||
33 | !if security isitemof $propag |
||
12411 | bpr | 34 | propag=!listcomplement security in $propag |
35 | security=!record 0 of wimshome/log/classes/$wims_class/.security |
||
36 | propag_security=yes |
||
23 | reyssat | 37 | !else |
12411 | bpr | 38 | propag_security=no |
23 | reyssat | 39 | !endif |
40 | |||
41 | !if supass isitemof $propag |
||
12411 | bpr | 42 | propag=!listcomplement supass in $propag |
43 | supass=!defof user_password in wimshome/log/classes/$wims_class/supervisor |
||
44 | propag_supass=yes |
||
23 | reyssat | 45 | !else |
12411 | bpr | 46 | propag_supass=no |
23 | reyssat | 47 | !endif |
48 | |||
11228 | guerimand | 49 | !if oefdefault isitemof $propag |
12411 | bpr | 50 | propag=!listcomplement oefdefault in $propag |
51 | propag_oefdefault=yes |
||
11228 | guerimand | 52 | !else |
12411 | bpr | 53 | propag_oefdefault=no |
11228 | guerimand | 54 | !endif |
55 | |||
12411 | bpr | 56 | |
23 | reyssat | 57 | !defread wimshome/log/classes/$wims_class/.def |
58 | setup= |
||
10682 | bpr | 59 | |
23 | reyssat | 60 | !for s in $propag |
12411 | bpr | 61 | setup=!append line !set class_$s=$(class_$s) to $setup |
23 | reyssat | 62 | !next s |
63 | |||
64 | subclasses=!words2items $subclasses |
||
65 | subclasses=!makelist $wims_class/x for x in $subclasses |
||
66 | !if $courses!=$empty |
||
12411 | bpr | 67 | subclasses=!append item $courses to $subclasses |
23 | reyssat | 68 | !endif |
69 | css=!record 0 of wimshome/log/classes/$wims_class/css |
||
70 | !for s in $subclasses |
||
12411 | bpr | 71 | test=!defof class_defined in wimshome/log/classes/$s/.def |
72 | !if $test=yes |
||
73 | !setdef $setup in wimshome/log/classes/$s/.def |
||
74 | !if css isitemof $propagate |
||
75 | !writefile wimshome/log/classes/$s/css $css |
||
76 | !endif |
||
77 | !if $propag_security=yes |
||
78 | !writefile wimshome/log/classes/$s/.security $security |
||
79 | !endif |
||
80 | !if $propag_supass=yes |
||
81 | !setdef !set user_password=$supass in wimshome/log/classes/$s/supervisor |
||
82 | !endif |
||
83 | !if $propag_oefdefault=yes |
||
84 | !setdef !set user_qnum=$wims_oefdefault_qnum\ |
||
11228 | guerimand | 85 | !set user_qcmlevel=$wims_oefdefault_qcmlevel\ |
86 | !set user_scoredelay=$wims_oefdefault_scoredelay\ |
||
87 | !set user_qcmpresent=$wims_oefdefault_qcmpresent\ |
||
12460 | bpr | 88 | !set user_givefeed=$wims_oefdefault_feed\ |
11228 | guerimand | 89 | !set user_check=$wims_oefdefault_check_\ |
12460 | bpr | 90 | !set user_givegood=$wims_oefdefault_good\ |
91 | !set user_givehint=$wims_oefdefault_hint\ |
||
11228 | guerimand | 92 | !set user_sepow=$wims_oefdefault_sepow\ |
93 | !set user_expow=$wims_oefdefault_expow\ |
||
94 | !set user_precw=$wims_oefdefault_precw\ |
||
95 | in wimshome/log/classes/$s/supervisor |
||
12411 | bpr | 96 | !endif |
11228 | guerimand | 97 | !endif |
23 | reyssat | 98 | !next s |
99 | |||
10981 | bpr | 100 | !exit |
101 | rajouter qui se trouve dans le fichier supervisor |
||
102 | !setdef !set user_qnum=$nw_qnum\ |
||
103 | !set user_qcmlevel=$nw_qcmlevel\ |
||
104 | !set user_scoredelay=$nw_scoredelay\ |
||
105 | !set user_qcmpresent=$nw_qcmpresent\ |
||
12460 | bpr | 106 | !set user_givefeed=$nw_givefeed\ |
10981 | bpr | 107 | !set user_check=$nw_check_\ |
12460 | bpr | 108 | !set user_givegood=$nw_givegood\ |
109 | !set user_givehint=$nw_givehint\ |
||
10981 | bpr | 110 | !set user_sepow=$nw_sepow\ |
111 | !set user_expow=$nw_expow\ |
||
112 | !set user_precw=$nw_precw\ |
||
113 | in wimshome/log/classes/$wims_class/supervisor |