Subversion Repositories wimsdev

Rev

Rev 12493 | Rev 13697 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. !nocache
  2. !! useful when one comes from modtool
  3. !set modu_lang=$lang
  4. !read oef/$modu_lang/names
  5. !if $lang_exists!=yes
  6.   !let modu_lang=en
  7.   !read oef/$modu_lang/names
  8. !endif
  9. !set wims_backslash_insmath=yes
  10. !set proc=oef
  11. !if robot isin $session
  12.   !changeto content.html
  13. !endif
  14. !read oef/default
  15.  
  16. !!!#### contributions
  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
  22. !for ex = 1 to $exolist_cnt
  23.   !if - notin $(exolist[$ex])
  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
  28.   !endif
  29. !next ex
  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
  35.   !set tmp=!replace internal ; by ,$ in $tmp
  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
  43.     <div class="wims_contribute">$name_Contribute $authorlist.</div>
  44.   !endif
  45. !endif
  46.  
  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!=
  50.   <p class="name_datamodule">
  51.    <i>$name_datamodule</i>
  52.   </p>
  53. !endif
  54. <hr style="width:35%" />
  55.  
  56. !if robot isin $session
  57.   !changeto content.html
  58. !endif
  59.  
  60. !if $special_parm3!=$empty
  61.   !let tmp=!replace internal ; by $ $ in $special_parm3
  62.   !!!should use the script getparm
  63.   !set testw=!replace internal ; by $\
  64. $ in $special_parm3
  65.   !set testw=!replace internal = by , in $testw
  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,\
  68.    confparm4,confparm5,confparm6,confparm7,confparm8,intro_expert,seedrepeat,exotrymax
  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
  85. !endif
  86.  
  87. !if $wims_class!=$empty and $wims_user=supervisor and ($special_parm3=$empty or intro_expert isin $special_parm3)
  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
  92.   !default intro_sol=$wims_oefdefault_sol
  93.   !default intro_feed=$wims_oefdefault_feed
  94.   !default intro_check=$wims_oefdefault_check
  95.   !default intro_good=$wims_oefdefault_good
  96.   !default intro_hint=$wims_oefdefault_hint
  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
  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)
  104.     !let expert_option=yes
  105.   !else
  106.     !let expert_option=no
  107.   !endif
  108. !endif
  109. !reset special_parm3
  110.  
  111. !if ////classes/ isin ////$module
  112.   !set class_header=wimshome/log/classes/$wims_class/
  113. !endif
  114.  
  115. !read $(class_header)Exindex
  116. !set exocnt=!itemcnt $exolist
  117. !set qcnt=$[min($exocnt,15)]
  118. !if $wims_user=supervisor and #classes/ isin #$module
  119.  !set wims_menu_items=!append line add_exo,1,module=adm/createxo\
  120.       to $wims_menu_items
  121.   !if $exocnt<1
  122.     !exit
  123.   !endif
  124. !else
  125.   !if $exocnt<1
  126.     $name_noexercise
  127.     !exit
  128.   !endif
  129. !endif
  130.  
  131. !if $lang notsametext $module_language and $(titlelist_$lang) notsametext
  132.   !set titlelist=$(titlelist_$lang)
  133. !endif
  134.  
  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
  146.  
  147. !form new
  148. <input type="hidden" name="module" value="$module" />
  149. <div id="oef_intro_params">
  150.   <h2 class="legend oef_name_menu">$name_menu</h2>
  151.   <div class="formHelp">$name_remarkintro1</div>
  152.  
  153.   <fieldset class="property_fields blockcenter" id="general_parms">
  154.     <legend>$name_general_parms</legend>
  155. !if $oefintro_custom_select=$empty
  156.       <div class="field">
  157.   !if $exocnt>1
  158.     !set special_parm=!trim $special_parm
  159.     !if select iswordof $special_parm2 and $special_parm notsametext $empty
  160.         <label for="exo">$name_chooseexo$name_exercisescontaining</label> &laquo;<em style="color:blue">$special_parm</em>&nbsp;&raquo;&nbsp;:
  161.     !endif
  162.   !endif
  163.   !read oef/select.phtml
  164.       </div>
  165.  
  166.   !if * isin $titlelist
  167.         <p>$name_remarkintro2</p>
  168.   !endif
  169. !else
  170.   !read $oefintro_custom_select
  171. !endif
  172.   </fieldset>
  173.  
  174. !!test if there is an introhook
  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
  182.       !!! only comment in the file introhook.phtml
  183.       !set introhook_exists=no
  184.       !reset tmp
  185.     !endif
  186.   !endif
  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>
  197.   !endif
  198.   </fieldset>
  199. !endif
  200.  
  201. !if $oefintro_custom_series_setup=$empty
  202.   !read oef/intromenu_series.phtml
  203. !endif
  204.  
  205. !set wims_ref_class=wims_button
  206. !set trimmed_parm2=!trim $special_parm2
  207. !set trimmed_parm3=!trim $special_parm3
  208.  
  209. !if expert notwordof $trimmed_parm2 and yes notin $expert_option
  210.   <p class="oef_intro_buttons" id="score_setup">
  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
  215.  </p>
  216.   !read oef/intromenu_nonexpert.phtml
  217. !else
  218.   <p class="oef_intro_buttons" id="score_setup">
  219.   !set trimmed_parm2=!replace word expert by $ in $trimmed_parm2
  220.   !set trimmed_parm3=!replace internal intro_expert=yes by $ in $trimmed_parm3
  221.   !set trimmed_parm3=$trimmed_parm3 intro_expert=no
  222.   !href module=$module&special_parm=$special_parm&special_parm2=$trimmed_parm2&special_parm3=$trimmed_parm3&special_parm4=$special_parm4#general_parms $name_simplifiedmenu_back
  223.  </p>
  224.   !read oef/intromenu_expert.phtml
  225. !endif
  226. </div>
  227.  
  228. <div class="oef_intro_buttons spacer" id="oef_intro_launch">
  229.   <button type="submit" class="wims_button icon_button">
  230.     <span class="work">$wims_name_work</span>
  231.   </button>&nbsp;
  232.   <button type="submit" class="wims_button wims_secondary_button icon_button" name="print" id="print" value="yes">
  233.     <span class="printable">$name_print</span>
  234.   </button>
  235.   <input type="hidden" name="special_parm2" value="$special_parm2" />
  236.   <input type="hidden" name="special_parm4" value="$special_parm4" />
  237. </div>
  238.  
  239. !formend
  240.  
  241. !if $exocnt>10
  242.   !form intro
  243.     <input type="hidden" name="special_parm2" value="select $special_parm2" />
  244.     <input type="hidden" name="special_parm3" value="$special_parm3" />
  245.     <input type="hidden" name="special_parm4" value="$special_parm4" />
  246.     <input type="hidden" name="module" value="$module" />
  247.     <label for="special_parm">$name_select</label>
  248.     <input size="12" maxlength="12" name="special_parm" value="$special_parm" id="special_parm" />
  249.     <input type="submit" value="$wims_name_send" />
  250.   !formend
  251. !endif
  252.  
  253. !if expert iswordof $special_parm2 or yes isin $expert_option
  254.   <div class="formHelp">
  255.   $name_remarkseverity
  256.   !read oef/helpseverity
  257.   !read oef/helppenality
  258.   </div>
  259. !endif
  260.  
  261. !if $wims_class!=$empty and $wims_user=supervisor and (../devel/ notin ../$module or $wims_devel_modules iswordof open)
  262.   !set wims_menu_items=!append line addallexo,1,module=adm/class/addmodule&job=addallexo&dir=$module&scoring=$module_scoring\
  263. ,0, to $wims_menu_items
  264. !endif
  265.