EduploneExam/skins/EduploneExam exam_overrideform.pt,NONE,1.1.2.1 exam_overrideprocess.cpy,NONE,1.1.2.1 exam_scoreoverride.cpt,NONE,1.1.2.1 exam_scoreoverride.cpt.metadata,NONE,1.1.2.1 exam_fillgap.pt,1.9.2.3,1.9.2.4 exam_finished.pt,1.3.2.2,1.3.2.3 exam_freetext.pt,1.7.2.2,1.7.2.3 exam_matching.pt,1.11.2.3,1.11.2.4 exam_math.pt,1.8.2.2,1.8.2.3 exam_multiplechoice.pt,1.15.2.3,1.15.2.4 exam_questionHeader.pt,1.7.2.5,1.7.2.6 exam_singlechoice.pt,1.13.2.4,1.13.2.5 exam_texttask.pt,1.7.2.2,1.7.2.3 exam_truefalse.pt,1.13.2.3,1.13.2.4 exam_userlist.pt,1.1.2.1,1.1.2.2

Nils Haagen <[email protected]> Sun, 08 Jan 2006 14:01:25 +0000
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-serv18628/skins/EduploneExam

Modified Files:
      Tag: exam-1_1
	exam_fillgap.pt exam_finished.pt exam_freetext.pt 
	exam_matching.pt exam_math.pt exam_multiplechoice.pt 
	exam_questionHeader.pt exam_singlechoice.pt exam_texttask.pt 
	exam_truefalse.pt exam_userlist.pt 
Added Files:
      Tag: exam-1_1
	exam_overrideform.pt exam_overrideprocess.cpy 
	exam_scoreoverride.cpt exam_scoreoverride.cpt.metadata 
Log Message:
score override

Index: exam_multiplechoice.pt
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/skins/EduploneExam/exam_multiplechoice.pt,v
retrieving revision 1.15.2.3
retrieving revision 1.15.2.4
diff -C2 -d -r1.15.2.3 -r1.15.2.4
*** exam_multiplechoice.pt	8 Jan 2006 00:08:46 -0000	1.15.2.3
--- exam_multiplechoice.pt	8 Jan 2006 14:01:23 -0000	1.15.2.4
***************
*** 82,85 ****
--- 82,89 ----
          </table>        
  
+         <tal:cond tal:condition="context_override">
+             <tal metal:use-macro="here/exam_overrideform/macros/override_form" />
+         </tal:cond>        
+ 
      </div>
  

Index: exam_truefalse.pt
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/skins/EduploneExam/exam_truefalse.pt,v
retrieving revision 1.13.2.3
retrieving revision 1.13.2.4
diff -C2 -d -r1.13.2.3 -r1.13.2.4
*** exam_truefalse.pt	8 Jan 2006 00:08:46 -0000	1.13.2.3
--- exam_truefalse.pt	8 Jan 2006 14:01:23 -0000	1.13.2.4
***************
*** 96,99 ****
--- 96,103 ----
          </table>        
  
+         <tal:cond tal:condition="context_override">
+             <tal metal:use-macro="here/exam_overrideform/macros/override_form" />
+         </tal:cond>
+ 
      </div>
  

Index: exam_texttask.pt
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/skins/EduploneExam/exam_texttask.pt,v
retrieving revision 1.7.2.2
retrieving revision 1.7.2.3
diff -C2 -d -r1.7.2.2 -r1.7.2.3
*** exam_texttask.pt	8 Jan 2006 00:08:46 -0000	1.7.2.2
--- exam_texttask.pt	8 Jan 2006 14:01:23 -0000	1.7.2.3
***************
*** 59,62 ****
--- 59,66 ----
          </table>        
  
+         <tal:cond tal:condition="context_override">
+             <tal metal:use-macro="here/exam_overrideform/macros/override_form" />
+         </tal:cond>        
+ 
      </div>
  

--- NEW FILE: exam_scoreoverride.cpt ---
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"
      lang="en-US"
      metal:use-macro="here/main_template/macros/master"
      i18n:domain="EduploneExam">
  <body>


    <link metal:fill-slot="css_slot"
          rel="stylesheet" 
          type="text/css"
          media="all"
          tal:attributes="href python:here.absolute_url()+'/exam_additionalstyles.css'" />

    <div metal:fill-slot="main"
         tal:define="portal_type python:here.getPortalTypeName().lower();
                     view_template python:'%s_view' % portal_type;
                     view_macros python:path('here/%s/macros|nothing' % view_template);
                     body_macro view_macros/body|nothing;">


         <tal metal:use-macro="here/exam_userlist/macros/userlist_navigation" />


        <div metal:define-macro="main"
             tal:omit-tag="">


            <div metal:define-macro="page_nav"
                tal:define="results python:here.objectValues(here.getRegisteredQuestionTypes().keys());
                            Batch python:modules['Products.CMFPlone'].Batch;
                            b_size python:len(results);
                            b_size request/b_size | b_size;
                            b_start python:0;
                            b_start request/b_start | b_start;
                            batch python:Batch(results, b_size, int(b_start), orphan=0, pagerange=2);
                            forUser python:here.REQUEST.get('forUser', '-1');">
               
                <div metal:use-macro="here/batch_macros/macros/navigation" />

                    <h1><span tal:omit-tag=" " 
                              i18n:translate="score_for_user">Score for user: </span> 
                        <b tal:content="forUser" />
                    </h1>

                <form method="post" action="" name="eXamOverrideForm">
                    
                    <input type="hidden" name="form.submitted" value="1" />
                    <input type="hidden" name="forUser" tal:attributes="value forUser" />
                                     
                    <tal:repeat tal:repeat="currentQuestion batch">

                        <fieldset tal:define="context python:here;
                                              pt_question python:currentQuestion.getQuestionType().lower().replace('question','');
                                              exam_eval_macro python: path('here/exam_%s/macros/eval' % pt_question);
                                              context_override python:True;">
            
                             <tal metal:use-macro="exam_eval_macro" />

                        </fieldset>

                    </tal:repeat>

                    <br/>
                    
                    <input type="submit" value="Save" i18n:attributes="value" /> 
                    
                    <br/>

                <div metal:use-macro="here/batch_macros/macros/navigation" />
                
            </div>

        </div>

    </div>

  </body>
</html>

Index: exam_fillgap.pt
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/skins/EduploneExam/exam_fillgap.pt,v
retrieving revision 1.9.2.3
retrieving revision 1.9.2.4
diff -C2 -d -r1.9.2.3 -r1.9.2.4
*** exam_fillgap.pt	8 Jan 2006 00:08:46 -0000	1.9.2.3
--- exam_fillgap.pt	8 Jan 2006 14:01:22 -0000	1.9.2.4
***************
*** 102,106 ****
  </tr>
  
!         </table>
  
            
--- 102,110 ----
  </tr>
  
!         </table>        
! 
!         <tal:cond tal:condition="context_override">
!             <tal metal:use-macro="here/exam_overrideform/macros/override_form" />
!         </tal:cond>
  
            

--- NEW FILE: exam_scoreoverride.cpt.metadata ---
[validators]

[actions]
action.success = traverse_to:string:exam_overrideprocess
Index: exam_userlist.pt
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/skins/EduploneExam/Attic/exam_userlist.pt,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** exam_userlist.pt	8 Jan 2006 00:08:46 -0000	1.1.2.1
--- exam_userlist.pt	8 Jan 2006 14:01:23 -0000	1.1.2.2
***************
*** 20,38 ****
                       ">
  
          <div metal:define-macro="main"
               tal:omit-tag="">
- 
-                     <br>
                
!                     <tal:repeat tal:repeat="Xuser python:here.listUsers()">
  
!                         <a tal:attributes="href python:'exam_finished?forUser=%s' % Xuser"
                             tal:content="Xuser" />
  
!                         <br />
  
-                     </tal:repeat>
  
!                     <br/>
         
  
--- 20,82 ----
                       ">
  
+          <fieldset metal:define-macro="userlist_navigation">
+              
+             <a href="exam_userlist">kurze Ansicht</a>
+             &nbsp; &nbsp; 
+             <a href="exam_userlist?extended=true">ausführliche Ansicht</a>
+             &nbsp; &nbsp; 
+             <a href="">Zeugnisdruck</a>
+             
+         </fieldset>
+ 
+ 
          <div metal:define-macro="main"
               tal:omit-tag="">
                
!         <table border="1"
!            id="sortable"
!            class="listing"
!            summary="UserResults"
!            tal:define="allResults python:here.getAllResults();
!                        extended   python:here.REQUEST.get('extended','false')">
!             
!             <thead>
!                 <tr>
!                     <th><b i18n:translate="username">Username</b></th>
!                     <th><b i18n:translate="score">Score (total)</b></th>
!                     <th tal:condition="python: extended=='true'" />
  
! 
!                 </tr>
!             </thead>
!                     <tr tal:repeat="Xuser allResults">
! 
!                         <td valign="top">
!                            <a tal:attributes="href python:'exam_scoreoverride?forUser=%s' % Xuser"
                             tal:content="Xuser" />
+                         </td>
  
!                         <td valign="top"
!                             align="right"
!                             tal:content="python: allResults[Xuser]" />
  
  
!                     <tal:extended tal:omit-tag=" "
!                                   tal:condition="python: extended=='true'">
!                         <td>
!                             <table border="0">
!                             <tr tal:repeat="q python:here.objectValues(here.getRegisteredQuestionTypes())">
!                                  <td tal:content="q/Title" />
!                                  <td tal:content="python: here.deliverResponse(q, create=False, forUser=Xuser).getScore()" />
!                             </tr>
!                             </table>
!                         </td>
! 
!                     </tal:extended>
! 
! 
!                     </tr>
! 
!             </table>
         
  

Index: exam_singlechoice.pt
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/skins/EduploneExam/exam_singlechoice.pt,v
retrieving revision 1.13.2.4
retrieving revision 1.13.2.5
diff -C2 -d -r1.13.2.4 -r1.13.2.5
*** exam_singlechoice.pt	8 Jan 2006 00:08:46 -0000	1.13.2.4
--- exam_singlechoice.pt	8 Jan 2006 14:01:23 -0000	1.13.2.5
***************
*** 77,80 ****
--- 77,84 ----
          </table>        
  
+         <tal:cond tal:condition="context_override">
+             <tal metal:use-macro="here/exam_overrideform/macros/override_form" />
+         </tal:cond>        
+ 
      </div>
  

Index: exam_matching.pt
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/skins/EduploneExam/exam_matching.pt,v
retrieving revision 1.11.2.3
retrieving revision 1.11.2.4
diff -C2 -d -r1.11.2.3 -r1.11.2.4
*** exam_matching.pt	8 Jan 2006 00:08:46 -0000	1.11.2.3
--- exam_matching.pt	8 Jan 2006 14:01:23 -0000	1.11.2.4
***************
*** 95,98 ****
--- 95,102 ----
          </table>        
  
+         <tal:cond tal:condition="context_override">
+             <tal metal:use-macro="here/exam_overrideform/macros/override_form" />
+         </tal:cond>        
+ 
      </div>
  

Index: exam_freetext.pt
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/skins/EduploneExam/exam_freetext.pt,v
retrieving revision 1.7.2.2
retrieving revision 1.7.2.3
diff -C2 -d -r1.7.2.2 -r1.7.2.3
*** exam_freetext.pt	8 Jan 2006 00:08:46 -0000	1.7.2.2
--- exam_freetext.pt	8 Jan 2006 14:01:23 -0000	1.7.2.3
***************
*** 38,42 ****
            <dd tal:content="python: currentQuestion.getExemplar()" />
  
!     </div>
  
  </div>
\ No newline at end of file
--- 38,46 ----
            <dd tal:content="python: currentQuestion.getExemplar()" />
  
!     </div>        
! 
!         <tal:cond tal:condition="context_override">
!             <tal metal:use-macro="here/exam_overrideform/macros/override_form" />
!         </tal:cond>
  
  </div>
\ No newline at end of file

Index: exam_questionHeader.pt
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/skins/EduploneExam/exam_questionHeader.pt,v
retrieving revision 1.7.2.5
retrieving revision 1.7.2.6
diff -C2 -d -r1.7.2.5 -r1.7.2.6
*** exam_questionHeader.pt	10 Nov 2005 16:58:50 -0000	1.7.2.5
--- exam_questionHeader.pt	8 Jan 2006 14:01:23 -0000	1.7.2.6
***************
*** 40,44 ****
              <tal:block tal:omit-tag=""
                         tal:condition="python: here.getParam_showFinalScore()">
!             (<b tal:content="python:responseObj.getScore()" /> 
              /<span tal:omit-tag=""
                     tal:content="currentQuestion/maxScore" />)
--- 40,45 ----
              <tal:block tal:omit-tag=""
                         tal:condition="python: here.getParam_showFinalScore()">
!             (<b tal:content="python:responseObj.getRelevantScore()" /> 
! 
              /<span tal:omit-tag=""
                     tal:content="currentQuestion/maxScore" />)

Index: exam_finished.pt
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/skins/EduploneExam/exam_finished.pt,v
retrieving revision 1.3.2.2
retrieving revision 1.3.2.3
diff -C2 -d -r1.3.2.2 -r1.3.2.3
*** exam_finished.pt	8 Jan 2006 00:08:46 -0000	1.3.2.2
--- exam_finished.pt	8 Jan 2006 14:01:23 -0000	1.3.2.3
***************
*** 31,35 ****
                              b_start python:0;
                              b_start request/b_start | b_start;
!                             batch python:Batch(results, b_size, int(b_start), orphan=0, pagerange=2);">
                 
                  <div metal:use-macro="here/batch_macros/macros/navigation" />
--- 31,37 ----
                              b_start python:0;
                              b_start request/b_start | b_start;
!                             batch python:Batch(results, b_size, int(b_start), orphan=0, pagerange=2);
!                             forUser string:-1;
!                             context_override python:False;">
                 
                  <div metal:use-macro="here/batch_macros/macros/navigation" />
***************
*** 41,46 ****
                          <fieldset tal:define="context python:here;
                                                pt_question python:currentQuestion.getQuestionType().lower().replace('question','');
!                                               exam_eval_macro python: path('here/exam_%s/macros/eval' % pt_question);
!                                               forUser python:here.REQUEST.get('forUser', '-1');" >
              
                               <tal metal:use-macro="exam_eval_macro" />
--- 43,47 ----
                          <fieldset tal:define="context python:here;
                                                pt_question python:currentQuestion.getQuestionType().lower().replace('question','');
!                                               exam_eval_macro python: path('here/exam_%s/macros/eval' % pt_question);">
              
                               <tal metal:use-macro="exam_eval_macro" />

--- NEW FILE: exam_overrideform.pt ---
<div metal:define-macro="override_form"
       tal:omit-tag=""
       i18n:domain="EduploneExam">

        <i i18n:translate="label_user_score">User score</i> 
        <b tal:content="python:responseObj.getScore()" />
        
        <br />
      
        <i i18n:translate="score_total">possible score</i> 
        <span tal:omit-tag=""
              tal:content="currentQuestion/maxScore" />
        
        <br />

        <i i18n:translate="score_new">new score</i> 
        <input type="text" tal:attributes="name  python:'OverrideScore##%s' % currentQuestion.UID();
                                           value python: responseObj.getOverrideScore()" />
        <br />
        <textarea tal:attributes="name python:'OverrideComment##%s' % currentQuestion.UID()"><span tal:omit-tag="" tal:content="python: responseObj.getOverrideComment()" /></textarea>

</div>
--- NEW FILE: exam_overrideprocess.cpy ---
# Controller Python Script "exam_overrideprocess"
##bind context=context
##bind state=state
##parameters=
##title=processes an exam form.
##

# get subset of questions from current batch
#from Products.CMFPlone import Batch
request = context.REQUEST

#results = context.contentValues(context.getRegisteredQuestionTypes().keys())
#b_start = request.get('b_start', 1)
#b_size  = request.get('b_size',  1)
#batch   = Batch(results, int(b_size), int(b_start), orphan=0, pagerange=2)

#for question in batch:
#    question.processResponse(request)

#if batch.next:
#    request.RESPONSE.redirect('%s/exam_view?b_start:int=%s&b_size:int=%s' % 
#                              (context.absolute_url(), b_start+b_size, b_size)
#    )
#    return

context.overrideScore(request)

request.RESPONSE.redirect('%s/exam_scoreoverride?forUser=%s' % (context.absolute_url(),request.get('forUser')))



Index: exam_math.pt
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/skins/EduploneExam/exam_math.pt,v
retrieving revision 1.8.2.2
retrieving revision 1.8.2.3
diff -C2 -d -r1.8.2.2 -r1.8.2.3
*** exam_math.pt	8 Jan 2006 00:08:46 -0000	1.8.2.2
--- exam_math.pt	8 Jan 2006 14:01:23 -0000	1.8.2.3
***************
*** 64,67 ****
--- 64,71 ----
  
  
+         <tal:cond tal:condition="context_override">
+             <tal metal:use-macro="here/exam_overrideform/macros/override_form" />
+         </tal:cond>
+ 
      </div>
  



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click