EduploneExam_QOrderProcessor/QOrder_ProcessorTypes QOrderProcessGroup.py,1.3,1.4 QOrderProcessor.py,1.4,1.5
Nils Haagen <[email protected]> Tue, 15 Nov 2005 11:13:20 +0000
| Newsgroups | gmane.comp.web.zope.eduplone.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/eduplone/EduploneExam_QOrderProcessor/QOrder_ProcessorTypes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10806/QOrder_ProcessorTypes
Modified Files:
QOrderProcessGroup.py QOrderProcessor.py
Log Message:
Processor with FeedBack-Text
Index: QOrderProcessor.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam_QOrderProcessor/QOrder_ProcessorTypes/QOrderProcessor.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** QOrderProcessor.py 15 Nov 2005 09:57:39 -0000 1.4
--- QOrderProcessor.py 15 Nov 2005 11:13:18 -0000 1.5
***************
*** 2,6 ****
#
# Copyright (c) 2005 by
! # Generator: ArchGenXML Version 1.4.0-beta2 devel
# http://plone.org/products/archgenxml
#
--- 2,6 ----
#
# Copyright (c) 2005 by
! # Generator: ArchGenXML Version 1.4.0-RC1
# http://plone.org/products/archgenxml
#
***************
*** 39,42 ****
--- 39,52 ----
schema=Schema((
+ TextField('Feedback',
+ widget=RichWidget
+ (
+ label='Feedback',
+ label_msgid='EduploneExam_QOrderProcessor_label_Feedback',
+ description_msgid='EduploneExam_QOrderProcessor_help_Feedback',
+ i18n_domain='EduploneExam_QOrderProcessor',
+ )
+ ),
+
),
)
***************
*** 104,131 ****
return ret
- def totalNumberOfQOrderAnswers(self):
- """ """
- sum=0
- for pg in self.objectValues():
- sum=sum + len(pg.get_AnswerUIDs())
- return sum
-
- def maxSumProcIds(self):
- """ returns ordered list of processgroupIds, highest first """
- results={}
- #highest=None
- for pg in self.objectValues('QOrderProcessGroup'):
- results[pg.sumUp()]=pg.getId()
-
- reslist=results.keys()
- reslist.sort()
- reslist.reverse()
-
- ret={}
- counter=0
- for i in reslist:
- ret[counter]=results[i]
- counter+=1
- return ret
def pgResultPositions(self):
--- 114,117 ----
***************
*** 150,160 ****
return ret
- def getTitleForUID(self, uid):
- """ """
- brain=self._lookupUID(uid,self)
- if brain:
- return brain.title
- else:
- return False
def _lookupUID(self, uid, instance):
--- 136,139 ----
***************
*** 169,172 ****
--- 148,188 ----
+ def totalNumberOfQOrderAnswers(self):
+ """ """
+ sum=0
+ for pg in self.objectValues():
+ sum=sum + len(pg.get_AnswerUIDs())
+ return sum
+
+
+ def getTitleForUID(self, uid):
+ """ """
+ brain=self._lookupUID(uid,self)
+ if brain:
+ return brain.title
+ else:
+ return False
+
+
+ def maxSumProcIds(self):
+ """ returns ordered list of processgroupIds, highest first """
+ results={}
+ #highest=None
+ for pg in self.objectValues('QOrderProcessGroup'):
+ results[pg.sumUp()]=pg.getId()
+
+ reslist=results.keys()
+ reslist.sort()
+ reslist.reverse()
+
+ ret={}
+ counter=0
+ for i in reslist:
+ ret[counter]=results[i]
+ counter+=1
+ return ret
+
+
+
registerType(QOrderProcessor,PROJECTNAME)
# end of class QOrderProcessor
Index: QOrderProcessGroup.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam_QOrderProcessor/QOrder_ProcessorTypes/QOrderProcessGroup.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** QOrderProcessGroup.py 24 Oct 2005 11:00:14 -0000 1.3
--- QOrderProcessGroup.py 15 Nov 2005 11:13:18 -0000 1.4
***************
*** 2,6 ****
#
# Copyright (c) 2005 by
! # Generator: ArchGenXML Version 1.4.0-beta2 devel
# http://plone.org/products/archgenxml
#
--- 2,6 ----
#
# Copyright (c) 2005 by
! # Generator: ArchGenXML Version 1.4.0-RC1
# http://plone.org/products/archgenxml
#
***************
*** 37,41 ****
schema=Schema((
TextField('Feedback',
! widget=TextAreaWidget(
label='Feedback',
label_msgid='EduploneExam_QOrderProcessor_label_Feedback',
--- 37,42 ----
schema=Schema((
TextField('Feedback',
! widget=RichWidget
! (
label='Feedback',
label_msgid='EduploneExam_QOrderProcessor_label_Feedback',
***************
*** 107,110 ****
--- 108,135 ----
+ def _lookupUID(self, uid, instance):
+ tool = getToolByName(instance, UID_CATALOG)
+ brains = tool(UID=uid)
+ for brain in brains:
+ obj = brain.getObject()
+ if obj is not None:
+ return obj
+ else:
+ return None
+
+
+ def getAnswerUIDforQuestion(self, question):
+ """ """
+ if self._answerUIDs.has_key(question):
+ return self._answerUIDs[question]
+ else:
+ return False
+
+
+ def set_AnswerUIDs(self, uids={}):
+ """ """
+ self._answerUIDs=uids
+
+
def sumUp(self):
""" """
***************
*** 123,149 ****
- def getAnswerUIDforQuestion(self, question):
- """ """
- if self._answerUIDs.has_key(question):
- return self._answerUIDs[question]
- else:
- return False
-
- def set_AnswerUIDs(self, uids={}):
- """ """
- self._answerUIDs=uids
-
-
- def _lookupUID(self, uid, instance):
- tool = getToolByName(instance, UID_CATALOG)
- brains = tool(UID=uid)
- for brain in brains:
- obj = brain.getObject()
- if obj is not None:
- return obj
- else:
- return None
-
-
registerType(QOrderProcessGroup,PROJECTNAME)
--- 148,151 ----
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today
Register for a JBoss Training Course. Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click