Update of 
/var/cvs/contributions/didactor2/src/education/templates/education/fillquestions
In directory james.mmbase.org:/tmp/cvs-serv595

Modified Files:
        index.jsp 
Log Message:
cleaned up, made jsps, made xml, more or less valid html


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


Index: index.jsp
===================================================================
RCS file: 
/var/cvs/contributions/didactor2/src/education/templates/education/fillquestions/index.jsp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- index.jsp   1 Nov 2006 10:14:08 -0000       1.4
+++ index.jsp   28 Mar 2008 11:07:05 -0000      1.5
@@ -1,14 +1,14 @@
-<[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" %>
+<jsp:root
+    xmlns:jsp="http://java.sun.com/JSP/Page"; version="2.0"
+    xmlns:mm="http://www.mmbase.org/mmbase-taglib-2.0";
+    xmlns:di="http://www.didactor.nl/ditaglib_1.0"; >
+  <mm:content postprocessor="none">
+    <mm:cloud method="delegate">
 
-<mm:content postprocessor="reducespace" expires="0">
-<mm:cloud method="delegate" jspvar="cloud">
+      <mm:import externid="question" required="true"/>
+      <mm:import externid="madetest">-1</mm:import>
 
-<mm:import externid="question" required="true"/>
-<mm:import externid="madetest">-1</mm:import>
-<[EMAIL PROTECTED] file="/shared/setImports.jsp" %>
-
-<mm:node number="$question" jspvar="flash">
+      <mm:node number="$question">
    <mm:relatedcontainer path="givenanswers,madetests">
       <mm:constraint field="madetests.number" value="$madetest"/>
       <mm:related>
@@ -18,53 +18,18 @@
       </mm:related>
    </mm:relatedcontainer>
 
-    <% 
-        int layout = flash.getIntValue("layout");
-        int width = 770;
-        int height= 440;
-        if (layout >= 0) {
-            if (layout >= 2) {
-                width = 385;
-                height = 220;
-                %><table class="Font"><tr><td><%
-            }
-            if (layout == 2 || layout == 0) {
-                %><mm:field name="text" escape="none"/><%
-                if (layout == 2) {
-                    %></td><td><% 
-                }
-            }
-        }
-    %>
-
 
-    <mm:import id="temp" jspvar="temp"><mm:field name="text" 
escape="none"/></mm:import>
-        <mm:field name="showtitle">
-           <mm:compare value="1">
-             <h2><mm:field name="title"/></h2>
-           </mm:compare>
-         </mm:field>
+        <mm:import id="temp"><mm:field name="text" escape="none"/></mm:import>
 
+        <di:title />
+        <di:flash checkField="flashOrText" layoutField="layout" />
 
-       <p/>
 
-<mm:field name="flashOrText">
-<mm:compare value="1">
-          <mm:relatednodes type="attachments">
-              <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" 
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,47,0";
 width="760" height="440" id="flashpage">
-              <param name="movie" value="<mm:attachment/>">
-              <param name="quality" value="high">
-              <embed src="<mm:attachment/>" quality="high" 
pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash";
 type="application/x-shockwave-flash" width="<%= width %>" height="<%= height 
%>" name="flashpage" swLiveConnect="true">
-              </embed>                           
-          </object>
-  </mm:relatednodes>
-</mm:compare>
-</mm:field>
-
-
-
-<mm:field name="flashOrText">
-<mm:compare value="0">
+        <mm:field name="flashOrText">
+          <!-- who came up with this ??
+               This is much to explicit. Repulsive.
+          -->
+          <mm:compare value="0">
 
     <mm:field name="impos">
     <mm:compare value="1">     
@@ -78,8 +43,7 @@
                 </mm:compare>
               </mm:field>
 
-              <img src="<mm:image />" width="200" border="0" /><br/>
-
+                    <mm:image mode="src" width="200" border="0" /><br />
               <mm:field name="description" escape="none"/> 
             </mm:relatednodes>
 
@@ -93,14 +57,8 @@
           <div class="images">
 
             <mm:relatednodes type="images">
-              <mm:field name="showtitle">
-                <mm:compare value="1">
-                  <h3><mm:field name="title"/></h3>
-                </mm:compare>
-              </mm:field>
-
-              <img src="<mm:image />" width="200" border="0" /><br/>
-
+                    <di:title />
+                    <mm:image mode="src" width="200" border="0" /><br />
               <mm:field name="description" escape="none"/> 
             </mm:relatednodes>
 
@@ -115,18 +73,15 @@
     <mm:compare value="2">     
           <div class="images">
             <mm:relatednodes type="images">
-              <mm:field name="showtitle">
-                <mm:compare value="1">
-                  <h3><mm:field name="title"/></h3>
-                </mm:compare>
-              </mm:field>
+                    <di:title />
 
             <table>
              <tr>
-              
-              
               <td><mm:write referid="temp"/></td>
-              <td><img src="<mm:image />" width="200" border="0" align="right" 
/><br/></td>
+                        <td>
+                          <mm:image mode="src" width="200" border="0" 
align="right" />
+                          <br/>
+                        </td>
             </tr>
             </table>
               <mm:field name="description" escape="none"/> 
@@ -138,29 +93,18 @@
     </mm:compare>
     </mm:field>
 
-</mm:compare>
-</mm:field>
+          </mm:compare>
+        </mm:field>
 
     <p>
     
-    
        <mm:field name="textFirst" escape="none"/> 
-               
-       <input  type="text" size="15"  dtmaxlength="15" name="<mm:write 
referid="question"/>" value="<mm:present referid="answer"><mm:write 
referid="answer" escape="text/plain"/></mm:present>" /> 
-
+          <input  type="text" size="15"  dtmaxlength="15" name="${question}" 
value="${answer}" />
        <mm:field name="textSecond" escape="none"/> 
+        </p>
    
-       <p/>
-  
-  
- 
-
-  
-
-    
-
-
-</mm:node>
+      </mm:node>
 
-</mm:cloud>
-</mm:content>
+    </mm:cloud>
+  </mm:content>
+</jsp:root>
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to