Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions player.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function initializeAnimationView(submission, detailed) {
function initializeModelAnswerView(submission) {
const modelAnswer = submission.definitions.modelAnswer;
if (modelAnswer.length > 0) {
var initialStateHTML = getModelAnswerInitialHTML(modelAnswer);
var initialStateHTML = submission.initialState.modelSvg;
} else {
$('#model-answer-container').html('<h3>No model answer data</h3>');
return;
Expand Down Expand Up @@ -164,8 +164,8 @@ function getModelAnswerInitialHTML(modelAnswer) {
* @returns a list of the modelAnswer steps with type click.
*/
function getModelAnswerSteps(modelAnswer) {
// modelAnswer.shift();
return modelAnswer.filter(step => step.type === 'click');
modelAnswer = modelAnswer.flat();
return modelAnswer.filter(step => step.gradable === true);
}

/**
Expand Down
3 changes: 2 additions & 1 deletion testbench/OpenDSA/JSAV/build/JSAV-min.js
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,8 @@
var eventData = {
"type": action,
"currentStep": that.currentStep(),
"totalSteps": that.totalSteps()
"totalSteps": that.totalSteps(),
"gradable": that._undo[that._undo.length - 1].options.grade ?? false,
};
that.logEvent(eventData);
}
Expand Down