Skip to content

Commit

Permalink
Fix the alert timeouts in two cases for the single problem grader.
Browse files Browse the repository at this point in the history
A couple of typos prevent the bootstrap alerts from being properly
shown.  The messages are displayed, but the alert styles are not.
This is just a minor display issue.
  • Loading branch information
drgrice1 committed Nov 4, 2023
1 parent 46f2fcf commit 16d9528
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions htdocs/js/ProblemGrader/problemgrader.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
messageArea.innerHTML =
'<div>The score was saved, but there was an error saving the comment.</div>' +
`<div>${e}</div>`;
setTimeout(() => messageArea.classList.remove('alert-danger', 100));
setTimeout(() => messageArea.classList.remove('alert-danger'), 100);
}
} else {
messageArea.classList.add('alert-success');
Expand All @@ -192,7 +192,7 @@
} catch (e) {
messageArea.classList.add('alert-danger');
messageArea.innerHTML = `<div>Error saving score.</div><div>${e?.message ?? e}</div>`;
setTimeout(() => messageArea.classList.remove('alert-danger', 100));
setTimeout(() => messageArea.classList.remove('alert-danger'), 100);
}
});
})
Expand Down

0 comments on commit 16d9528

Please sign in to comment.