Commit 09d8dbd7 by Braden MacDonald

Fix bug when mentoring contains Answer and AnswerRecap with same name

parent d5ea6f63
......@@ -345,7 +345,7 @@ class MentoringBlock(XBlock, StepParentMixin, StudioEditableXBlockMixin, StudioC
submit_results = []
completed = True
for child_id in self.children:
for child_id in self.steps:
child = self.runtime.get_block(child_id)
if child.name and child.name in submissions:
submission = submissions[child.name]
......
......@@ -38,8 +38,8 @@ function MentoringStandardView(runtime, element, mentoring) {
var children = mentoring.children;
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child && child.name !== undefined) {
data[child.name] = callIfExists(child, 'submit');
if (child && child.name !== undefined && typeof(child.submit) !== "undefined") {
data[child.name] = child.submit();
}
}
var handlerUrl = runtime.handlerUrl(element, '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