EduploneTest/types EduploneFillGap.py,1.5,1.6 EduploneTestingEnvironment.py,1.12,1.13

Nils Haagen <[email protected]>
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-serv9214/types

Modified Files:
	EduploneFillGap.py EduploneTestingEnvironment.py 
Log Message:
fixed scoring for FillGap

Index: EduploneFillGap.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneTest/types/EduploneFillGap.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** EduploneFillGap.py	13 Oct 2004 13:07:56 -0000	1.5
--- EduploneFillGap.py	13 Oct 2004 15:48:20 -0000	1.6
***************
*** 37,44 ****
  			vocabulary=['Text', 'Dropdown'],
  			widget=SelectionWidget(label="Task type",
!                                                               label_msgid='label_text_or_dropdown', 
!                                                               description = "Either text or dropdown.", 
!                                                               description_msgid='help_text_or_dropdown', 
!                                                               i18n_domain='eduplone'),
  		),
  		StringField('text_to_render',
--- 37,44 ----
  			vocabulary=['Text', 'Dropdown'],
  			widget=SelectionWidget(label="Task type",
!                                                label_msgid='label_text_or_dropdown', 
!                                                description = "Either text or dropdown.", 
!                                                description_msgid='help_text_or_dropdown', 
!                                                i18n_domain='eduplone'),
  		),
  		StringField('text_to_render',

Index: EduploneTestingEnvironment.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneTest/types/EduploneTestingEnvironment.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** EduploneTestingEnvironment.py	13 Oct 2004 13:07:56 -0000	1.12
--- EduploneTestingEnvironment.py	13 Oct 2004 15:48:20 -0000	1.13
***************
*** 401,405 ****
  
          if self[questionId].meta_type in ['eduplone FreeText']:
!             print '-FreeText'
  	    correctAnswers=0
  	    for i in possibleAnswers: #answer-object
--- 401,405 ----
  
          if self[questionId].meta_type in ['eduplone FreeText']:
!             #print '-FreeText'
  	    correctAnswers=0
  	    for i in possibleAnswers: #answer-object
***************
*** 409,421 ****
  			inText=1
  		correctAnswers += inText
! 		
  	    wrongAnswers=len(possibleAnswers)-correctAnswers
  	    return (float(questionScore)/float(len(possibleAnswers))) * correctAnswers
  
- 
          if self[questionId].meta_type in ['eduplone FillGap']:
!             print '-FillGap'
! 	    
! 
  
          if self[questionId].meta_type in ['eduplone SingleChoice']:
--- 409,424 ----
  			inText=1
  		correctAnswers += inText
! 
  	    wrongAnswers=len(possibleAnswers)-correctAnswers
  	    return (float(questionScore)/float(len(possibleAnswers))) * correctAnswers
  
          if self[questionId].meta_type in ['eduplone FillGap']:
!             #print '-FillGap'
! 	    correctAnswers=0
!             for a in possibleAnswers:
! 		uAnswer=self.users[userId].getSingleAnswer(questionId, a.getId())
! 		if self.evalAnswer(questionId, a.getId(), uAnswer):
!             	    correctAnswers +=1
! 	    return (float(questionScore)/float(len(possibleAnswers))) * correctAnswers
  
          if self[questionId].meta_type in ['eduplone SingleChoice']:
***************
*** 436,439 ****
--- 439,444 ----
  
  
+ 
+ 
      def score_CalculateTotal(self, userId):
          """ calculates user-score for a single question """



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.