From 9677a5a4fdb2d0720e9578f77c29d67e4ded2a8c Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Mon, 1 Mar 2021 09:33:14 +0100 Subject: [PATCH] - BenutzerModel: added comment for getFromPersonId method - UPDATE permission for web for tbl_projektbetreuer added - added phrase for Zweitbegutachter - link --- application/models/person/Benutzer_model.php | 5 +++++ system/dbupdate_3.3.php | 14 +++++++++++++ system/phrasesupdate.php | 21 +++++++++++++++++++- 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/application/models/person/Benutzer_model.php b/application/models/person/Benutzer_model.php index c1e76ce38..eff1329a6 100644 --- a/application/models/person/Benutzer_model.php +++ b/application/models/person/Benutzer_model.php @@ -13,6 +13,11 @@ class Benutzer_model extends DB_Model $this->hasSequence = false; } + /** + * Gets active Benutzer from person_id + * @param $person_id + * @return object + */ public function getFromPersonId($person_id) { return $this->loadWhere(array('person_id' => $person_id, 'aktiv' => true)); diff --git a/system/dbupdate_3.3.php b/system/dbupdate_3.3.php index 59dba9f9d..55a00500b 100644 --- a/system/dbupdate_3.3.php +++ b/system/dbupdate_3.3.php @@ -4503,6 +4503,20 @@ if($result = $db->db_query("SELECT 1 FROM system.tbl_app WHERE app='projektarbei } } +// UPDATE Berechtigung für lehre.tbl_projektbetreuer für web user hinzufügen +if($result = @$db->db_query("SELECT * FROM information_schema.role_table_grants WHERE table_name='tbl_projektbetreuer' AND table_schema='lehre' AND grantee='web' AND privilege_type='UPDATE'")) +{ + if($db->db_num_rows($result)==0) + { + $qry = "GRANT UPDATE ON lehre.tbl_projektbetreuer TO web;"; + + if(!$db->db_query($qry)) + echo 'Projektbetreuer Berechtigungen: '.$db->db_last_error().'
'; + else + echo '
Web User: update fuer lehre.tbl_projektbetreuer berechtigt'; + } +} + // *** Pruefung und hinzufuegen der neuen Attribute und Tabellen echo '

Pruefe Tabellen und Attribute!

'; diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 7dff6a675..6e4ed26a6 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -9292,7 +9292,26 @@ Any unusual occurrences ) ) ), - + array( + 'app' => 'projektarbeitsbeurteilung', + 'category' => 'projektarbeitsbeurteilung', + 'phrase' => 'zurZweitbegutachterBewertung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Zur Bewertung des Zweitbegutachters', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'To assessment of second assessor', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ) );