diff options
author | Simon Rettberg | 2020-08-03 16:10:49 +0200 |
---|---|---|
committer | Simon Rettberg | 2020-08-03 16:15:13 +0200 |
commit | bc953adae676ca6bace892a16f711ae9c01302c5 (patch) | |
tree | 480334205dfba142d88c01e5e6be1a51f937034f | |
parent | [serversetup-bwlp-ipxe/statistics] Sanitize strings from clients (diff) | |
download | slx-admin-bc953adae676ca6bace892a16f711ae9c01302c5.tar.gz slx-admin-bc953adae676ca6bace892a16f711ae9c01302c5.tar.xz slx-admin-bc953adae676ca6bace892a16f711ae9c01302c5.zip |
[exams] Cast locationList of lecture to string
If it's a single location, it was turned into a number by jQuery, so
.split() failed.
-rw-r--r-- | modules-available/exams/templates/page-add-edit-exam.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules-available/exams/templates/page-add-edit-exam.html b/modules-available/exams/templates/page-add-edit-exam.html index eb77e751..5946874c 100644 --- a/modules-available/exams/templates/page-add-edit-exam.html +++ b/modules-available/exams/templates/page-add-edit-exam.html @@ -285,7 +285,7 @@ document.addEventListener("DOMContentLoaded", function () { $locationWarning.hide(); return; } - lecLocs = lecLocs.split(','); + lecLocs = ('' + lecLocs).split(','); if (!$.isArray(selectedLocs)) { selectedLocs = [selectedLocs]; } |