hides the profil updates list if no profil update is present

This commit is contained in:
SimonGschnell
2024-02-13 14:20:01 +01:00
parent 1be8c27cb5
commit 66b843be1b
5 changed files with 48 additions and 10 deletions
+22 -2
View File
@@ -20,9 +20,9 @@ class Profil extends Auth_Controller
'foto_sperre_function' => ['student/anrechnung_beantragen:r', 'user:r'],
'getView' => ['student/anrechnung_beantragen:r', 'user:r'],
'View' => ['student/anrechnung_beantragen:r', 'user:r'],
'isMitarbeiter' => ['student/anrechnung_beantragen:r', 'user:r'],
'isStudent' => ['student/anrechnung_beantragen:r', 'user:r'],
]);
@@ -613,4 +613,24 @@ class Profil extends Auth_Controller
return $zutrittskarte_ausgegebenam;
}
//? foreward declaration of the function isStudent in Student_model.php
public function isStudent($uid){
$result = $this->StudentModel->isStudent($uid);
if(!isSuccess($result)){
show_error("error when calling Student_model function isStudent with uid ".$uid);
}
$result = getData($result);
echo json_encode($result);
}
//? foreward declaration of the function isMitarbeiter in Mitarbeiter_model.php
public function isMitarbeiter($uid){
$result = $this->MitarbeiterModel->isMitarbeiter($uid);
if(!isSuccess($result)){
show_error("error when calling Mitarbeiter_model function isMitarbeiter with uid ".$uid);
}
$result = getData($result);
echo json_encode($result);
}
}