Subversion Repositories wimsdev

Rev

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

  1.  
  2. !set parm=!replace internal \ by $$m_ in $wims_read_parm
  3. !distribute items $parm into t_,inputsize,prompt_
  4. !set inputsize1=!word 1 of $inputsize
  5. !if $(replytype$i) iswordof flashcard
  6.   !set inputsize1=!word 1 of $inputsize
  7. !else
  8.   !set inputsize1=$inputsize
  9. !endif
  10. !if $printing=yes or $cmd=hint
  11. !!i__ est le numero de la question
  12.  !set i__=!replace internal reply by in $t_
  13.  !set i__=!replace internal r by in $i__
  14.  !set i__=!trim $i__
  15.  !set replytype$i__=!item $i__ of $(Replytype$i)
  16.  !set replystyle$i__=!item $i__ of $(Replystyle$i)
  17.  !readproc anstype/$(replytype$i__).input def
  18.  !default replystyle$i__=$anstyle
  19.  !if mc iswordof $(replystyle$i__) or $(replytype$i__) iswordof dragfill clickfill
  20.   !if $inputsize1>0
  21.    !if $prompt_=$empty
  22.     !!set g_=!rows2lines $(replygood$i__)
  23.     !!set g_=!line 2 of $g_
  24.     !set prompt_=!line $i__ of $(Rg$i)
  25.     !set prompt_=!item $inputsize1 of $prompt_
  26.    !endif
  27.   !else
  28.    !if $prompt_=$empty
  29.     !set g_=!rows2lines $(replygood$i__)
  30.     !set g_=!line 2 of $g_
  31.     !set prompt_=$g_
  32.     !set prompt_=!line $i__ of $(Rg$i)
  33.     !set prompt_=!replace internal , by  </u>$  $ / $ $<u> in <u>$prompt_</u>
  34.    !endif
  35.   !endif
  36.   <i>$prompt_</i>
  37.  !else
  38.   !if $(replytype$i__) iswordof compose correspond
  39.    !if $(replytype$i__)=compose
  40.     !set prompt_=!line $i__ of $(Rg$i)
  41.     !set prompt_cnt=!wordcnt $prompt
  42.     !set prompt_=!shuffle $prompt_
  43.     !set prompt_=!replace internal , by $ $ / $ $ in $prompt_
  44.    $prompt_
  45.    !endif
  46.    !if $(replytype$i__)=correspond
  47.     !set prompt_=!line $i__ of $(Rg$i)
  48.     $prompt_
  49.    !endif
  50.   !else
  51.    ___________
  52.   !endif
  53.  !endif
  54.  !exit
  55. !endif
  56. !!end of print section
  57.  
  58. !if $wims_read_parm=$empty
  59.  !exit
  60. !endif
  61.  
  62. !set n_=!char 2 to -1 of $t_
  63. !set t_=!char 1 of $t_
  64. !set t_=!lower $t_
  65. !set t_=!translate a to r in $t_
  66. !set n_=!text select 0123456789()+-* in $n_
  67. !set n_=$[$n_]
  68. !bound n_ between integer 1 and 100 default $
  69. !if $t_ notitemof r,c or $n_=$empty
  70.  !exit
  71. !endif
  72.  
  73. !if $t_=c and $(choicelist$n_)=$empty or\
  74.         $t_=r and $(replygood$n_)=$empty
  75.  !exit
  76. !endif
  77.  
  78. !if $t_$n_ notitemof $embedded
  79.  !set embedded=!append item $t_$n_ to $embedded
  80.  !set embcnt=!itemcnt $embedded
  81. !endif
  82. !set i=$n_
  83.  
  84. !if $q_form=yes
  85.  !if $t_=c
  86.   !set p_=$ch_choose,$(choicelist$i)
  87.   !if $idontknow>0 and noidontknow notwordof $(choiceoption$i)
  88.    !set p_=$p_,$ch_noidea
  89.   !endif
  90.   !if $qcmgood<1
  91.    !set p_=$p_,$ch_none
  92.   !endif
  93.   !set N_=!itemcnt $p_
  94.   !set C_=$(choice$i)
  95.   !if debug iswordof $m_oefenv
  96.    !set replydefaulted=yes
  97.    !if $oef_default=yes
  98.     !set T_=!positionof item $(choicegood$i[1]) in $(choicelist$i)
  99.     !default choice$i=$(T_[1])
  100.    !endif
  101.   !endif
  102.   !formselect choice$i from 0 to $[$N_-1] prompt $p_
  103.   !set choice$i=$C_
  104.  !else
  105.   !read anstype/$(replytype$i).input noprompt
  106.  !endif
  107. !else
  108.  !distribute item green,red,blue into colorr_good,colorr_bad,colorr_forget
  109.  !set cl=blue
  110.  !if $t_=c
  111.   !set cl=$(colorr_$(diachoice$i))
  112.   !set p_=!item $(choice$i) of $(choicelist$i),$ch_noidea,$ch_none
  113.   !set choicename$i=[$embcnt]
  114.  !else
  115.   !default reply_$i=$(reply$i)
  116.   !set p_=$(reply_$i)
  117.   !if dprompt iswordof $(replystyle$i)
  118.    !set reply_$i=$(reply__$i)
  119.   !endif
  120.   !if mc iswordof $(replystyle$i) and $inputsize1!=$empty and $inputsize1 >= 1 and $inputsize1 <= 1000
  121.    !set tt=!rows2lines $(replygood$i)
  122.    !distribute lines $tt into ts,tt
  123.    !default prompt_=!item $inputsize1 of $tt
  124.    !set p_=$prompt_
  125.    !reset tv
  126.    !if $(replytype$i)  iswordof mark flashcard
  127.      !set tv=$(reply$i)
  128.    !else
  129.     !for r_ in $(reply$i)
  130.      !set tu=!positionof item $r_ in $tt
  131.      !set tv=!append item $tu to $tv
  132.     !next r_
  133.    !endif
  134.    !set p_=!replace internal  &#59; by ; in $p_
  135.   !if $inputsize1 notitemof $tv
  136.     !if $inputsize1 isitemof $ts and $(replytype$i) iswordof mark flashcard
  137.      !set cl = $colorr_forget
  138.      !imgrename <b><tt><u><font color="$cl">$p_</font></u></tt></b>
  139.     !else
  140.      !imgrename <b><tt><u>$p_</u></tt></b>
  141.     !endif
  142.     !exit
  143.    !endif
  144.   !endif
  145.   !if $(replytype$i) iswordof code
  146.    !set p_=!replace internal & by &amp; in $p_
  147.    !set p_=!replace internal &amp;#36; by &#36; in $p_
  148.   !set p_=!replace internal < by &lt; in $p_
  149.    !set p_=<pre>$p_</pre>
  150.   !endif
  151.   !set tt=!word 1 of $(replygood$i)
  152.   !if $tt!=?analyze
  153.    !set cl=$(colorr_$(diareply$i))
  154.    !if $(replytype$i) iswordof mark flashcard
  155.     !if $inputsize isitemof $ts
  156.       !set cl = $colorr_good
  157.     !else
  158.     !set cl = $colorr_bad
  159.     !endif
  160.    !endif
  161.   !else
  162.    !set embedded_analyze=!append item $i to $embedded_analyze
  163.    !if noanalyzeprint notwordof $(replyoption$i)
  164.     !set embedded_bracket=$embedded_bracket [$embcnt]
  165.    !endif
  166.   !endif
  167.   !set replyname$i=[$embcnt]
  168.  !endif
  169.  !if noanalyzeprint notwordof $(replyoption$i)
  170.   !set embcnt1=&nbsp;<sup><small>[$embcnt]</small></sup>
  171.  !else
  172.   !reset embcnt1
  173.  !endif
  174.  !if $(replytype$i) notwordof correspond
  175.   !set instex_color=$cl
  176.   !imgrename <b><font color="$cl">$p_</font></b>$embcnt1
  177.   !else
  178.   !imgrename $p_ $embcnt1
  179.  !endif
  180.  !set instex_color=black
  181.  !if $(replytype$i) iswordof correspond
  182.   !set noshow$i=yes
  183.  !endif
  184. !endif
  185.  
  186.