From 2073b7ceda30e48d989fbc57be5720b6445eb451 Mon Sep 17 00:00:00 2001 From: Nikolaus Krondraf Date: Thu, 9 Jan 2020 08:40:40 +0100 Subject: [PATCH] =?UTF-8?q?Reihung=20wird=20nicht=20neu=20gespeichert=20we?= =?UTF-8?q?nn=20letzte=20Anmeldung=20gel=C3=B6scht=20wird?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cis/private/lehre/pruefung/pruefung.js.php | 45 ++++++++++++---------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/cis/private/lehre/pruefung/pruefung.js.php b/cis/private/lehre/pruefung/pruefung.js.php index 7a76f48d0..661094780 100644 --- a/cis/private/lehre/pruefung/pruefung.js.php +++ b/cis/private/lehre/pruefung/pruefung.js.php @@ -892,28 +892,31 @@ function saveReihung(terminId, lehrveranstaltung_id) anmeldung.uid = v.id; reihung.push(anmeldung); }); - $.ajax({ - dataType: 'json', - url: "./pruefungsanmeldung.json.php", - type: "POST", - data: { - method: "saveReihung", - reihung: reihung - }, - error: loadError, - success: function(data){ - if(data.error === 'false' && data.result === true) - { - messageBox("message", "t('pruefung/reihunghErfolgreichGeaendert'); ?>", "green", "highlight", 1000); - } - else - { - messageBox("message", data.errormsg, "red", "highlight", 1000); - } - showAnmeldungen(terminId, lehrveranstaltung_id); - } - }); + if (reihung.length > 0) { + $.ajax({ + dataType: 'json', + url: "./pruefungsanmeldung.json.php", + type: "POST", + data: { + method: "saveReihung", + reihung: reihung + }, + error: loadError, + success: function(data){ + if(data.error === 'false' && data.result === true) + { + messageBox("message", "t('pruefung/reihunghErfolgreichGeaendert'); ?>", "green", "highlight", 1000); + } + else + { + messageBox("message", data.errormsg, "red", "highlight", 1000); + } + + showAnmeldungen(terminId, lehrveranstaltung_id); + } + }); + } } /**