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