Subversion Repositories wimsdev

Rev

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