EduploneTest/skins/EduploneTest eduplone_scoreOverride.pt,1.5,1.6 eduplone_userResults2.pt,1.5,1.6
Claudia Disque <[email protected]>
| Newsgroups | gmane.comp.web.zope.eduplone.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/eduplone/EduploneTest/skins/EduploneTest
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5807/skins/EduploneTest
Modified Files:
eduplone_scoreOverride.pt eduplone_userResults2.pt
Log Message:
interface: plone-style table
Index: eduplone_userResults2.pt
===================================================================
RCS file: /cvsroot/eduplone/EduploneTest/skins/EduploneTest/eduplone_userResults2.pt,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** eduplone_userResults2.pt 13 Nov 2004 11:16:45 -0000 1.5
--- eduplone_userResults2.pt 20 Nov 2004 19:25:49 -0000 1.6
***************
*** 2,8 ****
lang="en-US"
metal:use-macro="here/main_template/macros/master"
! i18n:domain="plone"
>
!
<body>
<div metal:fill-slot="main">
--- 2,8 ----
lang="en-US"
metal:use-macro="here/main_template/macros/master"
! i18n:domain="eduplone"
>
!
<body>
<div metal:fill-slot="main">
***************
*** 11,178 ****
<div class="contentHeader">
<h1>
! <small i18n:translate="label_results_for_users">Results for user:</small>
<span tal:content="structure python:here.title_or_id()">Title or id</span>
! </h1>
</div>
<div id="bodyContent"
tal:define="quests python:here.fixedObjectValues();
! questionId python: request.get('qId', None);
! defcolors python:['red','green'];
! defimages python:['wrong_answer.gif','right_answer.gif']">
!
<!-- ===== -->
<tal:rep tal:repeat="quest quests">
!
<fieldset>
! <legend>
! <img src="questionmark.gif" border="0" />
!
! <span style="text-decoration:underline; font-weight: bold;">
! <a tal:content="quest/title"
tal:attributes="href python:quest.absolute_url() + '/task_view' " />
! </span>
!
!
! (<tal tal:content="python: quest.meta_type" />)
!
!
! <b tal:content="python: round(here.score_CalculateQuestion(quest.getId(), user.id),2)" />
! /
! <b tal:content="python: quest.getScore()" />
! <b i18n:translate="label_score">Punkte</b>
!
! </legend>
<small style="font-weight:normal;" tal:content="structure quest/question" />
!
! <br/><br/>
!
! <tal:typeswitch tal:condition="python: quest.meta_type == 'eduplone FillGap'">
! <b tal:content="structure python: quest.getRenderedText(render_as='tutor_noLinks')" />
! <bR/><bR/>
! </tal:typeswitch>
!
<!-- = = = = = = -->
!
! <tal:typeswitch tal:condition="python: quest.meta_type == 'eduplone FreeText'">
! <b tal:content="structure python: here.evalFreeTextAnswer(quest.getId(), here.getSingleAnswer(quest.getId(), quest.getId()))" />
! <bR/><bR/>
!
! <table border="1" tal:define="qId python:quest.getId();
! uAnswer python:here.getSingleAnswer(qId, qId);
! evalFTA python:here.evalFreeTextAnswer(qId, uAnswer, 2)">
! <tr>
! <td style="font-weight:bold; background-color:lightgrey;" i18n:translate="label_answer_alternatives">Answer alternatives</td>
! <td style="font-weight:bold; background-color:lightgrey;" i18n:translate="label_occurs_in_useranswer">occurs in userAnswer?</td>
! <td style="font-weight:bold; background-color:lightgrey;" i18n:translate="label_user_score">Score</td>
! </tr>
!
! <tr tal:repeat="answerObj python:here.filteredAnswerValues(qId)">
! <td>
! <tal tal:repeat="answer python:answerObj.getCorrectAnswer()">
! <span tal:content="answer" /> <br/>
! </tal>
! </td>
! <td>
! <img src="" tal:attributes="src python:defimages[evalFTA[answerObj.getId()]]" />
! </td>
! <td>
! <tal tal:condition="python: evalFTA[answerObj.getId()]">
! <b tal:content="python: round(float(quest.getScore())/float(len(quest.filteredAnswerValues(quest.getId()))),2)" />
! </tal>
! </td>
! </tr>
! </table>
!
! </tal:typeswitch>
!
<!-- = = = = = = -->
! <table border="1" tal:condition="python: quest.meta_type != 'eduplone FreeText'">
! <tr>
! <td style="font-weight:bold; background-color:lightgrey;" i18n:translate="label_answer_alternatives">Answer alternatives</td>
! <td style="font-weight:bold; background-color:lightgrey;" i18n:translate="label_user_answer">User answer</td>
! <td style="font-weight:bold; background-color:lightgrey;" i18n:translate="label_correct">correct ?</td>
! <td style="font-weight:bold; background-color:lightgrey;" i18n:translate="label_user_score">Score</td>
! </tr>
- <tr tal:repeat="answer python:here.filteredAnswerValues(quest.getId())">
- <tal:def tal:define="MType python: answer.meta_type">
-
<!-- == TYPESWITCH == -->
! <tal:typeswitch tal:condition="python: MType == 'eduplone SingleChoiceAnswer'">
! <td tal:content="python: answer.getAnswer()" />
! <td>
! <b tal:condition="python: answer.getId()==here.getSingleAnswer(quest.getId(),answer.getId())">X</b>
! </td>
! <td>
! <img src="" tal:condition="python: answer.getId()==here.getSingleAnswer(quest.getId(),answer.getId())"
! tal:attributes="src python:defimages[here.evalAnswer(quest.getId(), answer.getId(), here.getSingleAnswer(quest.getId(), answer.getId()))]"/>
!
! <img src="" tal:condition="python: answer.getId()!=here.getSingleAnswer(quest.getId(),answer.getId()) and answer.getCorrectAnswer()==True"
! tal:attributes="src python:defimages[1]"/>
! </td>
! <td>
! <tal tal:condition="python: here.evalAnswer(quest.getId(), answer.getId(), here.getSingleAnswer(quest.getId(), answer.getId()))">
! <b tal:content="python: quest.getScore()" />
! </tal>
! </td>
! </tal:typeswitch>
! <!-- = -->
! <tal:typeswitch tal:condition="python: MType in ['eduplone MultiChoiceAnswer', 'eduplone TrueFalseAnswer',]">
! <td tal:content="python: answer.getAnswer()" />
! <td tal:content="python: here.getSingleAnswer(quest.getId(),answer.getId())" />
! <td>
! <img src="" tal:attributes="src python:defimages[here.evalAnswer(quest.getId(), answer.getId(), here.getSingleAnswer(quest.getId(), answer.getId()))]"/>
! </td>
! <td>
! <tal tal:condition="python: here.evalAnswer(quest.getId(), answer.getId(), here.getSingleAnswer(quest.getId(), answer.getId()))">
! <b tal:content="python: round(float(quest.getScore())/float(len(quest.filteredAnswerValues(quest.getId()))),2)" />
! </tal>
! </td>
! </tal:typeswitch>
! <!-- = -->
! <tal:typeswitch tal:condition="python: MType in ['eduplone FillGapAnswer','eduplone TextTaskAnswer']">
! <td>
! <span tal:repeat="answerLine python: answer.getCorrectAnswer()">
! <b tal:replace="answerLine" /><br/>
! </span>
! </td>
! <td tal:content="python: here.getSingleAnswer(quest.getId(),answer.getId())" />
! <td>
! <img src="" tal:attributes="src python:defimages[here.evalAnswer(quest.getId(), answer.getId(), here.getSingleAnswer(quest.getId(), answer.getId()))]"/>
! </td>
! <td>
! <tal tal:condition="python: here.evalAnswer(quest.getId(), answer.getId(), here.getSingleAnswer(quest.getId(), answer.getId()))">
! <b tal:content="python: round(float(quest.getScore())/float(len(quest.filteredAnswerValues(quest.getId()))),2)" />
! </tal>
! </td>
! </tal:typeswitch>
! <!-- = -->
! <tal:typeswitch tal:condition="python: MType in ['eduplone MatchingAnswer',]">
! <td tal:content="python: answer.getCorrectAnswer()" />
! <td tal:content="python: here.getSingleAnswer(quest.getId(),answer.getId())" />
! <td>
! <img src="" tal:attributes="src python:defimages[here.evalAnswer(quest.getId(), answer.getId(), here.getSingleAnswer(quest.getId(), answer.getId()))]"/>
! </td>
! <td>
! <tal tal:condition="python: here.evalAnswer(quest.getId(), answer.getId(), here.getSingleAnswer(quest.getId(), answer.getId()))">
! <b tal:content="python: round(float(quest.getScore())/float(len(quest.filteredAnswerValues(quest.getId()))),2)" />
! </tal>
! </td>
! </tal:typeswitch>
!
!
<!-- == //TYPESWITCH == -->
! </tal:def>
! </tr>
! </table>
!
! </fieldset>
</tal:rep>
--- 11,190 ----
<div class="contentHeader">
<h1>
! <small i18n:translate="label_user_result">user result:</small>
<span tal:content="structure python:here.title_or_id()">Title or id</span>
! </h1>
</div>
<div id="bodyContent"
tal:define="quests python:here.fixedObjectValues();
! questionId python: request.get('qId', None);
! defcolors python:['red','green'];
! defimages python:['wrong_answer.gif','right_answer.gif']">
!
<!-- ===== -->
<tal:rep tal:repeat="quest quests">
!
<fieldset>
! <legend>
! <img src="questionmark.gif" border="0" />
!
! <span style="text-decoration:underline; font-weight: bold;">
! <a tal:content="quest/title"
tal:attributes="href python:quest.absolute_url() + '/task_view' " />
! </span>
!
! (<tal tal:content="python: quest.meta_type" />)
!
!
!
! <b tal:content="python: round(here.score_CalculateQuestion(quest.getId(), user.id),2)" />
! /
! <b tal:content="python: quest.getScore()" />
! <b i18n:translate="label_score">Punkte</b>
!
! </legend>
<small style="font-weight:normal;" tal:content="structure quest/question" />
!
! <br/><br/>
!
! <tal:typeswitch tal:condition="python: quest.meta_type == 'eduplone FillGap'">
! <b tal:content="structure python: quest.getRenderedText(render_as='tutor_noLinks')" />
! <bR/><bR/>
! </tal:typeswitch>
!
<!-- = = = = = = -->
!
! <tal:typeswitch tal:condition="python: quest.meta_type == 'eduplone FreeText'">
! <b tal:content="structure python: here.evalFreeTextAnswer(quest.getId(), here.getSingleAnswer(quest.getId(), quest.getId()))" />
! <bR/><bR/>
!
! <table border="1"
! class="listing"
! summary="user result"
!
! tal:define="qId python:quest.getId();
! uAnswer python:here.getSingleAnswer(qId, qId);
! evalFTA python:here.evalFreeTextAnswer(qId, uAnswer, 2)">
! <thead>
! <tr><th i18n:translate="label_answer_alternatives">Answer alternatives</th>
! <th i18n:translate="label_occurs_in_useranswer">occurs in userAnswer?</th>
! <th i18n:translate="label_user_score">Score</th>
! </tr>
! </thead>
!
! <tr tal:repeat="answerObj python:here.filteredAnswerValues(qId)">
! <td>
! <tal tal:repeat="answer python:answerObj.getCorrectAnswer()">
! <span tal:content="answer" /> <br/>
! </tal>
! </td>
! <td>
! <img src="" tal:attributes="src python:defimages[evalFTA[answerObj.getId()]]" />
! </td>
! <td>
! <tal tal:condition="python: evalFTA[answerObj.getId()]">
! <b tal:content="python: round(float(quest.getScore())/float(len(quest.filteredAnswerValues(quest.getId()))),2)" />
! </tal>
! </td>
! </tr>
! </table>
!
! </tal:typeswitch>
!
<!-- = = = = = = -->
! <tal:typeswitch tal:condition="python: quest.meta_type != 'eduplone FreeText'">
!
! <table border="1"
! class="listing"
! summary="user result">
!
! <thead>
! <tr><th i18n:translate="label_answer_alternatives">Answer alternatives</th>
! <th i18n:translate="label_user_answer">User answer</th>
! <th i18n:translate="label_correct">correct ?</th>
! <th i18n:translate="label_user_score">Score</th>
! </tr>
! </thead>
!
! <tr tal:repeat="answer python:here.filteredAnswerValues(quest.getId())">
! <tal:def tal:define="MType python: answer.meta_type">
<!-- == TYPESWITCH == -->
! <tal:typeswitch tal:condition="python: MType == 'eduplone SingleChoiceAnswer'">
! <td tal:content="python: answer.getAnswer()" />
! <td>
! <b tal:condition="python: answer.getId()==here.getSingleAnswer(quest.getId(),answer.getId())">X</b>
! </td>
! <td>
! <img src="" tal:condition="python: answer.getId()==here.getSingleAnswer(quest.getId(),answer.getId())"
! tal:attributes="src python:defimages[here.evalAnswer(quest.getId(), answer.getId(), here.getSingleAnswer(quest.getId(), answer.getId()))]"/>
!
! <img src="" tal:condition="python: answer.getId()!=here.getSingleAnswer(quest.getId(),answer.getId()) and answer.getCorrectAnswer()==True"
! tal:attributes="src python:defimages[1]"/>
! </td>
! <td>
! <tal tal:condition="python: here.evalAnswer(quest.getId(), answer.getId(), here.getSingleAnswer(quest.getId(), answer.getId()))">
! <b tal:content="python: quest.getScore()" />
! </tal>
! </td>
! </tal:typeswitch>
! <!-- = -->
! <tal:typeswitch tal:condition="python: MType in ['eduplone MultiChoiceAnswer', 'eduplone TrueFalseAnswer',]">
! <td tal:content="python: answer.getAnswer()" />
! <td tal:content="python: here.getSingleAnswer(quest.getId(),answer.getId())" />
! <td>
! <img src="" tal:attributes="src python:defimages[here.evalAnswer(quest.getId(), answer.getId(), here.getSingleAnswer(quest.getId(), answer.getId()))]"/>
! </td>
! <td>
! <tal tal:condition="python: here.evalAnswer(quest.getId(), answer.getId(), here.getSingleAnswer(quest.getId(), answer.getId()))">
! <b tal:content="python: round(float(quest.getScore())/float(len(quest.filteredAnswerValues(quest.getId()))),2)" />
! </tal>
! </td>
! </tal:typeswitch>
! <!-- = -->
! <tal:typeswitch tal:condition="python: MType in ['eduplone FillGapAnswer','eduplone TextTaskAnswer']">
! <td>
! <span tal:repeat="answerLine python: answer.getCorrectAnswer()">
! <b tal:replace="answerLine" /><br/>
! </span>
! </td>
! <td tal:content="python: here.getSingleAnswer(quest.getId(),answer.getId())" />
! <td>
! <img src="" tal:attributes="src python:defimages[here.evalAnswer(quest.getId(), answer.getId(), here.getSingleAnswer(quest.getId(), answer.getId()))]"/>
! </td>
! <td>
! <tal tal:condition="python: here.evalAnswer(quest.getId(), answer.getId(), here.getSingleAnswer(quest.getId(), answer.getId()))">
! <b tal:content="python: round(float(quest.getScore())/float(len(quest.filteredAnswerValues(quest.getId()))),2)" />
! </tal>
! </td>
! </tal:typeswitch>
! <!-- = -->
! <tal:typeswitch tal:condition="python: MType in ['eduplone MatchingAnswer',]">
! <td tal:content="python: answer.getCorrectAnswer()" />
! <td tal:content="python: here.getSingleAnswer(quest.getId(),answer.getId())" />
! <td>
! <img src="" tal:attributes="src python:defimages[here.evalAnswer(quest.getId(), answer.getId(), here.getSingleAnswer(quest.getId(), answer.getId()))]"/>
! </td>
! <td>
! <tal tal:condition="python: here.evalAnswer(quest.getId(), answer.getId(), here.getSingleAnswer(quest.getId(), answer.getId()))">
! <b tal:content="python: round(float(quest.getScore())/float(len(quest.filteredAnswerValues(quest.getId()))),2)" />
! </tal>
! </td>
! </tal:typeswitch>
!
!
<!-- == //TYPESWITCH == -->
! </tal:def>
! </tr>
! </table>
! </tal:typeswitch>
!
! </fieldset>
</tal:rep>
Index: eduplone_scoreOverride.pt
===================================================================
RCS file: /cvsroot/eduplone/EduploneTest/skins/EduploneTest/eduplone_scoreOverride.pt,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** eduplone_scoreOverride.pt 13 Oct 2004 20:17:03 -0000 1.5
--- eduplone_scoreOverride.pt 20 Nov 2004 19:25:48 -0000 1.6
***************
*** 11,15 ****
<div class="contentHeader">
<h1>
! <small i18n:translate="label_results_and_users">Results and users:</small>
<span tal:content="structure python:env.title_or_id()">
Title or id</span></h1>
--- 11,15 ----
<div class="contentHeader">
<h1>
! <small i18n:translate="label_user_result">user result:</small>
<span tal:content="structure python:env.title_or_id()">
Title or id</span></h1>
***************
*** 26,141 ****
<div id="bodyContent" tal:define="questionId python: request.get('qId', None);
userId python: here.getId();
! questionOb python: here.aq_parent.aq_parent[questionId];
! quests python: here.fixedObjectValues()">
! <!-- ==================================================================== -->
- <table>
- <tr>
- <td i18n:translate="label_user">User:</td><td><b tal:content="userId" /></td>
- </tr>
- <tr>
- <td i18n:translate="label_question_type">Question type:</td><td><b tal:content="python: questionOb.meta_type"/></td>
- </tr>
- <tr>
- <td i18n:translate="label_question_title">Question title:</td><td><b tal:content="python: questionOb.title" /></td>
! </tr>
! <tr>
! <td valign="top" i18n:translate="label_answer">Answer:</td>
! <td>
! <b tal:repeat="answer python:here.filteredAnswerValues(questionId)"
! tal:content="python:answer.title"/>
! </td>
! </tr>
! <tr>
! <td valign="top" i18n:translate="label_question">Question:</td><td><b tal:content="python: questionOb.question"/></td>
! </tr>
! <tr>
! <td valign="top" i18n:translate="label_instructions">Instructions:</td><td><b tal:content="python: questionOb.instruction"/></td>
! </tr>
! <tr>
! <td i18n:translate="label_question_score">Score:</td><td><b tal:content="python: questionOb.score"/></td>
! </tr>
! <tr>
! <td i18n:translate="label_user_score">User score:</td><td><b tal:content="python: here.score_CalculateQuestion(questionId, userId)"/></td>
! </tr>
! </table><br/>
! <!-- ==================================================================== -->
! <table width="80%" tal:condition="python: questionOb.meta_type == 'eduplone Matching'">
! <tr>
! <td i18n:translate="label_answer_alternatives">Answer alternatives</td><td i18n:translate="label_answer">Answer</td><td i18n:translate="label_user_answer">User answer</td>
! </tr>
! <tr tal:repeat="answer python: questionOb.objectValues()">
! <td><b tal:content="python: answer['Challenge']" /></td>
! <td tal:content="python: answer.correctAnswer" />
! <td tal:content="python: here.getSingleAnswer(questionId, answer.getId())" />
! </tr>
! </table>
! <!-- ==================================================================== -->
! <table width="80%" tal:condition="python: questionOb.meta_type in ['eduplone MultiChoice', 'eduplone SingleChoice', 'eduplone TrueFalse']">
! <tr>
! <td i18n:translate="label_answer_alternatives">Answer alternatives</td><td i18n:translate="label_answer">Answer</td><td i18n:translate="label_user_answer">User answer</td>
! </tr>
! <tr tal:repeat="answer python: questionOb.objectValues()">
! <td><b tal:content="python: answer['Answer']" /></td>
! <td tal:content="python: answer.correctAnswer" />
! <td tal:content="python: here.getSingleAnswer(questionId, answer.getId())" />
! </tr>
! </table>
! <!-- ==================================================================== -->
! <table width="80%" tal:condition="python: questionOb.meta_type == 'eduplone FreeText'">
! <tr>
! <td i18n:translate="label_answer_alternatives">Answer alternatives</td><td i18n:translate="label_answer">Answer</td><td i18n:translate="label_user_answer">User answer</td>
! </tr>
! <tr tal:repeat="answer python: questionOb.objectValues()">
! <td><b tal:content="python: answer['correctAnswer']" /></td>
! <td tal:content="python: answer.correctAnswer" />
! <td tal:content="python: here.getSingleAnswer(questionId, answer.getId())" />
! </tr>
! </table>
! <!-- ==================================================================== -->
! <table width="80%" tal:condition="python: questionOb.meta_type == 'eduplone TextTask'">
! <tr>
! <td i18n:translate="label_answer_alternatives">Answer alternatives</td><td i18n:translate="label_answer">Answer</td><td i18n:translate="label_user_answer">User answer</td>
! </tr>
! <tr tal:repeat="answer python: questionOb.objectValues()">
! <td><b tal:content="python: answer['correctAnswer']" /></td>
! <td tal:content="python: answer.correctAnswer" />
! <td tal:content="python: here.getSingleAnswer(questionId, answer.getId())" />
! </tr>
! </table>
! <!-- ==================================================================== -->
! <table width="80%" tal:condition="python: questionOb.meta_type == 'eduplone FillGap'">
! <tr>
! <td i18n:translate="label_answer_alternatives">Answer alternatives</td><td i18n:translate="label_answer">Answer</td><td i18n:translate="label_user_answer">User answer</td>
! </tr>
! <tr tal:repeat="answer python: questionOb.objectValues()">
! <td><tal tal:content="python: answer['correctAnswer']" /></td>
! <td tal:content="python: answer.Challenges" />
! <td tal:content="python: answer.correctAnswer" />
! <td tal:content="python: here.getSingleAnswer(questionId, answer.getId())" />
! </tr>
! </table>
<!-- ==================================================================== -->
--- 26,204 ----
<div id="bodyContent" tal:define="questionId python: request.get('qId', None);
userId python: here.getId();
! quest python: here.aq_parent.aq_parent[questionId];
! quests python: here.fixedObjectValues();
! questionId python: request.get('qId', None);
! defcolors python:['red','green'];
! defimages python:['wrong_answer.gif','right_answer.gif']">
! <fieldset>
! <legend>
! <img src="questionmark.gif" border="0" />
+ <span style="text-decoration:underline; font-weight: bold;">
+ <a tal:content="quest/title"
+ tal:attributes="href python:quest.absolute_url() + '/task_view' " />
+ </span>
!
! (<tal tal:content="python: quest.meta_type" />)
!
! <b tal:content="python: round(here.score_CalculateQuestion(quest.getId(), user.id),2)" />
! /
! <b tal:content="python: quest.getScore()" />
! <b i18n:translate="label_score">Punkte</b>
! </legend>
+ <small style="font-weight:bold;" tal:content="structure quest/question" />
+ <br/>
+ <small style="font-weight:normal;" tal:content="python: quest.instruction"/>
+ <br/><br/>
+ <!-- ----------------------------------------------------------------------------------------- -->
! <tal:typeswitch tal:condition="python: quest.meta_type == 'eduplone FillGap'">
! <b tal:content="structure python: quest.getRenderedText(render_as='tutor_noLinks')" />
! <bR/><bR/>
! </tal:typeswitch>
! <!-- = = = = = = -->
! <tal:typeswitch condition="python: quest.meta_type == 'eduplone FreeText'">
! <b tal:content="structure python: here.evalFreeTextAnswer(quest.getId(), here.getSingleAnswer(quest.getId(), quest.getId()))" />
! <bR/><bR/>
! <table border="1"
! class="listing"
! summary="user result"
! tal:define="qId python:quest.getId();
! uAnswer python:here.getSingleAnswer(qId, qId);
! evalFTA python:here.evalFreeTextAnswer(qId, uAnswer, 2)">
!
! <thead>
! <tr><th i18n:translate="label_answer_alternatives">Answer alternatives</th>
! <th i18n:translate="label_occurs_in_useranswer">occurs in userAnswer?</th>
! <th i18n:translate="label_user_score">Score</th>
! </tr>
! </thead>
! <tr tal:repeat="answerObj python:here.filteredAnswerValues(qId)">
! <td>
! <tal tal:repeat="answer python:answerObj.getCorrectAnswer()">
! <span tal:content="answer" /> <br/>
! </tal>
! </td>
! <td>
! <img src="" tal:attributes="src python:defimages[evalFTA[answerObj.getId()]]" />
! </td>
! <td>
! <tal tal:condition="python: evalFTA[answerObj.getId()]">
! <b tal:content="python: round(float(quest.getScore())/float(len(quest.filteredAnswerValues(quest.getId()))),2)" />
! </tal>
! </td>
! </tr>
! </table>
! </tal:typeswitch>
! <!-- = = = = = = -->
!
! <tal:typeswitch tal:condition="python: quest.meta_type != 'eduplone FreeText'">
+ <table border="1"
+ class="listing"
+ summary="user result">
+ <thead>
+ <tr><th i18n:translate="label_answer_alternatives">Answer alternatives</th>
+ <th i18n:translate="label_user_answer">User answer</th>
+ <th i18n:translate="label_correct">correct ?</th>
+ <th i18n:translate="label_user_score">Score</th>
+ </tr>
+ </thead>
+
+ <tr tal:repeat="answer python:here.filteredAnswerValues(quest.getId())">
+ <tal:def tal:define="MType python: answer.meta_type">
+ <!-- = = = = = = -->
+
+ <!-- == TYPESWITCH == -->
+ <tal:typeswitch tal:condition="python: MType == 'eduplone SingleChoiceAnswer'">
+ <td tal:content="python: answer.getAnswer()" />
+ <td>
+ <b tal:condition="python: answer.getId()==here.getSingleAnswer(quest.getId(),answer.getId())">X</b>
+ </td>
+ <td>
+ <img src="" tal:condition="python: answer.getId()==here.getSingleAnswer(quest.getId(),answer.getId())"
+ tal:attributes="src python:defimages[here.evalAnswer(quest.getId(), answer.getId(), here.getSingleAnswer(quest.getId(), answer.getId()))]"/>
+
+ <img src="" tal:condition="python: answer.getId()!=here.getSingleAnswer(quest.getId(),answer.getId()) and answer.getCorrectAnswer()==True"
+ tal:attributes="src python:defimages[1]"/>
+ </td>
+ <td>
+ <tal tal:condition="python: here.evalAnswer(quest.getId(), answer.getId(), here.getSingleAnswer(quest.getId(), answer.getId()))">
+ <b tal:content="python: quest.getScore()" />
+ </tal>
+ </td>
+ </tal:typeswitch>
+ <!-- = -->
+ <tal:typeswitch tal:condition="python: MType in ['eduplone MultiChoiceAnswer', 'eduplone TrueFalseAnswer',]">
+ <td tal:content="python: answer.getAnswer()" />
+ <td tal:content="python: here.getSingleAnswer(quest.getId(),answer.getId())" />
+ <td>
+ <img src="" tal:attributes="src python:defimages[here.evalAnswer(quest.getId(), answer.getId(), here.getSingleAnswer(quest.getId(), answer.getId()))]"/>
+ </td>
+ <td>
+ <tal tal:condition="python: here.evalAnswer(quest.getId(), answer.getId(), here.getSingleAnswer(quest.getId(), answer.getId()))">
+ <b tal:content="python: round(float(quest.getScore())/float(len(quest.filteredAnswerValues(quest.getId()))),2)" />
+ </tal>
+ </td>
+ </tal:typeswitch>
+ <!-- = -->
+ <tal:typeswitch tal:condition="python: MType in ['eduplone FillGapAnswer','eduplone TextTaskAnswer']">
+ <td>
+ <span tal:repeat="answerLine python: answer.getCorrectAnswer()">
+ <b tal:replace="answerLine" /><br/>
+ </span>
+ </td>
+ <td tal:content="python: here.getSingleAnswer(quest.getId(),answer.getId())" />
+ <td>
+ <img src="" tal:attributes="src python:defimages[here.evalAnswer(quest.getId(), answer.getId(), here.getSingleAnswer(quest.getId(), answer.getId()))]"/>
+ </td>
+ <td>
+ <tal tal:condition="python: here.evalAnswer(quest.getId(), answer.getId(), here.getSingleAnswer(quest.getId(), answer.getId()))">
+ <b tal:content="python: round(float(quest.getScore())/float(len(quest.filteredAnswerValues(quest.getId()))),2)" />
+ </tal>
+ </td>
+ </tal:typeswitch>
+ <!-- = -->
+ <tal:typeswitch tal:condition="python: MType in ['eduplone MatchingAnswer',]">
+ <td tal:content="python: answer.getCorrectAnswer()" />
+ <td tal:content="python: here.getSingleAnswer(quest.getId(),answer.getId())" />
+ <td>
+ <img src="" tal:attributes="src python:defimages[here.evalAnswer(quest.getId(), answer.getId(), here.getSingleAnswer(quest.getId(), answer.getId()))]"/>
+ </td>
+ <td>
+ <tal tal:condition="python: here.evalAnswer(quest.getId(), answer.getId(), here.getSingleAnswer(quest.getId(), answer.getId()))">
+ <b tal:content="python: round(float(quest.getScore())/float(len(quest.filteredAnswerValues(quest.getId()))),2)" />
+ </tal>
+ </td>
+ </tal:typeswitch>
+
+
+ <!-- == //TYPESWITCH == -->
+
+ </tal:def>
+ </tr>
+ </table>
+ </tal:typeswitch>
+ </fieldset>
<!-- ==================================================================== -->
***************
*** 143,147 ****
<br/>
<form method="post" tal:attributes="action python: here.absolute_url()+ '/setOverride'"
! tal:condition="python: questionOb.meta_type in ['eduplone TextTask', 'eduplone FreeText']">
<span i18n:translate="label_new_score">New score:</span>
<input type="text" name="score" size="7"
--- 206,210 ----
<br/>
<form method="post" tal:attributes="action python: here.absolute_url()+ '/setOverride'"
! tal:condition="python: quest.meta_type in ['eduplone TextTask', 'eduplone FreeText']">
<span i18n:translate="label_new_score">New score:</span>
<input type="text" name="score" size="7"
***************
*** 152,156 ****
</form>
-
<!-- ==================================================================== -->
--- 215,218 ----
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8