feature(News-StudiengangsInformationen): adds the Studiengangsinformationen next to the news view

This commit is contained in:
SimonGschnell
2024-12-04 15:04:05 +01:00
parent f7bc01e63f
commit ecbb65c2a4
6 changed files with 44 additions and 8 deletions
@@ -687,11 +687,15 @@ class Studiengang_model extends DB_Model
$this->load->model('crm/Student_model', 'StudentModel');
//TODO: this does not work for Mitarbeiter
$student = $this->StudentModel->loadWhere(['student_uid' => getAuthUID()]);
if (isError($student))
return error($student);
if (getData($student)) {
//TODO: if a mitarbeiter requests this site, empty data should be returned
if(count($student) == 0)
{
return new stdClass();
}
$student = current(getData($student));
$studiengang_kz = $student->studiengang_kz;
$semester = $student->semester;