From c887c61d968933b5a6bc7be30dc1d872d496cacc Mon Sep 17 00:00:00 2001 From: Cris Date: Thu, 13 Jun 2019 16:19:23 +0200 Subject: [PATCH] Created class zeitaufzeichnung_gd & method save() The save method saves the lectors decision about self-managing breaks during parted working times. --- include/zeitaufzeichnung_gd.class.php | 83 +++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 include/zeitaufzeichnung_gd.class.php diff --git a/include/zeitaufzeichnung_gd.class.php b/include/zeitaufzeichnung_gd.class.php new file mode 100644 index 000000000..c88cc9525 --- /dev/null +++ b/include/zeitaufzeichnung_gd.class.php @@ -0,0 +1,83 @@ +uid) && + is_string($this->studiensemester_kurzbz) && + is_bool($this->selbstverwaltete_pause)) + { + $qry = ' + INSERT INTO campus.tbl_zeitaufzeichnung_gd ( + uid, + studiensemester_kurzbz, + selbstverwaltete_pause, + insertvon + ) + VALUES ('. + $this->db_add_param($this->uid). ', '. + $this->db_add_param($this->studiensemester_kurzbz). ', '. + $this->db_add_param($this->selbstverwaltete_pause). ', '. + $this->db_add_param($this->uid). ' + ); + '; + + if ($this->db_query($qry)) + { + return true; + } + else + { + $this->errormsg = 'Fehler beim Speichern der selbstverwalteten Pause'; + return false; + } + } + else + { + $this->errormsg = 'Falsche Parameterübergabe'; + return false; + } + } +} \ No newline at end of file