From 094f75ef6105f7d0a79344bbb7f2f764f581951b Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Fri, 21 Jan 2022 00:41:13 +0100 Subject: [PATCH] - Projektbetreuer_model.php: method getBetreuerOfProjektarbeit for getting Betreuer by betreuerart - phrasesupdate.php: added Projektarbeitsbeurteilung phrases --- .../education/Projektbetreuer_model.php | 29 ++++++- system/phrasesupdate.php | 77 +++++++++++++++++++ 2 files changed, 105 insertions(+), 1 deletion(-) diff --git a/application/models/education/Projektbetreuer_model.php b/application/models/education/Projektbetreuer_model.php index 22c7be1ec..f3af03f86 100644 --- a/application/models/education/Projektbetreuer_model.php +++ b/application/models/education/Projektbetreuer_model.php @@ -42,6 +42,31 @@ class Projektbetreuer_model extends DB_Model } } + /** + * Checks if a Projektarbeit has a Betreuer of a certain type + * @param int $projektarbeit_id + * @param string $betreuerart_kurzbz + * @return array success with number of Betreuer or error + */ + public function getBetreuerOfProjektarbeit($projektarbeit_id, $betreuerart_kurzbz) + { + $this->addSelect('pers.person_id, betreuerart_kurzbz, vorname, nachname, + anrede, titelpre, titelpost, gebdatum, geschlecht, + ben.uid, ben.aktiv as benutzer_aktiv, ben.alias, student_uid'); + $this->addJoin('lehre.tbl_projektarbeit', 'projektarbeit_id'); + $this->addJoin('public.tbl_person pers', 'person_id'); + $this->addJoin('public.tbl_benutzer ben', 'person_id', 'LEFT'); + $this->addOrder('pers.person_id'); + + return $this->loadWhere( + array( + 'projektarbeit_id' => $projektarbeit_id, + 'betreuerart_kurzbz' => $betreuerart_kurzbz, + 'ben.aktiv' => true + ) + ); + } + /** * Get Projektbetreuer data by authentification token * @param $zugangstoken @@ -99,7 +124,7 @@ class Projektbetreuer_model extends DB_Model * Generiert neuen Token für externen Zweitbetreuer. * @param int $zweitbegutachter_person_id * @param int $projektarbeit_id - * @return object | bool + * @return array */ public function generateZweitbegutachterToken($zweitbegutachter_person_id, $projektarbeit_id) { @@ -136,5 +161,7 @@ class Projektbetreuer_model extends DB_Model return $result; } + else + return success("Account vorhanden, kein Token benötigt"); } } diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index a5bceb40d..95919b833 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -9872,6 +9872,83 @@ Any unusual occurrences ) ) ), + array( + 'app' => 'projektarbeitsbeurteilung', + 'category' => 'projektarbeitsbeurteilung', + 'phrase' => 'kommissionellePruefungHinweis', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Dies ist eine zur kommissionellen Wiederholungsprüfung vorgelegte Bachelorarbeit. Die Note sollte daher erst nach Abstimmung mit allen Kommissionsmitgliedern abgesendet werden.', + 'description' => '', + ), + array( + 'sprache' => 'English', + 'text' => 'This bachelor thesis is submitted for the Bachelor Examination before a Committee. It should be graded after consultation with all committee members.', + 'description' => '', + ) + ) + ), + array( + 'app' => 'projektarbeitsbeurteilung', + 'category' => 'projektarbeitsbeurteilung', + 'phrase' => 'kommissionMailSenden', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Infomail an Kommissionsmitglieder senden', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Sent info mail to commission members', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'projektarbeitsbeurteilung', + 'category' => 'projektarbeitsbeurteilung', + 'phrase' => 'kommissionMailGesendet', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Mail an Kommissionsmitglieder gesendet', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Sent mail to commission members', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'projektarbeitsbeurteilung', + 'category' => 'projektarbeitsbeurteilung', + 'phrase' => 'kommissionMailFehler', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Fehler beim Senden der Mail an Kommission', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Error when sending mail to commission members', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'core', 'category' => 'anrechnung',