Subversion Repositories wimsdev

Rev

Rev 8628 | Rev 8875 | 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_=!items2lines $prompt_
  34.     !set prompt_=!replace internal $\
  35. $ by  </span>$  $ <span style="color:blue">/</span> $ $<span style="text-decoration:underline"> in <span style="text-decoration:underline">$prompt_</span>
  36.    !endif
  37.   !endif
  38.   <div class="inline" style="font-style:italic">$prompt_</div>
  39.  !else
  40.   !if $(replytype$i__) iswordof compose correspond
  41.    !if $(replytype$i__)=compose
  42.     !set prompt_=!line $i__ of $(Rg$i)
  43.     !set prompt_cnt=!wordcnt $prompt
  44.     !set prompt_=!shuffle $prompt_
  45.     !set prompt_=!replace internal , by $ $ / $ $ in $prompt_
  46.    $prompt_
  47.    !endif
  48.    !if $(replytype$i__)=correspond
  49.     !set prompt_=!line $i__ of $(Rg$i)
  50.     $prompt_
  51.    !endif
  52.   !else
  53.    ___________
  54.   !endif
  55.  !endif
  56.  !exit
  57. !endif
  58. !!end of print section
  59.  
  60. !if $wims_read_parm=$empty
  61.  !exit
  62. !endif
  63.  
  64. !set n_=!char 2 to -1 of $t_
  65. !set t_=!char 1 of $t_
  66. !set t_=!lower $t_
  67. !set t_=!translate a to r in $t_
  68. !set n_=!text select 0123456789()+-* in $n_
  69. !set n_=$[$n_]
  70. !bound n_ between integer 1 and 100 default $
  71. !if $t_ notitemof r,c or $n_=$empty
  72.  !exit
  73. !endif
  74.  
  75. !if $t_=c and $(choicelist$n_)=$empty or\
  76.         $t_=r and $(replygood$n_)=$empty
  77.  !exit
  78. !endif
  79.  
  80. !if $t_$n_ notitemof $embedded
  81.  !set embedded=!append item $t_$n_ to $embedded
  82.  !set embcnt=!itemcnt $embedded
  83. !endif
  84. !set i=$n_
  85.  
  86. !if $q_form=yes
  87.  !if $t_=c
  88.   !set p_=$ch_choose,$(choicelist$i)
  89.   !if $idontknow>0 and noidontknow notwordof $(choiceoption$i)
  90.    !set p_=$p_,$ch_noidea
  91.   !endif
  92.   !if $qcmgood<1
  93.    !set p_=$p_,$ch_none
  94.   !endif
  95.   !set N_=!itemcnt $p_
  96.   !set C_=$(choice$i)
  97.   !if debug iswordof $m_oefenv
  98.    !set replydefaulted=yes
  99.    !if $oef_default=yes
  100.     !set T_=!positionof item $(choicegood$i[1]) in $(choicelist$i)
  101.     !default choice$i=$(T_[1])
  102.    !endif
  103.   !endif
  104.   !formselect choice$i from 0 to $[$N_-1] prompt $p_
  105.   !set choice$i=$C_
  106.  !else
  107.   !read anstype/$(replytype$i).input noprompt
  108.  !endif
  109. !else
  110.  !distribute item oef_indgood, oef_indbad, oef_indforget, oef_indneutral, oef_empty into colorr_good, colorr_bad, colorr_forget, colorr_neutral, colorr_none
  111.  !set cl=oef_indforget
  112.  !if $t_=c
  113.   !set cl=$(colorr_$(diachoice$i))
  114.   !set p_=!item $(choice$i) of $(choicelist$i),$ch_noidea,$ch_none
  115.   !set choicename$i=[$embcnt]
  116.  !else
  117.   !default reply_$i=$(reply$i)
  118.   !set p_=$(reply_$i)
  119.   !if dprompt iswordof $(replystyle$i)
  120.    !set reply_$i=$(reply__$i)
  121.   !endif
  122.   !if mc iswordof $(replystyle$i) and $inputsize1!=$empty and $inputsize1 >= 1 and $inputsize1 <= 1000
  123.    !set tt=!rows2lines $(replygood$i)
  124.    !distribute lines $tt into ts,tt
  125.    !default prompt_=!item $inputsize1 of $tt
  126.    !set p_=$prompt_
  127.    !reset tv
  128.    !if $(replytype$i) iswordof mark flashcard
  129.      !set tv=$(reply$i)
  130.    !else
  131.     !for r_ in $(reply$i)
  132.      !set tu=!positionof item $r_ in $tt
  133.      !set tv=!append item $tu to $tv
  134.     !next r_
  135.    !endif
  136.  
  137.    !set p_=!replace internal &#59; by ; in $p_
  138.   !if $inputsize1 notitemof $tv
  139.     !if $presentgood=0
  140.       !set cl= $colorr_none
  141.     !else
  142.       !if $inputsize1 isitemof $ts and $(replytype$i) iswordof mark flashcard checkbox
  143.         !set cl = $colorr_forget
  144.       !else
  145.         !set cl = $colorr_neutral
  146.       !endif
  147.     !endif
  148.     !imgrename <span class="$cl">$p_</span>
  149.     !exit
  150.    !endif
  151.   !endif
  152.   !if $(replytype$i) iswordof code
  153.    !set p_=!replace internal & by &amp; in $p_
  154.    !set p_=!replace internal &amp;#36; by &#36; in $p_
  155.   !set p_=!replace internal < by &lt; in $p_
  156.    !set p_=<pre>$p_</pre>
  157.   !endif
  158.   !set tt=!word 1 of $(replygood$i)
  159.   !if $tt!=?analyze
  160.    !set cl=$(colorr_$(diareply$i))
  161.    !if $(replytype$i) iswordof mark flashcard checkbox
  162.     !if $inputsize isitemof $ts
  163.       !set cl = $colorr_good
  164.     !else
  165.       !set cl = $colorr_bad
  166.     !endif
  167.    !endif
  168.   !else
  169.    !set embedded_analyze=!append item $i to $embedded_analyze
  170.    !if noanalyzeprint notwordof $(replyoption$i)
  171.     !set embedded_bracket=$embedded_bracket [$embcnt]
  172.    !endif
  173.   !endif
  174.   !set replyname$i=[$embcnt]
  175.  !endif
  176.  !set embcnt1=&nbsp;<sup><small>[$embcnt]</small></sup>
  177.  !if $(replytype$i) notwordof correspond crossword
  178.    !if bad isin $cl
  179.     !set instex_color=red
  180.    !endif
  181.    !if good isin $cl
  182.     !set instex_color=green
  183.    !endif
  184.    !if forget isin $cl
  185.     !set instex_color=blue
  186.    !endif
  187.   !imgrename <span class="$cl">$p_</span>$embcnt1
  188.   !else
  189.   !imgrename $p_ $embcnt1
  190.  !endif
  191.  !set instex_color=black
  192.  !if $(replytype$i) iswordof correspond
  193.   !set noshow$i=yes
  194.  !endif
  195. !endif
  196.