EduploneExam/skins/EduploneExam exam_fillgap_cleanup.cpy,1.1.2.1,1.1.2.2 exam_fillgap_edit.cpt,1.9.2.1,1.9.2.2 exam_fillgap_process.cpy,1.3.2.1,1.3.2.2

"Fabian K." <[email protected]> Sun, 26 Feb 2006 20:09:05 +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-serv15646/skins/EduploneExam

Modified Files:
      Tag: exam-1_1
	exam_fillgap_cleanup.cpy exam_fillgap_edit.cpt 
	exam_fillgap_process.cpy 
Log Message:
Fixed nasty FillGap bug. Now go ahead and delete as many gaps as you can :)

Index: exam_fillgap_cleanup.cpy
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/skins/EduploneExam/Attic/exam_fillgap_cleanup.cpy,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_fillgap_cleanup.cpy	26 Oct 2005 14:18:32 -0000	1.1.2.1
--- exam_fillgap_cleanup.cpy	26 Feb 2006 20:09:03 -0000	1.1.2.2
***************
*** 9,15 ****
  
  parent=context.aq_parent
- parent.manage_delObjects([context.getId()])
  
  
  # Return to fillgap task
! context.REQUEST.RESPONSE.redirect("%s/folder_contents" % parent.absolute_url())
--- 9,17 ----
  
  parent=context.aq_parent
  
+ # Only delete object if it hasn't been created yet
+ if context.getCreated() == False:
+     parent.manage_delObjects([context.getId()])
  
  # Return to fillgap task
! context.REQUEST.RESPONSE.redirect("%s" % parent.absolute_url())

Index: exam_fillgap_process.cpy
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/skins/EduploneExam/exam_fillgap_process.cpy,v
retrieving revision 1.3.2.1
retrieving revision 1.3.2.2
diff -C2 -d -r1.3.2.1 -r1.3.2.2
*** exam_fillgap_process.cpy	2 Oct 2005 21:21:12 -0000	1.3.2.1
--- exam_fillgap_process.cpy	26 Feb 2006 20:09:03 -0000	1.3.2.2
***************
*** 13,16 ****
--- 13,17 ----
  answerCorrect = request.get("correct")
  answerCaseSensitive = request.get("caseSensitive")
+ answerCreated = request.get("created")
  answer = context
  gapWordIndex = int(request.get("gapWordIndex"))
***************
*** 41,44 ****
--- 42,46 ----
  answer.setTitle(answerTitle)
  answer.setCorrect(answerCorrect)
+ answer.setCreated(True)
  
  if answer.meta_type=="BlindGapAnswer":

Index: exam_fillgap_edit.cpt
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/skins/EduploneExam/exam_fillgap_edit.cpt,v
retrieving revision 1.9.2.1
retrieving revision 1.9.2.2
diff -C2 -d -r1.9.2.1 -r1.9.2.2
*** exam_fillgap_edit.cpt	13 Nov 2005 15:19:40 -0000	1.9.2.1
--- exam_fillgap_edit.cpt	26 Feb 2006 20:09:03 -0000	1.9.2.2
***************
*** 151,156 ****
            <input class="context" type="submit"
            	     name="form.button.submit" value="Save" i18n:attributes="value" />
!           <input class="standalone" type="submit"
!           		 name="form.button.cancel" value="Cancel" i18n:attributes="value" />
  </form>
  
--- 151,156 ----
            <input class="context" type="submit"
            	     name="form.button.submit" value="Save" i18n:attributes="value" />
! 	  <input class="standalone" type="submit"
! 		     name="form.button.cancel" value="Cancel" i18n:attributes="value" />
  </form>
  



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642