EduploneTest/types EduploneTestingEnvironment.py,1.26,1.27

Nils Haagen <[email protected]> Wed, 05 Jan 2005 19:01:44 +0000
Newsgroups gmane.comp.web.zope.eduplone.cvs
Message-ID <[email protected]>
Update of /cvsroot/eduplone/EduploneTest/types
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25610/types

Modified Files:
	EduploneTestingEnvironment.py 
Log Message:
nextTask/previousTask now submits the form.

Index: EduploneTestingEnvironment.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneTest/types/EduploneTestingEnvironment.py,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** EduploneTestingEnvironment.py	4 Jan 2005 21:40:39 -0000	1.26
--- EduploneTestingEnvironment.py	5 Jan 2005 19:01:41 -0000	1.27
***************
*** 473,476 ****
--- 473,489 ----
              return self.sequence_getNext(questionid)
  
+     security.declareProtected(eXamPermissions.saveAnswers, 'answerAndBackward')
+     def answerAndBackward(self, REQUEST=None):
+         """ stores answers and moves back in the sequence """
+         questionid = REQUEST.form['qId']
+         self.saveQuestionAnswers(REQUEST)
+         nextId = self.sequence_getLast(questionid)
+         if nextId not in  ['users', -1]:
+             return self[self.sequence_getLast(questionid)].view()
+         else:
+             if nextId == -1:
+                 pass
+                 #return self.REQUEST.response.redirect(self.absolute_url() + '/test_environment_feedback')
+             return self.sequence_getLast(questionid)
  
  ##CLEAN THAT UP



-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt