EduploneExam/skins/EduploneExam exam_multiplechoice.pt,1.1,1.2 exam_view.cpt,1.1,1.2 exam_view.cpt.metadata,1.1,1.2

Nils Haagen <[email protected]>
Newsgroups gmane.comp.web.zope.eduplone.cvs
Message-ID <[email protected]>
Update of /cvsroot/eduplone/EduploneExam/skins/EduploneExam
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24819

Modified Files:
	exam_multiplechoice.pt exam_view.cpt exam_view.cpt.metadata 
Log Message:
skins to cpt

Index: exam_view.cpt
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/skins/EduploneExam/exam_view.cpt,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** exam_view.cpt	16 Dec 2004 11:14:50 -0000	1.1
--- exam_view.cpt	16 Dec 2004 13:04:34 -0000	1.2
***************
*** 26,41 ****
                 
                  <div metal:use-macro="here/batch_macros/macros/navigation" />
-                
- 
-                 <fieldset tal:define="context python:here;
-                                       currentQuestion python: batch[0];
-                                       pt_question python:currentQuestion.getQuestionType().replace('Question','');
-                                       exam_view_macro string: here/exam_${pt_question}/macros/view;" >
-     
-                      <tal metal:use-macro="here/exam_multiplechoice/macros/view" />
-     
-                 </fieldset>
  
                  
                  <div metal:use-macro="here/batch_macros/macros/navigation" />
                  
--- 26,54 ----
                 
                  <div metal:use-macro="here/batch_macros/macros/navigation" />
  
                  
+                 <form method="post" action="">
+                     
+                     <input type="hidden" name="form.submitted" value="1">
+ 
+                     <input type="hidden" name="ContextUID"
+                            tal:attributes="value here/UID" />
+                                      
+                     <tal:repeat tal:repeat="currentQuestion batch">
+ 
+                         <fieldset tal:define="context python:here;
+                                               pt_question python:currentQuestion.getQuestionType().lower().replace('question','');
+                                               exam_view_macro python: path('here/exam_%s/macros/view' % pt_question)" >
+             
+                              <tal metal:use-macro="exam_view_macro" />
+             
+                         </fieldset>
+                     </tal:repeat>
+ 
+                     <br/>
+                     <input type="submit" value="Save" i18n:attributes="value" /> 
+ 
+                 </form>
+ 
                  <div metal:use-macro="here/batch_macros/macros/navigation" />
                  

Index: exam_view.cpt.metadata
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/skins/EduploneExam/exam_view.cpt.metadata,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** exam_view.cpt.metadata	16 Dec 2004 11:14:50 -0000	1.1
--- exam_view.cpt.metadata	16 Dec 2004 13:04:34 -0000	1.2
***************
*** 1,6 ****
! Directory 'skins/EduploneExam':
! 
! This skin layer has low priority, put unique templates and scripts here.
  
! I.e. if you to want to create own unique views or forms for your product, this
! is the right place.
--- 1,4 ----
! [validators]
  
! [actions]
! action.success = traverse_to:string:exam_formprocess
\ No newline at end of file

Index: exam_multiplechoice.pt
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/skins/EduploneExam/exam_multiplechoice.pt,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** exam_multiplechoice.pt	16 Dec 2004 11:14:50 -0000	1.1
--- exam_multiplechoice.pt	16 Dec 2004 13:04:34 -0000	1.2
***************
*** 5,60 ****
      <div>
                      
!         <h1 tal:content="python: 'context: ' + context.title_or_id()" />
!         <h5 tal:content="python: 'currentQuestion: ' + currentQuestion.title_or_id()" />
! 
          <bR>
-         
          <b tal:content="structure python:currentQuestion.getQuestion()" />
!             <br/>
!             <span tal:content="python: currentQuestion.getInstruction()" />
!             
!             <br/><br/>
! 
!             <form tal:attributes="action string:'answerAndForward';
!                                   method string:'post';"
!                   tal:define=    "answers  python:currentQuestion.contentValues();
!                                  ">
! 
!               <input tal:attributes="type python:'hidden';
!                                      name python:'qId';
!                                      value python:currentQuestion.getId()"/>
! 
! 
!                 <table border="0">
! 
!                 <tr tal:repeat="answer answers">
! 
!                     <tal:define define="tId python:answer.getId();
!                                         tAnswer python:answer.getChallange();
!                                         uAnswer python:'here.users.getSingleUserAnswer(cUser, here.id, tId)'">
! 
! 
!                         <td>
!                         <input tal:attributes="name tId;
!                                                type python:'checkbox' ;
!                                                checked python:test(str(uAnswer)=='on',
!                                                        'checked', None)"/>
!                         </td><td>
!                             &nbsp; &nbsp; <span tal:content="structure tAnswer" />
!                         </td>
! 
!                     </tal:define>
!                 </tr>
!                 </table>
! 
! 
!                 <br/>
!                 <input type="submit" value="Save" i18n:attributes="value" /> 
! 
!             </form>
  
  
  
  
  
  
--- 5,31 ----
      <div>
                      
!         <h2 tal:content="currentQuestion/title" />
          <bR>
          <b tal:content="structure python:currentQuestion.getQuestion()" />
!         <br/>
!         <span tal:content="python: currentQuestion.getInstruction()" />
!         
!         <br/><br/>
  
+         <table border="0">
  
+         <tr tal:repeat="answer python:currentQuestion.contentValues()">
  
+                 <td>
+                 <input type="checkbox" 
+                        tal:attributes="name python:'##'.join((currentQuestion.UID(), answer.UID()));
+                                        checked python:test(str('uAnswer')=='on','checked', None)" />
+                 </td>
+                 <td>
+                     &nbsp; &nbsp; <span tal:content="python: answer.getChallange()" />
+                 </td>
  
+         </tr>
+         </table>
  
  



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.