Skip to content

Commit

Permalink
When resuming a question, resolve pre_submit_promises for gaps once t…
Browse files Browse the repository at this point in the history
…he 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.
  • Loading branch information
christianp committed Dec 17, 2024
1 parent 24cc553 commit f720ab5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions runtime/scripts/question.js
Original file line number Diff line number Diff line change
Expand Up @@ -992,6 +992,11 @@ Question.prototype = /** @lends Numbas.Question.prototype */
resolve();
}
});
if(part.gaps) {
promise.then(function() {
part.gaps.forEach(function(g) { part_submit_promises[g.path].resolve(); });
});
}
}

q.signals.on('ready',function() {
Expand Down

0 comments on commit f720ab5

Please sign in to comment.