Go to most recent revision | Details | 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 |
||
4712 | bpr | 4 | !read oef/$modu_lang/names |
2373 | bpr | 5 | !if $lang_exists!=yes |
12456 | bpr | 6 | !let modu_lang=en |
7 | !read oef/$modu_lang/names |
||
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 |
||
12012 | bpr | 22 | !for ex = 1 to $exolist_cnt |
9162 | bpr | 23 | !if - notin $(exolist[$ex]) |
12456 | bpr | 24 | !set tmp=!exec translator $(exolist[$ex]) |
25 | !set tmp=!replace internal , by $ $ in $tmp |
||
26 | !set tmp=!singlespace $tmp |
||
27 | !set authorlist=!append item $tmp to $authorlist |
||
9162 | bpr | 28 | !endif |
10883 | obado | 29 | !next ex |
9162 | bpr | 30 | !set authorlist=!replace internal $translator_unknown by in $authorlist |
31 | !set authorlist=!replace internal ; by , in $authorlist |
||
32 | !if $authorlist!= and $authorlist notsametext $exolist |
||
33 | !set authorlist=!listuniq $authorlist |
||
34 | !set tmp=!items2words $module_author |
||
12012 | bpr | 35 | !set tmp=!replace internal ; by ,$ in $tmp |
9162 | bpr | 36 | !set tmp=!singlespace $tmp |
37 | !set authorlist=!singlespace $authorlist |
||
38 | !!set authorlist1=!listcomplement $tmp in $authorlist |
||
39 | !set authorlist1=$authorlist |
||
40 | !set authorlist_cnt=!itemcnt $authorlist1 |
||
41 | !set authorlist=!replace internal , by ,$ $ in $authorlist |
||
42 | !if $authorlist_cnt > 0 |
||
12343 | bpr | 43 | <div class="wims_contribute">$name_Contribute $authorlist.</div> |
9162 | bpr | 44 | !endif |
45 | !endif |
||
10883 | obado | 46 | |
2072 | bpr | 47 | !set test_data=!replace internal data/ by in $module_data |
48 | !set test_data=!defof title in datamodule/$test_data/INDEX |
||
49 | !if $test_data= and $module_data!= |
||
12456 | bpr | 50 | <p class="name_datamodule"> |
51 | <i>$name_datamodule</i> |
||
52 | </p> |
||
2072 | bpr | 53 | !endif |
6869 | bpr | 54 | <hr style="width:35%" /> |
1664 | bpr | 55 | |
56 | !if robot isin $session |
||
12456 | bpr | 57 | !changeto content.html |
1664 | bpr | 58 | !endif |
59 | |||
2072 | bpr | 60 | !if $special_parm3!=$empty |
12343 | bpr | 61 | !let tmp=!replace internal ; by $ $ in $special_parm3 |
12459 | bpr | 62 | !!!should use the script getparm |
12343 | bpr | 63 | !set testw=!replace internal ; by $\ |
8697 | bpr | 64 | $ in $special_parm3 |
12343 | bpr | 65 | !set testw=!replace internal = by , in $testw |
12460 | bpr | 66 | !for cle in exo,qnum,qcmlevel,scoredelay,intro_qcmpresent,intro_sol,intro_feed,\ |
67 | intro_check,intro_good,intro_hint,intro_sepow,intro_expow,intro_precw,random,confparm1,confparm2,confparm3,\ |
||
12213 | bpr | 68 | confparm4,confparm5,confparm6,confparm7,confparm8,intro_expert,seedrepeat,exotrymax |
12343 | bpr | 69 | !set testw0=!select $testw where column 1=$cle |
70 | !set get_$cle=$(testw0[;2..-1]) |
||
71 | !set get_$cle=!singlespace $(get_$cle) |
||
72 | !set get_$cle=!words2items $(get_$cle) |
||
73 | !set get_$cle=!listuniq $(get_$(cle)) |
||
74 | !default $(cle)=$(get_$cle) |
||
75 | !next cle |
||
76 | !if $scoredelay=0 |
||
77 | !reset scoredelay |
||
78 | !endif |
||
79 | !if $exo=0 |
||
80 | !reset exo |
||
81 | !endif |
||
82 | !if yes isin $intro_expert |
||
83 | !let special_parm2=!append word expert to $special_parm4 |
||
84 | !endif |
||
2072 | bpr | 85 | !endif |
86 | |||
9059 | guerimand | 87 | !if $wims_class!=$empty and $wims_user=supervisor and ($special_parm3=$empty or intro_expert isin $special_parm3) |
12343 | bpr | 88 | !default qnum=$wims_oefdefault_qnum |
89 | !default qcmlevel=$wims_oefdefault_qcmlevel |
||
90 | !default scoredelay=$wims_oefdefault_scoredelay |
||
91 | !default intro_qcmpresent=$wims_oefdefault_qcmpresent |
||
12460 | bpr | 92 | !default intro_sol=$wims_oefdefault_sol |
93 | !default intro_feed=$wims_oefdefault_feed |
||
12343 | bpr | 94 | !default intro_check=$wims_oefdefault_check |
12460 | bpr | 95 | !default intro_good=$wims_oefdefault_good |
96 | !default intro_hint=$wims_oefdefault_hint |
||
12343 | bpr | 97 | !default intro_sepow=$wims_oefdefault_sepow |
98 | !default intro_expow=$wims_oefdefault_expow |
||
99 | !default intro_precw=$wims_oefdefault_precw |
||
100 | !default seedrepeat=$wims_oefdefault_seedrepeat |
||
101 | !default exotrymax=$wims_oefdefault_exotrymax |
||
102 | !let special_parm2=$special_parm |
||
12460 | bpr | 103 | !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 | 104 | !let expert_option=yes |
12343 | bpr | 105 | !else |
9059 | guerimand | 106 | !let expert_option=no |
12343 | bpr | 107 | !endif |
1664 | bpr | 108 | !endif |
2072 | bpr | 109 | !reset special_parm3 |
1664 | bpr | 110 | |
111 | !if ////classes/ isin ////$module |
||
12343 | bpr | 112 | !set class_header=wimshome/log/classes/$wims_class/ |
1664 | bpr | 113 | !endif |
114 | |||
115 | !read $(class_header)Exindex |
||
116 | !set exocnt=!itemcnt $exolist |
||
9238 | bpr | 117 | !set qcnt=$[min($exocnt,15)] |
5081 | bpr | 118 | !if $wims_user=supervisor and #classes/ isin #$module |
1664 | bpr | 119 | !set wims_menu_items=!append line add_exo,1,module=adm/createxo\ |
12343 | bpr | 120 | to $wims_menu_items |
121 | !if $exocnt<1 |
||
122 | !exit |
||
123 | !endif |
||
5081 | bpr | 124 | !else |
12343 | bpr | 125 | !if $exocnt<1 |
5081 | bpr | 126 | $name_noexercise |
127 | !exit |
||
12343 | bpr | 128 | !endif |
1664 | bpr | 129 | !endif |
4323 | bpr | 130 | |
7354 | bpr | 131 | !if $lang notsametext $module_language and $(titlelist_$lang) notsametext |
12343 | bpr | 132 | !set titlelist=$(titlelist_$lang) |
4323 | bpr | 133 | !endif |
134 | |||
10680 | bpr | 135 | !!if $exocnt=1 |
136 | !! $name_oneexercise, <span class="bold"> |
||
137 | !! !item 1 of $titlelist |
||
138 | !! </span>. |
||
139 | !! !else |
||
140 | !! !if $wims_user=supervisor |
||
141 | !! <div class="formHelp"> |
||
142 | !! $name_remarkallexo |
||
143 | !! </div> |
||
144 | !! !endif |
||
145 | !!!endif |
||
1664 | bpr | 146 | |
147 | !form new |
||
6869 | bpr | 148 | <input type="hidden" name="module" value="$module" /> |
4795 | obado | 149 | <div id="oef_intro_params"> |
10883 | obado | 150 | <h2 class="legend oef_name_menu">$name_menu</h2> |
151 | <div class="formHelp">$name_remarkintro1</div> |
||
9180 | bpr | 152 | |
10895 | obado | 153 | <fieldset class="property_fields blockcenter" id="general_parms"> |
10883 | obado | 154 | <legend>$name_general_parms</legend> |
12343 | bpr | 155 | !if $oefintro_custom_select=$empty |
10895 | obado | 156 | <div class="field"> |
12343 | bpr | 157 | !if $exocnt>1 |
158 | !set special_parm=!trim $special_parm |
||
159 | !if select iswordof $special_parm2 and $special_parm notsametext $empty |
||
12493 | lemaire | 160 | <label for="exo">$name_chooseexo$name_exercisescontaining</label> «<em style="color:blue">$special_parm</em> » : |
12343 | bpr | 161 | !endif |
162 | !endif |
||
163 | !read oef/select.phtml |
||
10895 | obado | 164 | </div> |
165 | |||
12343 | bpr | 166 | !if * isin $titlelist |
10895 | obado | 167 | <p>$name_remarkintro2</p> |
12343 | bpr | 168 | !endif |
169 | !else |
||
170 | !read $oefintro_custom_select |
||
171 | !endif |
||
10883 | obado | 172 | </fieldset> |
173 | |||
12456 | bpr | 174 | !!test if there is an introhook |
12343 | bpr | 175 | !if _classes/ isin _$module |
176 | !set introhook_exists=no |
||
177 | !else |
||
178 | !readproc introhook.phtml |
||
179 | !if $introhook_exists=$empty |
||
180 | !set tmp=!record 0 of introhook.phtml |
||
181 | !if $tmp=$empty |
||
12456 | bpr | 182 | !!! only comment in the file introhook.phtml |
12343 | bpr | 183 | !set introhook_exists=no |
184 | !reset tmp |
||
12262 | bpr | 185 | !endif |
10895 | obado | 186 | !endif |
12343 | bpr | 187 | !endif |
188 | !if $introhook_exists!=no |
||
189 | <fieldset class="introhook property_fields blockcenter"> |
||
190 | <legend>$name_module_setup</legend> |
||
191 | !if $introhook_tableless=yes |
||
192 | !read introhook.phtml |
||
193 | !else |
||
194 | <table> |
||
195 | !read introhook.phtml |
||
196 | </table> |
||
4795 | obado | 197 | !endif |
12343 | bpr | 198 | </fieldset> |
199 | !endif |
||
9162 | bpr | 200 | |
12343 | bpr | 201 | !if $oefintro_custom_series_setup=$empty |
202 | !read oef/intromenu_series.phtml |
||
203 | !endif |
||
10883 | obado | 204 | |
12343 | bpr | 205 | !set wims_ref_class=wims_button |
206 | !set trimmed_parm2=!trim $special_parm2 |
||
207 | !set trimmed_parm3=!trim $special_parm3 |
||
10895 | obado | 208 | |
12343 | bpr | 209 | !if expert notwordof $trimmed_parm2 and yes notin $expert_option |
210 | <p class="oef_intro_buttons" id="score_setup"> |
||
12456 | bpr | 211 | !set trimmed_parm2=$trimmed_parm2 expert |
212 | !set trimmed_parm3=!replace internal intro_expert=no by $ in $trimmed_parm3 |
||
213 | !set trimmed_parm3=$trimmed_parm3 intro_expert=yes |
||
214 | !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 | 215 | </p> |
216 | <fieldset class="oef_expert property_fields blockcenter"> |
||
217 | <legend>$name_score_setup</legend> |
||
218 | <div class="field"> |
||
219 | <label for="qcmlevel">$name_levelseverity:</label> |
||
12456 | bpr | 220 | !default qcmlevel=$(default_choice[2]) |
221 | !formselect qcmlevel from 1 to 9 |
||
12343 | bpr | 222 | <div class="formHelp">$name_warning_levelseverity</div> |
223 | </div> |
||
224 | </fieldset> |
||
225 | !else |
||
226 | <p class="oef_intro_buttons" id="score_setup"> |
||
227 | !set trimmed_parm2=!replace word expert by $ in $trimmed_parm2 |
||
228 | !set trimmed_parm3=!replace internal intro_expert=yes by $ in $trimmed_parm3 |
||
229 | !set trimmed_parm3=$trimmed_parm3 intro_expert=no |
||
230 | !href module=$module&special_parm=$special_parm&special_parm2=$trimmed_parm2&special_parm3=$trimmed_parm3&special_parm4=$special_parm4#general_parms $name_simplifiedmenu_back |
||
231 | </p> |
||
232 | <fieldset class="oef_expert property_fields blockcenter"> |
||
233 | <legend>$name_score_setup</legend> |
||
12460 | bpr | 234 | !default intro_check=1,2 |
12343 | bpr | 235 | !reset name_prompt_expower2 name_prompt_sepower2 |
236 | !set powercnt=!itemcnt $list_expow |
||
237 | !for j=1 to $powercnt |
||
238 | !set name_prompt_expower2=!append item $(name_prompt_expower[$j]) ($(list_expow[$j])) to $name_prompt_expower2 |
||
239 | !set name_prompt_sepower2=!append item $(name_prompt_sepower[$j]) ($(list_sepow[$j])) to $name_prompt_sepower2 |
||
240 | !next |
||
241 | !default intro_sepow=$(list_sepow[1]) |
||
242 | !default intro_expow=$(list_expow[1]) |
||
243 | !default intro_precw=$(list_precw[1]) |
||
10895 | obado | 244 | |
12343 | bpr | 245 | <input type="hidden" name="intro_expert" value="yes" /> |
12164 | obado | 246 | <div class="field"> |
12459 | bpr | 247 | <strong>$name_expower</strong> |
12164 | obado | 248 | <div> |
12343 | bpr | 249 | !set wims_ref_class=wims_formradio |
250 | !formradio intro_expow list $list_expow prompt $name_prompt_expower2 |
||
12164 | obado | 251 | <div class="formHelp">$name_warning_expower</div> |
252 | </div> |
||
10883 | obado | 253 | </div> |
12164 | obado | 254 | <div class="field"> |
12459 | bpr | 255 | <strong>$name_sepower</strong> |
12164 | obado | 256 | <div> |
12343 | bpr | 257 | !set wims_ref_class=wims_formradio |
258 | !formradio intro_sepow list $list_sepow prompt $name_prompt_sepower2 |
||
12164 | obado | 259 | <div class="formHelp"> |
12343 | bpr | 260 | $name_warning_sepower $name_warning_pow |
12164 | obado | 261 | </div> |
262 | </div> |
||
10908 | bpr | 263 | </div> |
12164 | obado | 264 | <div class="field"> |
12459 | bpr | 265 | <strong>$name_precweight</strong> |
12343 | bpr | 266 | !set wims_ref_class=wims_formradio |
267 | !formradio intro_precw list $list_precw |
||
12164 | obado | 268 | <div class="formHelp">$name_help_precweight</div> |
9170 | bpr | 269 | </div> |
12307 | bpr | 270 | </fieldset> |
12381 | bpr | 271 | <fieldset class="oef_expert property_fields blockcenter"> |
272 | <legend>$name_help_setup</legend> |
||
273 | <div class="field"> |
||
12459 | bpr | 274 | !! about good_answer |
12460 | bpr | 275 | !set wims_ref_id=introgivegood |
276 | !default intro_good=$(default_choice[6]) |
||
12456 | bpr | 277 | <strong>$(name_choice_check[3])</strong> |
12459 | bpr | 278 | !!never, at the version number n |
279 | <div> |
||
12460 | bpr | 280 | !formradio intro_good list 0 prompt $(name_choice[1]) |
12350 | bpr | 281 | $(name_tries[1]) |
12460 | bpr | 282 | !formradio intro_good from 1 to $limit_version |
12350 | bpr | 283 | $(name_tries[2]) |
12459 | bpr | 284 | </div> |
12375 | bpr | 285 | <div class="formHelp"> |
12460 | bpr | 286 | $name_help_givegood |
12307 | bpr | 287 | </div> |
12375 | bpr | 288 | </div> |
12459 | bpr | 289 | !! about present solution name change for retrocomtability |
12307 | bpr | 290 | <div class="field"> |
12456 | bpr | 291 | <strong>$name_solutiongiven</strong> |
12460 | bpr | 292 | !default intro_sol=$(default_choice[3]) |
293 | !set wims_ref_id=sol |
||
12459 | bpr | 294 | <div> |
295 | !!decalage is due to retrocomptability (2 was always) |
||
12460 | bpr | 296 | !formradio intro_sol list 0 prompt $(name_choice[1]) |
12343 | bpr | 297 | $(name_tries[1]) |
12460 | bpr | 298 | !formradio intro_sol from 1 to $limit_version |
12343 | bpr | 299 | $(name_tries[2]) |
12459 | bpr | 300 | </div></div> |
12456 | bpr | 301 | !! about present feedback |
12459 | bpr | 302 | <div class="field"> |
12493 | lemaire | 303 | <strong>$name_feedgiven</strong> |
12460 | bpr | 304 | !default intro_feed=$(default_choice[5]) |
305 | !set wims_ref_id=feed1 |
||
12459 | bpr | 306 | <div> |
12460 | bpr | 307 | !formradio intro_feed list 0 prompt $(name_choice[1]) |
12345 | bpr | 308 | $(name_tries[1]) |
12460 | bpr | 309 | !formradio intro_feed from 1 to $limit_version |
12345 | bpr | 310 | $(name_tries[2]) |
12459 | bpr | 311 | </div> |
312 | <div class="formHelp"> |
||
12460 | bpr | 313 | $name_help_givefeed |
12345 | bpr | 314 | </div> |
315 | </div> |
||
12456 | bpr | 316 | !! about hint |
12307 | bpr | 317 | <div class="field"> |
12459 | bpr | 318 | !!about |
12460 | bpr | 319 | !default intro_hint=$(default_choice[7]) |
12456 | bpr | 320 | <strong>$(name_choice_check[4])</strong> |
12460 | bpr | 321 | !set wims_ref_id=introhint |
12493 | lemaire | 322 | !!jamais, toujours, apres le nombre de versions |
12459 | bpr | 323 | <div> |
12460 | bpr | 324 | !formradio intro_hint list 0 prompt $(name_choice[1]) |
12350 | bpr | 325 | $(name_tries[1]) |
12460 | bpr | 326 | !formradio intro_hint from 1 to $limit_version |
12350 | bpr | 327 | $(name_tries[2]) |
12459 | bpr | 328 | </div></div> |
12164 | obado | 329 | </fieldset> |
12343 | bpr | 330 | !if $oefintro_custom_choices_setup=$empty |
331 | !read oef/intromenu_choices.phtml |
||
10883 | obado | 332 | !endif |
12343 | bpr | 333 | !endif |
9161 | bpr | 334 | </div> |
10883 | obado | 335 | |
12164 | obado | 336 | <div class="oef_intro_buttons spacer" id="oef_intro_launch"> |
12163 | obado | 337 | <button type="submit" class="wims_button icon_button"> |
338 | <span class="work">$wims_name_work</span> |
||
339 | </button> |
||
340 | <button type="submit" class="wims_button wims_secondary_button icon_button" name="print" id="print" value="yes"> |
||
341 | <span class="printable">$name_print</span> |
||
342 | </button> |
||
343 | <input type="hidden" name="special_parm2" value="$special_parm2" /> |
||
344 | <input type="hidden" name="special_parm4" value="$special_parm4" /> |
||
4795 | obado | 345 | </div> |
12163 | obado | 346 | |
5928 | bpr | 347 | !formend |
348 | |||
1664 | bpr | 349 | !if $exocnt>10 |
10895 | obado | 350 | !form intro |
351 | <input type="hidden" name="special_parm2" value="select $special_parm2" /> |
||
352 | <input type="hidden" name="special_parm3" value="$special_parm3" /> |
||
353 | <input type="hidden" name="special_parm4" value="$special_parm4" /> |
||
354 | <input type="hidden" name="module" value="$module" /> |
||
11665 | bpr | 355 | <label for="special_parm">$name_select</label> |
356 | <input size="12" maxlength="12" name="special_parm" value="$special_parm" id="special_parm" /> |
||
10895 | obado | 357 | <input type="submit" value="$wims_name_send" /> |
358 | !formend |
||
1664 | bpr | 359 | !endif |
360 | |||
9162 | bpr | 361 | !if expert iswordof $special_parm2 or yes isin $expert_option |
10895 | obado | 362 | <div class="formHelp"> |
12343 | bpr | 363 | $name_remarkseverity |
364 | !read oef/helpseverity |
||
365 | !read oef/helppenality |
||
10895 | obado | 366 | </div> |
4810 | bpr | 367 | !endif |
368 | |||
9174 | guerimand | 369 | !if $wims_class!=$empty and $wims_user=supervisor and (../devel/ notin ../$module or $wims_devel_modules iswordof open) |
12343 | bpr | 370 | !set wims_menu_items=!append line addallexo,1,module=adm/class/addmodule&job=addallexo&dir=$module&scoring=$module_scoring\ |
8817 | guerimand | 371 | ,0, to $wims_menu_items |
9099 | bpr | 372 | !endif |