Update of
/var/cvs/contributions/didactor2/src/education/templates/education/mcquestions
In directory james.mmbase.org:/tmp/cvs-serv24323/mcquestions
Modified Files:
ratemcquestions.jsp
Log Message:
cleaning
See also:
http://cvs.mmbase.org/viewcvs/contributions/didactor2/src/education/templates/education/mcquestions
Index: ratemcquestions.jsp
===================================================================
RCS file:
/var/cvs/contributions/didactor2/src/education/templates/education/mcquestions/ratemcquestions.jsp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- ratemcquestions.jsp 12 Jun 2008 13:33:20 -0000 1.13
+++ ratemcquestions.jsp 26 Jun 2008 13:56:09 -0000 1.14
@@ -1,8 +1,11 @@
-<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
+<jsp:root
+ xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
xmlns:mm="http://www.mmbase.org/mmbase-taglib-2.0"
+ xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:di="http://www.didactor.nl/ditaglib_1.0" >
<mm:content
postprocessor="reducespace">
+
<mm:cloud method="delegate">
<mm:import externid="question" required="true"/>
@@ -23,13 +26,13 @@
<mm:createrelation role="related" source="madetest"
destination="my_givenanswers"/>
<mm:createrelation role="related" source="question"
destination="my_givenanswers"/>
- <mm:field name="type" id="type" write="false"/>
- <mm:compare referid="type" value="0">
+ <mm:field name="type" write="false">
+ <c:choose>
+ <c:when test="${_ eq 0}">
<!-- Only 1 answer is given -->
<mm:import externid="$question" id="givenanswer" />
-
<mm:present referid="givenanswer">
<mm:node referid="givenanswer">
<mm:field id="questioncorrect" name="correct" write="false"/>
@@ -39,10 +42,9 @@
</mm:node>
<mm:createrelation role="related" source="my_givenanswers"
destination="givenanswer"/>
</mm:present>
+ </c:when>
- </mm:compare>
-
- <mm:compare referid="type" value="1">
+ <c:when test="${_ eq 1}">
<!-- Multiple answers can be given -->
<!-- correct unless counterevidence -->
@@ -80,7 +82,15 @@
<mm:setfield name="score"><mm:write referid="score"/></mm:setfield>
</mm:node>
- </mm:compare>
+ </c:when>
+ <c:when test="${_ eq 2}">
+ This seems to be possible answer, but should really nothgin happen
+ </c:when>
+ <c:otherwise>
+ UNKONWN TYPE
+ </c:otherwise>
+ </c:choose>
+ </mm:field>
</mm:node>
</mm:cloud>
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs