Commit f7a0d156 by Braden MacDonald

Remove unused code

parent 8e7eec3f
...@@ -148,6 +148,7 @@ class MentoringBlock(XBlock, StepParentMixin, StudioEditableXBlockMixin, StudioC ...@@ -148,6 +148,7 @@ class MentoringBlock(XBlock, StepParentMixin, StudioEditableXBlockMixin, StudioC
# Has the student attempted this mentoring step? # Has the student attempted this mentoring step?
default=False, default=False,
scope=Scope.user_state scope=Scope.user_state
# TODO: Does anything use this 'attempted' field? May want to delete it.
) )
completed = Boolean( completed = Boolean(
# Has the student completed this mentoring step? # Has the student completed this mentoring step?
...@@ -458,7 +459,6 @@ class MentoringBlock(XBlock, StepParentMixin, StudioEditableXBlockMixin, StudioC ...@@ -458,7 +459,6 @@ class MentoringBlock(XBlock, StepParentMixin, StudioEditableXBlockMixin, StudioC
return { return {
'results': results, 'results': results,
'completed': completed, 'completed': completed,
'attempted': self.attempted,
'message': message, 'message': message,
'step': step, 'step': step,
'max_attempts': self.max_attempts, 'max_attempts': self.max_attempts,
...@@ -468,6 +468,8 @@ class MentoringBlock(XBlock, StepParentMixin, StudioEditableXBlockMixin, StudioC ...@@ -468,6 +468,8 @@ class MentoringBlock(XBlock, StepParentMixin, StudioEditableXBlockMixin, StudioC
@XBlock.json_handler @XBlock.json_handler
def submit(self, submissions, suffix=''): def submit(self, submissions, suffix=''):
log.info(u'Received submissions: {}'.format(submissions)) log.info(u'Received submissions: {}'.format(submissions))
# This has now been attempted:
self.attempted = True self.attempted = True
if self.is_assessment: if self.is_assessment:
...@@ -528,10 +530,9 @@ class MentoringBlock(XBlock, StepParentMixin, StudioEditableXBlockMixin, StudioC ...@@ -528,10 +530,9 @@ class MentoringBlock(XBlock, StepParentMixin, StudioEditableXBlockMixin, StudioC
return { return {
'results': submit_results, 'results': submit_results,
'completed': self.completed, 'completed': self.completed,
'attempted': self.attempted,
'message': message, 'message': message,
'max_attempts': self.max_attempts, 'max_attempts': self.max_attempts,
'num_attempts': self.num_attempts 'num_attempts': self.num_attempts,
} }
def handle_assessment_submit(self, submissions, suffix): def handle_assessment_submit(self, submissions, suffix):
...@@ -589,7 +590,6 @@ class MentoringBlock(XBlock, StepParentMixin, StudioEditableXBlockMixin, StudioC ...@@ -589,7 +590,6 @@ class MentoringBlock(XBlock, StepParentMixin, StudioEditableXBlockMixin, StudioC
return { return {
'completed': completed, 'completed': completed,
'attempted': self.attempted,
'max_attempts': self.max_attempts, 'max_attempts': self.max_attempts,
'num_attempts': self.num_attempts, 'num_attempts': self.num_attempts,
'step': self.step, 'step': self.step,
......
...@@ -24,7 +24,6 @@ function AnswerBlock(runtime, element) { ...@@ -24,7 +24,6 @@ function AnswerBlock(runtime, element) {
handleSubmit: function(result) { handleSubmit: function(result) {
var checkmark = $('.answer-checkmark', element); var checkmark = $('.answer-checkmark', element);
$(element).find('.message').text((result || {}).error || '');
this.clearResult(); this.clearResult();
......
...@@ -48,10 +48,6 @@ function MentoringStandardView(runtime, element, mentoring) { ...@@ -48,10 +48,6 @@ function MentoringStandardView(runtime, element, mentoring) {
submitXHR = $.post(handlerUrl, JSON.stringify(data)).success(handleSubmitResults); submitXHR = $.post(handlerUrl, JSON.stringify(data)).success(handleSubmitResults);
} }
function get_results() {
calculate_results('get_results');
}
function submit() { function submit() {
calculate_results('submit'); calculate_results('submit');
} }
......
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