Skip to content

Commit f720ab5

Browse files
committed
When resuming a question, resolve pre_submit_promises for gaps once the parent has been submitted.
This fixes a bug where a later part depends on a gap in a gap-fill, but the promise for the gap was never being resolved because it's not submitted on its own.
1 parent 24cc553 commit f720ab5

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

runtime/scripts/question.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -992,6 +992,11 @@ Question.prototype = /** @lends Numbas.Question.prototype */
992992
resolve();
993993
}
994994
});
995+
if(part.gaps) {
996+
promise.then(function() {
997+
part.gaps.forEach(function(g) { part_submit_promises[g.path].resolve(); });
998+
});
999+
}
9951000
}
9961001

9971002
q.signals.on('ready',function() {

0 commit comments

Comments
 (0)