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