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