EduploneExam/answers BaseAnswer.py,1.1.2.1,1.1.2.2 BlindGapAnswer.py,1.27.2.4,1.27.2.5 ChoiceGapAnswer.py,1.26.2.8,1.26.2.9
"Fabian K." <[email protected]> Sun, 26 Feb 2006 20:09:04 +0000
| Newsgroups | gmane.comp.web.zope.eduplone.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/eduplone/EduploneExam/answers
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15646/answers
Modified Files:
Tag: exam-1_1
BaseAnswer.py BlindGapAnswer.py ChoiceGapAnswer.py
Log Message:
Fixed nasty FillGap bug. Now go ahead and delete as many gaps as you can :)
Index: ChoiceGapAnswer.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/answers/ChoiceGapAnswer.py,v
retrieving revision 1.26.2.8
retrieving revision 1.26.2.9
diff -C2 -d -r1.26.2.8 -r1.26.2.9
*** ChoiceGapAnswer.py 8 Feb 2006 13:39:33 -0000 1.26.2.8
--- ChoiceGapAnswer.py 26 Feb 2006 20:09:02 -0000 1.26.2.9
***************
*** 55,58 ****
--- 55,68 ----
),
+ BooleanField('created',
+ default="0",
+ widget=BooleanWidget(
+ label='Created',
+ label_msgid='EduploneExam_label_created',
+ description_msgid='EduploneExam_help_created',
+ i18n_domain='EduploneExam',
+ )
+ ),
+
),
)
***************
*** 109,112 ****
--- 119,135 ----
#Methods
#manually created methods
+
+ def manage_beforeDelete(self, item, container):
+ """ """
+ BaseAnswer.manage_beforeDelete(self, item, container)
+ basetext_new = []
+ match = "<id='%s'>" % self.getId()
+ for i in self.aq_parent.getBasetextAsList():
+ if i == match:
+ basetext_new.append(self.getCorrect())
+ else:
+ basetext_new.append(i)
+ self.aq_parent.setBasetext(" ".join(basetext_new))
+
def getCleanOptions(self):
Index: BaseAnswer.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/answers/Attic/BaseAnswer.py,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** BaseAnswer.py 9 Feb 2006 21:32:36 -0000 1.1.2.1
--- BaseAnswer.py 26 Feb 2006 20:09:02 -0000 1.1.2.2
***************
*** 107,112 ****
"""
- pass
-
--- 107,110 ----
Index: BlindGapAnswer.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/answers/BlindGapAnswer.py,v
retrieving revision 1.27.2.4
retrieving revision 1.27.2.5
diff -C2 -d -r1.27.2.4 -r1.27.2.5
*** BlindGapAnswer.py 8 Jan 2006 14:01:20 -0000 1.27.2.4
--- BlindGapAnswer.py 26 Feb 2006 20:09:02 -0000 1.27.2.5
***************
*** 37,40 ****
--- 37,50 ----
schema=Schema((
+ BooleanField('created',
+ default="0",
+ widget=BooleanWidget(
+ label='Created',
+ label_msgid='EduploneExam_label_created',
+ description_msgid='EduploneExam_help_created',
+ i18n_domain='EduploneExam',
+ )
+ ),
+
),
)
***************
*** 91,94 ****
--- 101,117 ----
#Methods
#manually created methods
+
+ def manage_beforeDelete(self, item, container):
+ """ """
+ TextLineAnswer.manage_beforeDelete(self, item, container)
+ basetext_new = []
+ match = "<id='%s'>" % self.getId()
+ for i in self.aq_parent.getBasetextAsList():
+ if i == match:
+ basetext_new.append(self.getCorrect()[0])
+ else:
+ basetext_new.append(i)
+ self.aq_parent.setBasetext(" ".join(basetext_new))
+
def processValue(self, value=''):
-------------------------------------------------------
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