Subversion Repositories wimsdev

Rev

Rev 16736 | 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. <h2 class="legend oefanswername">$name_answeranalysis</h2>
  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\
  43.             chemclick and nolegend notwordof $(replyoption$i))\
  44.             or legend iswordof $(replyoption$i))\
  45.             and ?analyze notin $(replygood$i) and $wims_isexam<1
  46.           !if $(diareply$i)!=good or $(partialgood$i)=yes or $(precreply$i)=yes
  47.             !set display_oeflegend=yes
  48.             !if $(partialgood$i)=yes
  49.               !default display_partialgood=yes
  50.             !endif
  51.             !if $(precreply$i)=yes
  52.               !default display_precreply=yes
  53.             !endif
  54.             !if ($(replystyle$i)=mc or $(replytype$i) iswordof draw multipleclick chemclick) and $(replytype$i) notwordof radio
  55.               !default display_forget=yes
  56.             !endif
  57.           !endif
  58.         !endif
  59.       !endif
  60.     !endif
  61.   !endif
  62.   !advance cnt$t
  63. !next t
  64.  
  65. !if $conditioncnt>0
  66.   !if $embedded_bracket!=$empty
  67.     <tr><td style="text-align:left" colspan="2" class="nowrap small">$embedded_bracket</td></tr>
  68.   !endif
  69. !endif
  70.  
  71. !for i in $condlist
  72.   !if hide notwordof $(condoption$i)
  73.     <tr><td colspan="2" class="bold">$(condname$i):</td><td>
  74.     !item $(condtest$i)+1 of $condbad,$condgood
  75.     </td></tr>
  76.   !endif
  77. !next i
  78.  
  79. !if $ansorder!=$empty or $conditioncnt >0
  80.   </table>
  81. !endif
  82.  
  83. !if $display_oeflegend issametext yes
  84.   !read oef/color_legend.phtml
  85. !endif
  86. !set scorestat=!getscorestatus sheet=$wims_sheet
  87. !if $feedbackcnt>0 and \
  88.   ($givefeed=$empty or $givefeed=-1 or ($givefeed=1 and ($score=10 or $seedlastcnt>=$seedrepeat))\
  89.     or ($givefeed>=2 and $seedcnt>=$givefeed and ($score=10 or $seedlastcnt>=$seedrepeat))\
  90.     or ($givefeed>=1 and _exam isin $wims_session)\
  91.     or ($givefeed=-2 and $scorestat=no)\
  92.   )
  93.   <div class="oef_feedbacks" style="clear:left;">
  94.   !read $deffile feedback
  95.   </div>
  96. !endif
  97. <br class="spacer clearall">
  98. !if $status=$empty
  99.   <span class="oef_modulescore">
  100.     !if $qnum>1
  101.       $name_serie_score
  102.     !else
  103.       $name_exo_score
  104.     !endif
  105.   </span>
  106.   !ifval $module_score>9.8
  107.     <span class="oef_congratulations">$wims_name_Congratulations</span>
  108.   !endif
  109.   !if $toolate!=$empty and $score>$module_score
  110.     <span class="oef_penalty">$name_penalty</span>
  111.   !endif
  112. !endif
  113. !!end of .content
  114. </div>
  115. !!end of .answer_analysis
  116. </div>
  117. !!presentsol=1 deprecated
  118. !! givesol=1: always if $score=10 or at the last try of all versions
  119. !if $solution!=$empty and ($givesol=$empty or (($presentsol=1 and $score<10)\
  120.     or ($givesol=1 and ($score=10 or $seedlastcnt>=$seedrepeat))\
  121.     or ($givesol>=2 and $seedcnt>=$givesol and ($score=10 or $seedlastcnt>=$seedrepeat))\
  122.     or ($givesol>=1 and _exam isin $wims_session)\
  123.     or ($givesol=-1 and $scorestat=no)\
  124.     ))
  125.   <div class="wims_widget_box clearall">
  126.     <div class="title_box">
  127.       <input type="button" class="wims_button wims_secondary_button float_right small"
  128.              id="button_print" value="$name_sol_print"
  129.              onclick="printSolution()">
  130.       <script>
  131.         function printSolution() {
  132.           css_print = document.getElementById("css_print");
  133.           css_print.disabled=false;
  134.           window.print();
  135.           css_print.disabled=true;
  136.         }
  137.       </script>
  138.       <h2>$name_Solution</h2>
  139.     </div>
  140.     <div class="box_content">
  141.       !if $solution!=$executed_str or $oef2wims_version<3.10
  142.         $solution
  143.       !else
  144.         !read $deffile solution
  145.       !endif
  146.     </div>
  147.   </div>
  148. !endif
  149.  
  150. !!reset seedlastcnt
  151.  
  152. !if $m_reply_err != $empty
  153.   <pre class="wimswarning">$m_reply_err</pre>
  154. !endif
  155.   <br class="spacer clearall">
  156. </div>
  157. <!--END oef answer-->
  158.