diff --git a/application/controllers/api/frontend/v1/LvPlan.php b/application/controllers/api/frontend/v1/LvPlan.php index 69cbeca54..2a900e92d 100644 --- a/application/controllers/api/frontend/v1/LvPlan.php +++ b/application/controllers/api/frontend/v1/LvPlan.php @@ -418,6 +418,10 @@ class LvPlan extends FHCAPI_Controller */ private function fetchMoodleEvents($start_date, $end_date, $uid = null) { + if ($uid && $uid !== getAuthUID()) { + return []; + } + $this->load->config('calendar'); $tz = new DateTimeZone($this->config->item('timezone')); diff --git a/application/libraries/ProfilLib.php b/application/libraries/ProfilLib.php index 97cb8ce5d..43a110b85 100644 --- a/application/libraries/ProfilLib.php +++ b/application/libraries/ProfilLib.php @@ -263,6 +263,59 @@ class ProfilLib{ $element->mailto = "mailto:" . $element->gruppe_kurzbz . "@" . DOMAIN; return $element; }, $mailverteiler_res); + + $this->ci->load->model("crm/Student_model", "StudentModel"); + $this->ci->StudentModel->addJoin("tbl_benutzer", "tbl_benutzer.uid = tbl_student.student_uid"); + $this->ci->StudentModel->addJoin("tbl_person", "tbl_benutzer.person_id = tbl_person.person_id"); + $this->ci->StudentModel->addJoin("tbl_studiengang", "tbl_student.studiengang_kz = tbl_studiengang.studiengang_kz"); + $this->ci->StudentModel->addSelect("matr_nr, semester, verband, gruppe, kurzbzlang"); + + $studentResult = $this->ci->StudentModel->loadWhere(["student_uid" => $uid]); + if (isError($studentResult)) { + return error(getData($studentResult)); + } + + $studentResultData = getData($studentResult); + $studentData = null; + if (is_array($studentResultData) && count($studentResultData)) { + $studentData = $studentResultData[0]; + } + + if ($studentData && $studentData->matr_nr) { + $this->ci->load->library("phrasesLib", ["profil"], "phrases"); + $standardCourseVerteiler = trim($studentData->kurzbzlang) . "_STD"; + $mailverteiler_res[] = [ + "beschreibung" => $this->ci->phrases->t('profil', 'alleStudentenVon') . " " . $standardCourseVerteiler, + "gruppe_kurzbz" => $standardCourseVerteiler, + "mailto" => "mailto:" . strtolower($standardCourseVerteiler) . "@" . DOMAIN, + ]; + + $semesterVerteiler = trim($studentData->kurzbzlang) . trim($studentData->semester); + $mailverteiler_res[] = [ + "beschreibung" => $this->ci->phrases->t('profil', 'alleStudentenVon') . " " . $semesterVerteiler, + "gruppe_kurzbz" => $semesterVerteiler, + "mailto" => "mailto:" . strtolower($semesterVerteiler) . "@" . DOMAIN, + ]; + + if ($studentData->verband && strlen(trim($studentData->verband))) { + $verbandVerteiler = $semesterVerteiler . trim($studentData->verband); + $mailverteiler_res[] = [ + "beschreibung" => $this->ci->phrases->t('profil', 'alleStudentenVon') . " " . $verbandVerteiler, + "gruppe_kurzbz" => $verbandVerteiler, + "mailto" => "mailto:" . strtolower($verbandVerteiler) . "@" . DOMAIN, + ]; + + if ($studentData->gruppe && strlen(trim($studentData->gruppe))) { + $gruppeVerteiler = $verbandVerteiler . trim($studentData->gruppe); + $mailverteiler_res[] = [ + "beschreibung" => $this->ci->phrases->t('profil', 'alleStudentenVon') . " " . $gruppeVerteiler, + "gruppe_kurzbz" => $gruppeVerteiler, + "mailto" => "mailto:" . strtolower($gruppeVerteiler) . "@" . DOMAIN, + ]; + } + } + } + return $mailverteiler_res; } diff --git a/application/models/organisation/Studiensemester_model.php b/application/models/organisation/Studiensemester_model.php index 5fa6ffb14..e6492b52e 100644 --- a/application/models/organisation/Studiensemester_model.php +++ b/application/models/organisation/Studiensemester_model.php @@ -122,6 +122,47 @@ class Studiensemester_model extends DB_Model return $this->execQuery($query, array($studiensemester_kurzbz, $limit)); } + + /** + * Returns the current study semester and the previous semesters of the same type (SS/WS). + * + * Example: + * - SS2026, limit 3: SS2026, SS2025, SS2024 + * - WS2025, limit 2: WS2025, WS2024 + * + * @param $studiensemester_kurzbz + * @param $limit + */ + public function getPreviousSameSemesterFrom($studiensemester_kurzbz, $limit = 1) + { + $qry = ' + SELECT + studiensemester_kurzbz, + start, + ende + FROM + public.tbl_studiensemester + WHERE + SUBSTRING(studiensemester_kurzbz FROM 1 FOR 2) = SUBSTRING(? FROM 1 FOR 2) + AND start <= ( + SELECT start + FROM public.tbl_studiensemester + WHERE studiensemester_kurzbz = ? + ) + ORDER BY + start DESC + LIMIT ? + '; + + return $this->execQuery($qry, + [ + $studiensemester_kurzbz, + $studiensemester_kurzbz, + $limit + ] + ); + } + /** * getNearest */ diff --git a/application/models/person/Benutzerfunktion_model.php b/application/models/person/Benutzerfunktion_model.php index dff422b7d..dfed7c332 100644 --- a/application/models/person/Benutzerfunktion_model.php +++ b/application/models/person/Benutzerfunktion_model.php @@ -260,7 +260,6 @@ class Benutzerfunktion_model extends DB_Model return $this->execQuery($query, $parameters_array); } - /** * Get active Kompetenzfeldleitung bei UID. * @@ -296,7 +295,6 @@ class Benutzerfunktion_model extends DB_Model return $this->execQuery($query, $parameters_array); } - public function insertBenutzerfunktion($Json) { unset($Json['benutzerfunktion_id']); diff --git a/include/benutzerberechtigung.class.php b/include/benutzerberechtigung.class.php index 4685f4bbb..e015ce210 100644 --- a/include/benutzerberechtigung.class.php +++ b/include/benutzerberechtigung.class.php @@ -350,7 +350,7 @@ class benutzerberechtigung extends basis_db }; $roles = defined('STUDENTS_KEEP_PERMISSIONS_AFTER_USER_INACTIVE_ROLES') ? implode(', ', array_map($mapfunc, unserialize(STUDENTS_KEEP_PERMISSIONS_AFTER_USER_INACTIVE_ROLES))) - : 'NO_DEFINED_ROLE'; + : "'NO_DEFINED_ROLE'"; $sql = << this.$p.user_language), - isMobile: Vue.computed(() => this.windowWidth < 767), + isMobile: Vue.computed(() => this.isMobile), } }, + computed: { + isMobile: function() { + return (this.windowWidth < 767); + } + }, methods: { isInternalRoute(href) { const internalBase = window.location.origin diff --git a/public/js/components/Stv/Studentenverwaltung/Details/Konto.js b/public/js/components/Stv/Studentenverwaltung/Details/Konto.js index 36e5bbbd3..5b6e1b6bb 100644 --- a/public/js/components/Stv/Studentenverwaltung/Details/Konto.js +++ b/public/js/components/Stv/Studentenverwaltung/Details/Konto.js @@ -27,7 +27,7 @@ export default { return { filter: false, studiengang_kz: false, - counterdate: new Date() + counterdate: luxon.DateTime.now().setZone(FHC_JS_DATA_STORAGE_OBJECT.timezone).toISODate() }; }, computed: { @@ -259,6 +259,7 @@ export default { { - a[c.field] = - isTabulatorLocalized && localizedColumnTitles[c.field] - ? localizedColumnTitles[c.field] - : c.title; - return a; - }, {}); + + let filterTitles; + if (isTabulatorLocalized) { + const localizedColumnTitles = this.tabulator.getLang().columns; + filterTitles = this.filteredColumns.reduce((a, c) => { + a[c.field] = localizedColumnTitles[c.field]; + return a; + }, {}); + } else { + filterTitles = this.filteredColumns.reduce((a, c) => { + a[c.field] = c.title; + return a; + }, {}); + } + return this.datasetMetadata.map((el) => ({ ...el, ...{ title: filterTitles[el.name] }, diff --git a/skin/images/sancho/sancho_footer_lvevaluierung_rollout.jpg b/skin/images/sancho/sancho_footer_lvevaluierung_rollout.jpg new file mode 100644 index 000000000..15809d851 Binary files /dev/null and b/skin/images/sancho/sancho_footer_lvevaluierung_rollout.jpg differ diff --git a/skin/images/sancho/sancho_header_lvevaluierung_rollout.jpg b/skin/images/sancho/sancho_header_lvevaluierung_rollout.jpg new file mode 100644 index 000000000..47a3c08c2 Binary files /dev/null and b/skin/images/sancho/sancho_header_lvevaluierung_rollout.jpg differ diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 4b7140bd5..14be42163 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -29742,6 +29742,26 @@ array( ) ) ), + array( + 'app' => 'core', + 'category' => 'profil', + 'phrase' => 'alleStudentenVon', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Alle Student*innen aus', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'All students from', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), //Profil Phrasen ende // LvPlan Phrasen start array(