From 187367688db7c991fd6b1956f47eb1146c680628 Mon Sep 17 00:00:00 2001 From: oesi Date: Thu, 24 Sep 2015 08:28:04 +0200 Subject: [PATCH] =?UTF-8?q?Fehler=20im=20Reihungstest=20behoben=20bei=20de?= =?UTF-8?q?m=20das=20Gebiet=20nicht=20korrekt=20gestartet=20wurde,=20wenn?= =?UTF-8?q?=20die=20maximale=20Fragenanzahl=20gr=C3=B6=C3=9Fer=20ist=20als?= =?UTF-8?q?=20die=20tats=C3=A4chlich=20vorhandenen=20Fragen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/frage.class.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/include/frage.class.php b/include/frage.class.php index 7011d94c4..f1a6c553d 100644 --- a/include/frage.class.php +++ b/include/frage.class.php @@ -521,6 +521,9 @@ class frage extends basis_db $this->frage_id=$this->getNewFrage($gebiet_id, $pruefling_id, $nextlevel); + if($this->frage_id=='') + break; + $this->pruefling_id=$pruefling_id; //hoechste Nummer holen @@ -548,7 +551,7 @@ class frage extends basis_db $this->begintime=''; $this->endtime=''; - + //PrueflingFrage speichern if(!$this->save_prueflingfrage(true)) { @@ -686,8 +689,10 @@ class frage extends basis_db public function save_prueflingfrage($new=null) { if(!$this->validate_prueflingfrage()) + { return false; - + } + if(is_null($new)) $new = $this->new; @@ -763,7 +768,7 @@ class frage extends basis_db $qry .= " ORDER BY nummer ASC"; $qry .= " LIMIT 1"; - + if($this->db_query($qry)) { if($row = $this->db_fetch_object())