Subversion Repositories wimsdev

Rev

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

  1. !nocache
  2. !read oef/default
  3. !read oef/testseedscore.phtml
  4. !read getparm $module_init_parm intro_check intro_good
  5. !if 3 isin $get_introcheck
  6.   !set introgivegood=1
  7. !endif
  8. !default introgivegood=$get_intro_good
  9. !read oef/default
  10. !default seedrepeat=0
  11. !bound introgivegood between 0 and $limit_version default 1
  12. !if (($introgivegood=1 and $seedrepeat<=1) or\
  13.     ($introgivegood>=1 and $introgivegood<=$seedcnt and $seedlastcnt>=$seedrepeat)\
  14.     or ($introgivegood>=1 and _exam isin $wims_session)\
  15.     )
  16.   !set presentgood=1
  17. !else
  18.   !set presentgood=0
  19. !endif
  20.  
  21. <div class="oefanswer">
  22. !nocache
  23. !if bad_exo iswordof $error
  24.   !exit
  25. !endif
  26. !read ./oef/$module_language/answer.phtml
  27. <div id="answeranalysis">
  28. <h3 class="legend oefanswername">$name_answeranalysis</h3>
  29.  
  30. <div class="content">
  31. !if $ansorder!=$empty or $conditioncnt >0
  32.   <table class="float_left answeranalysis">
  33. !endif
  34.  
  35. !distribute item 1,1 into cntr,cntc
  36.  
  37. !set indgood   =<span class="oef_indgood">$indgood</span>
  38. !set indpartial=<span class="oef_indpartial">$indpartial</span>
  39. !set indprec   =<span class="oef_indprec">$indprec</span>
  40. !set indbad    =<span class="oef_indbad">$indbad</span>
  41. !set condgood  =<span class="oef_condgood">$condgood</span>
  42. !set condbad   =<span class="oef_condbad">$condbad</span>
  43.  
  44. !for t in $ansorder
  45.   !set i=$(cnt$t)
  46.   !if $oefsteps=$empty or $t$i isitemof $gotsteps
  47.     !set tt=!word 1 of $(replygood$i)
  48.     !if noanalyzeprint notwordof $(replyoption$i) or ?analyze notin $(replygood$i)
  49.       !read oef/answer$t.phtml
  50.     !endif
  51.     !! # Here is a whitelist of answer types where color legend must be displayed.
  52.    !if noanalyzeprint iswordof $(replyoption$i)
  53.       !set display_noanalyze=yes
  54.     !else
  55.       !! could have been defined for another reply
  56.       !if $display_noanalyze!=yes
  57.         !if (($(replytype$i) iswordof radio checkbox mark flashcard numeric and nolegend notwordof $(replyoption$i))\
  58.             or legend iswordof $(replyoption$i))\
  59.             and ?analyze notin $(replygood$i) and $wims_isexam<1
  60.           !if $(diareply$i)!=good or $(partialgood$i)=yes or $(precreply$i)=yes
  61.             !set display_oeflegend=yes
  62.             !if $(partialgood$i)=yes
  63.               !default display_partialgood=yes
  64.             !endif
  65.             !if $(precreply$i)=yes
  66.               !default display_precreply=yes
  67.             !endif
  68.             !if ($(replystyle$i)=mc or $(replytype$i) iswordof draw) and $(replytype$i) notwordof radio
  69.               !default display_forget=yes
  70.             !endif
  71.           !endif
  72.         !endif
  73.       !endif
  74.     !endif
  75.   !endif
  76.   !advance cnt$t
  77. !next t
  78.  
  79. !if $conditioncnt>0
  80.   !if $embedded_bracket!=$empty
  81.     <tr><td style="text-align:left" colspan="2" class="nowrap small">$embedded_bracket</td></tr>
  82.   !endif
  83. !endif
  84.  
  85. !for i in $condlist
  86.   !if hide notwordof $(condoption$i)
  87.     <tr><td colspan="2" class="bold">$(condname$i):</td><td>
  88.     !item $(condtest$i)+1 of $condbad,$condgood
  89.     </td></tr>
  90.   !endif
  91. !next i
  92.  
  93. !if $ansorder!=$empty or $conditioncnt >0
  94.   </table>
  95. !endif
  96.  
  97. !if $display_oeflegend issametext yes
  98.   !read oef/color_legend.phtml
  99. !endif
  100.  
  101. !if $feedbackcnt>0 and \
  102.   ($givefeed=$empty or $givefeed=-1 or ($givefeed=1 and ($score=10 or $seedlastcnt>=$seedrepeat))\
  103.     or ($givefeed>=2 and $seedcnt>=$givefeed and ($score=10 or $seedlastcnt>=$seedrepeat))\
  104.     or ($givefeed>=1 and _exam isin $wims_session)\
  105.   )
  106.   <div class="oef_feedbacks" style="clear:left;">
  107.   !read $deffile feedback
  108.   </div>
  109. !endif
  110.  
  111. !!presentsol=1 deprecated
  112. !! givesol=1: always if $score=10 or at the last try of all versions
  113. !if $solution!=$empty and ($givesol=$empty or (($presentsol=1 and $score<10)\
  114.     or ($givesol=1 and ($score=10 or $seedlastcnt>=$seedrepeat))\
  115.     or ($givesol>=2 and $seedcnt>=$givesol and ($score=10 or $seedlastcnt>=$seedrepeat))\
  116.     or ($givesol>=1 and _exam isin $wims_session)\
  117.     ))
  118.   <div class="wims_widget_box clearall">
  119.     <div class="title_box">
  120.       <input type="button" class="wims_button wims_secondary_button float_right small"
  121.              id="button_print" value="$name_sol_print"
  122.              onclick="printSolution()">
  123.       <script>
  124.         function printSolution() {
  125.           css_print = document.getElementById("css_print");
  126.           css_print.disabled=false;
  127.           window.print();
  128.           css_print.disabled=true;
  129.         }
  130.       </script>
  131.       <h3>$name_Solution</h3>
  132.     </div>
  133.     <div class="box_content">
  134.       !if $solution!=$executed_str or $oef2wims_version<3.10
  135.         $solution
  136.       !else
  137.         !read $deffile solution
  138.       !endif
  139.     </div>
  140.   </div>
  141. !endif
  142.  
  143. !reset seedlastcnt
  144.  
  145. !if $m_reply_err != $empty
  146.   <pre class="wimswarning">$m_reply_err</pre>
  147. !endif
  148.   <br class="spacer clearall" />
  149.   </div>
  150.  </div>
  151. </div>
  152. <!--END oef answer-->
  153.