mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 08:22:17 +00:00
makes it possible to display documents when reviewing profil update requests
This commit is contained in:
@@ -15,6 +15,7 @@ class ProfilUpdate extends Auth_Controller
|
||||
'getAllRequests' => ['student/anrechnung_beantragen:r', 'user:r'],
|
||||
'acceptProfilRequest'=>['user:r'],
|
||||
'denyProfilRequest'=>['user:r'],
|
||||
'show'=>['user:r'],
|
||||
|
||||
]);
|
||||
|
||||
@@ -31,6 +32,17 @@ class ProfilUpdate extends Auth_Controller
|
||||
$this->load->view('Cis/ProfilUpdate');
|
||||
}
|
||||
|
||||
public function show($dms_id){
|
||||
$this->load->library('DmsLib');
|
||||
//? downloads the file using the dms_id
|
||||
$file = $this->dmslib->download($dms_id);
|
||||
$file = hasData($file) ? getData($file) : null;
|
||||
//? returns the downloaded file to the user
|
||||
$res = $this->outputFile($file);
|
||||
|
||||
echo json_encode($res);
|
||||
}
|
||||
|
||||
public function getAllRequests(){
|
||||
$res = $this->ProfilChangeModel->getProfilUpdate();
|
||||
$res = hasData($res)? getData($res) : null;
|
||||
@@ -87,7 +99,8 @@ class ProfilUpdate extends Auth_Controller
|
||||
case "titel": $topic ="titelpre"; break;
|
||||
case "postnomen": $topic = "titelpost"; break;
|
||||
}
|
||||
$result = $this->PersonModel->update($personID,[$topic=>$requested_change]);
|
||||
|
||||
$result = $this->PersonModel->update($personID,[$topic=>$requested_change["value"]]);
|
||||
if(isError($result)){
|
||||
echo json_encode(error("was not able to update Person Information: " . $topic . " with value : " . $requested_change));
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user