rename 'options' to the more specific 'answerOptions'
This commit is contained in:
		
							parent
							
								
									872272adb3
								
							
						
					
					
						commit
						952f2a989b
					
				
					 2 changed files with 9 additions and 9 deletions
				
			
		|  | @ -33,7 +33,7 @@ class IQuestionnaire(Interface): | |||
| 
 | ||||
|     questions = Attribute('An ordered collection of questions.') | ||||
|     responses = Attribute('A set of responses.') | ||||
|     defaultOptions = Attribute('A sequence of answer options to select from. ' | ||||
|     defaultAnswerOptions = Attribute('A sequence of answer options to select from. ' | ||||
|                 'Default value used for questions that do not ' | ||||
|                 'explicitly provide the values attribute.') | ||||
| 
 | ||||
|  | @ -44,7 +44,7 @@ class IQuestion(Interface): | |||
| 
 | ||||
|     text = Attribute('The question asked.') | ||||
|     questionnaire = Attribute('The questionnaire this question belongs to.') | ||||
|     options = Attribute('A sequence of answer options to select from.') | ||||
|     answerOptions = Attribute('A sequence of answer options to select from.') | ||||
|     resultElements = Attribute('A mapping with result elements as keys and ' | ||||
|             'corresponding relevance factors as values.') | ||||
| 
 | ||||
|  |  | |||
|  | @ -32,25 +32,25 @@ class Questionnaire(object): | |||
|     def __init__(self): | ||||
|         self.questions = [] | ||||
|         self.responses = [] | ||||
|         self.defaultOptions = range(5) | ||||
|         self.defaultAnswerOptions = range(5) | ||||
| 
 | ||||
| 
 | ||||
| class Question(object): | ||||
| 
 | ||||
|     implements(IQuestion) | ||||
| 
 | ||||
|     _options = None | ||||
|     _answerOptions = None | ||||
|      | ||||
|     def __init__(self, questionnaire, text=u''): | ||||
|         self.questionnaire = questionnaire | ||||
|         self.resultElements = {} | ||||
|         self.text = text | ||||
| 
 | ||||
|     def getOptions(self): | ||||
|         return self._options or self.questionnaire.defaultOptions | ||||
|     def setOptions(self, value): | ||||
|         self._options = value | ||||
|     options = property(getOptions, setOptions) | ||||
|     def getAnswerOptions(self): | ||||
|         return self._answerOptions or self.questionnaire.defaultAnswerOptions | ||||
|     def setAnswerOptions(self, value): | ||||
|         self._answerOptions = value | ||||
|     answerOptions = property(getAnswerOptions, setAnswerOptions) | ||||
| 
 | ||||
| 
 | ||||
| class ResultElement(object): | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue