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