Update of /var/cvs/contributions/didactor2/src/assessment/templates/assessment
In directory james.mmbase.org:/tmp/cvs-serv6074
Modified Files:
matrix.div.jspx stage4-problems.jspx
stage5-editdifficulties.jspx stage5.js.jsp
Log Message:
cleaned up a bit
See also:
http://cvs.mmbase.org/viewcvs/contributions/didactor2/src/assessment/templates/assessment
Index: matrix.div.jspx
===================================================================
RCS file:
/var/cvs/contributions/didactor2/src/assessment/templates/assessment/matrix.div.jspx,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- matrix.div.jspx 9 Jan 2009 14:10:27 -0000 1.23
+++ matrix.div.jspx 9 Jan 2009 14:34:37 -0000 1.24
@@ -1,20 +1,14 @@
-<jsp:root
+<mm:content
+ type="application/xml"
+ expires="0"
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:c="http://java.sun.com/jsp/jstl/core"
+ xmlns:fn="http://java.sun.com/jsp/jstl/functions"
xmlns:mm="http://www.mmbase.org/mmbase-taglib-2.0"
xmlns:di="http://www.didactor.nl/ditaglib_1.0"
xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
- xmlns:mm-sr="http://www.mmbase.org/tags/mm/searchrelate"
- version="2.0">
- <!--
- xmlns:mm-sr="urn:jsptagdir:/WEB-INF/tags/mm/searchrelate/"
-
-
- -->
- <mm:relatednodes max="1" path="problemtypes,tests" element="tests">
-
- <mm:node id="test" />
- </mm:relatednodes>
+ >
+ <jsp:output omit-xml-declaration="true" />
<mm:import externid="source" required="true" />
<mm:import externid="icondir" />
@@ -26,31 +20,20 @@
<mm:node id="problem" number="${_node}" /> <!-- give current node an id,
and put it in the current cloud -->
- <!-- And, per lesson, how much trouble it gave -->
- <mm:node number="${education}">
- <mm:relatednodescontainer
- element="learnblocks"
- searchdirs="destination"
- path="posrel,learnblocks${di:setting('assessment',
'relate_learnblocks') ? ',related,components' : ''}">
- <mm:size id="blockCount" write="false"/>
- <mm:sortorder field="posrel.pos" />
- <c:if test="${di:setting('assessment', 'relate_learnblocks')}">
- <mm:addnode element="components" number="component.assessment" />
- </c:if>
- <mm:size id="size" write="false" />
- <mm:relatednodes id="learnBlock">
+ <c:set var="blockCount" value="0" />
+ <!-- And, per lesson, how much trouble it gave -->
+ <mm:node number="${education}">
+ <mm:nodelistfunction name="lessons" id="learnBlock">
<!--
Create the relation problem-posrel->learnBlock if that does not
exist yet. The
'position' field is abused to indicate how much trouble the
problem gave after this
lesson. Really, there should not have been used 'posrel' here.
Because _pos_rel is of
course for _position_, and is not some generic integer which can
be used for whatever one
likes.
-
-Only for closed lessons, and the first open one.
-
-_I_ did not come up with this.
+ Only for closed lessons, and the first open one.
+ _I_ did not come up with this.
-->
<mm:relation to="${user}" notfound="null">
<c:if test="${! empty _node or empty firstopenlesson}">
@@ -82,7 +65,8 @@
this relation, or only _see_ (if 'closed' lesson).
That is, inidcate how much trouble the problem is now causing.
-->
- <mm:import id="blockCount" reset="true">${(blockCount+1)}</mm:import>
+
+
<mm:listrelationscontainer type="problems" role="posrel">
<mm:addnode element="problems" number="${problem}" />
@@ -91,30 +75,30 @@
<!-- See MMB-1770 -->
<fmt:bundle basename="nl.didactor.resources.troubles">
<td class="learnblockItems"><fmt:message key="${_}" /></td>
- <mm:import id="blockCount"
reset="true">${(blockCount-1)}</mm:import>
</fmt:bundle>
</mm:field>
+ <c:set var="blockCount" value="${blockCount + 1}" />
</mm:listrelations>
</mm:listrelationscontainer>
-
-
-
-
- </mm:relatednodes>
- </mm:relatednodescontainer>
+ </mm:nodelistfunction>
</mm:node>
<mm:import externid="stage" />
<mm:import externid="sub" />
+
+ <mm:relatednodes max="1" path="problemtypes,tests" element="tests">
+ <mm:node id="test" />
+ </mm:relatednodes>
<mm:present referid="test">
<mm:link referids="test,_n...@problem,sub?">
<mm:param name="stage">stage5-evaluate</mm:param>
- <td colspan="${blockCount}" class="learnblockItems" align="right"><a
href="${_}">uitwerken</a></td>
+ <td colspan="${fn:length(learnBlock) - blockCount}"
class="learnblockItems" align="right">
+ <a href="${_}">uitwerken</a>
+ </td>
</mm:link>
</mm:present>
</tr>
-
-</jsp:root>
+</mm:content>
Index: stage4-problems.jspx
===================================================================
RCS file:
/var/cvs/contributions/didactor2/src/assessment/templates/assessment/stage4-problems.jspx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- stage4-problems.jspx 9 Jan 2009 10:40:01 -0000 1.9
+++ stage4-problems.jspx 9 Jan 2009 14:34:37 -0000 1.10
@@ -7,45 +7,38 @@
class="problems">
<jsp:output omit-xml-declaration="true" />
+ <!--
+ Now the problems, divided per type.
+ -->
+
<h2><di:translate key="assessment.problems" /></h2>
<div>
<p>Dit is een overzicht van de problemen die je eerder hebt ingevoerd, en
hoeveel last je er per les van had. Werk eventueel per probleem uit hoe je het
gaat aanpakken (zie les 2).</p>
</div>
- <!--
- show the learnblocks, sorry for using tables :-( couldn't get it to work
otherwise....
- -->
- <table cellpadding="2" cellspacing="0" border="0">
- <mm:node number="${education}">
- <mm:relatednodescontainer
path="posrel,learnblocks${di:setting('assessment', 'relate_learnblocks') ?
',related,components' : ''}" searchdirs="destination">
- <mm:sortorder field="posrel.pos" />
- <c:if test="${di:setting('assessment', 'relate_learnblocks')}">
- <mm:addnode element="components" number="component.assessment" />
- </c:if>
+
+ <table>
+
+ <mm:node number="${education}">
<mm:import id="blocknames" escape="text/plain">
- <mm:relatednodes id="learnBlock" varStatus="status">
+ <!-- cache the block names, because they are repeated for every
problem type -->
+
+ <mm:nodelistfunction name="lessons" id="learnBlock">
<!--
If a relation learnBlock -classrel->user exists, then that
means that this lesson is marked 'closed' (by this module)
-->
- <mm:relation to="${user}" role="classrel" searchdir="source"
- notfound="null">
- <td class="learnblockItemsTitle">
+ <mm:relation to="${user}" role="classrel" searchdir="source"
notfound="null">
+ <td class="learnblockItemsTitle ${empty _node ? '' : 'closed'}">
<mm:field name="name" node="learnBlock" />
</td>
</mm:relation>
- </mm:relatednodes>
- <td class="learnblockItemsTitle"><jsp:text> </jsp:text></td>
- </mm:import>
- </mm:relatednodescontainer>
-
+ </mm:nodelistfunction>
+ <td><jsp:text> </jsp:text></td>
+ </mm:import>
</mm:node>
- <!--
- Now the problems, divided per type.
- They can be edited by the user
- -->
<mm:listnodes orderby="pos" type="problemtypes">
<tr>
<td><h2 class="problemTypes"><di:translate
key="assessment.${_node.key}" /></h2></td>
Index: stage5-editdifficulties.jspx
===================================================================
RCS file:
/var/cvs/contributions/didactor2/src/assessment/templates/assessment/stage5-editdifficulties.jspx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- stage5-editdifficulties.jspx 9 Jan 2009 13:42:32 -0000 1.4
+++ stage5-editdifficulties.jspx 9 Jan 2009 14:34:37 -0000 1.5
@@ -8,6 +8,7 @@
>
<jsp:output omit-xml-declaration="true" />
<mm:content
+ postprocessor="none"
type="text/xml" expires="0">
<mm:import externid="problem" required="true" />
<mm:import externid="submit" />
@@ -23,13 +24,18 @@
<mm:relation to="${problem}">
<mm:field name="pos" id="pos${_node}">
<mm:fieldinfo field="pos${_node}"
datatype="didactor_assessment_troubles" type="input" />
+ <mm:present referid="submit">
<mm:fieldinfo field="pos${_node}"
datatype="didactor_assessment_troubles" type="errors" />
+ </mm:present>
</mm:field>
</mm:relation>
</mm:nodelistfunction>
<mm:present referid="submit">
<mm:commit />
</mm:present>
+ <mm:notpresent referid="submit">
+ <mm:cancel />
+ </mm:notpresent>
</mm:form>
</mm:node>
</mm:cloud>
Index: stage5.js.jsp
===================================================================
RCS file:
/var/cvs/contributions/didactor2/src/assessment/templates/assessment/stage5.js.jsp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- stage5.js.jsp 9 Jan 2009 13:42:32 -0000 1.6
+++ stage5.js.jsp 9 Jan 2009 14:34:37 -0000 1.7
@@ -35,7 +35,6 @@
}
});
-
// Then the test
document.forms.questionform.command.value = 'done';
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs