Rev 16237 | Rev 16406 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
20 | reyssat | 1 | !nocache |
2373 | bpr | 2 | !! useful when one comes from modtool |
3 | !set modu_lang=$lang |
||
15342 | obado | 4 | !read oef/$modu_lang/names.proc |
2373 | bpr | 5 | !if $lang_exists!=yes |
12456 | bpr | 6 | !let modu_lang=en |
15342 | obado | 7 | !read oef/$modu_lang/names.proc |
2373 | bpr | 8 | !endif |
6677 | bpr | 9 | !set wims_backslash_insmath=yes |
20 | reyssat | 10 | !set proc=oef |
11 | !if robot isin $session |
||
12456 | bpr | 12 | !changeto content.html |
20 | reyssat | 13 | !endif |
9177 | bpr | 14 | !read oef/default |
9168 | bpr | 15 | |
16 | !!!#### contributions |
||
9162 | bpr | 17 | !! very tricky ... |
18 | !reset authorlist |
||
19 | !set dictionary=$module_dir/$(class_header)Exauthors |
||
20 | !set translator_unknown=delete |
||
21 | !set exolist_cnt=!itemcnt $exolist |
||
16236 | bpr | 22 | |
12012 | bpr | 23 | !for ex = 1 to $exolist_cnt |
16238 | bpr | 24 | !if - notin $(exolist[$ex]) and . notin $(exolist[$ex]) |
12456 | bpr | 25 | !set tmp=!exec translator $(exolist[$ex]) |
26 | !set tmp=!replace internal , by $ $ in $tmp |
||
27 | !set tmp=!singlespace $tmp |
||
28 | !set authorlist=!append item $tmp to $authorlist |
||
9162 | bpr | 29 | !endif |
10883 | obado | 30 | !next ex |
9162 | bpr | 31 | !set authorlist=!replace internal $translator_unknown by in $authorlist |
32 | !set authorlist=!replace internal ; by , in $authorlist |
||
33 | !if $authorlist!= and $authorlist notsametext $exolist |
||
34 | !set authorlist=!listuniq $authorlist |
||
35 | !set tmp=!items2words $module_author |
||
12012 | bpr | 36 | !set tmp=!replace internal ; by ,$ in $tmp |
9162 | bpr | 37 | !set tmp=!singlespace $tmp |
38 | !set authorlist=!singlespace $authorlist |
||
39 | !!set authorlist1=!listcomplement $tmp in $authorlist |
||
40 | !set authorlist1=$authorlist |
||
41 | !set authorlist_cnt=!itemcnt $authorlist1 |
||
42 | !set authorlist=!replace internal , by ,$ $ in $authorlist |
||
43 | !if $authorlist_cnt > 0 |
||
12343 | bpr | 44 | <div class="wims_contribute">$name_Contribute $authorlist.</div> |
9162 | bpr | 45 | !endif |
46 | !endif |
||
10883 | obado | 47 | |
15428 | bpr | 48 | !if $related_modules!=no |
49 | !if $keyw=$empty |
||
50 | !set keyw=!getdef keywords in INDEX |
||
16018 | bpr | 51 | !set keyw=!nonempty items $keyw |
15428 | bpr | 52 | !endif |
15429 | bpr | 53 | !set level=!getdef level in INDEX |
54 | !set level=!makelist level x for x in $level |
||
55 | !set level=!nospace $level |
||
56 | !set level=!lowercase $level |
||
57 | !set keywlevel=$keyw;$level |
||
58 | |||
15428 | bpr | 59 | <div class="wims_smallremark"> |
15429 | bpr | 60 | !read related.phtml $keywlevel |
15428 | bpr | 61 | </div> |
62 | !endif |
||
63 | |||
2072 | bpr | 64 | !set test_data=!replace internal data/ by in $module_data |
65 | !set test_data=!defof title in datamodule/$test_data/INDEX |
||
66 | !if $test_data= and $module_data!= |
||
12456 | bpr | 67 | <p class="name_datamodule"> |
68 | <i>$name_datamodule</i> |
||
69 | </p> |
||
2072 | bpr | 70 | !endif |
6869 | bpr | 71 | <hr style="width:35%" /> |
1664 | bpr | 72 | |
73 | !if robot isin $session |
||
12456 | bpr | 74 | !changeto content.html |
1664 | bpr | 75 | !endif |
76 | |||
13753 | bpr | 77 | !! When we come back to Intro after an exo, $special_parm3 contains the last params used. |
2072 | bpr | 78 | !if $special_parm3!=$empty |
12343 | bpr | 79 | !let tmp=!replace internal ; by $ $ in $special_parm3 |
12459 | bpr | 80 | !!!should use the script getparm |
13697 | obado | 81 | |
82 | !! replace line breaks temporary |
||
83 | !set testw=!replace internal $\ |
||
84 | $ by %0A in $special_parm3 |
||
12343 | bpr | 85 | !set testw=!replace internal ; by $\ |
13697 | obado | 86 | $ in $testw |
12343 | bpr | 87 | !set testw=!replace internal = by , in $testw |
12460 | bpr | 88 | !for cle in exo,qnum,qcmlevel,scoredelay,intro_qcmpresent,intro_sol,intro_feed,\ |
16145 | bpr | 89 | intro_check,intro_good,intro_hint,intro_sepow,intro_expow,intro_calc,random,confparm1,confparm2,confparm3,\ |
12213 | bpr | 90 | confparm4,confparm5,confparm6,confparm7,confparm8,intro_expert,seedrepeat,exotrymax |
12343 | bpr | 91 | !set testw0=!select $testw where column 1=$cle |
92 | !set get_$cle=$(testw0[;2..-1]) |
||
93 | !set get_$cle=!singlespace $(get_$cle) |
||
94 | !set get_$cle=!words2items $(get_$cle) |
||
95 | !set get_$cle=!listuniq $(get_$(cle)) |
||
13697 | obado | 96 | !! recover line breaks |
97 | !set get_$cle=!replace internal %0A by $\ |
||
98 | $ in $(get_$(cle)) |
||
99 | |||
12343 | bpr | 100 | !default $(cle)=$(get_$cle) |
101 | !next cle |
||
102 | !if $scoredelay=0 |
||
103 | !reset scoredelay |
||
104 | !endif |
||
105 | !if $exo=0 |
||
106 | !reset exo |
||
107 | !endif |
||
108 | !if yes isin $intro_expert |
||
109 | !let special_parm2=!append word expert to $special_parm4 |
||
110 | !endif |
||
2072 | bpr | 111 | !endif |
112 | |||
9059 | guerimand | 113 | !if $wims_class!=$empty and $wims_user=supervisor and ($special_parm3=$empty or intro_expert isin $special_parm3) |
12343 | bpr | 114 | !default qnum=$wims_oefdefault_qnum |
115 | !default qcmlevel=$wims_oefdefault_qcmlevel |
||
116 | !default scoredelay=$wims_oefdefault_scoredelay |
||
117 | !default intro_qcmpresent=$wims_oefdefault_qcmpresent |
||
12460 | bpr | 118 | !default intro_sol=$wims_oefdefault_sol |
119 | !default intro_feed=$wims_oefdefault_feed |
||
12343 | bpr | 120 | !default intro_check=$wims_oefdefault_check |
12460 | bpr | 121 | !default intro_good=$wims_oefdefault_good |
122 | !default intro_hint=$wims_oefdefault_hint |
||
12343 | bpr | 123 | !default intro_sepow=$wims_oefdefault_sepow |
124 | !default intro_expow=$wims_oefdefault_expow |
||
125 | !default intro_precw=$wims_oefdefault_precw |
||
16145 | bpr | 126 | !!$wims_oefdefault_precw |
12343 | bpr | 127 | !default seedrepeat=$wims_oefdefault_seedrepeat |
128 | !default exotrymax=$wims_oefdefault_exotrymax |
||
129 | !let special_parm2=$special_parm |
||
12460 | bpr | 130 | !if ($special_parm3=$empty or intro_expert=yes isin $special_parm3) and ($wims_oefdefault_qcmpresent$wims_oefdefault_sol$wims_oefdefault_feed$wims_oefdefault_good$wims_oefdefault_hint$wims_oefdefault_sepow$wims_oefdefault_expow$wims_oefdefault_precw$wims_oefdefault_seedrepeat!=$empty) |
9059 | guerimand | 131 | !let expert_option=yes |
12343 | bpr | 132 | !else |
9059 | guerimand | 133 | !let expert_option=no |
12343 | bpr | 134 | !endif |
1664 | bpr | 135 | !endif |
2072 | bpr | 136 | !reset special_parm3 |
1664 | bpr | 137 | |
138 | !if ////classes/ isin ////$module |
||
12343 | bpr | 139 | !set class_header=wimshome/log/classes/$wims_class/ |
1664 | bpr | 140 | !endif |
141 | |||
142 | !read $(class_header)Exindex |
||
143 | !set exocnt=!itemcnt $exolist |
||
9238 | bpr | 144 | !set qcnt=$[min($exocnt,15)] |
5081 | bpr | 145 | !if $wims_user=supervisor and #classes/ isin #$module |
1664 | bpr | 146 | !set wims_menu_items=!append line add_exo,1,module=adm/createxo\ |
12343 | bpr | 147 | to $wims_menu_items |
148 | !if $exocnt<1 |
||
149 | !exit |
||
150 | !endif |
||
5081 | bpr | 151 | !else |
12343 | bpr | 152 | !if $exocnt<1 |
5081 | bpr | 153 | $name_noexercise |
154 | !exit |
||
12343 | bpr | 155 | !endif |
1664 | bpr | 156 | !endif |
4323 | bpr | 157 | |
7354 | bpr | 158 | !if $lang notsametext $module_language and $(titlelist_$lang) notsametext |
12343 | bpr | 159 | !set titlelist=$(titlelist_$lang) |
4323 | bpr | 160 | !endif |
161 | |||
10680 | bpr | 162 | !!if $exocnt=1 |
163 | !! $name_oneexercise, <span class="bold"> |
||
164 | !! !item 1 of $titlelist |
||
165 | !! </span>. |
||
166 | !! !else |
||
167 | !! !if $wims_user=supervisor |
||
168 | !! <div class="formHelp"> |
||
169 | !! $name_remarkallexo |
||
170 | !! </div> |
||
171 | !! !endif |
||
172 | !!!endif |
||
1664 | bpr | 173 | |
174 | !form new |
||
6869 | bpr | 175 | <input type="hidden" name="module" value="$module" /> |
4795 | obado | 176 | <div id="oef_intro_params"> |
10883 | obado | 177 | <h2 class="legend oef_name_menu">$name_menu</h2> |
178 | <div class="formHelp">$name_remarkintro1</div> |
||
9180 | bpr | 179 | |
10895 | obado | 180 | <fieldset class="property_fields blockcenter" id="general_parms"> |
10883 | obado | 181 | <legend>$name_general_parms</legend> |
12343 | bpr | 182 | !if $oefintro_custom_select=$empty |
10895 | obado | 183 | <div class="field"> |
12343 | bpr | 184 | !if $exocnt>1 |
185 | !set special_parm=!trim $special_parm |
||
186 | !if select iswordof $special_parm2 and $special_parm notsametext $empty |
||
12493 | lemaire | 187 | <label for="exo">$name_chooseexo$name_exercisescontaining</label> «<em style="color:blue">$special_parm</em> » : |
12343 | bpr | 188 | !endif |
189 | !endif |
||
190 | !read oef/select.phtml |
||
10895 | obado | 191 | </div> |
192 | |||
12343 | bpr | 193 | !if * isin $titlelist |
13495 | obado | 194 | <p>$name_remarkintro2</p> |
12343 | bpr | 195 | !endif |
196 | !else |
||
197 | !read $oefintro_custom_select |
||
198 | !endif |
||
10883 | obado | 199 | </fieldset> |
200 | |||
12456 | bpr | 201 | !!test if there is an introhook |
12343 | bpr | 202 | !if _classes/ isin _$module |
203 | !set introhook_exists=no |
||
204 | !else |
||
205 | !readproc introhook.phtml |
||
206 | !if $introhook_exists=$empty |
||
207 | !set tmp=!record 0 of introhook.phtml |
||
208 | !if $tmp=$empty |
||
12456 | bpr | 209 | !!! only comment in the file introhook.phtml |
12343 | bpr | 210 | !set introhook_exists=no |
211 | !reset tmp |
||
12262 | bpr | 212 | !endif |
10895 | obado | 213 | !endif |
12343 | bpr | 214 | !endif |
215 | !if $introhook_exists!=no |
||
216 | <fieldset class="introhook property_fields blockcenter"> |
||
217 | <legend>$name_module_setup</legend> |
||
218 | !if $introhook_tableless=yes |
||
219 | !read introhook.phtml |
||
220 | !else |
||
221 | <table> |
||
222 | !read introhook.phtml |
||
223 | </table> |
||
4795 | obado | 224 | !endif |
12343 | bpr | 225 | </fieldset> |
226 | !endif |
||
9162 | bpr | 227 | |
12343 | bpr | 228 | !if $oefintro_custom_series_setup=$empty |
229 | !read oef/intromenu_series.phtml |
||
230 | !endif |
||
10883 | obado | 231 | |
12343 | bpr | 232 | !set wims_ref_class=wims_button |
233 | !set trimmed_parm2=!trim $special_parm2 |
||
234 | !set trimmed_parm3=!trim $special_parm3 |
||
10895 | obado | 235 | |
12343 | bpr | 236 | !if expert notwordof $trimmed_parm2 and yes notin $expert_option |
237 | <p class="oef_intro_buttons" id="score_setup"> |
||
12456 | bpr | 238 | !set trimmed_parm2=$trimmed_parm2 expert |
239 | !set trimmed_parm3=!replace internal intro_expert=no by $ in $trimmed_parm3 |
||
240 | !set trimmed_parm3=$trimmed_parm3 intro_expert=yes |
||
241 | !href module=$module&special_parm=$special_parm&special_parm2=$trimmed_parm2&special_parm3=$trimmed_parm3&special_parm4=$special_parm4#general_parms $name_expertmenu |
||
12343 | bpr | 242 | </p> |
13041 | bpr | 243 | !read oef/intromenu_nonexpert.phtml |
12343 | bpr | 244 | !else |
245 | <p class="oef_intro_buttons" id="score_setup"> |
||
246 | !set trimmed_parm2=!replace word expert by $ in $trimmed_parm2 |
||
247 | !set trimmed_parm3=!replace internal intro_expert=yes by $ in $trimmed_parm3 |
||
248 | !set trimmed_parm3=$trimmed_parm3 intro_expert=no |
||
249 | !href module=$module&special_parm=$special_parm&special_parm2=$trimmed_parm2&special_parm3=$trimmed_parm3&special_parm4=$special_parm4#general_parms $name_simplifiedmenu_back |
||
250 | </p> |
||
13041 | bpr | 251 | !read oef/intromenu_expert.phtml |
12343 | bpr | 252 | !endif |
9161 | bpr | 253 | </div> |
10883 | obado | 254 | |
12164 | obado | 255 | <div class="oef_intro_buttons spacer" id="oef_intro_launch"> |
12163 | obado | 256 | <button type="submit" class="wims_button icon_button"> |
257 | <span class="work">$wims_name_work</span> |
||
258 | </button> |
||
259 | <button type="submit" class="wims_button wims_secondary_button icon_button" name="print" id="print" value="yes"> |
||
260 | <span class="printable">$name_print</span> |
||
261 | </button> |
||
262 | <input type="hidden" name="special_parm2" value="$special_parm2" /> |
||
263 | <input type="hidden" name="special_parm4" value="$special_parm4" /> |
||
4795 | obado | 264 | </div> |
12163 | obado | 265 | |
5928 | bpr | 266 | !formend |
267 | |||
1664 | bpr | 268 | !if $exocnt>10 |
10895 | obado | 269 | !form intro |
270 | <input type="hidden" name="special_parm2" value="select $special_parm2" /> |
||
271 | <input type="hidden" name="special_parm3" value="$special_parm3" /> |
||
272 | <input type="hidden" name="special_parm4" value="$special_parm4" /> |
||
273 | <input type="hidden" name="module" value="$module" /> |
||
11665 | bpr | 274 | <label for="special_parm">$name_select</label> |
275 | <input size="12" maxlength="12" name="special_parm" value="$special_parm" id="special_parm" /> |
||
10895 | obado | 276 | <input type="submit" value="$wims_name_send" /> |
277 | !formend |
||
1664 | bpr | 278 | !endif |
279 | |||
9162 | bpr | 280 | !if expert iswordof $special_parm2 or yes isin $expert_option |
10895 | obado | 281 | <div class="formHelp"> |
12343 | bpr | 282 | $name_remarkseverity |
283 | !read oef/helpseverity |
||
284 | !read oef/helppenality |
||
10895 | obado | 285 | </div> |
4810 | bpr | 286 | !endif |
9174 | guerimand | 287 | !if $wims_class!=$empty and $wims_user=supervisor and (../devel/ notin ../$module or $wims_devel_modules iswordof open) |
12343 | bpr | 288 | !set wims_menu_items=!append line addallexo,1,module=adm/class/addmodule&job=addallexo&dir=$module&scoring=$module_scoring\ |
8817 | guerimand | 289 | ,0, to $wims_menu_items |
9099 | bpr | 290 | !endif |