Commit bf34ef54 by Vik Paruchuri

Add in ability to define score points

parent 67bc4271
...@@ -112,7 +112,7 @@ class SelfAssessmentModule(XModule): ...@@ -112,7 +112,7 @@ class SelfAssessmentModule(XModule):
# Used for progress / grading. Currently get credit just for # Used for progress / grading. Currently get credit just for
# completion (doesn't matter if you self-assessed correct/incorrect). # completion (doesn't matter if you self-assessed correct/incorrect).
self._max_score = instance_state.get('max_score', MAX_SCORE) self._max_score = int(self.metadata.get('max_score', MAX_SCORE))
self.attempts = instance_state.get('attempts', 0) self.attempts = instance_state.get('attempts', 0)
...@@ -137,7 +137,6 @@ class SelfAssessmentModule(XModule): ...@@ -137,7 +137,6 @@ class SelfAssessmentModule(XModule):
'initial_message': self.get_message_html(), 'initial_message': self.get_message_html(),
'state': self.state, 'state': self.state,
'allow_reset': allow_reset, 'allow_reset': allow_reset,
'max_score' : self._max_score,
} }
html = self.system.render_template('self_assessment_prompt.html', context) html = self.system.render_template('self_assessment_prompt.html', context)
...@@ -225,7 +224,9 @@ class SelfAssessmentModule(XModule): ...@@ -225,7 +224,9 @@ class SelfAssessmentModule(XModule):
return '' return ''
# we'll render it # we'll render it
context = {'rubric': self.rubric} context = {'rubric': self.rubric,
'max_score' : self._max_score,
}
if self.state == self.ASSESSING: if self.state == self.ASSESSING:
context['read_only'] = False context['read_only'] = False
......
...@@ -6,8 +6,9 @@ ...@@ -6,8 +6,9 @@
% if not read_only: % if not read_only:
<select name="assessment" class="assessment"> <select name="assessment" class="assessment">
<option value="incorrect">Incorrect</option> %for i in xrange(0,max_score+1):
<option value="correct">Correct</option> <option value="${i}">${i}</option>
%endfor
</select> </select>
% endif % endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment