Subversion Repositories wimsdev

Rev

Rev 5900 | Rev 6151 | 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.  
  10. !set proc=oef
  11. !if robot isin $session
  12.  !changeto content.html
  13. !endif
  14.  
  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!=
  18.    <p class="name_datamodule"><i>
  19.    $name_datamodule
  20.    </i></p>
  21. !endif
  22. <hr style="width:35%"/>
  23.  
  24. !if robot isin $session
  25.  !changeto content.html
  26. !endif
  27.  
  28. !if $special_parm3!=$empty
  29.  !let tmp=!replace internal ; by $ $ in $special_parm3
  30.  !for cle in exo,qnum,qcmlevel,scoredelay,intro_qcmpresent,intro_presentsol,intro_check,confparm1,confparm2,confparm3,confparm4,confparm5,confparm6,confparm7,confparm8,intro_expert
  31.   !let t=!getopt $(cle) in $tmp
  32.   !default $(cle)=$t
  33.  !next cle
  34.  !if $scoredelay=0
  35.   !reset scoredelay
  36.  !endif
  37.  !if $exo=0
  38.   !reset exo
  39.  !endif
  40.  !if yes isin $intro_expert
  41.   !let special_parm2=!append word expert to $special_parm4
  42.  !endif
  43. !endif
  44.  
  45. !if $wims_class!=$empty and $wims_user=supervisor and $special_parm3=$empty
  46.  !distribute line $wims_oefdefault_qnum\
  47. $wims_oefdefault_qcmlevel\
  48. $wims_oefdefault_scoredelay\
  49. $wims_oefdefault_qcmpresent\
  50. $wims_oefdefault_presentsol\
  51. $wims_oefdefault_check into qnum,qcmlevel,scoredelay,intro_qcmpresent,intro_presentsol,intro_check
  52.  !let special_parm2=$special_parm
  53. !endif
  54. !reset special_parm3
  55.  
  56. !if ////classes/ isin ////$module
  57.  !set class_header=wimshome/log/classes/$wims_class/
  58. !endif
  59.  
  60. !read $(class_header)Exindex
  61. !set exocnt=!itemcnt $exolist
  62. !set qcnt=$[min($exocnt,8)]
  63. !if $wims_user=supervisor and #classes/ isin #$module
  64.  !set wims_menu_items=!append line add_exo,1,module=adm/createxo\
  65.   to $wims_menu_items
  66.     !if $exocnt<1
  67.      !exit
  68.     !endif
  69. !else
  70.    !if $exocnt<1
  71.     $name_noexercise
  72.     !exit
  73.    !endif
  74. !endif
  75.  
  76. !if $lang notsametext $module_language and $(titlelist_$lang) notsametext
  77.  !set titlelist=$(titlelist_$lang)
  78. !endif
  79.  
  80. !if $exocnt=1
  81.  $name_oneexercise, <b>
  82.  !item 1 of $titlelist
  83.  </b>.
  84. !endif
  85.  
  86. !form new
  87. <input type="hidden" name="module" value="$module"/>
  88. <div id="oef_intro_params">
  89. <h2 class="legend oef_name_menu">$name_menu</h2>
  90. !if $exocnt>1
  91.  <div class="field">
  92.   !set special_parm=!trim $special_parm
  93.   !if select iswordof $special_parm2 and $special_parm!=$empty
  94.    <span>$name_chooseexo$name_exercisescontaining</span> &laquo;<em style="color:blue">$special_parm</em>&nbsp;&raquo;&nbsp;:
  95.   !else
  96.    <label for="exo">$name_chooseexo:</label>
  97.   !endif
  98.   !read oef/select.phtml
  99.  </div>
  100. !endif
  101. <div class="field">
  102.  <label for="qnum">$name_oneserie
  103.  !default qnum=1
  104.  !formselect qnum from 1 to 9
  105.  $name_exercises.</label>
  106. </div>
  107. <div class="field">
  108.  <label for="qcmlevel">$name_levelseverity:</label>
  109.  !default qcmlevel=3
  110.  !formselect qcmlevel from 1 to 9
  111. </div>
  112. <div class="field">
  113.  <label for="scoredelay">$name_chrono:</label>
  114.  <input size="7" id="scoredelay" name="scoredelay" value="$scoredelay"/> $name_secondes.
  115. </div>
  116. !!!FIXME should test if there is an introhook
  117. <table class="field introhook">
  118. !read introhook.phtml
  119. </table>
  120. !if expert iswordof $special_parm2
  121.    <fieldset class="oef_expert">
  122.     <legend>$name_expertmenu</legend>
  123.     <div class="field">
  124.      <label for="intro_qcmpresent">$name_qcmanswer: </label>
  125.      !default intro_qcmpresent=4
  126.      !formselect intro_qcmpresent list 2,3,4,5,6,7,8
  127.     </div>
  128.     <div class="field">
  129.      <label for="intro_presentsol">$name_solutiongiven? </label>
  130.      !default intro_presentsol=1
  131.      !formselect intro_presentsol list 0,1,2 prompt $name_choice
  132.     </div>
  133.  
  134.     !default intro_check=1,2,3,4
  135.     <div class="field">
  136.      <label>
  137.       !formcheckbox intro_check list 1 prompt $(name_choice_check[1])
  138.      </label>
  139.     </div>
  140.     <div class="field">
  141.      <label>
  142.       !formcheckbox intro_check list 2 prompt $(name_choice_check[2])
  143.      </label>
  144.     </div>
  145.     <div class="field">
  146.      <label>
  147.       !formcheckbox  intro_check list 3 prompt $(name_choice_check[3])
  148.      </label>
  149.     </div>
  150.     <div class="field">
  151.      <label>
  152.       !formcheckbox intro_check list 4 prompt $(name_choice_check[4])
  153.      </label>
  154.     </div>
  155.     !let tmp=!replace word expert by $ in $special_parm2
  156.     <input type="hidden" name="intro_expert" value="yes"/>
  157.  
  158.    <td colspan="2" align="center">
  159.    !set wims_ref_class=wims_button
  160.    <p class="oef_intro_buttons">
  161.     !href module=$module&special_parm=$special_parm&special_parm2=$tmp&special_parm3=$special_parm3&special_parm4=$special_parm4 $name_simplifiedmenu
  162.    </p>
  163. !else
  164.    !let tmp=$special_parm2 expert
  165.    !set wims_ref_class=wims_button
  166.    <p class="oef_intro_buttons">
  167.     !href module=$module&special_parm=$special_parm&special_parm2=$tmp&special_parm3=$special_parm3&special_parm4=$special_parm4 $name_expertmenu
  168.    </p>
  169. !endif
  170. </div>
  171.  
  172. <div class="oef_intro_buttons">
  173.         <input type="submit" value="$wims_name_work"/>&nbsp;
  174.         <input type="submit" name="print" value="$name_print"/>
  175.         <input type="hidden" name="special_parm2" value="$special_parm2"/>
  176.         <input type="hidden" name="special_parm4" value="$special_parm4"/>
  177. </div>
  178.  
  179. !formend
  180.  
  181. !if $exocnt>10
  182.  !form intro
  183.  <input type="hidden" name="special_parm2" value="select $special_parm2"/>
  184.  <input type="hidden" name="special_parm3" value="$special_parm3"/>
  185.  <input type="hidden" name="special_parm4" value="$special_parm4"/>
  186.  <input type="hidden" name="module" value="$module"/>
  187.  $name_select
  188.  <input size="12" maxlength="12" name="special_parm" value="$special_parm"/>
  189.  <input type="submit" value="$wims_name_send"/>
  190.  
  191.  !formend
  192. !endif
  193.  
  194. $name_remarkintro1
  195.  
  196. !if * isin $titlelist
  197.  <p>
  198.   $name_remarkintro2
  199.  </p>
  200. !endif
  201.  
  202. <div class="wims_smallremark">
  203. $name_remarkintro3
  204. </div>
  205.  
  206.  
  207. !! very tricky ...
  208. !reset authorlist
  209. !set dictionary=$module_dir/$(class_header)Exauthors
  210. !set translator_unknown=unknown
  211. !set exolist_cnt=!itemcnt $exolist
  212. !for ex = 1 to  $exolist_cnt
  213.   !set tmp=!exec translator $(exolist[$ex])
  214.   !set tmp=!replace internal , by $ $ in $tmp
  215.   !set authorlist=!append item $tmp to $authorlist
  216. !next
  217. !set authorlist=!replace internal $translator_unknown by in $authorlist
  218. !set authorlist=!replace internal ; by , in $authorlist
  219. !if $authorlist!= and $authorlist notsametext $exolist
  220.   !set authorlist=!listuniq $authorlist
  221.   !set tmp=!items2words $module_author
  222.   !set tmp=!replace internal ; by , in $tmp
  223.   !set tmp=!singlespace $tmp
  224.   !set authorlist=!singlespace $authorlist
  225.   !set authorlist1=!listcomplement $tmp in $authorlist
  226.   !set authorlist_cnt=!itemcnt $authorlist1
  227.   !set authorlist=!replace internal , by ,$ $ in $authorlist
  228.   !if $authorlist_cnt > 0
  229.    <div class="wims_contribute">$name_Contribute $authorlist.</div>
  230.   !endif
  231. !endif
  232.  
  233.