Subversion Repositories wimsdev

Rev

Rev 9111 | Rev 9155 | 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
4712 bpr 4
!read oef/$modu_lang/names
2373 bpr 5
!if $lang_exists!=yes
6
   !let modu_lang=en
4712 bpr 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
12
 !changeto content.html
13
!endif
1664 bpr 14
 
2072 bpr 15
!set test_data=!replace internal data/ by in $module_data
16
!set test_data=!defof title in datamodule/$test_data/INDEX
17
!if $test_data= and $module_data!=
4795 obado 18
   <p class="name_datamodule"><i>
2072 bpr 19
   $name_datamodule
4795 obado 20
   </i></p>
2072 bpr 21
!endif
6869 bpr 22
<hr style="width:35%" />
1664 bpr 23
 
24
!if robot isin $session
25
 !changeto content.html
26
!endif
27
 
2072 bpr 28
!if $special_parm3!=$empty
29
 !let tmp=!replace internal ; by $ $ in $special_parm3
8697 bpr 30
!!!should use the script getparm
31
 !set testw=!replace internal ; by $\
32
$ in $special_parm3
33
 !set testw=!replace internal = by , in  $testw
9099 bpr 34
 !for cle in exo,qnum,qcmlevel,scoredelay,intro_qcmpresent,intro_presentsol,\
35
   intro_check,intro_sepow,intro_expow,intro_precw,random,confparm1,confparm2,confparm3,\
36
   confparm4,confparm5,confparm6,confparm7,confparm8,intro_expert
8697 bpr 37
  !set testw0=!select $testw where column 1=$cle
38
  !set get_$cle=$(testw0[;2..-1])
39
  !set get_$cle=!singlespace $(get_$cle)
40
  !set get_$cle=!words2items $(get_$cle)
41
  !set get_$cle=!listuniq $(get_$(cle))
42
   !default $(cle)=$(get_$cle)
2072 bpr 43
 !next cle
44
 !if $scoredelay=0
45
  !reset scoredelay
46
 !endif
47
 !if $exo=0
48
  !reset exo
49
 !endif
50
 !if yes isin $intro_expert
51
  !let special_parm2=!append word expert to $special_parm4
52
 !endif
53
!endif
54
 
9059 guerimand 55
!if $wims_class!=$empty and $wims_user=supervisor and ($special_parm3=$empty or intro_expert isin $special_parm3)
56
 !default qnum=$wims_oefdefault_qnum
57
 !default qcmlevel=$wims_oefdefault_qcmlevel
58
 !default scoredelay=$wims_oefdefault_scoredelay
59
 !default intro_qcmpresent=$wims_oefdefault_qcmpresent
60
 !default intro_presentsol=$wims_oefdefault_presentsol
61
 !default intro_check=$wims_oefdefault_check
9099 bpr 62
 !default intro_sepow=$wims_oefdefault_sepow
63
 !default intro_expow=$wims_oefdefault_expow
64
 !default intro_precw=$wims_oefdefault_precw
5082 bpr 65
 !let special_parm2=$special_parm
9099 bpr 66
 !if ($special_parm3=$empty or intro_expert=yes isin $special_parm3) and ($wims_oefdefault_qcmpresent$wims_oefdefault_presentsol$wims_oefdefault_check$wims_oefdefault_sepow$wims_oefdefault_expow$wims_oefdefault_precw!=$empty)
9059 guerimand 67
    !let expert_option=yes
68
 !else
69
    !let expert_option=no
70
 !endif
1664 bpr 71
!endif
2072 bpr 72
!reset special_parm3
1664 bpr 73
 
74
!if ////classes/ isin ////$module
75
 !set class_header=wimshome/log/classes/$wims_class/
76
!endif
77
 
78
!read $(class_header)Exindex
79
!set exocnt=!itemcnt $exolist
80
!set qcnt=$[min($exocnt,8)]
5081 bpr 81
!if $wims_user=supervisor and #classes/ isin #$module
1664 bpr 82
  !set wims_menu_items=!append line add_exo,1,module=adm/createxo\
83
  to $wims_menu_items
5081 bpr 84
    !if $exocnt<1
85
     !exit
86
    !endif
87
!else
88
   !if $exocnt<1
89
    $name_noexercise
90
    !exit
91
   !endif
1664 bpr 92
!endif
4323 bpr 93
 
7354 bpr 94
!if $lang notsametext $module_language and $(titlelist_$lang) notsametext
4323 bpr 95
 !set titlelist=$(titlelist_$lang)
96
!endif
97
 
1664 bpr 98
!if $exocnt=1
6151 bpr 99
 $name_oneexercise, <span class="bold">
1664 bpr 100
 !item 1 of $titlelist
6151 bpr 101
 </span>.
1664 bpr 102
!endif
103
 
104
!form new
6869 bpr 105
<input type="hidden" name="module" value="$module" />
4795 obado 106
<div id="oef_intro_params">
107
<h2 class="legend oef_name_menu">$name_menu</h2>
1840 bpr 108
!if $exocnt>1
4795 obado 109
 <div class="field">
110
  !set special_parm=!trim $special_parm
111
  !if select iswordof $special_parm2 and $special_parm!=$empty
112
   <span>$name_chooseexo$name_exercisescontaining</span> &laquo;<em style="color:blue">$special_parm</em>&nbsp;&raquo;&nbsp;:
113
  !else
114
   <label for="exo">$name_chooseexo:</label>
115
  !endif
116
  !read oef/select.phtml
117
 </div>
1664 bpr 118
!endif
9131 bpr 119
!!test if there is an introhook (works with new modules)
120
!readproc introhook.phtml
121
!if $introhook_exists!=no
9099 bpr 122
<fieldset class="oef_expert">
123
    <legend>$name_module_setup</legend>
124
<div class="field introhook">
125
<table class="field introhook">
126
!read introhook.phtml
127
</table>
128
</div>
129
</fieldset>
9131 bpr 130
!endif
9099 bpr 131
<fieldset class="oef_expert">
132
 <legend>$name_general_setup</legend>
133
 <div class="field">
4795 obado 134
 <label for="qnum">$name_oneserie
135
 !default qnum=1
136
 !formselect qnum from 1 to 9
137
 $name_exercises.</label>
9099 bpr 138
 </div>
139
 <div class="field">
140
  <label for="scoredelay">$name_chrono:</label>
141
  <input size="7" id="scoredelay" name="scoredelay" value="$scoredelay" /> $name_secondes.
142
 </div>
143
 <div class="field">
144
     <label>
145
      !formcheckbox random list 0 prompt $name_aleaseries
146
     </label>
147
 </div>
8205 bpr 148
!set translation_language=!getdef translation_language in INDEX
149
!if $translation_language!=$empty
150
  !set translation_language=$module_language,$translation_language
151
  !set translation_language=!words2items $translation_language
152
  !set translation_language=!sort items $translation_language
153
  <div class="field">
154
   <label for="lang_choice">$wims_name_Language:</label>
155
   !formradio lang_choice list $translation_language
156
  </div>
157
!endif
9099 bpr 158
</fieldset>
9111 bpr 159
<fieldset class="oef_expert">
160
  <legend>$name_score_setup</legend>
9099 bpr 161
!if expert notwordof $special_parm2 and yes notin $expert_option
162
  <div class="field">
163
  <label for="qcmlevel">$name_levelseverity:</label>
164
 !default qcmlevel=3
165
 !formselect qcmlevel from 1 to 9
166
 </div>
9111 bpr 167
   !let tmp=$special_parm2 expert
168
   !set tmp3=!replace internal intro_expert=no by $ in $special_parm3
169
   !set tmp3=$tmp3 intro_expert=yes
170
   !set wims_ref_class=wims_button
171
   <p class="oef_intro_buttons">
172
    !href module=$module&special_parm=$special_parm&special_parm2=$tmp&special_parm3=$tmp3&special_parm4=$special_parm4 $name_expertmenu
173
   </p>
9099 bpr 174
!else
175
   !!default intro_check=1,2,3,4
9110 bpr 176
   !read oef/default
9099 bpr 177
   !default intro_sepow=1
178
   !default intro_expow=1
179
   !default intro_precw=1
180
   !default intro_presentsol=1
9111 bpr 181
   !let tmp=!replace word expert by $ in $special_parm2
182
    !set tmp3=!replace internal intro_expert=yes by $ in $special_parm3
183
    !set tmp3=$tmp3 intro_expert=no
184
    <input type="hidden" name="intro_expert" value="yes" />
185
   !set wims_ref_class=wims_button
186
   <p class="oef_intro_buttons">
187
    !href module=$module&special_parm=$special_parm&special_parm2=$tmp&special_parm3=$tmp3&special_parm4=$special_parm4 $name_simplifiedmenu
188
   </p>
4795 obado 189
    <div class="field">
190
     <label for="intro_presentsol">$name_solutiongiven? </label>
191
     !formselect intro_presentsol list 0,1,2 prompt $name_choice
192
    </div>
193
    <div class="field">
194
     <label>
7399 bpr 195
      !formcheckbox  intro_check list 3 prompt $(name_choice_check[3])
4795 obado 196
     </label>
197
    </div>
198
    <div class="field">
199
     <label>
7399 bpr 200
      !formcheckbox intro_check list 4 prompt $(name_choice_check[4])
4795 obado 201
     </label>
202
    </div>
203
    <div class="field">
9099 bpr 204
     $name_expower:
205
     <div>
9110 bpr 206
      !formradio intro_expow list $list_expow prompt $name_prompt_expower
9099 bpr 207
     </div>
4795 obado 208
    </div>
9099 bpr 209
    <div class="field">
210
    $name_sepower:
211
      <div>
9110 bpr 212
      !formradio intro_sepow list $list_sepow prompt $name_prompt_sepower
9099 bpr 213
      </div>
214
    <div class="formHelp"> $name_warning_pow</div>
215
     </div>
216
    <div class="field">
217
     $name_precweight
218
      <div>
9110 bpr 219
      !formbar intro_precw list $list_precw
9099 bpr 220
     </div>
221
    </div>
7399 bpr 222
<hr />
223
$name_qcm
9099 bpr 224
!default intro_qcmpresent=4
4795 obado 225
    <div class="field">
7399 bpr 226
     <label for="intro_qcmpresent">$name_qcmanswer: </label>
227
     !formselect intro_qcmpresent list 2,3,4,5,6,7,8
228
    </div>
229
    <div class="field">
4795 obado 230
     <label>
7399 bpr 231
      !formcheckbox intro_check list 1 prompt $(name_choice_check[1])
4795 obado 232
     </label>
233
    </div>
7354 bpr 234
    <div class="field">
235
     <label>
7399 bpr 236
      !formcheckbox intro_check list 2 prompt $(name_choice_check[2])
7354 bpr 237
     </label>
238
    </div>
1664 bpr 239
!endif
9111 bpr 240
</fieldset>
4795 obado 241
<div class="oef_intro_buttons">
6869 bpr 242
        <input type="submit" value="$wims_name_work" />&nbsp;
243
        <input type="submit" name="print" value="$name_print" />
244
        <input type="hidden" name="special_parm2" value="$special_parm2" />
245
        <input type="hidden" name="special_parm4" value="$special_parm4" />
4795 obado 246
</div>
1664 bpr 247
 
5928 bpr 248
!formend
249
 
1664 bpr 250
!if $exocnt>10
251
 !form intro
6869 bpr 252
 <input type="hidden" name="special_parm2" value="select $special_parm2" />
253
 <input type="hidden" name="special_parm3" value="$special_parm3" />
254
 <input type="hidden" name="special_parm4" value="$special_parm4" />
255
 <input type="hidden" name="module" value="$module" />
1664 bpr 256
 $name_select
6869 bpr 257
 <input size="12" maxlength="12" name="special_parm" value="$special_parm" />
258
 <input type="submit" value="$wims_name_send" />
5928 bpr 259
 
260
 !formend
1664 bpr 261
!endif
262
 
263
$name_remarkintro1
264
 
265
!if * isin $titlelist
4810 bpr 266
 <p>
267
  $name_remarkintro2
268
 </p>
1664 bpr 269
!endif
270
 
4810 bpr 271
<div class="wims_smallremark">
1664 bpr 272
$name_remarkintro3
4128 bpr 273
</div>
2072 bpr 274
 
4810 bpr 275
!! very tricky ...
276
!reset authorlist
277
!set dictionary=$module_dir/$(class_header)Exauthors
7799 bpr 278
!set translator_unknown=delete
4810 bpr 279
!set exolist_cnt=!itemcnt $exolist
4842 bpr 280
!for ex = 1 to  $exolist_cnt
7799 bpr 281
  !if - notin $(exolist[$ex])
282
   !set tmp=!exec translator $(exolist[$ex])
283
   !set tmp=!replace internal , by $ $ in $tmp
284
   !set tmp=!singlespace $tmp
285
   !set authorlist=!append item $tmp to $authorlist
286
  !endif
4810 bpr 287
!next
288
!set authorlist=!replace internal $translator_unknown by in $authorlist
4842 bpr 289
!set authorlist=!replace internal ; by , in $authorlist
4810 bpr 290
!if $authorlist!= and $authorlist notsametext $exolist
291
  !set authorlist=!listuniq $authorlist
292
  !set tmp=!items2words $module_author
6869 bpr 293
  !set tmp=!replace internal ; by ,$  in $tmp
4810 bpr 294
  !set tmp=!singlespace $tmp
295
  !set authorlist=!singlespace $authorlist
6869 bpr 296
  !!set authorlist1=!listcomplement $tmp in $authorlist
297
  !set authorlist1=$authorlist
5268 bpr 298
  !set authorlist_cnt=!itemcnt $authorlist1
299
  !set authorlist=!replace internal , by ,$ $ in $authorlist
300
  !if $authorlist_cnt > 0
4810 bpr 301
   <div class="wims_contribute">$name_Contribute $authorlist.</div>
302
  !endif
303
!endif
304
 
8817 guerimand 305
!if $wims_class!=$empty and $wims_user=supervisor and classes notin $module
306
    !set wims_menu_items=!append line addallexo,1,module=adm/class/addmodule&job=addallexo&dir=$module&scoring=$module_scoring\
307
,0, to $wims_menu_items
9099 bpr 308
!endif