Commit f7a0d156 by Braden MacDonald

Remove unused code

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