Studierendenverwaltung Projektarbeit: added button for Projektarbeit download

This commit is contained in:
Alexei Karpenko
2025-06-03 21:18:03 +02:00
parent 750b956dd2
commit fe81e7fb7c
3 changed files with 171 additions and 126 deletions
@@ -3,6 +3,7 @@
if (! defined('BASEPATH')) exit('No direct script access allowed');
use \DateTime as DateTime;
use CI3_Events as Events;
class Projektbetreuer extends FHCAPI_Controller
{
@@ -85,6 +86,21 @@ class Projektbetreuer extends FHCAPI_Controller
//~ }
//~ }
foreach ($projektbetreuer as $pb)
{
$downloadLink = null;
Events::trigger(
'projektbeurteilung_download_link',
$pb->projektarbeit_id,
$pb->betreuerart_kurzbz,
$pb->person_id,
function ($value) use (&$downloadLink) {
$downloadLink = $value;
}
);
$pb->projektarbeitDownload = $downloadLink;
}
$this->terminateWithSuccess($this->_addFullNameToBetreuer($projektbetreuer));
}
@@ -105,11 +121,7 @@ class Projektbetreuer extends FHCAPI_Controller
foreach ($projektbetreuer as $pb)
{
if ($this->_validate($pb) == false)
{
$this->addMeta('test', 'foisch');
$this->terminateWithValidationErrors($this->form_validation->error_array());
}
if ($this->_validate($pb) == false) $this->terminateWithValidationErrors($this->form_validation->error_array());
}
$result = null;
@@ -210,10 +222,6 @@ class Projektbetreuer extends FHCAPI_Controller
$result = $this->StundensatzModel->getStundensatzForMitarbeiter($person_id, $studiensemester_kurzbz);
$this->addMeta('res', $result);
//if (isError($result)) return $this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
return $this->terminateWithSuccess($result);
}