From 16d95283fb47cc31afc6b69e920f578db7143b7e Mon Sep 17 00:00:00 2001 From: Glenn Rice Date: Sat, 4 Nov 2023 06:45:26 -0500 Subject: [PATCH] Fix the alert timeouts in two cases for the single problem grader. 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. --- htdocs/js/ProblemGrader/problemgrader.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/js/ProblemGrader/problemgrader.js b/htdocs/js/ProblemGrader/problemgrader.js index c1cd644e4e..31629a6ca1 100644 --- a/htdocs/js/ProblemGrader/problemgrader.js +++ b/htdocs/js/ProblemGrader/problemgrader.js @@ -180,7 +180,7 @@ messageArea.innerHTML = '
The score was saved, but there was an error saving the comment.
' + `
${e}
`; - setTimeout(() => messageArea.classList.remove('alert-danger', 100)); + setTimeout(() => messageArea.classList.remove('alert-danger'), 100); } } else { messageArea.classList.add('alert-success'); @@ -192,7 +192,7 @@ } catch (e) { messageArea.classList.add('alert-danger'); messageArea.innerHTML = `
Error saving score.
${e?.message ?? e}
`; - setTimeout(() => messageArea.classList.remove('alert-danger', 100)); + setTimeout(() => messageArea.classList.remove('alert-danger'), 100); } }); })