Update of /var/cvs/contributions/didactor2/src/progress/templates/progress
In directory james.mmbase.org:/tmp/cvs-serv18260

Modified Files:
        getprogress.jsp index.jsp progress_row.jsp teststatus.jspx 
Log Message:
some cleaning


See also: 
http://cvs.mmbase.org/viewcvs/contributions/didactor2/src/progress/templates/progress


Index: getprogress.jsp
===================================================================
RCS file: 
/var/cvs/contributions/didactor2/src/progress/templates/progress/getprogress.jsp,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- getprogress.jsp     12 Oct 2007 16:39:13 -0000      1.23
+++ getprogress.jsp     22 Jan 2008 14:54:55 -0000      1.24
@@ -1,17 +1,22 @@
-<[EMAIL PROTECTED] uri="http://www.mmbase.org/mmbase-taglib-2.0"; prefix="mm" 
-%><[EMAIL PROTECTED] uri="http://www.didactor.nl/ditaglib_1.0"; prefix="di" 
-%><[EMAIL PROTECTED] uri="http://www.opensymphony.com/oscache"; prefix="os"
-%><[EMAIL PROTECTED] uri="http://java.sun.com/jsp/jstl/core"; prefix="c"
-%><mm:content type="text/plain" postprocessor="trimmer">
-<mm:cloud rank="didactor user">
-<jsp:directive.include file="/education/tests/definitions.jsp" />
+<jsp:root version="2.0"
+          xmlns:c="http://java.sun.com/jsp/jstl/core";
+          xmlns:jsp="http://java.sun.com/JSP/Page";
+          xmlns:mm="http://www.mmbase.org/mmbase-taglib-2.0";
+          xmlns:di="http://www.didactor.nl/ditaglib_1.0";
+          xmlns:os="http://www.opensymphony.com/oscache";
+          >
+  <mm:content type="text/plain"
+              postprocessor="none">
+    <mm:cloud
+        rank="didactor user">
+      <jsp:directive.include file="/education/tests/definitions.jsp" />
 
 
-<%-- report either the current user's progress, or the one given by "student" 
argument --%>
-<mm:import externid="student" id="student"><mm:write 
referid="user"/></mm:import>
+      <!-- report either the current user's progress, or the one given by 
"student" argument -->
+      <mm:import externid="student" id="student"><mm:write 
referid="user"/></mm:import>
 
 
-<mm:node number="$student" notfound="skip">
+      <mm:node number="$student" notfound="skip">
   <mm:context>
     <di:copybook student="${student}">
       <mm:node id="copybookNo" />
@@ -19,13 +24,14 @@
 
     <mm:present referid="copybookNo">
       <os:cache time="${empty copybookNo ? 600 : 0}" 
key="progress-${education}-${student}-${copybookNo}">
-        <%-- performance of this is very bad if no copybook DIDACTOR-50 
+              <!-- performance of this is very bad if no copybook DIDACTOR-50
         So caching it some time, to increase responsiveness.
-        --%>
-        <%
+              -->
+
+              <jsp:scriptlet>
         int nof_tests= 0;
         int nof_tests_passed= 0;
-        %>
+              </jsp:scriptlet>
         
         <mm:node number="$education" notfound="skip">
           <mm:import id="previousnumber"><mm:field name="number"/></mm:import>
@@ -36,20 +42,20 @@
             <mm:tree type="learnobjects" role="posrel" searchdir="destination" 
orderby="posrel.pos" directions="up">
               <mm:nodeinfo type="type">
                 <mm:compare value="tests">
-                  <% nof_tests++; %>
+                        <jsp:scriptlet>nof_tests++;</jsp:scriptlet>
                   <mm:import id="testNo" reset="true"><mm:field 
name="number"/></mm:import>
                   
                   <jsp:directive.include file="teststatus.jspx" />
                   
                   <mm:compare referid="teststatus" value="passed">
-                    <% nof_tests_passed++; %>
+                          <jsp:scriptlet>nof_tests_passed++;</jsp:scriptlet>
                   </mm:compare>
                 </mm:compare>
               </mm:nodeinfo>
             </mm:tree>
           </mm:relatednodescontainer>
           
-          <%= nof_tests > 0 ? (double)nof_tests_passed / (double)nof_tests : 
0%>
+                <jsp:expression>nof_tests > 0 ? (double)nof_tests_passed / 
(double)nof_tests : 0</jsp:expression>
           
         </mm:node>
       </os:cache>
@@ -57,9 +63,10 @@
     <mm:notpresent referid="copybookNo">0</mm:notpresent>
 
   </mm:context>
-</mm:node>
+      </mm:node>
 
-</mm:cloud>
+    </mm:cloud>
+  </mm:content>
+</jsp:root>
 
 
-</mm:content>
\ No newline at end of file


Index: index.jsp
===================================================================
RCS file: 
/var/cvs/contributions/didactor2/src/progress/templates/progress/index.jsp,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -b -r1.40 -r1.41
--- index.jsp   11 Jan 2008 14:15:45 -0000      1.40
+++ index.jsp   22 Jan 2008 14:54:55 -0000      1.41
@@ -5,6 +5,7 @@
           xmlns:os="http://www.opensymphony.com/oscache";
           xmlns:fn="http://java.sun.com/jsp/jstl/functions";
           xmlns:c="http://java.sun.com/jsp/jstl/core";>
+  <jsp:directive.page buffer="2000kb" />
   <di:html
       postprocessor="none"
       type="text/html"
@@ -37,11 +38,7 @@
 
     <mm:islessthan inverse="true" referid="rights" referid2="RIGHTS_RW">
       <mm:node number="$education">
-        <b><mm:field name="name" write="true"/></b>
-
-        <mm:present referid="class">
-          CLASS: ${class}
-        </mm:present>
+        <b title="${class}"><mm:field name="name" /></b>
 
         <table class="font">
 


Index: progress_row.jsp
===================================================================
RCS file: 
/var/cvs/contributions/didactor2/src/progress/templates/progress/progress_row.jsp,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- progress_row.jsp    18 Oct 2007 14:43:14 -0000      1.27
+++ progress_row.jsp    22 Jan 2008 14:54:55 -0000      1.28
@@ -79,7 +79,7 @@
           </di:copybook>
 
           <mm:node number="$education">
-            <mm:nodelistfunction name="tests">
+            <mm:nodelistfunction name="tests" id="testNo">
               <jsp:directive.include file="teststatus.jspx" />
               <mm:compare referid="teststatus" value="incomplete" 
inverse="true">
                 <mm:compare referid="teststatus" value="toberated">


Index: teststatus.jspx
===================================================================
RCS file: 
/var/cvs/contributions/didactor2/src/progress/templates/progress/teststatus.jspx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- teststatus.jspx     18 Oct 2007 14:43:14 -0000      1.5
+++ teststatus.jspx     22 Jan 2008 14:54:55 -0000      1.6
@@ -15,6 +15,9 @@
         goodanswers
         badanswers
 
+   TODO: using parameters for a static jsp in this way is error prone and not 
very intuitively.
+         should use dynamtic include or tag-files to formalize parameters and 
return values,
+
 -->
 <mm:node
     xmlns:jsp="http://java.sun.com/JSP/Page";
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to