diff options
author | Simon Rettberg | 2020-08-03 16:10:49 +0200 |
---|---|---|
committer | Simon Rettberg | 2020-08-03 16:10:49 +0200 |
commit | 267b04e161d075b02a4f98c8b8c8176518adc566 (patch) | |
tree | 4b3d97d8d33abc906905311193879bdcd66c4c97 | |
parent | [serversetup-bwlp-ipxe/statistics] Sanitize strings from clients (diff) | |
download | slx-admin-267b04e161d075b02a4f98c8b8c8176518adc566.tar.gz slx-admin-267b04e161d075b02a4f98c8b8c8176518adc566.tar.xz slx-admin-267b04e161d075b02a4f98c8b8c8176518adc566.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]; } |