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