mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-23 18:02:18 +00:00
Cleaned up commit from 'feature-27351/Digitalisierung_Formulare_Abmeldung_Unterbrechung_Wiederholung'
This commit is contained in:
@@ -0,0 +1,152 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
// TODO(chris): review this!
|
||||
$config['frist_rueckzahlung_studiengebuer_WS'] = '15.10.';
|
||||
$config['frist_rueckzahlung_studiengebuer_SS'] = '15.03.';
|
||||
|
||||
// TODO(chris): review this!
|
||||
#$config['unterbrechung_dms'] = ['oe_kurzbz' => null, 'dokument_kurzbz' => null, 'kategorie_kurzbz' => null];
|
||||
$config['unterbrechung_dms'] = ['oe_kurzbz' => null, 'dokument_kurzbz' => null, 'kategorie_kurzbz' => 'Akte'];
|
||||
|
||||
/**
|
||||
* UPLOAD
|
||||
*/
|
||||
|
||||
/**
|
||||
* Allowed filetypes for attachment upload in unterbrechung antrag
|
||||
*
|
||||
* @var array An array of fileextensions
|
||||
*/
|
||||
$config['unterbrechung_dms_filetypes'] = ['jpg', 'pdf'];
|
||||
|
||||
|
||||
/**
|
||||
* GRADES
|
||||
*/
|
||||
|
||||
/**
|
||||
* On wiederholung the student must repeat certain lvs.
|
||||
* This lvs will be graded with this id
|
||||
*
|
||||
* @var integer tbl_note.note
|
||||
*/
|
||||
$config['wiederholung_note_angerechnet'] = 19;
|
||||
|
||||
/**
|
||||
* On wiederholung the student can not attend certain lvs.
|
||||
* Those lvs will be graded with this id
|
||||
*
|
||||
* @var integer tbl_note.note
|
||||
*/
|
||||
$config['wiederholung_note_nicht_zugelassen'] = 20;
|
||||
|
||||
|
||||
/**
|
||||
* JOBS
|
||||
*/
|
||||
|
||||
/**
|
||||
* The Job will remind for every Unterbrecher who has a
|
||||
* wiedereinstieg_datum between the date the Job is run
|
||||
* and the modified date
|
||||
* e.g.: If the Job is running on 2023-04-20 and the modifier
|
||||
* is '+3 days' it will remind of everyone that
|
||||
* has a wiedereinstiegs_datum between 2023-04-20 and 2023-04-23
|
||||
*
|
||||
* @var string A string formated as PHP DateTime modifier
|
||||
* @see https://www.php.net/manual/de/datetime.modify.php
|
||||
*/
|
||||
$config['unterbrechung_job_remind_wiedereinstieg_date_modifier'] = '+3 days';
|
||||
|
||||
/**
|
||||
* The Job will sent a request to everyone who faild the 3rd committee exam
|
||||
* and respecting the given conditions (not repeated yet, stg not in blacklist)
|
||||
* to decide if he/she will repeat or not
|
||||
*
|
||||
* First request
|
||||
*
|
||||
* @var string A string formated as PHP DateTime modifier
|
||||
* @see https://www.php.net/manual/de/datetime.modify.php
|
||||
*/
|
||||
$config['wiederholung_job_request_1_date_modifier'] = '+0 days';
|
||||
|
||||
/**
|
||||
* Second request
|
||||
*
|
||||
* @var string A string formated as PHP DateTime modifier
|
||||
* @see https://www.php.net/manual/de/datetime.modify.php
|
||||
*/
|
||||
$config['wiederholung_job_request_2_date_modifier'] = '+3 weeks';
|
||||
|
||||
/**
|
||||
* Final deadline - after this the student will be abgemeldet if he hasn't chosen yet
|
||||
*
|
||||
* @var string A string formated as PHP DateTime modifier
|
||||
* @see https://www.php.net/manual/de/datetime.modify.php
|
||||
*/
|
||||
$config['wiederholung_job_deadline_date_modifier'] = '+1 month';
|
||||
|
||||
/**
|
||||
* Objection period - the student will be abgemeldet if he hasn't objected in this period
|
||||
*
|
||||
* @var string A string formated as PHP DateTime modifier
|
||||
* @see https://www.php.net/manual/de/datetime.modify.php
|
||||
*/
|
||||
$config['abmeldung_job_deadline_date_modifier'] = '+3 weeks';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* System User - uid of a user that is allowed to set prestudentstatus
|
||||
* TODO(chris): DEBUG! CHANGE THIS!
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
$config['antrag_job_systemuser'] = 'ma0168';
|
||||
|
||||
|
||||
/**
|
||||
* WHITELISTS
|
||||
*/
|
||||
|
||||
/**
|
||||
* List of stati who entitle a prestudent to create an Antrag
|
||||
*
|
||||
* @var array Array of tbl_status.status_kurzbz's
|
||||
*/
|
||||
$config['antrag_prestudentstatus_whitelist'] = ['Student', 'Diplomand'];
|
||||
|
||||
|
||||
/**
|
||||
* BLACKLISTS
|
||||
*/
|
||||
|
||||
/**
|
||||
* List of Statusgründe that prevent a prestudent from create an Wiederholungsantrag
|
||||
*
|
||||
* @var array An array of tbl_status_grund.statusgrund_id's
|
||||
*/
|
||||
$config['status_gruende_wiederholer'] = [16, 15];
|
||||
|
||||
/**
|
||||
* Blacklisted for abmeldung anträge
|
||||
*
|
||||
* @var array An array of tbl_studiengang.studiengang_kz's
|
||||
*/
|
||||
$config['stgkz_blacklist_abmeldung'] = [];
|
||||
|
||||
/**
|
||||
* Blacklisted for unterbrechung anträge
|
||||
*
|
||||
* @var array An array of tbl_studiengang.studiengang_kz's
|
||||
*/
|
||||
$config['stgkz_blacklist_unterbrechung'] = [];
|
||||
|
||||
/**
|
||||
* Blacklisted for wiederholung anträge
|
||||
*
|
||||
* @var array An array of tbl_studiengang.studiengang_kz's
|
||||
*/
|
||||
$config['stgkz_blacklist_wiederholung'] = [];
|
||||
@@ -0,0 +1,201 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
use \Studierendenantrag_model as Studierendenantrag_model;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class Abmeldung extends FHC_Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* Calls the parent's constructor and loads the FilterCmptLib
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
// Libraries
|
||||
$this->load->library('AuthLib');
|
||||
$this->load->library('AntragLib');
|
||||
|
||||
// Load language phrases
|
||||
$this->loadPhrases([
|
||||
'studierendenantrag'
|
||||
]);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* Retrieves data of the current studiengang for the current user
|
||||
*/
|
||||
|
||||
public function getDetailsForNewAntrag($prestudent_id)
|
||||
{
|
||||
if (!$this->antraglib->isEntitledToCreateAntragFor($prestudent_id, true)) {
|
||||
$this->output->set_status_header(403);
|
||||
return $this->outputJsonError('Forbidden');
|
||||
}
|
||||
$result = $this->antraglib->getPrestudentAbmeldeBerechtigt($prestudent_id);
|
||||
if (isError($result)) {
|
||||
$this->output->set_status_header(500);
|
||||
return $this->outputJsonError(getError($result));
|
||||
}
|
||||
$result = $result->retval;
|
||||
if (!$result) {
|
||||
$this->output->set_status_header(403);
|
||||
return $this->outputJsonError($this->p->t('studierendenantrag', 'error_no_student'));
|
||||
}
|
||||
elseif ($result == -3)
|
||||
{
|
||||
$this->output->set_status_header(403);
|
||||
return $this->outputJsonError($this->p->t('studierendenantrag', 'error_stg_blacklist'));
|
||||
}
|
||||
elseif ($result == -1)
|
||||
{
|
||||
$result = $this->antraglib->getDetailsForLastAntrag($prestudent_id, Studierendenantrag_model::TYP_ABMELDUNG);
|
||||
if (isError($result)) {
|
||||
return $this->outputJsonError(getError($result));
|
||||
}
|
||||
|
||||
$data = getData($result);
|
||||
$data->canCancel = (boolean)$this->antraglib->isEntitledToCancelAntrag($data->studierendenantrag_id);
|
||||
|
||||
return $this->outputJsonSuccess($data);
|
||||
}
|
||||
|
||||
$result = $this->antraglib->getDetailsForNewAntrag($prestudent_id);
|
||||
if (isError($result)) {
|
||||
return $this->outputJsonError(getError($result));
|
||||
}
|
||||
|
||||
$this->outputJsonSuccess(getData($result));
|
||||
}
|
||||
|
||||
public function createAntrag()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$_POST = json_decode($this->input->raw_input_stream, true);
|
||||
|
||||
$this->form_validation->set_rules('studiensemester', 'Studiensemester', 'required');
|
||||
$this->form_validation->set_rules('prestudent_id', 'Prestudent ID', 'required');
|
||||
$this->form_validation->set_rules('grund', 'Grund', 'required');
|
||||
|
||||
if ($this->form_validation->run() == false)
|
||||
{
|
||||
return $this->outputJsonError($this->form_validation->error_array());
|
||||
}
|
||||
|
||||
$grund = $this->input->post('grund');
|
||||
$studiensemester = $this->input->post('studiensemester');
|
||||
$prestudent_id = $this->input->post('prestudent_id');
|
||||
|
||||
$result = $this->antraglib->getPrestudentAbmeldeBerechtigt($prestudent_id);
|
||||
if (isError($result)) {
|
||||
return $this->outputJsonError(['db' => getError($result)]);
|
||||
}
|
||||
$result = $result->retval;
|
||||
if (!$result)
|
||||
{
|
||||
return $this->outputJsonError(['db' => $this->p->t('studierendenantrag', 'error_no_student')]);
|
||||
}
|
||||
elseif ($result == -3)
|
||||
{
|
||||
return $this->outputJsonError(['db' => $this->p->t('studierendenantrag', 'error_stg_blacklist')]);
|
||||
}
|
||||
elseif ($result < 0)
|
||||
{
|
||||
return $this->outputJsonError(['db' => $this->p->t('studierendenantrag', 'error_antrag_exists')]);
|
||||
}
|
||||
|
||||
$result = $this->antraglib->createAbmeldung($prestudent_id, $studiensemester, getAuthUID(), $grund);
|
||||
if (isError($result))
|
||||
{
|
||||
return $this->outputJsonError(['db' => getError($result)]);
|
||||
}
|
||||
|
||||
$result = $this->antraglib->getDetailsForAntrag(getData($result));
|
||||
if (!hasData($result))
|
||||
return $this->outputJsonSuccess(true);
|
||||
|
||||
$data = getData($result);
|
||||
$data->canCancel = (boolean)$this->antraglib->isEntitledToCancelAntrag($data->studierendenantrag_id);
|
||||
|
||||
$this->outputJsonSuccess($data);
|
||||
}
|
||||
|
||||
public function cancelAntrag()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$_POST = json_decode($this->input->raw_input_stream, true);
|
||||
|
||||
$this->form_validation->set_rules('antrag_id', 'Antrag ID', 'required');
|
||||
|
||||
if ($this->form_validation->run() == false)
|
||||
{
|
||||
return $this->outputJsonError($this->form_validation->error_array());
|
||||
}
|
||||
|
||||
$antrag_id = $this->input->post('antrag_id');
|
||||
if(!$this->antraglib->isEntitledToCancelAntrag($antrag_id))
|
||||
{
|
||||
$this->output->set_status_header(403);
|
||||
|
||||
return $this->outputJsonError('Forbidden');
|
||||
}
|
||||
|
||||
$result = $this->antraglib->cancelAntrag($antrag_id, getAuthUID());
|
||||
if(isError($result))
|
||||
{
|
||||
return $this->outputJsonError(['db' => getError($result)]);
|
||||
}
|
||||
|
||||
$result = $this->antraglib->getDetailsForAntrag($antrag_id);
|
||||
|
||||
if (!hasData($result))
|
||||
return $this->outputJsonSuccess($antrag_id);
|
||||
$this->outputJsonSuccess(getData($result));
|
||||
}
|
||||
|
||||
public function getStudiengaengeAssistenz()
|
||||
{
|
||||
$this->load->library('PermissionLib');
|
||||
|
||||
$studiengaenge = $this->permissionlib->getSTG_isEntitledFor('student/studierendenantrag');
|
||||
|
||||
$result = $this->antraglib->getAbmeldeBerechtigtForStg($studiengaenge);
|
||||
if (isError($result)) {
|
||||
return $this->outputJsonError(getError($result));
|
||||
}
|
||||
$result = getData($result);
|
||||
if (!$result) {
|
||||
return $this->outputJsonSuccess([]);
|
||||
}
|
||||
|
||||
$sortedStudents = [];
|
||||
foreach ($result as $item) {
|
||||
if (!isset($sortedStudents[$item->studiengang_kz]))
|
||||
$sortedStudents[$item->studiengang_kz] = [
|
||||
'bezeichnung' => $item->bezeichnung,
|
||||
'orgform' => $item->orgform,
|
||||
'studenten' => []
|
||||
];
|
||||
$sortedStudents[$item->studiengang_kz]['studenten'][] = [
|
||||
'semester' => $item->semester,
|
||||
'prestudent_id' => $item->prestudent_id,
|
||||
'name' => trim($item->vorname . ' ' . $item->nachname),
|
||||
'vorname' => $item->vorname,
|
||||
'nachname' => $item->nachname,
|
||||
'studiensemester_kurzbz' => $item->studiensemester_kurzbz
|
||||
];
|
||||
}
|
||||
|
||||
$this->outputJsonSuccess($sortedStudents);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,358 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class Leitung extends FHC_Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* Calls the parent's constructor and loads the FilterCmptLib
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
// Libraries
|
||||
$this->load->library('AuthLib');
|
||||
$this->load->library('AntragLib');
|
||||
|
||||
// Load language phrases
|
||||
$this->loadPhrases([
|
||||
'studierendenantrag'
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
public function getAntraege($studiengang = null)
|
||||
{
|
||||
|
||||
if($studiengang)
|
||||
$studiengaenge = [$studiengang];
|
||||
else {
|
||||
$studiengaenge =$this->permissionlib->getSTG_isEntitledFor('student/antragfreigabe');
|
||||
if(!is_array($studiengaenge))
|
||||
$studiengaenge = [];
|
||||
|
||||
|
||||
$stgsNeuanlage = $this->permissionlib->getSTG_isEntitledFor('student/studierendenantrag');
|
||||
if(!is_array($stgsNeuanlage))
|
||||
$stgsNeuanlage = [];
|
||||
|
||||
$studiengaenge = array_unique(array_merge($studiengaenge, $stgsNeuanlage));
|
||||
}
|
||||
|
||||
|
||||
$antraege = [];
|
||||
if ($studiengaenge) {
|
||||
$result = $this->StudierendenantragModel->loadForStudiengaenge($studiengaenge);
|
||||
if (isError($result)) {
|
||||
$this->output->set_status_header(500);
|
||||
return $this->outputJson('Internal Server Error');
|
||||
}
|
||||
$antraege = getData($result);
|
||||
}
|
||||
|
||||
$this->outputJson($antraege);
|
||||
}
|
||||
|
||||
public function reopenAntrag()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$_POST = json_decode($this->input->raw_input_stream, true);
|
||||
|
||||
$this->form_validation->set_rules(
|
||||
'studierendenantrag_id',
|
||||
'Studierenden Antrag',
|
||||
'required|callback_isEntitledToReopenAntrag',
|
||||
[
|
||||
'isEntitledToReopenAntrag' => $this->p->t('studierendenantrag','error_no_right')
|
||||
]
|
||||
);
|
||||
|
||||
if ($this->form_validation->run() == false)
|
||||
{
|
||||
return $this->outputJsonError($this->form_validation->error_array());
|
||||
}
|
||||
|
||||
$studierendenantrag_id = $this->input->post('studierendenantrag_id');
|
||||
|
||||
$result = $this->antraglib->reopenWiederholung($studierendenantrag_id, getAuthUID());
|
||||
|
||||
if (isError($result))
|
||||
return $this->outputJsonError(['studierendenantrag_id' => getError($result)]);
|
||||
|
||||
$this->outputJsonSuccess($studierendenantrag_id);
|
||||
}
|
||||
|
||||
public function objectAntrag()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$_POST = json_decode($this->input->raw_input_stream, true);
|
||||
|
||||
$this->form_validation->set_rules(
|
||||
'studierendenantrag_id',
|
||||
'Studierenden Antrag',
|
||||
'required|callback_isEntitledToObjectAntrag|callback_canBeObjected',
|
||||
[
|
||||
'isEntitledToObjectAntrag' => $this->p->t('studierendenantrag','error_no_right'),
|
||||
'canBeObjected' => $this->p->t('studierendenantrag','error_no_objection')
|
||||
]
|
||||
);
|
||||
|
||||
if ($this->form_validation->run() == false)
|
||||
{
|
||||
return $this->outputJsonError($this->form_validation->error_array());
|
||||
}
|
||||
|
||||
$studierendenantrag_id = $this->input->post('studierendenantrag_id');
|
||||
|
||||
$result = $this->antraglib->objectAbmeldung($studierendenantrag_id, getAuthUID());
|
||||
|
||||
if (isError($result))
|
||||
return $this->outputJsonError(['studierendenantrag_id' => getError($result)]);
|
||||
|
||||
$this->outputJsonSuccess($studierendenantrag_id);
|
||||
}
|
||||
|
||||
public function objectionDeny()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$_POST = json_decode($this->input->raw_input_stream, true);
|
||||
|
||||
$this->form_validation->set_rules(
|
||||
'studierendenantrag_id',
|
||||
'Studierenden Antrag',
|
||||
'required|callback_isEntitledToObjectAntrag|callback_isObjected',
|
||||
[
|
||||
'isEntitledToObjectAntrag' => $this->p->t('studierendenantrag','error_no_right'),
|
||||
'isObjected' => $this->p->t('studierendenantrag','error_not_objected')
|
||||
]
|
||||
);
|
||||
|
||||
if ($this->form_validation->run() == false)
|
||||
{
|
||||
return $this->outputJsonError($this->form_validation->error_array());
|
||||
}
|
||||
|
||||
$studierendenantrag_id = $this->input->post('studierendenantrag_id');
|
||||
|
||||
$result = $this->antraglib->approveAbmeldung([$studierendenantrag_id], getAuthUID());
|
||||
|
||||
if (isError($result))
|
||||
return $this->outputJsonError(['studierendenantrag_id' => getError($result)]);
|
||||
|
||||
$this->outputJsonSuccess($studierendenantrag_id);
|
||||
}
|
||||
|
||||
public function objectionApprove()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$_POST = json_decode($this->input->raw_input_stream, true);
|
||||
|
||||
$this->form_validation->set_rules(
|
||||
'studierendenantrag_id',
|
||||
'Studierenden Antrag',
|
||||
'required|callback_isEntitledToObjectAntrag|callback_isObjected',
|
||||
[
|
||||
'isEntitledToObjectAntrag' => $this->p->t('studierendenantrag','error_no_right'),
|
||||
'isObjected' => $this->p->t('studierendenantrag','error_not_objected')
|
||||
]
|
||||
);
|
||||
|
||||
if ($this->form_validation->run() == false)
|
||||
{
|
||||
return $this->outputJsonError($this->form_validation->error_array());
|
||||
}
|
||||
|
||||
$studierendenantrag_id = $this->input->post('studierendenantrag_id');
|
||||
|
||||
$result = $this->antraglib->cancelAntrag($studierendenantrag_id, getAuthUID());
|
||||
|
||||
if (isError($result))
|
||||
return $this->outputJsonError(['studierendenantrag_id' => getError($result)]);
|
||||
|
||||
$this->outputJsonSuccess($studierendenantrag_id);
|
||||
}
|
||||
|
||||
public function isEntitledToReopenAntrag($studierendenantrag_id)
|
||||
{
|
||||
return $this->antraglib->isEntitledToReopenAntrag($studierendenantrag_id);
|
||||
}
|
||||
|
||||
public function isEntitledToObjectAntrag($studierendenantrag_id)
|
||||
{
|
||||
return $this->antraglib->isEntitledToObjectAntrag($studierendenantrag_id);
|
||||
}
|
||||
|
||||
public function isEntitledToRejectAntrag($studierendenantrag_id)
|
||||
{
|
||||
return $this->antraglib->isEntitledToRejectAntrag($studierendenantrag_id);
|
||||
}
|
||||
|
||||
public function canBeObjected($studierendenantrag_id)
|
||||
{
|
||||
return $this->antraglib->hasStatus($studierendenantrag_id, Studierendenantragstatus_model::STATUS_APPROVED_STGL);
|
||||
}
|
||||
|
||||
public function isObjected($studierendenantrag_id)
|
||||
{
|
||||
return $this->antraglib->hasStatus($studierendenantrag_id, Studierendenantragstatus_model::STATUS_OBJECTED);
|
||||
}
|
||||
|
||||
|
||||
public function approveAbmeldung()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$_POST = json_decode($this->input->raw_input_stream, true);
|
||||
|
||||
$this->form_validation->set_rules(
|
||||
'studierendenantrag_id',
|
||||
'Studierenden Antrag',
|
||||
'required|callback_isEntitledToApproveAntrag',
|
||||
[
|
||||
'isEntitledToApproveAntrag' => $this->p->t('studierendenantrag','error_no_right')
|
||||
]
|
||||
);
|
||||
|
||||
if ($this->form_validation->run() == false)
|
||||
{
|
||||
return $this->outputJsonError($this->form_validation->error_array());
|
||||
}
|
||||
|
||||
$studierendenantrag_id = $this->input->post('studierendenantrag_id');
|
||||
|
||||
$result = $this->antraglib->approveAbmeldung([$studierendenantrag_id], getAuthUID());
|
||||
if (isError($result))
|
||||
{
|
||||
return $this->outputJsonError(['db' => getError($result)]);
|
||||
}
|
||||
|
||||
return $this->outputJsonSuccess($studierendenantrag_id);
|
||||
}
|
||||
|
||||
public function approveUnterbrechung()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$_POST = json_decode($this->input->raw_input_stream, true);
|
||||
|
||||
$this->form_validation->set_rules(
|
||||
'studierendenantrag_id',
|
||||
'Studierenden Antrag',
|
||||
'required|callback_isEntitledToApproveAntrag',
|
||||
[
|
||||
'isEntitledToApproveAntrag' => $this->p->t('studierendenantrag','error_no_right')
|
||||
]
|
||||
);
|
||||
|
||||
if ($this->form_validation->run() == false)
|
||||
{
|
||||
return $this->outputJsonError($this->form_validation->error_array());
|
||||
}
|
||||
|
||||
$studierendenantrag_id = $this->input->post('studierendenantrag_id');
|
||||
|
||||
$result = $this->antraglib->approveUnterbrechung([$studierendenantrag_id], getAuthUID());
|
||||
if (isError($result))
|
||||
{
|
||||
return $this->outputJsonError(['db' => getError($result)]);
|
||||
}
|
||||
|
||||
return $this->outputJsonSuccess($studierendenantrag_id);
|
||||
}
|
||||
|
||||
public function rejectUnterbrechung()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$_POST = json_decode($this->input->raw_input_stream, true);
|
||||
|
||||
$this->form_validation->set_rules(
|
||||
'studierendenantrag_id',
|
||||
'Studierenden Antrag',
|
||||
'required|callback_isEntitledToRejectAntrag',
|
||||
[
|
||||
'isEntitledToRejectAntrag' => $this->p->t('studierendenantrag','error_no_right')
|
||||
]
|
||||
);
|
||||
$this->form_validation->set_rules('grund', 'Grund', 'required');
|
||||
|
||||
if ($this->form_validation->run() == false)
|
||||
{
|
||||
return $this->outputJsonError($this->form_validation->error_array());
|
||||
}
|
||||
|
||||
$studierendenantrag_id = $this->input->post('studierendenantrag_id');
|
||||
$grund = $this->input->post('grund');
|
||||
|
||||
$result = $this->antraglib->rejectUnterbrechung([$studierendenantrag_id], getAuthUID(), $grund);
|
||||
if (isError($result))
|
||||
{
|
||||
return $this->outputJsonError(['db' => getError($result)]);
|
||||
}
|
||||
|
||||
return $this->outputJsonSuccess($studierendenantrag_id);
|
||||
}
|
||||
|
||||
public function approveWiederholung()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$_POST = json_decode($this->input->raw_input_stream, true);
|
||||
|
||||
$this->form_validation->set_rules(
|
||||
'studierendenantrag_id',
|
||||
'Studierenden Antrag',
|
||||
'required|callback_isEntitledToApproveAntrag',
|
||||
[
|
||||
'isEntitledToApproveAntrag' => $this->p->t('studierendenantrag','error_no_right')
|
||||
]
|
||||
);
|
||||
|
||||
if ($this->form_validation->run() == false)
|
||||
{
|
||||
return $this->outputJsonError($this->form_validation->error_array());
|
||||
}
|
||||
|
||||
$studierendenantrag_id = $this->input->post('studierendenantrag_id');
|
||||
|
||||
$result = $this->antraglib->approveWiederholung($studierendenantrag_id, getAuthUID());
|
||||
if (isError($result))
|
||||
{
|
||||
return $this->outputJsonError(['db' => getError($result)]);
|
||||
}
|
||||
|
||||
return $this->outputJsonSuccess($studierendenantrag_id);
|
||||
}
|
||||
|
||||
public function isEntitledToApproveAntrag($studierendenantrag_id)
|
||||
{
|
||||
return $this->antraglib->isEntitledToApproveAntrag($studierendenantrag_id);
|
||||
}
|
||||
|
||||
public function getHistory($studierendenantrag_id)
|
||||
{
|
||||
if (!$this->antraglib->isEntitledToSeeHistoryForAntrag($studierendenantrag_id)) {
|
||||
$this->output->set_status_header(403);
|
||||
return $this->outputJson('Forbidden');
|
||||
}
|
||||
|
||||
$result = $this->antraglib->getAntragHistory($studierendenantrag_id);
|
||||
if (isError($result)) {
|
||||
return $this->outputJsonError(getError($result));
|
||||
}
|
||||
|
||||
$this->outputJsonSuccess(getData($result) ?: []);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,230 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
use \Studierendenantrag_model as Studierendenantrag_model;
|
||||
use \DateTime as DateTime;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class Unterbrechung extends FHC_Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* Calls the parent's constructor and loads the FilterCmptLib
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
// Configs
|
||||
$this->load->config('studierendenantrag');
|
||||
|
||||
// Libraries
|
||||
$this->load->library('AuthLib');
|
||||
$this->load->library('AntragLib');
|
||||
|
||||
// Load language phrases
|
||||
$this->loadPhrases([
|
||||
'studierendenantrag'
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
public function getDetailsForNewAntrag($prestudent_id)
|
||||
{
|
||||
if (!$this->antraglib->isEntitledToCreateAntragFor($prestudent_id, false)) {
|
||||
$this->output->set_status_header(403);
|
||||
return $this->outputJsonError('Forbidden');
|
||||
}
|
||||
$result = $this->antraglib->getPrestudentUnterbrechungsBerechtigt($prestudent_id);
|
||||
if (isError($result)) {
|
||||
$this->output->set_status_header(500);
|
||||
return $this->outputJsonError(getError($result));
|
||||
}
|
||||
$result = $result->retval;
|
||||
if (!$result) {
|
||||
$this->output->set_status_header(403);
|
||||
return $this->outputJsonError($this->p->t('studierendenantrag', 'error_no_student'));
|
||||
}
|
||||
elseif ($result == -1)
|
||||
{
|
||||
$result = $this->antraglib->getDetailsForLastAntrag($prestudent_id, Studierendenantrag_model::TYP_UNTERBRECHUNG);
|
||||
if (isError($result)) {
|
||||
return $this->outputJsonError(getError($result));
|
||||
}
|
||||
|
||||
return $this->outputJsonSuccess(getData($result));
|
||||
}
|
||||
elseif ($result == -2)
|
||||
{
|
||||
$result = $this->antraglib->getDetailsForLastAntrag($prestudent_id);
|
||||
if (isError($result)) {
|
||||
return $this->outputJsonError(getError($result));
|
||||
}
|
||||
|
||||
$result = getData($result);
|
||||
$this->output->set_status_header(400);
|
||||
return $this->outputJsonError($this->p->t('studierendenantrag', 'error_antrag_pending', ['typ' => $this->p->t('studierendenantrag','antrag_typ_' . $result->typ)]));
|
||||
}
|
||||
elseif ($result == -3)
|
||||
{
|
||||
$this->output->set_status_header(403);
|
||||
return $this->outputJsonError($this->p->t('studierendenantrag', 'error_stg_blacklist'));
|
||||
}
|
||||
$result = $this->antraglib->getDetailsForNewAntrag($prestudent_id);
|
||||
if (isError($result)) {
|
||||
return $this->outputJsonError(getError($result));
|
||||
}
|
||||
|
||||
$data = getData($result);
|
||||
|
||||
$data->studiensemester = $this->antraglib->getSemesterForUnterbrechung($data->studiengang_kz, $data->studiensemester_kurzbz, $data->semester);
|
||||
|
||||
$this->outputJsonSuccess($data);
|
||||
}
|
||||
|
||||
public function getDetailsForAntrag($studierendenantrag_id)
|
||||
{
|
||||
if (!$this->antraglib->isEntitledToShowAntrag($studierendenantrag_id)) return show_404();
|
||||
|
||||
$result = $this->antraglib->getDetailsForAntrag($studierendenantrag_id);
|
||||
if (isError($result)) {
|
||||
return $this->outputJsonError(getError($result));
|
||||
}
|
||||
|
||||
$data = getData($result);
|
||||
|
||||
if ($data->typ !== Studierendenantrag_model::TYP_UNTERBRECHUNG)
|
||||
return show_404();
|
||||
|
||||
$this->outputJsonSuccess($data);
|
||||
}
|
||||
|
||||
public function createAntrag()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$this->form_validation->set_rules('studiensemester', 'Studiensemester', 'required');
|
||||
$this->form_validation->set_rules('prestudent_id', 'Prestudent ID', 'required');
|
||||
$this->form_validation->set_rules('grund', 'Grund', 'required');
|
||||
$this->form_validation->set_rules(
|
||||
'datum_wiedereinstieg',
|
||||
'Datum Wiedereinstieg',
|
||||
'required|callback_isValidDate|callback_isDateInFuture',
|
||||
[
|
||||
'isValidDate' => $this->p->t('ui', 'error_invalid_date'),
|
||||
'isDateInFuture' => $this->p->t('ui', 'error_invalid_date')
|
||||
]
|
||||
);
|
||||
|
||||
if ($this->form_validation->run() == false)
|
||||
{
|
||||
return $this->outputJsonError($this->form_validation->error_array());
|
||||
}
|
||||
|
||||
$grund = $this->input->post('grund');
|
||||
$studiensemester = $this->input->post('studiensemester');
|
||||
$prestudent_id = $this->input->post('prestudent_id');
|
||||
$datum_wiedereinstieg = $this->input->post('datum_wiedereinstieg');
|
||||
$dms_id = null;
|
||||
|
||||
$result = $this->antraglib->getPrestudentUnterbrechungsBerechtigt($prestudent_id);
|
||||
if (isError($result)) {
|
||||
return $this->outputJsonError(['db' => getError($result)]);
|
||||
}
|
||||
$result = $result->retval;
|
||||
if (!$result)
|
||||
{
|
||||
return $this->outputJsonError(['db' => $this->p->t('studierendenantrag', 'error_no_student')]);
|
||||
}
|
||||
elseif ($result == -3)
|
||||
{
|
||||
return $this->outputJsonError(['db' => $this->p->t('studierendenantrag', 'error_stg_blacklist')]);
|
||||
}
|
||||
elseif ($result < 0)
|
||||
{
|
||||
return $this->outputJsonError(['db' => $this->p->t('studierendenantrag', 'error_antrag_exists')]);
|
||||
}
|
||||
|
||||
if(isset($_FILES['attachment']) && (!isset($_FILES['attachment']['error']) || $_FILES['attachment']['error'] != UPLOAD_ERR_NO_FILE))
|
||||
{
|
||||
$this->load->library('DmsLib');
|
||||
|
||||
$dms = $this->config->item('unterbrechung_dms');
|
||||
if (!count(array_filter($dms, function ($v) {
|
||||
return $v !== null;
|
||||
})))
|
||||
$dms = ['kategorie_kurzbz' => 'Akte'];
|
||||
$dms['version'] = 0;
|
||||
|
||||
$allowed_filetypes = $this->config->item('unterbrechung_dms_filetypes') ?: ['*'];
|
||||
$result = $this->dmslib->upload($dms, 'attachment', $allowed_filetypes);
|
||||
if(isError($result))
|
||||
{
|
||||
return $this->outputJsonError(['db' => getError($result)]);
|
||||
}
|
||||
$dms_id = getData($result)['dms_id'];
|
||||
}
|
||||
|
||||
$result = $this->antraglib->createUnterbrechung($prestudent_id, $studiensemester, getAuthUID(), $grund, $datum_wiedereinstieg, $dms_id);
|
||||
if(isError($result))
|
||||
{
|
||||
return $this->outputJsonError(['db' => getError($result)]);
|
||||
}
|
||||
|
||||
$antragId = getData($result);
|
||||
$result = $this->antraglib->getDetailsForAntrag($antragId);
|
||||
|
||||
if(!hasData($result))
|
||||
return $this->outputJsonSuccess($antragId);
|
||||
$this->outputJsonSuccess(getData($result));
|
||||
}
|
||||
|
||||
public function cancelAntrag()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$_POST = json_decode($this->input->raw_input_stream, true);
|
||||
|
||||
$this->form_validation->set_rules('antrag_id', 'Antrag ID', 'required');
|
||||
|
||||
if ($this->form_validation->run() == false)
|
||||
{
|
||||
return $this->outputJsonError($this->form_validation->error_array());
|
||||
}
|
||||
|
||||
$antrag_id = $this->input->post('antrag_id');
|
||||
|
||||
$result = $this->antraglib->cancelAntrag($antrag_id, getAuthUID());
|
||||
if (isError($result))
|
||||
{
|
||||
return $this->outputJsonError(['db' => getError($result)]);
|
||||
}
|
||||
|
||||
$result = $this->antraglib->getDetailsForAntrag($antrag_id);
|
||||
|
||||
if (!hasData($result))
|
||||
return $this->outputJsonSuccess($antrag_id);
|
||||
$this->outputJsonSuccess(getData($result));
|
||||
}
|
||||
|
||||
public function isValidDate($date)
|
||||
{
|
||||
try {
|
||||
new DateTime($date);
|
||||
} catch (Exception $e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isDateInFuture($date)
|
||||
{
|
||||
return new DateTime() < new DateTime($date);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,369 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
use \REST_Controller as REST_Controller;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class Wiederholung extends FHC_Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* Calls the parent's constructor and loads the FilterCmptLib
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
// Configs
|
||||
$this->load->config('studierendenantrag');
|
||||
|
||||
// Libraries
|
||||
$this->load->library('AuthLib');
|
||||
$this->load->library('PermissionLib');
|
||||
$this->load->library('AntragLib');
|
||||
|
||||
$requiredPermissions = [
|
||||
'saveLvs' => ['student/studierendenantrag:w'],
|
||||
'getLvsAsRdf' => ['student/studierendenantrag:r', 'student/noten:r'],
|
||||
'moveLvsToZeugnis' => ['student/studierendenantrag:w', 'student/noten:w']
|
||||
];
|
||||
|
||||
if (isset($requiredPermissions[$this->router->method])) {
|
||||
if (!$this->permissionlib->isEntitled($requiredPermissions, $this->router->method)) {
|
||||
$this->output->set_status_header(REST_Controller::HTTP_FORBIDDEN);
|
||||
$this->outputJson('Forbidden');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
// Load language phrases
|
||||
$this->loadPhrases([
|
||||
'studierendenantrag'
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* Retrieves data of the current studiengang for the current user
|
||||
*/
|
||||
|
||||
public function getDetailsForNewAntrag($prestudent_id)
|
||||
{
|
||||
if (!$this->antraglib->isEntitledToCreateAntragFor($prestudent_id, false)) {
|
||||
$this->output->set_status_header(REST_Controller::HTTP_FORBIDDEN);
|
||||
return $this->outputJsonError('Forbidden');
|
||||
}
|
||||
$result = $this->antraglib->getPrestudentWiederholungsBerechtigt($prestudent_id);
|
||||
if (isError($result)) {
|
||||
$this->output->set_status_header(REST_Controller::HTTP_INTERNAL_SERVER_ERROR);
|
||||
return $this->outputJsonError(getError($result));
|
||||
}
|
||||
$result = $result->retval;
|
||||
if (!$result) {
|
||||
// TODO(chris): ERROR Message
|
||||
$this->output->set_status_header(REST_Controller::HTTP_FORBIDDEN);
|
||||
return $this->outputJsonError($this->p->t('studierendenantrag','error_no_student_no_failed_exam'));
|
||||
}
|
||||
elseif ($result == -1)
|
||||
{
|
||||
$result = $this->antraglib->getDetailsForLastAntrag($prestudent_id, Studierendenantrag_model::TYP_WIEDERHOLUNG);
|
||||
if (isError($result)) {
|
||||
return $this->outputJsonError(getError($result));
|
||||
}
|
||||
|
||||
$data = getData($result);
|
||||
|
||||
$result = $this->antraglib->getFailedExamForPrestudent($prestudent_id);
|
||||
// NOTE(chris): error handling for this function should already happenden in antraglib->getPrestudentWiederholungsBerechtigt()
|
||||
$pruefungsdata = current(getData($result));
|
||||
|
||||
$data->studiensemester_kurzbz = $pruefungsdata->studiensemester_kurzbz;
|
||||
$data->lvbezeichnung = $pruefungsdata->lvbezeichnung;
|
||||
$data->pruefungsdatum = $pruefungsdata->datum;
|
||||
|
||||
return $this->outputJsonSuccess($data);
|
||||
}
|
||||
elseif ($result == -2)
|
||||
{
|
||||
$result = $this->antraglib->getDetailsForLastAntrag($prestudent_id);
|
||||
if (isError($result)) {
|
||||
return $this->outputJsonError(getError($result));
|
||||
}
|
||||
|
||||
$result = getData($result);
|
||||
$this->output->set_status_header(REST_Controller::HTTP_BAD_REQUEST);
|
||||
return $this->outputJsonError($this->p->t('studierendenantrag', 'error_antrag_pending', ['typ' => $this->p->t('studierendenantrag','antrag_typ_' . $result->typ)]));
|
||||
}
|
||||
elseif ($result == -3)
|
||||
{
|
||||
$this->output->set_status_header(REST_Controller::HTTP_BAD_REQUEST);
|
||||
return $this->outputJsonError($this->p->t('studierendenantrag', 'error_stg_blacklist'));
|
||||
}
|
||||
|
||||
$result = $this->antraglib->getDetailsForNewAntrag($prestudent_id);
|
||||
if (isError($result)) {
|
||||
return $this->outputJsonError(getError($result));
|
||||
}
|
||||
|
||||
$data = getData($result);
|
||||
|
||||
$result = $this->antraglib->getFailedExamForPrestudent($prestudent_id);
|
||||
// NOTE(chris): error handling for this function should already happenden in antraglib->getPrestudentWiederholungsBerechtigt()
|
||||
$pruefungsdata = current(getData($result));
|
||||
|
||||
$data->studiensemester_kurzbz = $pruefungsdata->studiensemester_kurzbz;
|
||||
$data->lvbezeichnung = $pruefungsdata->lvbezeichnung;
|
||||
$data->pruefungsdatum = $pruefungsdata->datum;
|
||||
|
||||
$this->outputJsonSuccess($data);
|
||||
}
|
||||
|
||||
public function createAntrag()
|
||||
{
|
||||
$this->createAntragWithStatus(true);
|
||||
}
|
||||
|
||||
public function cancelAntrag()
|
||||
{
|
||||
$this->createAntragWithStatus(false);
|
||||
}
|
||||
|
||||
protected function createAntragWithStatus($repeat)
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$_POST = json_decode($this->input->raw_input_stream, true);
|
||||
|
||||
$this->form_validation->set_rules('prestudent_id', 'Prestudent ID', 'required');
|
||||
$this->form_validation->set_rules('studiensemester', 'Studiensemester', 'required');
|
||||
|
||||
if ($this->form_validation->run() == false)
|
||||
{
|
||||
return $this->outputJsonError($this->form_validation->error_array());
|
||||
}
|
||||
|
||||
$prestudent_id = $this->input->post('prestudent_id');
|
||||
$studiensemester = $this->input->post('studiensemester');
|
||||
|
||||
$result = $this->antraglib->getPrestudentWiederholungsBerechtigt($prestudent_id);
|
||||
if (isError($result)) {
|
||||
return $this->outputJsonError(['db' => getError($result)]);
|
||||
}
|
||||
$result = $result->retval;
|
||||
if (!$result)
|
||||
{
|
||||
// TODO(chris): ERROR Message
|
||||
return $this->outputJsonError(['db' => $this->p->t('studierendenantrag', 'error_no_student')]);
|
||||
}
|
||||
elseif ($result == -2)
|
||||
{
|
||||
return $this->outputJsonError(['db' => $this->p->t('studierendenantrag', 'error_antrag_exists')]);
|
||||
}
|
||||
elseif ($result == -3)
|
||||
{
|
||||
return $this->outputJsonError(['db' => $this->p->t('studierendenantrag', 'error_stg_blacklist')]);
|
||||
}
|
||||
|
||||
$result = $this->antraglib->createWiederholung($prestudent_id, $studiensemester, getAuthUID(), $repeat);
|
||||
if(isError($result))
|
||||
{
|
||||
return $this->outputJsonError(['db' => getError($result)]);
|
||||
}
|
||||
|
||||
$antragId = getData($result);
|
||||
$result = $this->antraglib->getDetailsForAntrag($antragId);
|
||||
|
||||
if(!hasData($result))
|
||||
return $this->outputJsonSuccess(true);
|
||||
|
||||
$data = getData($result);
|
||||
|
||||
$result = $this->antraglib->getFailedExamForPrestudent($prestudent_id);
|
||||
// NOTE(chris): error handling for this function should already happenden in antraglib->getPrestudentWiederholungsBerechtigt()
|
||||
$pruefungsdata = current(getData($result));
|
||||
|
||||
$data->studiensemester_kurzbz = $pruefungsdata->studiensemester_kurzbz;
|
||||
$data->lvbezeichnung = $pruefungsdata->lvbezeichnung;
|
||||
$data->pruefungsdatum = $pruefungsdata->datum;
|
||||
|
||||
$this->outputJsonSuccess($data);
|
||||
}
|
||||
|
||||
|
||||
public function getLvs($antrag_id)
|
||||
{
|
||||
$result = $this->antraglib->getLvsForAntrag($antrag_id);
|
||||
if (isError($result)) {
|
||||
$error = getError($result);
|
||||
if ($error == 'Forbidden')
|
||||
$this->output->set_status_header(REST_Controller::HTTP_FORBIDDEN);
|
||||
return $this->outputJsonError(getError($result));
|
||||
}
|
||||
$lvs = getData($result);
|
||||
|
||||
$this->outputJsonSuccess($lvs);
|
||||
}
|
||||
|
||||
public function saveLvs()
|
||||
{
|
||||
$result = $this->getPostJSON();
|
||||
$antragsLvs = array_merge($result->forbiddenLvs, $result->mandatoryLvs);
|
||||
|
||||
$insert = array_map(function ($lv) {
|
||||
return [
|
||||
'studierendenantrag_id' => $lv->studierendenantrag_id,
|
||||
'lehrveranstaltung_id' => $lv->lehrveranstaltung_id,
|
||||
'note' => $lv->zugelassen ? ($lv->zugelassen == 1 ? 0 : $this->config->item('wiederholung_note_angerechnet')) : $this->config->item('wiederholung_note_nicht_zugelassen'),
|
||||
'anmerkung' => $lv->anmerkung,
|
||||
'insertvon' => getAuthUID(),
|
||||
'studiensemester_kurzbz' => $lv->studiensemester_kurzbz
|
||||
];
|
||||
}, $antragsLvs);
|
||||
|
||||
$antrag_ids = array_unique(array_map(function ($lv) {
|
||||
return $lv['studierendenantrag_id'];
|
||||
}, $insert));
|
||||
|
||||
foreach ($antrag_ids as $antrag_id) {
|
||||
$result = $this->StudierendenantragModel->loadIdAndStatusWhere([
|
||||
'studierendenantrag_id' => $antrag_id
|
||||
]);
|
||||
if (isError($result))
|
||||
return $this->outputJsonError(getError($result));
|
||||
if (!hasData($result))
|
||||
return $this->outputJsonError($this->p->t('studierendenantrag', 'error_no_antrag_found', ['id' => $antrag_id]));
|
||||
$antrag = current(getData($result));
|
||||
if ($antrag->status != Studierendenantragstatus_model::STATUS_CREATED && $antrag->status != Studierendenantragstatus_model::STATUS_LVSASSIGNED)
|
||||
return $this->outputJsonError($this->p->t('studierendenantrag', 'error_antrag_locked'));
|
||||
}
|
||||
|
||||
if(!$antragsLvs)
|
||||
return $this->outputJsonError($this->p->t('studierendenantrag', 'error_no_lv'));
|
||||
|
||||
$result = $this->antraglib->saveLvs($insert);
|
||||
|
||||
if (isError($result))
|
||||
return $this->outputJsonError(getError($result));
|
||||
|
||||
$this->outputJsonSuccess(getData($result));
|
||||
}
|
||||
|
||||
public function getLvsAsRdf($prestudent_id)
|
||||
{
|
||||
// header für no cache
|
||||
$this->output->set_header("Cache-Control: no-cache");
|
||||
$this->output->set_header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
$this->output->set_header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
$this->output->set_header("Pragma: no-cache");
|
||||
$this->output->set_header("Content-type: application/xhtml+xml");
|
||||
|
||||
$this->load->library('VariableLib', ['uid' => getAuthUID()]);
|
||||
$sem_akt = $this->variablelib->getVar('semester_aktuell');
|
||||
|
||||
|
||||
$result = $this->antraglib->getLvsForPrestudent($prestudent_id, $sem_akt);
|
||||
if (isError($result)) {
|
||||
return $this->outputJsonError(getError($result));
|
||||
}
|
||||
|
||||
$lvs = getData($result) ?: [];
|
||||
$rdf_url = 'http://www.technikum-wien.at/antragnote';
|
||||
|
||||
$this->load->view('lehre/Antrag/Wiederholung/getLvs.rdf.php', [
|
||||
'url' => $rdf_url,
|
||||
'lvs' => $lvs
|
||||
]);
|
||||
}
|
||||
|
||||
public function moveLvsToZeugnis()
|
||||
{
|
||||
$anzahl = $this->input->post('anzahl');
|
||||
$student_uid = $this->input->post('student_uid');
|
||||
$this->load->model('education/Studierendenantraglehrveranstaltung_model', 'StudierendenantraglehrveranstaltungModel');
|
||||
$this->load->model('education/Zeugnisnote_model', 'ZeugnisnoteModel');
|
||||
|
||||
$errormsg = array();
|
||||
|
||||
for($i=0; $i<$anzahl; $i++)
|
||||
{
|
||||
$id = $this->input->post('studierendenantrag_lehrveranstaltung_id_' . $i);
|
||||
$result =$this->StudierendenantraglehrveranstaltungModel->load($id);
|
||||
if(isError($result))
|
||||
{
|
||||
$errormsg[] = getError($result);
|
||||
}
|
||||
elseif(!hasData($result))
|
||||
{
|
||||
$errormsg[] = $this->p->t('studierendenantrag', 'error_no_lv_in_application');
|
||||
}
|
||||
else
|
||||
{
|
||||
$antragLv = getData($result)[0];
|
||||
$result= $this->ZeugnisnoteModel->load([
|
||||
'lehrveranstaltung_id'=> $antragLv->lehrveranstaltung_id,
|
||||
'student_uid'=> $student_uid,
|
||||
'studiensemester_kurzbz' => $antragLv->studiensemester_kurzbz
|
||||
]);
|
||||
if(isError($result))
|
||||
{
|
||||
$errormsg[] = getError($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (hasData($result))
|
||||
{
|
||||
$result = $this->ZeugnisnoteModel->update(
|
||||
[
|
||||
'lehrveranstaltung_id'=> $antragLv->lehrveranstaltung_id,
|
||||
'student_uid'=> $student_uid,
|
||||
'studiensemester_kurzbz' => $antragLv->studiensemester_kurzbz
|
||||
],
|
||||
[
|
||||
'note'=> $antragLv->note,
|
||||
'uebernahmedatum' => date('c'),
|
||||
'benotungsdatum' => $antragLv->insertamum,
|
||||
'updateamum' => date('c'),
|
||||
'bemerkung'=>$antragLv->anmerkung,
|
||||
'updatevon'=>getAuthUID()
|
||||
]
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $this->ZeugnisnoteModel->insert([
|
||||
'lehrveranstaltung_id'=> $antragLv->lehrveranstaltung_id,
|
||||
'student_uid'=> $student_uid,
|
||||
'studiensemester_kurzbz' => $antragLv->studiensemester_kurzbz,
|
||||
'note'=> $antragLv->note,
|
||||
'uebernahmedatum' => date('c'),
|
||||
'benotungsdatum' => $antragLv->insertamum,
|
||||
'insertamum' => date('c'),
|
||||
'bemerkung'=>$antragLv->anmerkung,
|
||||
'insertvon'=>getAuthUID()
|
||||
]);
|
||||
}
|
||||
if(isError($result))
|
||||
{
|
||||
$errormsg[] = getError($result);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($errormsg)
|
||||
$return = false;
|
||||
else
|
||||
$return = true;
|
||||
|
||||
$this->load->view('lehre/Antrag/Wiederholung/moveLvs.rdf.php', [
|
||||
'return' => $return,
|
||||
'errormsg' => $errormsg
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class Phrasen extends FHC_Controller
|
||||
{
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* @param string $module
|
||||
*/
|
||||
public function loadModule($module)
|
||||
{
|
||||
$this->load->library('PhrasesLib', [$module], 'pj');
|
||||
$this->outputJsonSuccess(json_decode($this->pj->getJSON()));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,406 @@
|
||||
<?php
|
||||
|
||||
if (!defined("BASEPATH")) exit("No direct script access allowed");
|
||||
|
||||
use \DateTime as DateTime;
|
||||
// TODO(chris): Achtung not working
|
||||
|
||||
class AntragJob extends JOB_Controller
|
||||
{
|
||||
/**
|
||||
* API constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
// Configs
|
||||
$this->load->config('studierendenantrag');
|
||||
|
||||
// Loads SanchoHelper
|
||||
$this->load->helper('hlp_sancho_helper');
|
||||
|
||||
//Load Model
|
||||
$this->load->model('education/Studierendenantrag_model', 'StudierendenantragModel');
|
||||
$this->load->model('education/Studierendenantragstatus_model', 'StudierendenantragstatusModel');
|
||||
$this->load->model('education/Pruefung_model', 'PruefungModel');
|
||||
$this->load->model('person/Kontakt_model', 'KontaktModel');
|
||||
}
|
||||
|
||||
/**
|
||||
* Send reminder to Assistant for Wiedereinstieg Unterbrecher
|
||||
*
|
||||
*/
|
||||
public function sendReminderWiedereinstieg()
|
||||
{
|
||||
$now = new DateTime();
|
||||
$modifier = $this->config->item('unterbrechung_job_remind_wiedereinstieg_date_modifier');
|
||||
if (!$modifier)
|
||||
return $this->logError('Konnte Job nicht starten: Config "unterbrechung_job_remind_wiedereinstieg_date_modifiers" nicht gesetzt');
|
||||
|
||||
$end = new DateTime();
|
||||
$end->modify($modifier);
|
||||
|
||||
$this->logInfo(sprintf(
|
||||
'Start Job sendReminderWiedereinstieg (Wiedereinstieg zwischen %s - %s)',
|
||||
$now->format('Y-m-d'),
|
||||
$end->format('Y-m-d')
|
||||
));
|
||||
|
||||
$result = $this->StudierendenantragModel->getAntraegeWhereWiedereinstiegBetween($now, $end);
|
||||
|
||||
if(isError($result))
|
||||
{
|
||||
$this->logError(getError($result));
|
||||
$this->logInfo('Ende Job sendReminderWiedereinstieg');
|
||||
return;
|
||||
}
|
||||
|
||||
$antraege = getData($result) ?: [];
|
||||
$count = 0;
|
||||
foreach ($antraege as $antrag)
|
||||
{
|
||||
$datum = new DateTime($antrag->datum_wiedereinstieg);
|
||||
$data = array(
|
||||
'prestudent' => $antrag->prestudent_id,
|
||||
'name' => trim($antrag->vorname . ' '. $antrag->nachname),
|
||||
'datum_wiedereinstieg' => $datum->format('d.m.Y')
|
||||
);
|
||||
|
||||
if(sendSanchoMail('Sancho_Mail_Antrag_U_Reminder', $data, $antrag->email, 'Reminder: Unterbrechung Wiedereinstieg'))
|
||||
{
|
||||
$count++;
|
||||
$this->StudierendenantragstatusModel->insert([
|
||||
'studierendenantrag_id' => $antrag->studierendenantrag_id,
|
||||
'studierendenantrag_statustyp_kurzbz' => Studierendenantragstatus_model::STATUS_REMINDERSENT,
|
||||
'insertvon' => 'AntragJob'
|
||||
]);
|
||||
}
|
||||
}
|
||||
$this->logInfo($count . ' Reminder gesendet - Ende Job sendReminderWiedereinstieg');
|
||||
}
|
||||
|
||||
/**
|
||||
* Set Wiederholer after deadline to Abbrecher
|
||||
*
|
||||
*/
|
||||
public function handleWiederholerDeadline()
|
||||
{
|
||||
$this->logInfo('Start Job handleWiederholerDeadline');
|
||||
|
||||
$this->load->library('PrestudentLib');
|
||||
|
||||
$insertvon = $this->config->item('antrag_job_systemuser');
|
||||
if (!$insertvon) {
|
||||
$this->logError('Config "antrag_job_systemuser" nicht gesetzt');
|
||||
$this->logInfo('Ende Job handleWiederholerDeadline');
|
||||
return;
|
||||
}
|
||||
|
||||
$modifier_deadline = $this->config->item('wiederholung_job_deadline_date_modifier');
|
||||
if (!$modifier_deadline) {
|
||||
$this->logError('Config "wiederholung_job_deadline_date_modifier" nicht gesetzt');
|
||||
$this->logInfo('Ende Job handleWiederholerDeadline');
|
||||
return;
|
||||
}
|
||||
|
||||
$dateDeadline = new DateTime();
|
||||
$dateDeadline->sub(DateInterval::createFromDateString($modifier_deadline));
|
||||
|
||||
$result = $this->PruefungModel->getAllPrestudentsWhereCommitteeExamFailed(
|
||||
[
|
||||
null,
|
||||
Studierendenantragstatus_model::STATUS_REQUESTSENT_1,
|
||||
Studierendenantragstatus_model::STATUS_REQUESTSENT_2
|
||||
],
|
||||
$dateDeadline,
|
||||
null
|
||||
);
|
||||
|
||||
if(isError($result))
|
||||
{
|
||||
$this->logError(getError($result));
|
||||
}
|
||||
else
|
||||
{
|
||||
$prestudents = getData($result) ?: [];
|
||||
$count = 0;
|
||||
|
||||
$prestudents = $this->prestudentsGetUnique($prestudents);
|
||||
|
||||
foreach ($prestudents as $prestudent)
|
||||
{
|
||||
// TODO(chris): DEBUG REMOVE!
|
||||
if ($prestudent->studiensemester_kurzbz == 'WS2021')
|
||||
var_dump([$prestudent->prestudent_id, $prestudent->studiensemester_kurzbz, $prestudent->lvbezeichnung]);
|
||||
$result = success();
|
||||
// TODO(chris): find out how to filter old/wrong datasets!!!
|
||||
#$result = $this->prestudentlib->setAbbrecher($prestudent->prestudent_id, $prestudent->studiensemester_kurzbz, $insertvon);
|
||||
if (isError($result))
|
||||
$this->logError(getError($result));
|
||||
else
|
||||
$count++;
|
||||
}
|
||||
$this->logInfo($count . " Students set to Abbrecher");
|
||||
}
|
||||
|
||||
$this->logInfo('Ende Job handleWiederholerDeadline');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Set Abmeldungen after deadline to Abbrecher
|
||||
*
|
||||
*/
|
||||
public function handleAbmeldungenStglDeadline()
|
||||
{
|
||||
$this->logInfo('Start Job handleAbmeldungenStglDeadline');
|
||||
|
||||
$this->load->library('AntragLib');
|
||||
|
||||
$insertvon = $this->config->item('antrag_job_systemuser');
|
||||
if (!$insertvon) {
|
||||
$this->logError('Config "antrag_job_systemuser" nicht gesetzt');
|
||||
$this->logInfo('Ende Job handleAbmeldungenStglDeadline');
|
||||
return;
|
||||
}
|
||||
|
||||
$modifier_deadline = $this->config->item('abmeldung_job_deadline_date_modifier');
|
||||
if (!$modifier_deadline) {
|
||||
$this->logError('Config "abmeldung_job_deadline_date_modifier" nicht gesetzt');
|
||||
$this->logInfo('Ende Job handleAbmeldungenStglDeadline');
|
||||
return;
|
||||
}
|
||||
|
||||
$dateDeadline = new DateTime();
|
||||
$dateDeadline->sub(DateInterval::createFromDateString($modifier_deadline));
|
||||
|
||||
$result = $this->StudierendenantragModel->getWithLastStatusWhere(
|
||||
[
|
||||
'studierendenantrag_statustyp_kurzbz' => Studierendenantragstatus_model::STATUS_APPROVED_STGL,
|
||||
's.insertamum <=' => $dateDeadline->format('c')
|
||||
]
|
||||
);
|
||||
|
||||
if(isError($result))
|
||||
{
|
||||
$this->logError(getError($result));
|
||||
}
|
||||
else
|
||||
{
|
||||
$antraege = getData($result) ?: [];
|
||||
$count = 0;
|
||||
|
||||
foreach ($antraege as $antrag)
|
||||
{
|
||||
$result = $this->antraglib->approveAbmeldung([$antrag->studierendenantrag_id], $insertvon);
|
||||
|
||||
if (isError($result))
|
||||
$this->logError(getError($result));
|
||||
else
|
||||
$count++;
|
||||
}
|
||||
$this->logInfo($count . " Students set to Abbrecher");
|
||||
}
|
||||
$this->logInfo('Ende Job handleAbmeldungenStglDeadline');
|
||||
}
|
||||
|
||||
/**
|
||||
* Send Request to Student do Decide between Wiederholung and Verzicht
|
||||
*
|
||||
*/
|
||||
public function sendAufforderungWiederholer()
|
||||
{
|
||||
$this->logInfo('Start Job sendAufforderungWiederholer');
|
||||
|
||||
$modifier_request_1 = $this->config->item('wiederholung_job_request_1_date_modifier');
|
||||
$modifier_request_2 = $this->config->item('wiederholung_job_request_2_date_modifier');
|
||||
$modifier_deadline = $this->config->item('wiederholung_job_deadline_date_modifier');
|
||||
|
||||
if ($modifier_deadline)
|
||||
{
|
||||
$dateDeadline = new DateTime();
|
||||
$dateDeadline->sub(DateInterval::createFromDateString($modifier_deadline));
|
||||
}
|
||||
else
|
||||
$dateDeadline = null;
|
||||
|
||||
//first request
|
||||
if ($modifier_request_1)
|
||||
$this->sendReminder(
|
||||
'Request1',
|
||||
null,
|
||||
Studierendenantragstatus_model::STATUS_REQUESTSENT_1,
|
||||
$dateDeadline,
|
||||
$modifier_request_1,
|
||||
$modifier_deadline,
|
||||
'Aufforderung: Bekanntgabe Wiederholung'
|
||||
);
|
||||
else
|
||||
$this->logError('Config "wiederholung_job_request_1_date_modifier" nicht gesetzt');
|
||||
|
||||
//second request
|
||||
if ($modifier_request_2)
|
||||
$this->sendReminder(
|
||||
'Request2',
|
||||
Studierendenantragstatus_model::STATUS_REQUESTSENT_1,
|
||||
Studierendenantragstatus_model::STATUS_REQUESTSENT_2,
|
||||
$dateDeadline,
|
||||
$modifier_request_2,
|
||||
$modifier_deadline,
|
||||
'Reminder Aufforderung: Bekanntgabe Wiederholung'
|
||||
);
|
||||
else
|
||||
$this->logError('Config "wiederholung_job_request_2_date_modifier" nicht gesetzt');
|
||||
|
||||
$this->logInfo('Ende Job sendAufforderungWiederholer');
|
||||
}
|
||||
|
||||
protected function prestudentsGetUnique($prestudents) {
|
||||
$result = [];
|
||||
foreach ($prestudents as $prestudent) {
|
||||
if (!isset($result[$prestudent->prestudent_id]))
|
||||
$result[$prestudent->prestudent_id] = $prestudent;
|
||||
else {
|
||||
if ($result[$prestudent->prestudent_id]->datum > $prestudent->datum)
|
||||
$result[$prestudent->prestudent_id] = $prestudent;
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
protected function sendReminder($name, $status_from, $status_to, $deadline, $date_modifier, $modifier_deadline, $subject)
|
||||
{
|
||||
$this->logInfo('Start Job sendAufforderungWiederholer ' . $name);
|
||||
|
||||
$dateStichtag = new DateTime();
|
||||
$dateStichtag->sub(DateInterval::createFromDateString($date_modifier));
|
||||
|
||||
$result = $this->PruefungModel->getAllPrestudentsWhereCommitteeExamFailed($status_from, $dateStichtag, $deadline);
|
||||
|
||||
if(isError($result))
|
||||
{
|
||||
$this->logError(getError($result));
|
||||
}
|
||||
else
|
||||
{
|
||||
$prestudents = getData($result) ?: [];
|
||||
$count = 0;
|
||||
|
||||
$prestudents = $this->prestudentsGetUnique($prestudents);
|
||||
|
||||
foreach ($prestudents as $prestudent)
|
||||
{
|
||||
$stg_kz = $prestudent->studiengang_kz;
|
||||
if (in_array($stg_kz, $this->config->item('stgkz_blacklist_wiederholung')))
|
||||
continue;
|
||||
$url = site_url('lehre/Studierendenantrag/wiederholung/' . $prestudent->prestudent_id);
|
||||
$email = $this->KontaktModel->getZustellKontakt($prestudent->person_id, ['email']);
|
||||
if (isError($email)) {
|
||||
$this->logError(getError($email));
|
||||
} else {
|
||||
$email = getData($email);
|
||||
|
||||
if (!$email) {
|
||||
$this->logError('No email contact found for person_id: ' . $prestudent->person_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
$email = current($email)->kontakt;
|
||||
$fristende = new DateTime($prestudent->datum);
|
||||
$fristende->add(DateInterval::createFromDateString($modifier_deadline));
|
||||
|
||||
$dataMail = array(
|
||||
'name'=> trim($prestudent->vorname . ' '. $prestudent->nachname),
|
||||
'pers_kz'=> $prestudent->matrikelnr,
|
||||
'studiengang' => $prestudent->bezeichnung,
|
||||
'lvbezeichnung' => $prestudent->lvbezeichnung,
|
||||
'datum_kp' => $prestudent->datum,
|
||||
'studiensemester'=> $prestudent->studiensemester_kurzbz,
|
||||
'orgform'=> $prestudent->orgform,
|
||||
'url' => $url,
|
||||
'fristablauf' => $fristende->format('d.m.Y')
|
||||
);
|
||||
if(sendSanchoMail('Sancho_Mail_Antrag_W_' . $name, $dataMail, $email, $subject))
|
||||
{
|
||||
$antrag_id = null;
|
||||
$result = $this->StudierendenantragModel->loadWhere([
|
||||
'prestudent_id' => $prestudent->prestudent_id,
|
||||
'typ' => Studierendenantrag_model::TYP_WIEDERHOLUNG
|
||||
]);
|
||||
if (isError($result))
|
||||
$this->logError(getError($result));
|
||||
elseif (hasData($result))
|
||||
$antrag_id = current(getData($result) ?: []) -> studierendenantrag_id;
|
||||
if ($antrag_id == null)
|
||||
{
|
||||
$result = $this->StudierendenantragModel->insert([
|
||||
'prestudent_id' => $prestudent->prestudent_id,
|
||||
'studiensemester_kurzbz'=> $prestudent->studiensemester_kurzbz,
|
||||
'datum' => date('c'),
|
||||
'typ' => Studierendenantrag_model::TYP_WIEDERHOLUNG,
|
||||
'insertvon' => 'AntragJob'
|
||||
]);
|
||||
if (isError($result))
|
||||
$this->logError(getError($result));
|
||||
else
|
||||
$antrag_id = getData($result);
|
||||
}
|
||||
if ($antrag_id)
|
||||
{
|
||||
$result = $this->StudierendenantragstatusModel->insert([
|
||||
'studierendenantrag_id' => $antrag_id,
|
||||
'studierendenantrag_statustyp_kurzbz' => $status_to,
|
||||
'insertvon' => 'AntragJob'
|
||||
]);
|
||||
if (isError($result))
|
||||
$this->logError(getError($result));
|
||||
}
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->logInfo($count . " Mails '" . $subject . "' sent");
|
||||
}
|
||||
$this->logInfo('Ende Job sendAufforderungWiederholer ' . $name);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// TODO(chris): REMOVE DEBUG!
|
||||
|
||||
/**
|
||||
* Writes a cronjob info log
|
||||
*/
|
||||
protected function logInfo($response, $parameters = null)
|
||||
{
|
||||
echo $response . "\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes a cronjob debug log
|
||||
*/
|
||||
protected function logDebug($response, $parameters = null)
|
||||
{
|
||||
echo $response . "\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes a cronjob warning log
|
||||
*/
|
||||
protected function logWarning($response, $parameters = null)
|
||||
{
|
||||
echo $response . "\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes a cronjob error log
|
||||
*/
|
||||
protected function logError($response, $parameters = null)
|
||||
{
|
||||
echo $response . "\n";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
use \REST_Controller as REST_Controller;
|
||||
|
||||
/**
|
||||
*/
|
||||
class Attachment extends FHC_Controller
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$this->load->model('education/Studierendenantrag_model', 'StudierendenantragModel');
|
||||
|
||||
$this->load->library('DmsLib');
|
||||
$this->load->library('AuthLib');
|
||||
$this->load->library('PermissionLib');
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* @param integer $dms_id
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function show($dms_id)
|
||||
{
|
||||
$result = $this->StudierendenantragModel->loadWhere(['dms_id' => $dms_id]);
|
||||
if (!getData($result))
|
||||
return show_404();
|
||||
|
||||
if (!$this->permissionlib->isBerechtigt('student/antragfreigabe'))
|
||||
{
|
||||
$isSamePerson = false;
|
||||
$antraege = getData($result);
|
||||
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
|
||||
foreach ($antraege as $antrag)
|
||||
{
|
||||
$prestudent = $this->PrestudentModel->load($antrag->prestudent_id);
|
||||
if(hasData($prestudent))
|
||||
{
|
||||
if(current(getData($prestudent))->person_id == getAuthPersonId())
|
||||
{
|
||||
$isSamePerson = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($isSamePerson == false)
|
||||
{
|
||||
$this->output->set_status_header(REST_Controller::HTTP_FORBIDDEN); // set the HTTP header as unauthorized
|
||||
|
||||
$this->load->library('EPrintfLib'); // loads the EPrintfLib to format the output
|
||||
|
||||
// Prints the main error message
|
||||
$this->eprintflib->printError('You are not allowed to access to this content');
|
||||
// Prints the called controller name
|
||||
$this->eprintflib->printInfo('Controller name: '.$this->router->class);
|
||||
// Prints the called controller method name
|
||||
$this->eprintflib->printInfo('Method name: '.$this->router->method);
|
||||
// Prints the required permissions needed to access to this method
|
||||
$this->eprintflib->printInfo('Required permissions: student/antragfreigabe');
|
||||
|
||||
return show_error('You are not entitled to read this document');
|
||||
}
|
||||
}
|
||||
|
||||
$result = $this->dmslib->download($dms_id);
|
||||
if (isError($result))
|
||||
return show_error(getError($result));
|
||||
|
||||
$this->outputFile(getData($result));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
use \DateTime as DateTime;
|
||||
use \Studierendenantrag_model as Studierendenantrag_model;
|
||||
use \REST_Controller as REST_Controller;
|
||||
|
||||
/**
|
||||
*/
|
||||
class Wiederholung extends Auth_Controller
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'assistenz'=> 'student/studierendenantrag:w'
|
||||
]);
|
||||
|
||||
$this->load->library('AntragLib');
|
||||
|
||||
// Load language phrases
|
||||
$this->loadPhrases([
|
||||
'studierendenantrag'
|
||||
]);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
public function assistenz($antrag_id, $frame = false)
|
||||
{
|
||||
|
||||
$result = $this->antraglib->getDetailsForAntrag($antrag_id);
|
||||
|
||||
if (isError($result))
|
||||
return show_error(getError($result));
|
||||
|
||||
if (!hasData($result))
|
||||
return show_404();
|
||||
|
||||
$this->load->view('lehre/Antrag/Wiederholung/Student', [
|
||||
'antrag_id' => $antrag_id,
|
||||
'antrag' => getData($result),
|
||||
'frame' => $frame
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,208 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
use \stdClass as stdClass;
|
||||
|
||||
/**
|
||||
*/
|
||||
class Studierendenantrag extends FHC_Controller
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
// Load Libraries
|
||||
$this->load->library('AuthLib');
|
||||
$this->load->library('AntragLib');
|
||||
|
||||
// Load Models
|
||||
$this->load->model('education/Studierendenantrag_model', 'StudierendenantragModel');
|
||||
|
||||
// Load language phrases
|
||||
$this->loadPhrases([
|
||||
'studierendenantrag'
|
||||
]);
|
||||
|
||||
if (strtolower($this->router->method) === 'leitung')
|
||||
$this->_isAllowed([
|
||||
'leitung' => ['student/studierendenantrag:r', 'student/antragfreigabe:r']
|
||||
]);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
public function index()
|
||||
{
|
||||
$dataAntrag = $this->StudierendenantragModel->loadForPerson(getAuthPersonId());
|
||||
if (isError($dataAntrag))
|
||||
return show_error(getError($dataAntrag));
|
||||
$dataAntrag = (getData($dataAntrag) ? : []);
|
||||
$prestudentenArr = array();
|
||||
|
||||
foreach ($dataAntrag as $antrag)
|
||||
{
|
||||
if (!isset($prestudentenArr[$antrag->prestudent_id]))
|
||||
{
|
||||
$prestudentenArr[$antrag->prestudent_id] = array(
|
||||
'allowedNewTypes' => array(),
|
||||
'antraege'=> array(),
|
||||
'bezeichnungStg' => $antrag->bezeichnung,
|
||||
'bezeichnungOrgform' => $antrag->orgform
|
||||
);
|
||||
$result = $this->antraglib->getPrestudentAbmeldeBerechtigt($antrag->prestudent_id);
|
||||
if (getData($result) == 1)
|
||||
$prestudentenArr[$antrag->prestudent_id]['allowedNewTypes'][] = 'Abmeldung';
|
||||
|
||||
$result = $this->antraglib->getPrestudentUnterbrechungsBerechtigt($antrag->prestudent_id);
|
||||
if (getData($result) == 1)
|
||||
$prestudentenArr[$antrag->prestudent_id]['allowedNewTypes'][] = 'Unterbrechung';
|
||||
|
||||
$result = $this->antraglib->getPrestudentWiederholungsBerechtigt($antrag->prestudent_id);
|
||||
if (getData($result) == 1)
|
||||
$prestudentenArr[$antrag->prestudent_id]['allowedNewTypes'][] = 'Wiederholung';
|
||||
}
|
||||
if ($antrag->studierendenantrag_id == null)
|
||||
continue;
|
||||
$prestudentenArr[$antrag->prestudent_id]['antraege'][] = $antrag;
|
||||
}
|
||||
|
||||
$this->load->view('lehre/Antrag/Student/List', [
|
||||
'antraege' => $prestudentenArr
|
||||
]);
|
||||
}
|
||||
|
||||
public function leitung()
|
||||
{
|
||||
$studiengaenge = $this->permissionlib->getSTG_isEntitledFor('student/antragfreigabe');
|
||||
$stgsNeuanlage = $this->permissionlib->getSTG_isEntitledFor('student/studierendenantrag');
|
||||
|
||||
$stgL = [];
|
||||
if ($studiengaenge) {
|
||||
$result = $this->StudierendenantragModel->loadForStudiengaenge($studiengaenge);
|
||||
if (isError($result))
|
||||
return show_error(getError($result));
|
||||
$antraege = getData($result) ?: [];
|
||||
|
||||
foreach ($antraege as $antrag) {
|
||||
if (!isset($stgL[$antrag->studiengang_kz])) {
|
||||
$stgL[$antrag->studiengang_kz] = new stdClass();
|
||||
$stgL[$antrag->studiengang_kz]->bezeichnung = $antrag->bezeichnung;
|
||||
$stgL[$antrag->studiengang_kz]->orgform = $antrag->orgform;
|
||||
$stgL[$antrag->studiengang_kz]->studiengang_kz = $antrag->studiengang_kz;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$stgA = [];
|
||||
if ($stgsNeuanlage) {
|
||||
$result = $this->StudierendenantragModel->loadForStudiengaenge($stgsNeuanlage);
|
||||
if (isError($result))
|
||||
return show_error(getError($result));
|
||||
$antraege = getData($result) ?: [];
|
||||
|
||||
foreach ($antraege as $antrag) {
|
||||
if (!isset($stgA[$antrag->studiengang_kz])) {
|
||||
$stgA[$antrag->studiengang_kz] = new stdClass();
|
||||
$stgA[$antrag->studiengang_kz]->bezeichnung = $antrag->bezeichnung;
|
||||
$stgA[$antrag->studiengang_kz]->orgform = $antrag->orgform;
|
||||
$stgA[$antrag->studiengang_kz]->studiengang_kz = $antrag->studiengang_kz;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->load->view('lehre/Antrag/Leitung/List', [
|
||||
'stgA' => $stgA,
|
||||
'stgL' => $stgL
|
||||
]);
|
||||
}
|
||||
|
||||
public function abmeldung($prestudent_id, $studierendenantrag_id = null)
|
||||
{
|
||||
$this->load->view('lehre/Antrag/Create', [
|
||||
'prestudent_id' => $prestudent_id,
|
||||
'studierendenantrag_id' => $studierendenantrag_id,
|
||||
'antrag_type' => 'Abmeldung'
|
||||
]);
|
||||
}
|
||||
|
||||
public function unterbrechung($prestudent_id, $studierendenantrag_id = null)
|
||||
{
|
||||
$this->load->view('lehre/Antrag/Create', [
|
||||
'prestudent_id' => $prestudent_id,
|
||||
'studierendenantrag_id' => $studierendenantrag_id,
|
||||
'antrag_type' => 'Unterbrechung'
|
||||
]);
|
||||
}
|
||||
|
||||
public function wiederholung($prestudent_id, $studierendenantrag_id = null)
|
||||
{
|
||||
$this->load->view('lehre/Antrag/Create', [
|
||||
'prestudent_id' => $prestudent_id,
|
||||
'studierendenantrag_id' => $studierendenantrag_id,
|
||||
'antrag_type' => 'Wiederholung'
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the caller is allowed to access to this content with the given permissions
|
||||
* If it is not allowed will set the HTTP header with code 401
|
||||
* Wrapper for permissionlib->isEntitled
|
||||
*/
|
||||
private function _isAllowed($requiredPermissions)
|
||||
{
|
||||
// Loads permission lib
|
||||
$this->load->library('PermissionLib');
|
||||
|
||||
// Checks if this user is entitled to access to this content
|
||||
if (!$this->permissionlib->isEntitled($requiredPermissions, $this->router->method))
|
||||
{
|
||||
$this->output->set_status_header(REST_Controller::HTTP_UNAUTHORIZED); // set the HTTP header as unauthorized
|
||||
|
||||
$this->load->library('EPrintfLib'); // loads the EPrintfLib to format the output
|
||||
|
||||
// Prints the main error message
|
||||
$this->eprintflib->printError('You are not allowed to access to this content');
|
||||
// Prints the called controller name
|
||||
$this->eprintflib->printInfo('Controller name: '.$this->router->class);
|
||||
// Prints the called controller method name
|
||||
$this->eprintflib->printInfo('Method name: '.$this->router->method);
|
||||
// Prints the required permissions needed to access to this method
|
||||
$this->eprintflib->printInfo('Required permissions: '.$this->_rpsToString($requiredPermissions, $this->router->method));
|
||||
|
||||
exit; // immediately terminate the execution
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts an array of permissions to a string that contains them as a comma separated list
|
||||
* Ex: "<permission 1>, <permission 2>, <permission 3>"
|
||||
*/
|
||||
private function _rpsToString($requiredPermissions, $method)
|
||||
{
|
||||
$strRequiredPermissions = ''; // string that contains all the required permissions needed to access to this method
|
||||
|
||||
if (isset($requiredPermissions[$method])) // if the called method is present in the permissions array
|
||||
{
|
||||
// If it is NOT then convert it into an array
|
||||
$rpsMethod = $requiredPermissions[$method];
|
||||
if (!is_array($rpsMethod))
|
||||
{
|
||||
$rpsMethod = array($rpsMethod);
|
||||
}
|
||||
|
||||
// Copy all the permissions into $strRequiredPermissions separated by a comma
|
||||
for ($i = 0; $i < count($rpsMethod); $i++)
|
||||
{
|
||||
$strRequiredPermissions .= $rpsMethod[$i].', ';
|
||||
}
|
||||
|
||||
$strRequiredPermissions = rtrim($strRequiredPermissions, ', ');
|
||||
}
|
||||
|
||||
return $strRequiredPermissions;
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,8 @@
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
use \DateTime as DateTime;
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Collection of utility functions for general purpose
|
||||
// ------------------------------------------------------------------------
|
||||
@@ -405,3 +407,17 @@ function findResource($path, $resource, $subdir = false, $extraDir = null)
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* check if String can be converted to a date
|
||||
*/
|
||||
function isValidDate($dateString)
|
||||
{
|
||||
try
|
||||
{
|
||||
return (new DateTime($dateString)) !== false;
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -595,6 +595,8 @@ class DmsLib
|
||||
if (isError($insDmsResult)) return $insDmsResult;
|
||||
|
||||
$upload_data['dms_id'] = getData($insDmsResult);
|
||||
if(isset($upload_data['file_type']) && !isset($dms['mimetype']))
|
||||
$dms['mimetype'] = $upload_data['file_type'];
|
||||
|
||||
// Insert DMS version
|
||||
$insVersionResult = $this->_ci->DmsVersionModel->insert(
|
||||
|
||||
@@ -0,0 +1,356 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* FH-Complete
|
||||
*
|
||||
* @package FHC-Helper
|
||||
* @author FHC-Team
|
||||
* @copyright Copyright (c) 2023 fhcomplete.net
|
||||
* @license GPLv3
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class PrestudentLib
|
||||
{
|
||||
|
||||
/**
|
||||
* Object initialization
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->_ci =& get_instance();
|
||||
|
||||
// // Configs
|
||||
// $this->_ci->load->config('studierendenantrag');
|
||||
|
||||
// // Models
|
||||
$this->_ci->load->model('crm/Prestudent_model', 'PrestudentModel');
|
||||
$this->_ci->load->model('crm/Student_model', 'StudentModel');
|
||||
$this->_ci->load->model('crm/Prestudentstatus_model', 'PrestudentstatusModel');
|
||||
$this->_ci->load->model('education/Zeugnisnote_model', 'ZeugnisnoteModel');
|
||||
$this->_ci->load->model('organisation/Lehrverband_model', 'LehrverbandModel');
|
||||
$this->_ci->load->model('education/Studentlehrverband_model', 'StudentlehrverbandModel');
|
||||
$this->_ci->load->model('person/Benutzer_model', 'BenutzerModel');
|
||||
|
||||
}
|
||||
|
||||
public function setAbbrecher($prestudent_id, $studiensemester_kurzbz, $insertvon = null)
|
||||
{
|
||||
if (!$insertvon)
|
||||
$insertvon = getAuthUID();
|
||||
|
||||
$result = $this->_ci->PrestudentstatusModel->getLastStatus($prestudent_id, $studiensemester_kurzbz);
|
||||
if (isError($result))
|
||||
return $result;
|
||||
$result = getData($result);
|
||||
if (!$result)
|
||||
return error('Kein Prestudent in diesem Studiensemester gefunden');
|
||||
|
||||
$prestudent_status = current($result);
|
||||
|
||||
$result = $this->_ci->StudentModel->loadWhere(['prestudent_id' => $prestudent_id]);
|
||||
|
||||
if (isError($result))
|
||||
return $result;
|
||||
$result = getData($result);
|
||||
if (!$result)
|
||||
return error('No student found for ' . $prestudent_id);
|
||||
|
||||
$student = current($result);
|
||||
|
||||
//Status updaten
|
||||
$result = $this->_ci->PrestudentstatusModel->insert([
|
||||
'prestudent_id' => $prestudent_id,
|
||||
'status_kurzbz' => Prestudentstatus_model::STATUS_ABBRECHER,
|
||||
'studiensemester_kurzbz' => $studiensemester_kurzbz,
|
||||
'ausbildungssemester' => $prestudent_status->ausbildungssemester,
|
||||
'datum' => date('c'),
|
||||
'insertvon' => $insertvon,
|
||||
'insertamum' => date('c'),
|
||||
'orgform_kurzbz'=> $prestudent_status->orgform_kurzbz,
|
||||
'studienplan_id'=> $prestudent_status->studienplan_id,
|
||||
'bestaetigtvon' => $insertvon,
|
||||
'bestaetigtam' => date('c')
|
||||
]);
|
||||
|
||||
if (isError($result))
|
||||
return $result;
|
||||
|
||||
//Verband anlegen
|
||||
$result = $this->_ci->LehrverbandModel->load([
|
||||
'studiengang_kz' => $student->studiengang_kz,
|
||||
'semester' => 0,
|
||||
'verband' => 'A',
|
||||
'gruppe' => ''
|
||||
]);
|
||||
|
||||
if (isError($result))
|
||||
return $result;
|
||||
$result = getData($result);
|
||||
if (!$result)
|
||||
{
|
||||
$result = $this->_ci->LehrverbandModel->load([
|
||||
'studiengang_kz' => $student->studiengang_kz,
|
||||
'semester' => 0,
|
||||
'verband' => '',
|
||||
'gruppe' => ''
|
||||
]);
|
||||
if (isError($result))
|
||||
return $result;
|
||||
$result = getData($result);
|
||||
|
||||
if(!$result)
|
||||
{
|
||||
$this->_ci->LehrverbandModel->insert([
|
||||
'studiengang_kz' => $student->studiengang_kz,
|
||||
'semester' => 0,
|
||||
'verband' => '',
|
||||
'gruppe' => '',
|
||||
'bezeichnung' => 'Ab-Unterbrecher',
|
||||
'aktiv' => true,
|
||||
]);
|
||||
}
|
||||
|
||||
$this->_ci->LehrverbandModel->insert([
|
||||
'studiengang_kz' => $student->studiengang_kz,
|
||||
'semester' => 0,
|
||||
'verband' => 'A',
|
||||
'gruppe' => '',
|
||||
'bezeichnung' => 'Abbrecher',
|
||||
'aktiv' => true
|
||||
]);
|
||||
}
|
||||
|
||||
//noch nicht eingetragene Zeugnisnoten auf 9 setzen
|
||||
$result = $this->_ci->ZeugnisnoteModel->getZeugnisnoten($student->student_uid, $studiensemester_kurzbz);
|
||||
if (isError($result))
|
||||
return $result;
|
||||
$result = getData($result) ?: [];
|
||||
|
||||
foreach ($result as $lv)
|
||||
{
|
||||
if (!$lv->note)
|
||||
{
|
||||
$result = $this->_ci->ZeugnisnoteModel->insert([
|
||||
'note' => 9,
|
||||
'studiensemester_kurzbz' => $lv->studiensemester_kurzbz,
|
||||
'student_uid' => $lv->uid,
|
||||
'lehrveranstaltung_id' => $lv->lehrveranstaltung_id
|
||||
]);
|
||||
if (isError($result)) {
|
||||
$result = $this->_ci->ZeugnisnoteModel->update([
|
||||
'studiensemester_kurzbz' => $lv->studiensemester_kurzbz,
|
||||
'student_uid' => $lv->uid,
|
||||
'lehrveranstaltung_id' => $lv->lehrveranstaltung_id
|
||||
],[
|
||||
'note' => 9
|
||||
]);
|
||||
|
||||
if (isError($result))
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Update Aktionen
|
||||
|
||||
//StudentModel updaten
|
||||
$this->_ci->StudentModel->update([
|
||||
'student_uid' => $student->student_uid
|
||||
], [
|
||||
'verband' => 'A',
|
||||
'gruppe' => '',
|
||||
'semester' => 0,
|
||||
'updatevon' => $insertvon,
|
||||
'updateamum' => date('c')
|
||||
]);
|
||||
|
||||
//Studentlehrverband setzen
|
||||
$this->_ci->StudentlehrverbandModel->update([
|
||||
'studiensemester_kurzbz' => $studiensemester_kurzbz,
|
||||
'student_uid' => $student->student_uid
|
||||
],[
|
||||
'studiengang_kz' => $student->studiengang_kz,
|
||||
'semester' => 0,
|
||||
'verband' => 'A',
|
||||
'gruppe' => '',
|
||||
'updateamum' => date('c'),
|
||||
'updatevon' => $insertvon
|
||||
]);
|
||||
|
||||
//Benutzer inaktiv setzen
|
||||
$this->_ci->BenutzerModel->update([
|
||||
'uid' => $student->student_uid
|
||||
],[
|
||||
'aktiv' => false,
|
||||
'updateaktivvon' => $insertvon,
|
||||
'updateaktivam' => date('c'),
|
||||
'updatevon' => $insertvon,
|
||||
'updateamum' => date('c')
|
||||
]);
|
||||
|
||||
return success();
|
||||
}
|
||||
|
||||
public function setUnterbrecher($prestudent_id, $studiensemester_kurzbz, $studierendenantrag_id, $insertvon = null)
|
||||
{
|
||||
if (!$insertvon)
|
||||
$insertvon = getAuthUID();
|
||||
|
||||
$result = $this->_ci->PrestudentstatusModel->getLastStatus($prestudent_id, $studiensemester_kurzbz);
|
||||
if (isError($result))
|
||||
return $result;
|
||||
$result = getData($result);
|
||||
if (!$result)
|
||||
return error('Kein Prestudent in diesem Studiensemester gefunden');
|
||||
|
||||
$prestudent_status = current($result);
|
||||
|
||||
$result = $this->_ci->StudentModel->loadWhere(['prestudent_id' => $prestudent_id]);
|
||||
|
||||
if (isError($result))
|
||||
return $result;
|
||||
$result = getData($result);
|
||||
if (!$result)
|
||||
return error('No student found for ' . $prestudent_id);
|
||||
|
||||
$student = current($result);
|
||||
|
||||
$resultAntrag = $this->_ci->StudierendenantragModel->load($studierendenantrag_id);
|
||||
if (isError($resultAntrag))
|
||||
return $resultAntrag;
|
||||
$resultAntrag = getData($resultAntrag);
|
||||
if (!$resultAntrag)
|
||||
return error('No antrag found with id: ' . $studierendenantrag_id);
|
||||
|
||||
$antrag = current($resultAntrag);
|
||||
|
||||
//Status updaten
|
||||
$result = $this->_ci->PrestudentstatusModel->insert([
|
||||
'prestudent_id' => $prestudent_id,
|
||||
'status_kurzbz' => Prestudentstatus_model::STATUS_UNTERBRECHER,
|
||||
'studiensemester_kurzbz' => $studiensemester_kurzbz,
|
||||
'ausbildungssemester' => $prestudent_status->ausbildungssemester,
|
||||
'datum' => date('c'),
|
||||
'insertvon' => $insertvon,
|
||||
'insertamum' => date('c'),
|
||||
'orgform_kurzbz'=> $prestudent_status->orgform_kurzbz,
|
||||
'studienplan_id'=> $prestudent_status->studienplan_id,
|
||||
'bestaetigtvon' => $insertvon,
|
||||
'bestaetigtam' => date('c'),
|
||||
'anmerkung'=> 'Wiedereinstieg ' . $antrag->datum_wiedereinstieg
|
||||
]);
|
||||
|
||||
//error try manu
|
||||
if (isError($result))
|
||||
return $result;
|
||||
|
||||
//Verband anlegen
|
||||
$result = $this->_ci->LehrverbandModel->load([
|
||||
'studiengang_kz' => $student->studiengang_kz,
|
||||
'semester' => 0,
|
||||
'verband' => 'B',
|
||||
'gruppe' => ''
|
||||
]);
|
||||
|
||||
if (isError($result))
|
||||
return $result;
|
||||
$result = getData($result);
|
||||
if (!$result)
|
||||
{
|
||||
$result = $this->_ci->LehrverbandModel->load([
|
||||
'studiengang_kz' => $student->studiengang_kz,
|
||||
'semester' => 0,
|
||||
'verband' => '',
|
||||
'gruppe' => ''
|
||||
]);
|
||||
if (isError($result))
|
||||
return $result;
|
||||
$result = getData($result);
|
||||
|
||||
if(!$result)
|
||||
{
|
||||
$this->_ci->LehrverbandModel->insert([
|
||||
'studiengang_kz' => $student->studiengang_kz,
|
||||
'semester' => 0,
|
||||
'verband' => '',
|
||||
'gruppe' => '',
|
||||
'bezeichnung' => 'Ab-Unterbrecher',
|
||||
'aktiv' => true,
|
||||
]);
|
||||
}
|
||||
|
||||
$this->_ci->LehrverbandModel->insert([
|
||||
'studiengang_kz' => $student->studiengang_kz,
|
||||
'semester' => 0,
|
||||
'verband' => 'B',
|
||||
'gruppe' => '',
|
||||
'bezeichnung' => 'Unterbrecher',
|
||||
'aktiv' => true
|
||||
]);
|
||||
}
|
||||
|
||||
//noch nicht eingetragene Zeugnisnoten auf 9 setzen
|
||||
$result = $this->_ci->ZeugnisnoteModel->getZeugnisnoten($student->student_uid, $studiensemester_kurzbz);
|
||||
if (isError($result))
|
||||
return $result;
|
||||
$result = getData($result) ?: [];
|
||||
|
||||
foreach ($result as $lv)
|
||||
{
|
||||
if (!$lv->note)
|
||||
{
|
||||
$result = $this->_ci->ZeugnisnoteModel->insert([
|
||||
'note' => 9,
|
||||
'studiensemester_kurzbz' => $lv->studiensemester_kurzbz,
|
||||
'student_uid' => $lv->uid,
|
||||
'lehrveranstaltung_id' => $lv->lehrveranstaltung_id
|
||||
]);
|
||||
if (isError($result)) {
|
||||
$result = $this->_ci->ZeugnisnoteModel->update([
|
||||
'studiensemester_kurzbz' => $lv->studiensemester_kurzbz,
|
||||
'student_uid' => $lv->uid,
|
||||
'lehrveranstaltung_id' => $lv->lehrveranstaltung_id
|
||||
],[
|
||||
'note' => 9
|
||||
]);
|
||||
|
||||
if (isError($result))
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Update Aktionen
|
||||
|
||||
//StudentModel updaten
|
||||
$this->_ci->StudentModel->update([
|
||||
'student_uid' => $student->student_uid
|
||||
], [
|
||||
'verband' => 'B',
|
||||
'gruppe' => '',
|
||||
'semester' => 0,
|
||||
'updatevon' => $insertvon,
|
||||
'updateamum' => date('c')
|
||||
]);
|
||||
|
||||
//Studentlehrverband setzen
|
||||
$this->_ci->StudentlehrverbandModel->update([
|
||||
'studiensemester_kurzbz' => $studiensemester_kurzbz,
|
||||
'student_uid' => $student->student_uid
|
||||
],[
|
||||
'studiengang_kz' => $student->studiengang_kz,
|
||||
'semester' => 0,
|
||||
'verband' => 'B',
|
||||
'gruppe' => '',
|
||||
'updateamum' => date('c'),
|
||||
'updatevon' => $insertvon
|
||||
]);
|
||||
|
||||
return success();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -100,8 +100,8 @@ class Konto_model extends DB_Model
|
||||
|
||||
public function checkStudienbeitrag($uid, $stsem, $buchungstypen)
|
||||
{
|
||||
$query = 'SELECT tbl_konto.buchungsnr,
|
||||
tbl_konto.buchungsdatum
|
||||
$query = 'SELECT tbl_konto.buchungsnr,
|
||||
tbl_konto.buchungsdatum
|
||||
FROM public.tbl_konto,
|
||||
public.tbl_benutzer,
|
||||
public.tbl_student
|
||||
@@ -117,10 +117,47 @@ class Konto_model extends DB_Model
|
||||
FROM public.tbl_konto skonto
|
||||
WHERE skonto.buchungsnr = tbl_konto.buchungsnr_verweis
|
||||
OR skonto.buchungsnr_verweis = tbl_konto.buchungsnr_verweis
|
||||
)
|
||||
)
|
||||
ORDER BY buchungsnr DESC LIMIT 1
|
||||
';
|
||||
|
||||
return $this->execQuery($query);
|
||||
}
|
||||
|
||||
/**
|
||||
* check if student has paid studienbeitrag for certain semester
|
||||
*
|
||||
* @param $person_id person_id
|
||||
* @param $stsem stsem
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function checkStudienbeitragFromPerson($person_id, $stsem)
|
||||
{
|
||||
$this->addOrder('buchungsnr');
|
||||
$this->addLimit(1);
|
||||
$result = $this->loadWhere([
|
||||
'person_id'=>$person_id,
|
||||
'studiensemester_kurzbz' => $stsem,
|
||||
'buchungstyp_kurzbz' => 'Studiengebuehr'
|
||||
]);
|
||||
|
||||
if (!getData($result))
|
||||
return false;
|
||||
|
||||
$data = getData($result)[0];
|
||||
|
||||
$this->resetQuery();
|
||||
|
||||
$this->addSelect('sum(betrag) as differenz');
|
||||
$this->db->or_where('buchungsnr', $data->buchungsnr);
|
||||
$this->db->or_where('buchungsnr_verweis', $data->buchungsnr);
|
||||
|
||||
$result = $this->load();
|
||||
if (!getData($result))
|
||||
return false;
|
||||
|
||||
$data = getData($result)[0];
|
||||
return $data->differenz >= 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
class Prestudentstatus_model extends DB_Model
|
||||
{
|
||||
|
||||
const STATUS_ABBRECHER = 'Abbrecher';
|
||||
const STATUS_UNTERBRECHER = 'Unterbrecher';
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
@@ -226,4 +230,90 @@ class Prestudentstatus_model extends DB_Model
|
||||
|
||||
return $this->execQuery($query, $parametersArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* get Email of relevant Studiengang of prestudent
|
||||
*/
|
||||
public function getLastStatusWithStgEmail($prestudent_id, $studiensemester_kurzbz = '', $status_kurzbz = '')
|
||||
{
|
||||
$this->addSelect('tbl_prestudentstatus.*,
|
||||
tbl_studienplan.bezeichnung AS studienplan_bezeichnung,
|
||||
tbl_studienplan.orgform_kurzbz AS orgform,
|
||||
tbl_studienplan.sprache,
|
||||
tbl_orgform.bezeichnung_mehrsprachig AS bezeichnung_orgform,
|
||||
tbl_status.bezeichnung_mehrsprachig,
|
||||
tbl_status_grund.bezeichnung_mehrsprachig AS bezeichnung_statusgrund,
|
||||
tbl_studiengang.email');
|
||||
$this->addJoin('lehre.tbl_studienplan', 'studienplan_id', 'LEFT');
|
||||
$this->addJoin('lehre.tbl_studienordnung', 'studienordnung_id', 'LEFT');
|
||||
$this->addJoin('public.tbl_studiengang', 'studiengang_kz', 'LEFT');
|
||||
$this->addJoin('public.tbl_status', 'tbl_status.status_kurzbz = tbl_prestudentstatus.status_kurzbz');
|
||||
$this->addJoin('public.tbl_status_grund', 'statusgrund_id', 'LEFT');
|
||||
$this->addJoin('bis.tbl_orgform', 'tbl_studienplan.orgform_kurzbz = tbl_orgform.orgform_kurzbz', 'LEFT');
|
||||
$this->db->where('tbl_status.status_kurzbz = tbl_prestudentstatus.status_kurzbz');
|
||||
|
||||
$where = array('prestudent_id' => $prestudent_id);
|
||||
if ($studiensemester_kurzbz)
|
||||
$where['studiensemester_kurzbz'] = $studiensemester_kurzbz;
|
||||
if ($status_kurzbz)
|
||||
$where['tbl_prestudentstatus.status_kurzbz'] = $status_kurzbz;
|
||||
|
||||
$this->addOrder('datum', 'DESC');
|
||||
$this->addOrder('insertamum', 'DESC');
|
||||
$this->addOrder('ext_id', 'DESC');
|
||||
$this->addLimit(1);
|
||||
|
||||
return $this->loadWhere($where);
|
||||
}
|
||||
|
||||
public function loadLastWithStgDetails($prestudent_id, $studiensemester_kurzbz = null)
|
||||
{
|
||||
$this->load->config('studierendenantrag');
|
||||
|
||||
$lang = getUserLanguage();
|
||||
|
||||
$this->addSelect($this->dbTable . '.prestudent_id');
|
||||
$this->addSelect($this->dbTable . '.ausbildungssemester AS semester');
|
||||
$this->addSelect($this->dbTable . '.studiensemester_kurzbz');
|
||||
$this->addSelect('s.matrikelnr');
|
||||
$this->addSelect('ss.studienjahr_kurzbz');
|
||||
$this->addSelect('pers.vorname');
|
||||
$this->addSelect('pers.nachname');
|
||||
$this->addSelect('TRIM(CONCAT(pers.vorname, \' \', pers.nachname)) AS name');
|
||||
$this->addSelect('pers.person_id');
|
||||
$this->addSelect('g.studiengang_kz');
|
||||
$this->addSelect('g.bezeichnung');
|
||||
$this->addSelect('o.orgform_kurzbz');
|
||||
$this->addSelect(
|
||||
'o.bezeichnung_mehrsprachig[(SELECT index FROM public.tbl_sprache WHERE sprache=\'' . $lang . '\')] AS orgform_bezeichnung',
|
||||
false
|
||||
);
|
||||
|
||||
$this->addJoin('public.tbl_student s', 'prestudent_id');
|
||||
$this->addJoin('public.tbl_prestudent p', 'prestudent_id');
|
||||
$this->addJoin('public.tbl_studiensemester ss', 'studiensemester_kurzbz');
|
||||
$this->addJoin('public.tbl_person pers', 'person_id');
|
||||
$this->addJoin('public.tbl_studiengang g', 'p.studiengang_kz=g.studiengang_kz');
|
||||
$this->addJoin('bis.tbl_orgform o', 'g.orgform_kurzbz=o.orgform_kurzbz');
|
||||
|
||||
$this->addOrder($this->dbTable . '.datum', 'DESC');
|
||||
$this->addOrder($this->dbTable . '.insertamum', 'DESC');
|
||||
$this->addOrder($this->dbTable . '.ext_id', 'DESC');
|
||||
|
||||
$this->addLimit(1);
|
||||
|
||||
$this->db->where_in($this->dbTable . '.status_kurzbz', $this->config->item('antrag_prestudentstatus_whitelist'));
|
||||
|
||||
$whereArr = [
|
||||
$this->dbTable . '.prestudent_id' => $prestudent_id,
|
||||
'g.aktiv' => true
|
||||
];
|
||||
|
||||
if ($studiensemester_kurzbz !== null)
|
||||
{
|
||||
$whereArr[$this->dbTable. '.studiensemester_kurzbz'] = $studiensemester_kurzbz;
|
||||
}
|
||||
|
||||
return $this->loadWhere($whereArr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,11 +29,148 @@ class Pruefung_model extends DB_Model
|
||||
JOIN lehre.tbl_pruefung prfg USING (student_uid)
|
||||
JOIN lehre.tbl_lehreinheit le USING (lehreinheit_id)
|
||||
JOIN lehre.tbl_lehrveranstaltung lv USING (lehrveranstaltung_id)
|
||||
JOIN public.tbl_studiengang stg ON prst.studiengang_kz = stg.studiengang_kz
|
||||
JOIN public.tbl_studiengang stg ON prst.studiengang_kz = stg.studiengang_kz
|
||||
WHERE pers.person_id = ?
|
||||
AND le.studiensemester_kurzbz = ?
|
||||
ORDER BY prfg.datum, pruefung_id';
|
||||
|
||||
return $this->execQuery($qry, array($person_id, $studiensemester_kurzbz));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param integer $prestudent_id student_uid
|
||||
*
|
||||
* @return stdClass
|
||||
*/
|
||||
public function loadWhereCommitteeExamFailedForPrestudent($prestudent_id)
|
||||
{
|
||||
$this->load->config('studierendenantrag');
|
||||
|
||||
$this->dbTable = 'lehre.tbl_pruefung p';
|
||||
|
||||
$this->addSelect('p.datum');
|
||||
$this->addSelect('pers.vorname');
|
||||
$this->addSelect('pers.nachname');
|
||||
$this->addSelect('s.matrikelnr');
|
||||
$this->addSelect('g.bezeichnung');
|
||||
$this->addSelect('g.studiengang_kz');
|
||||
$this->addSelect('o.bezeichnung_mehrsprachig');
|
||||
$this->addSelect('ps.prestudent_id');
|
||||
$this->addSelect('lv.bezeichnung as lvbezeichnung');
|
||||
$this->addSelect('le.studiensemester_kurzbz');
|
||||
$this->addSelect('a.typ');
|
||||
$this->addSelect('campus.get_status_studierendenantrag(a.studierendenantrag_id) status');
|
||||
|
||||
$this->addJoin('lehre.tbl_note n', 'note');
|
||||
$this->addJoin('lehre.tbl_lehreinheit le', 'lehreinheit_id');
|
||||
$this->addJoin('lehre.tbl_lehrveranstaltung lv', 'lehrveranstaltung_id');
|
||||
$this->addJoin('public.tbl_student s', 'student_uid');
|
||||
$this->addJoin('public.tbl_prestudent ps', 'prestudent_id');
|
||||
$this->addJoin('public.tbl_person pers', 'person_id');
|
||||
$this->addJoin('public.tbl_studiengang g', 'ps.studiengang_kz=g.studiengang_kz');
|
||||
$this->addJoin('bis.tbl_orgform o', 'g.orgform_kurzbz=o.orgform_kurzbz');
|
||||
$this->addJoin('campus.tbl_studierendenantrag a', 'ps.prestudent_id=a.prestudent_id', 'LEFT');
|
||||
|
||||
$this->db->where("n.positiv", false);
|
||||
$this->db->where("p.pruefungstyp_kurzbz", 'kommPruef');
|
||||
$this->db->where("ps.prestudent_id", $prestudent_id);
|
||||
$this->db->where_in("get_rolle_prestudent(ps.prestudent_id, NULL)", $this->config->item('antrag_prestudentstatus_whitelist'));
|
||||
$this->db->where("g.aktiv", true);
|
||||
|
||||
$this->db->where('lv.studiengang_kz not in(
|
||||
SELECT ps.studiengang_kz
|
||||
FROM
|
||||
public.tbl_student s
|
||||
JOIN public.tbl_prestudent ps USING (prestudent_id)
|
||||
JOIN public.tbl_prestudentstatus pss USING (prestudent_id)
|
||||
WHERE pss.statusgrund_id in ?
|
||||
and ps.prestudent_id = ?)', null, false);
|
||||
|
||||
$sql = $this->db->get_compiled_select($this->dbTable);
|
||||
|
||||
return $this->execQuery($sql, [$this->config->item('status_gruende_wiederholer'), $prestudent_id]);
|
||||
}
|
||||
|
||||
public function getAllPrestudentsWhereCommitteeExamFailed($status, $maxDate, $minDate)
|
||||
{
|
||||
$this->load->config('studierendenantrag');
|
||||
$this->load->model('education/Studierendenantrag_model', 'StudierendenantragModel');
|
||||
|
||||
$this->dbTable = 'lehre.tbl_pruefung p';
|
||||
|
||||
$sprache_index = "SELECT index FROM public.tbl_sprache WHERE sprache='" . getUserLanguage() . "' LIMIT 1";
|
||||
|
||||
$this->addSelect('p.datum');
|
||||
$this->addSelect('pers.vorname');
|
||||
$this->addSelect('pers.nachname');
|
||||
$this->addSelect('pers.person_id');
|
||||
$this->addSelect('s.matrikelnr');
|
||||
$this->addSelect('g.bezeichnung');
|
||||
$this->addSelect('g.studiengang_kz');
|
||||
$this->addSelect('o.bezeichnung_mehrsprachig[(' . $sprache_index . ')] AS orgform', false);
|
||||
$this->addSelect('ps.prestudent_id');
|
||||
$this->addSelect('lv.bezeichnung as lvbezeichnung');
|
||||
$this->addSelect('le.studiensemester_kurzbz');
|
||||
$this->addSelect('a.typ');
|
||||
$this->addSelect('campus.get_status_studierendenantrag(a.studierendenantrag_id) status');
|
||||
|
||||
$this->addJoin('lehre.tbl_note n', 'note');
|
||||
$this->addJoin('lehre.tbl_lehreinheit le', 'lehreinheit_id');
|
||||
$this->addJoin('lehre.tbl_lehrveranstaltung lv', 'lehrveranstaltung_id');
|
||||
$this->addJoin('public.tbl_student s', 'student_uid');
|
||||
$this->addJoin('public.tbl_prestudent ps', 'prestudent_id');
|
||||
$this->addJoin('public.tbl_person pers', 'person_id');
|
||||
$this->addJoin('public.tbl_benutzer b', 's.student_uid=b.uid');
|
||||
$this->addJoin('public.tbl_studiengang g', 'ps.studiengang_kz=g.studiengang_kz');
|
||||
$this->addJoin('bis.tbl_orgform o', 'g.orgform_kurzbz=o.orgform_kurzbz');
|
||||
$this->db->join('campus.tbl_studierendenantrag a', 'ps.prestudent_id=a.prestudent_id and a.typ = ?', 'LEFT', false);
|
||||
|
||||
$this->db->where("n.positiv", false);
|
||||
$this->db->where("p.pruefungstyp_kurzbz", 'kommPruef');
|
||||
$this->db->where_in("get_rolle_prestudent(ps.prestudent_id, null)", $this->config->item('antrag_prestudentstatus_whitelist'));
|
||||
|
||||
if ($maxDate)
|
||||
$this->db->where("p.datum < ", $maxDate->format('c'));
|
||||
if ($minDate)
|
||||
$this->db->where("p.datum > ", $minDate->format('c'));
|
||||
$this->db->where("g.aktiv", true);
|
||||
$this->db->where("b.aktiv", true);
|
||||
|
||||
$this->db->where('lv.studiengang_kz not in(
|
||||
SELECT ps.studiengang_kz
|
||||
FROM
|
||||
public.tbl_prestudent ps1
|
||||
JOIN public.tbl_prestudentstatus pss USING (prestudent_id)
|
||||
WHERE pss.statusgrund_id in ?
|
||||
AND ps.prestudent_id = ps1.prestudent_id)', null, false);
|
||||
|
||||
// NOTE(chris): is Wiederholer without set statusgrund (legacy?)
|
||||
$this->db->where('(SELECT COUNT(*) FROM (SELECT DISTINCT studiensemester_kurzbz FROM tbl_prestudentstatus _s WHERE ausbildungssemester=get_absem_prestudent(ps.prestudent_id, le.studiensemester_kurzbz) AND prestudent_id=ps.prestudent_id) a) = 1', null, false);
|
||||
|
||||
if (is_array($status)) {
|
||||
if (in_array(null, $status)) {
|
||||
$status = array_filter($status);
|
||||
if (count($status)) {
|
||||
$this->db->group_start();
|
||||
$this->db->where_in('campus.get_status_studierendenantrag(a.studierendenantrag_id)', $status);
|
||||
$this->db->or_where('campus.get_status_studierendenantrag(a.studierendenantrag_id)', null);
|
||||
$this->db->group_end();
|
||||
} else {
|
||||
$this->db->where('campus.get_status_studierendenantrag(a.studierendenantrag_id)', null);
|
||||
}
|
||||
} else {
|
||||
$this->db->where_in('campus.get_status_studierendenantrag(a.studierendenantrag_id)', $status);
|
||||
}
|
||||
} else {
|
||||
$this->db->where('campus.get_status_studierendenantrag(a.studierendenantrag_id)', $status);
|
||||
}
|
||||
|
||||
$sql = $this->db->get_compiled_select($this->dbTable);
|
||||
|
||||
$statusgruende = $this->config->item('status_gruende_wiederholer');
|
||||
if (!is_array($statusgruende))
|
||||
$statusgruende = [];
|
||||
|
||||
return $this->execQuery($sql, [Studierendenantrag_model::TYP_WIEDERHOLUNG, $statusgruende]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,229 @@
|
||||
<?php
|
||||
class Studierendenantrag_model extends DB_Model
|
||||
{
|
||||
|
||||
const TYP_ABMELDUNG = 'Abmeldung';
|
||||
const TYP_UNTERBRECHUNG = 'Unterbrechung';
|
||||
const TYP_WIEDERHOLUNG = 'Wiederholung';
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->dbTable = 'campus.tbl_studierendenantrag';
|
||||
$this->pk = 'studierendenantrag_id';
|
||||
|
||||
$this->load->config('studierendenantrag');
|
||||
|
||||
$this->load->model('education/Studierendenantragstatus_model', 'StudierendenantragstatusModel');
|
||||
}
|
||||
|
||||
public function loadCreatedForStudiengaenge($studiengaenge, $typ)
|
||||
{
|
||||
return $this->loadForStudiengaenge($studiengaenge, $typ, $this->StudierendenantragstatusModel::STATUS_CREATED);
|
||||
}
|
||||
|
||||
public function loadForStudiengaenge($studiengaenge, $typ = null, $status = null)
|
||||
{
|
||||
$sql = "SELECT index FROM public.tbl_sprache WHERE sprache='" . getUserLanguage() . "' LIMIT 1";
|
||||
|
||||
$this->addSelect('stg.bezeichnung');
|
||||
$this->addSelect('bezeichnung_mehrsprachig[(' . $sql . ')] AS orgform', false);
|
||||
$this->addSelect('s.studierendenantrag_id');
|
||||
$this->addSelect('matrikelnr');
|
||||
$this->addSelect('studienjahr_kurzbz');
|
||||
$this->addSelect('vorname');
|
||||
$this->addSelect('nachname');
|
||||
$this->addSelect('prestudent_id');
|
||||
$this->addSelect('p.studiengang_kz');
|
||||
$this->addSelect('semester');
|
||||
$this->addSelect($this->dbTable . '.grund');
|
||||
$this->addSelect('datum');
|
||||
$this->addSelect('datum_wiedereinstieg');
|
||||
$this->addSelect($this->dbTable . '.typ');
|
||||
$this->addSelect('st.studierendenantrag_statustyp_kurzbz as status');
|
||||
$this->addSelect('dms_id');
|
||||
$this->addSelect('st.bezeichnung[(' . $sql . ')] as statustyp');
|
||||
|
||||
$this->addJoin('public.tbl_prestudent p', 'prestudent_id');
|
||||
$this->addJoin('public.tbl_student', 'prestudent_id');
|
||||
$this->addJoin('public.tbl_person', 'person_id');
|
||||
$this->addJoin('public.tbl_studiengang stg', 'p.studiengang_kz=stg.studiengang_kz');
|
||||
$this->addJoin('public.tbl_studiensemester', 'studiensemester_kurzbz');
|
||||
$this->addJoin('bis.tbl_orgform', 'orgform_kurzbz');
|
||||
$this->addJoin('campus.tbl_studierendenantrag_status as s','campus.get_status_id_studierendenantrag('.$this->dbTable .'.studierendenantrag_id) = studierendenantrag_status_id' );
|
||||
$this->addJoin('campus.tbl_studierendenantrag_statustyp as st','studierendenantrag_statustyp_kurzbz' );
|
||||
|
||||
$this->db->where_in('p.studiengang_kz', $studiengaenge);
|
||||
|
||||
$where = [];
|
||||
if ($status !== null)
|
||||
$where['st.studierendenantrag_statustyp_kurzbz'] = $status;
|
||||
if ($typ !== null)
|
||||
$where[$this->dbTable . '.typ'] = $typ;
|
||||
|
||||
return $this->loadWhere($where);
|
||||
}
|
||||
|
||||
public function isInStudiengang($studierendenantrag_id, $studiengaenge)
|
||||
{
|
||||
$this->addJoin('public.tbl_prestudent', 'prestudent_id');
|
||||
|
||||
$this->db->where_in('studiengang_kz', $studiengaenge);
|
||||
|
||||
return $this->load($studierendenantrag_id);
|
||||
}
|
||||
|
||||
public function loadIdAndStatusWhere($where)
|
||||
{
|
||||
$this->addSelect('studierendenantrag_id');
|
||||
$this->addSelect('campus.get_status_studierendenantrag(studierendenantrag_id) status');
|
||||
return $this->loadWhere($where);
|
||||
}
|
||||
|
||||
public function loadWithStatusWhere($where)
|
||||
{
|
||||
$lang = 'SELECT index FROM public.tbl_sprache WHERE sprache=' . $this->escape(getUserLanguage());
|
||||
|
||||
$this->addSelect('*');
|
||||
$this->addSelect('campus.get_status_studierendenantrag(studierendenantrag_id) status');
|
||||
$this->addSelect('t.bezeichnung[(' . $lang . ')] statustyp');
|
||||
|
||||
$this->addJoin(
|
||||
'campus.tbl_studierendenantrag_statustyp t',
|
||||
'campus.get_status_studierendenantrag(studierendenantrag_id)=t.studierendenantrag_statustyp_kurzbz'
|
||||
);
|
||||
|
||||
$this->addOrder('datum', 'DESC');
|
||||
|
||||
return $this->loadWhere($where);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the studiengang and ausbildungssemester the student was in
|
||||
* for the studiensemester the antrag was committed for
|
||||
*
|
||||
* @param integer $antrag_id
|
||||
*
|
||||
* @return stdClass
|
||||
*/
|
||||
public function getStgAndSem($antrag_id)
|
||||
{
|
||||
$this->addSelect('p.studiengang_kz');
|
||||
$this->addSelect('s.ausbildungssemester');
|
||||
$this->addSelect('s.orgform_kurzbz');
|
||||
|
||||
$this->addJoin(
|
||||
'public.tbl_prestudentstatus s',
|
||||
$this->dbTable . '.prestudent_id=s.prestudent_id AND ' . $this->dbTable . '.studiensemester_kurzbz=s.studiensemester_kurzbz'
|
||||
);
|
||||
$this->addJoin('public.tbl_prestudent p', $this->dbTable . '.prestudent_id=p.prestudent_id');
|
||||
|
||||
$this->addOrder('s.datum', 'DESC');
|
||||
$this->addOrder('s.insertamum', 'DESC');
|
||||
$this->addOrder('s.ext_id', 'DESC');
|
||||
|
||||
$this->addLimit(1);
|
||||
|
||||
$this->db->where_in('s.status_kurzbz', $this->config->item('antrag_prestudentstatus_whitelist'));
|
||||
|
||||
return $this->loadWhere([
|
||||
$this->pk => $antrag_id
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the studiengang the student is in
|
||||
*
|
||||
* @param integer $antrag_id
|
||||
*
|
||||
* @return stdClass
|
||||
*/
|
||||
public function getStg($antrag_id)
|
||||
{
|
||||
$this->addSelect('p.studiengang_kz');
|
||||
$this->addJoin('public.tbl_prestudent p', 'prestudent_id');
|
||||
|
||||
$this->addLimit(1);
|
||||
|
||||
return $this->load(
|
||||
$antrag_id
|
||||
);
|
||||
}
|
||||
|
||||
public function getStgEmail($antrag_id)
|
||||
{
|
||||
$this->addJoin('public.tbl_prestudent p', 'prestudent_id');
|
||||
$this->addJoin('public.tbl_studiengang sg', 'studiengang_kz');
|
||||
$this->addSelect('sg.email');
|
||||
|
||||
return $this->load($antrag_id);
|
||||
}
|
||||
|
||||
public function loadForPerson($person_id)
|
||||
{
|
||||
$lang = 'SELECT index FROM public.tbl_sprache WHERE sprache=' . $this->escape(getUserLanguage());
|
||||
$this->addSelect('stg.bezeichnung');
|
||||
$this->addSelect('bezeichnung_mehrsprachig[(' . $lang . ')] as orgform');
|
||||
$this->addSelect('p.studiengang_kz');
|
||||
$this->addSelect('st.studierendenantrag_statustyp_kurzbz as status');
|
||||
$this->addSelect('st.bezeichnung[(' . $lang . ')] as status_bezeichnung');
|
||||
$this->addSelect('p.prestudent_id');
|
||||
$this->addSelect($this->dbTable . '.studierendenantrag_id');
|
||||
$this->addSelect($this->dbTable . '.studiensemester_kurzbz');
|
||||
$this->addSelect($this->dbTable . '.datum');
|
||||
$this->addSelect($this->dbTable . '.typ');
|
||||
$this->addSelect($this->dbTable . '.insertamum');
|
||||
$this->addSelect($this->dbTable . '.insertvon');
|
||||
$this->addSelect($this->dbTable . '.datum_wiedereinstieg');
|
||||
$this->addSelect($this->dbTable . '.grund');
|
||||
$this->addSelect($this->dbTable . '.dms_id');
|
||||
|
||||
$this->addJoin('public.tbl_prestudent p', 'prestudent_id', 'RIGHT');
|
||||
$this->addJoin('public.tbl_studiengang stg', 'p.studiengang_kz=stg.studiengang_kz');
|
||||
$this->addJoin('bis.tbl_orgform', 'orgform_kurzbz');
|
||||
$this->addJoin('campus.tbl_studierendenantrag_statustyp st', 'campus.get_status_studierendenantrag(studierendenantrag_id)=st.studierendenantrag_statustyp_kurzbz','LEFT');
|
||||
|
||||
$this->db->where_in('public.get_rolle_prestudent(p.prestudent_id, null)', $this->config->item('antrag_prestudentstatus_whitelist'));
|
||||
|
||||
return $this->loadWhere([
|
||||
'p.person_id' => $person_id
|
||||
]);
|
||||
}
|
||||
|
||||
public function getAntraegeWhereWiedereinstiegBetween($start, $end)
|
||||
{
|
||||
$this->addSelect('sg.email');
|
||||
$this->addSelect('vorname');
|
||||
$this->addSelect('nachname');
|
||||
$this->addSelect($this->dbTable.'.*');
|
||||
|
||||
$this->addJoin(
|
||||
'campus.tbl_studierendenantrag_status s',
|
||||
'campus.get_status_id_studierendenantrag(' . $this->dbTable . '.studierendenantrag_id)=s.studierendenantrag_status_id'
|
||||
);
|
||||
$this->addJoin('public.tbl_prestudent p', 'prestudent_id');
|
||||
$this->addJoin('public.tbl_person', 'person_id');
|
||||
$this->addJoin('public.tbl_studiengang sg', 'studiengang_kz');
|
||||
|
||||
$this->db->where('datum_wiedereinstieg >=', $start->format('Y-m-d'));
|
||||
$this->db->where('datum_wiedereinstieg <=', $end->format('Y-m-d'));
|
||||
|
||||
return $this->loadWhere([
|
||||
's.studierendenantrag_statustyp_kurzbz' => Studierendenantragstatus_model::STATUS_APPROVED,
|
||||
$this->dbTable.'.typ' => self::TYP_UNTERBRECHUNG,
|
||||
]);
|
||||
}
|
||||
|
||||
public function getWithLastStatusWhere($where)
|
||||
{
|
||||
$this->addJoin(
|
||||
'campus.tbl_studierendenantrag_status s',
|
||||
'campus.get_status_id_studierendenantrag(' . $this->dbTable . '.studierendenantrag_id)=s.studierendenantrag_status_id'
|
||||
);
|
||||
|
||||
return $this->loadWhere($where);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
class Studierendenantraglehrveranstaltung_model extends DB_Model
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->dbTable = 'campus.tbl_studierendenantrag_lehrveranstaltung';
|
||||
$this->pk = 'studierendenantrag_lehrveranstaltung_id';
|
||||
}
|
||||
|
||||
public function insertBatch($data)
|
||||
{
|
||||
// Check class properties
|
||||
if (is_null($this->dbTable)) return error('The given database table name is not valid', EXIT_MODEL);
|
||||
|
||||
// DB-INSERT
|
||||
$insert = $this->db->insert_batch($this->dbTable, $data);
|
||||
|
||||
if ($insert)
|
||||
{
|
||||
return success();
|
||||
}
|
||||
else
|
||||
{
|
||||
return error($this->db->error(), EXIT_DATABASE);
|
||||
}
|
||||
}
|
||||
|
||||
public function deleteWhere($where)
|
||||
{
|
||||
if (is_null($this->dbTable)) return error('The given database table name is not valid', EXIT_MODEL);
|
||||
|
||||
$delete = $this->db->delete($this->dbTable, $where);
|
||||
|
||||
if ($delete)
|
||||
{
|
||||
return success();
|
||||
}
|
||||
else
|
||||
{
|
||||
return error($this->db->error(), EXIT_DATABASE);
|
||||
}
|
||||
}
|
||||
|
||||
public function getLvsForPrestudent($prestudent_id, $studiensemester_kurzbz)
|
||||
{
|
||||
$this->addSelect($this->dbTable . '.*');
|
||||
$this->addSelect('a.prestudent_id');
|
||||
$this->addSelect('lv.bezeichnung as lv_bezeichnung');
|
||||
$this->addSelect('stat.insertamum as freigabedatum');
|
||||
$this->addSelect('n.bezeichnung as note_bezeichnung');
|
||||
$this->addSelect('stg.bezeichnung as stg_bezeichnung');
|
||||
|
||||
$this->addJoin('campus.tbl_studierendenantrag a', 'studierendenantrag_id');
|
||||
$this->addJoin('lehre.tbl_note n', 'note');
|
||||
$this->addJoin('lehre.tbl_lehrveranstaltung lv', 'lehrveranstaltung_id');
|
||||
$this->addJoin('public.tbl_prestudent ps', 'prestudent_id');
|
||||
$this->addJoin('public.tbl_studiengang stg', 'ps.studiengang_kz = stg.studiengang_kz');
|
||||
$this->addJoin(
|
||||
'campus.tbl_studierendenantrag_status stat',
|
||||
'stat.studierendenantrag_status_id = campus.get_status_id_studierendenantrag(a.studierendenantrag_id)'
|
||||
);
|
||||
$this->addJoin('public.tbl_student s', 'prestudent_id');
|
||||
$this->addJoin('lehre.tbl_zeugnisnote z', 'z.lehrveranstaltung_id=lv.lehrveranstaltung_id AND z.student_uid=s.student_uid AND z.studiensemester_kurzbz=a.studiensemester_kurzbz', 'LEFT');
|
||||
|
||||
return $this->loadWhere([
|
||||
'ps.prestudent_id' => $prestudent_id,
|
||||
'a.typ' => Studierendenantrag_model::TYP_WIEDERHOLUNG,
|
||||
'stat.studierendenantrag_statustyp_kurzbz' => Studierendenantragstatus_model::STATUS_APPROVED,
|
||||
'n.note <> ' => 0,
|
||||
$this->dbTable . '.studiensemester_kurzbz' => $studiensemester_kurzbz,
|
||||
'(n.note<>19 OR z.note IS NOT NULL)' => null
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
class Studierendenantragstatus_model extends DB_Model
|
||||
{
|
||||
|
||||
const STATUS_CREATED = 'Erstellt';
|
||||
const STATUS_CREATED_STGL = 'ErstelltStgl';
|
||||
const STATUS_APPROVED = 'Genehmigt';
|
||||
const STATUS_APPROVED_STGL = 'GenehmigtStgl';
|
||||
const STATUS_REJECTED = 'Abgelehnt';
|
||||
const STATUS_PASS = 'Verzichtet';
|
||||
const STATUS_REOPENED = 'Offen';
|
||||
const STATUS_CANCELLED = 'Zurückgezogen';
|
||||
const STATUS_LVSASSIGNED = 'Lvszugewiesen';
|
||||
const STATUS_REMINDERSENT = 'EmailVersandt';
|
||||
const STATUS_REQUESTSENT_1 = 'ErsteAufforderungVersandt';
|
||||
const STATUS_REQUESTSENT_2 = 'ZweiteAufforderungVersandt';
|
||||
const STATUS_OBJECTED = 'Beeinsprucht';
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->dbTable = 'campus.tbl_studierendenantrag_status';
|
||||
$this->pk = 'studierendenantrag_status_id';
|
||||
}
|
||||
|
||||
public function loadWithTyp($studierendenantrag_status_id)
|
||||
{
|
||||
$lang = 'SELECT index FROM public.tbl_sprache WHERE sprache=' . $this->escape(getUserLanguage());
|
||||
|
||||
$this->addSelect($this->dbTable . '.*');
|
||||
$this->addSelect('bezeichnung[(' . $lang . ')] AS typ');
|
||||
|
||||
$this->addJoin('campus.tbl_studierendenantrag_statustyp', 'studierendenantrag_statustyp_kurzbz');
|
||||
|
||||
return $this->load($studierendenantrag_status_id);
|
||||
}
|
||||
|
||||
public function loadWithTypWhere($where)
|
||||
{
|
||||
$lang = 'SELECT index FROM public.tbl_sprache WHERE sprache=' . $this->escape(getUserLanguage());
|
||||
|
||||
$this->addSelect($this->dbTable . '.*');
|
||||
$this->addSelect('bezeichnung[(' . $lang . ')] AS typ');
|
||||
|
||||
$this->addJoin('campus.tbl_studierendenantrag_statustyp', 'studierendenantrag_statustyp_kurzbz');
|
||||
|
||||
return $this->loadWhere($where);
|
||||
}
|
||||
}
|
||||
@@ -102,7 +102,7 @@ class Zeugnisnote_model extends DB_Model
|
||||
JOIN lehre.tbl_zeugnisnote zgnisnote USING (student_uid)
|
||||
JOIN lehre.tbl_note note ON zgnisnote.note = note.note
|
||||
JOIN lehre.tbl_lehrveranstaltung lv USING (lehrveranstaltung_id)
|
||||
JOIN public.tbl_studiengang stg ON prst.studiengang_kz = stg.studiengang_kz
|
||||
JOIN public.tbl_studiengang stg ON prst.studiengang_kz = stg.studiengang_kz
|
||||
WHERE pers.person_id = ?
|
||||
AND zgnisnote.studiensemester_kurzbz = ?";
|
||||
|
||||
@@ -140,4 +140,83 @@ class Zeugnisnote_model extends DB_Model
|
||||
|
||||
return $this->execQuery($qry, $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets courses (Zeugnisnoten) for a student.
|
||||
* @param string $student_uid,
|
||||
* @param string $studiensemester_kurzbz
|
||||
*
|
||||
* @return object
|
||||
*/
|
||||
public function getZeugnisnoten($student_uid, $studiensemester_kurzbz)
|
||||
{
|
||||
$params = array();
|
||||
$where='';
|
||||
|
||||
if ($student_uid != null)
|
||||
{
|
||||
$where .= " AND uid=?";
|
||||
$params[] = $student_uid;
|
||||
}
|
||||
if ($studiensemester_kurzbz !=null)
|
||||
{
|
||||
$where.=" AND vw_student_lehrveranstaltung.studiensemester_kurzbz= ?";
|
||||
$params[] = $studiensemester_kurzbz;
|
||||
}
|
||||
|
||||
$where2='';
|
||||
|
||||
if ($student_uid != null)
|
||||
{
|
||||
$where2 .= " AND student_uid=?";
|
||||
$params[] = $student_uid;
|
||||
}
|
||||
if ($studiensemester_kurzbz !=null)
|
||||
{
|
||||
$where2 .= " AND studiensemester_kurzbz= ?";
|
||||
$params[] = $studiensemester_kurzbz;
|
||||
}
|
||||
|
||||
$qry = "SELECT vw_student_lehrveranstaltung.lehrveranstaltung_id, uid,
|
||||
vw_student_lehrveranstaltung.studiensemester_kurzbz, note, punkte, uebernahmedatum, benotungsdatum,
|
||||
vw_student_lehrveranstaltung.ects, vw_student_lehrveranstaltung.semesterstunden,
|
||||
tbl_zeugnisnote.updateamum, tbl_zeugnisnote.updatevon, tbl_zeugnisnote.insertamum,
|
||||
tbl_zeugnisnote.insertvon, tbl_zeugnisnote.ext_id,
|
||||
vw_student_lehrveranstaltung.bezeichnung as lehrveranstaltung_bezeichnung,
|
||||
vw_student_lehrveranstaltung.bezeichnung_english as lehrveranstaltung_bezeichnung_english,
|
||||
tbl_note.bezeichnung as note_bezeichnung,
|
||||
tbl_note.positiv as note_positiv,
|
||||
tbl_zeugnisnote.bemerkung as bemerkung,
|
||||
vw_student_lehrveranstaltung.sort,
|
||||
vw_student_lehrveranstaltung.zeugnis,
|
||||
vw_student_lehrveranstaltung.studiengang_kz,
|
||||
vw_student_lehrveranstaltung.lv_lehrform_kurzbz,
|
||||
tbl_lehrveranstaltung.sws
|
||||
FROM
|
||||
(
|
||||
campus.vw_student_lehrveranstaltung LEFT JOIN lehre.tbl_zeugnisnote
|
||||
ON(uid=student_uid
|
||||
AND vw_student_lehrveranstaltung.studiensemester_kurzbz=tbl_zeugnisnote.studiensemester_kurzbz
|
||||
AND vw_student_lehrveranstaltung.lehrveranstaltung_id=tbl_zeugnisnote.lehrveranstaltung_id
|
||||
)
|
||||
) LEFT JOIN lehre.tbl_note USING(note)
|
||||
JOIN lehre.tbl_lehrveranstaltung ON(vw_student_lehrveranstaltung.lehrveranstaltung_id=tbl_lehrveranstaltung.lehrveranstaltung_id)
|
||||
WHERE true $where
|
||||
|
||||
UNION
|
||||
SELECT lehre.tbl_lehrveranstaltung.lehrveranstaltung_id,student_uid AS uid,studiensemester_kurzbz, note, punkte,
|
||||
uebernahmedatum, benotungsdatum,lehre.tbl_lehrveranstaltung.ects,lehre.tbl_lehrveranstaltung.semesterstunden, tbl_zeugnisnote.updateamum, tbl_zeugnisnote.updatevon, tbl_zeugnisnote.insertamum,
|
||||
tbl_zeugnisnote.insertvon, tbl_zeugnisnote.ext_id, lehre.tbl_lehrveranstaltung.bezeichnung as lehrveranstaltung_bezeichnung, lehre.tbl_lehrveranstaltung.bezeichnung_english as lehrveranstaltung_bezeichnung_english,
|
||||
tbl_note.bezeichnung as note_bezeichnung, tbl_note.positiv as note_positiv, tbl_zeugnisnote.bemerkung as bemerkung, tbl_lehrveranstaltung.sort, tbl_lehrveranstaltung.zeugnis, tbl_lehrveranstaltung.studiengang_kz,
|
||||
tbl_lehrveranstaltung.lehrform_kurzbz as lv_lehrform_kurzbz, tbl_lehrveranstaltung.sws
|
||||
FROM
|
||||
lehre.tbl_zeugnisnote
|
||||
JOIN lehre.tbl_lehrveranstaltung USING (lehrveranstaltung_id)
|
||||
JOIN lehre.tbl_note USING(note)
|
||||
WHERE true $where2
|
||||
|
||||
ORDER BY sort";
|
||||
|
||||
return $this->execQuery($qry, $params);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -511,10 +511,10 @@ class Studiengang_model extends DB_Model
|
||||
public function getStudiengangTyp($studiengang_kz, $typ = null)
|
||||
{
|
||||
$query = "SELECT DISTINCT(sgt.*)
|
||||
FROM tbl_studiengangstyp sgt JOIN tbl_studiengang sg on sgt.typ = sg.typ
|
||||
FROM tbl_studiengangstyp sgt JOIN tbl_studiengang sg on sgt.typ = sg.typ
|
||||
WHERE studiengang_kz IN ?";
|
||||
|
||||
$params[] = $studiengang_kz;
|
||||
$params = [$studiengang_kz];
|
||||
|
||||
if (!is_null($typ))
|
||||
{
|
||||
@@ -524,4 +524,53 @@ class Studiengang_model extends DB_Model
|
||||
|
||||
return $this->execQuery($query, $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $studiengang_kzs
|
||||
* @param array $not_antrag_typ (optional) If the prestudent has an antrag with one of the specified types it will be excluded from the result
|
||||
* @param array $prestudent_stati (optional)
|
||||
*
|
||||
* @return stdClass
|
||||
*/
|
||||
public function getAktivePrestudenten($studiengang_kzs, $not_antrag_typ = null)
|
||||
{
|
||||
$this->load->config('studierendenantrag');
|
||||
|
||||
$sql = "SELECT index FROM public.tbl_sprache WHERE sprache='" . getUserLanguage() . "' LIMIT 1";
|
||||
|
||||
$this->addSelect($this->dbTable . '.studiengang_kz');
|
||||
$this->addSelect($this->dbTable . '.bezeichnung');
|
||||
$this->addSelect('o.orgform_kurzbz');
|
||||
$this->addSelect('o.bezeichnung_mehrsprachig[(' . $sql . ')] AS orgform', false);
|
||||
$this->addSelect('ps.ausbildungssemester AS semester');
|
||||
$this->addSelect('ps.studiensemester_kurzbz');
|
||||
$this->addSelect('p.prestudent_id');
|
||||
$this->addSelect('pers.vorname');
|
||||
$this->addSelect('pers.nachname');
|
||||
|
||||
$this->addJoin('public.tbl_prestudent p', 'studiengang_kz');
|
||||
$this->addJoin(
|
||||
'public.tbl_prestudentstatus ps',
|
||||
'ps.prestudent_id=p.prestudent_id
|
||||
AND ps.studiensemester_kurzbz=get_stdsem_prestudent(p.prestudent_id, NULL)
|
||||
AND ps.ausbildungssemester=get_absem_prestudent(p.prestudent_id, NULL)
|
||||
AND ps.status_kurzbz=get_rolle_prestudent(p.prestudent_id, NULL)'
|
||||
);
|
||||
$this->addJoin('bis.tbl_orgform o', $this->dbTable . '.orgform_kurzbz=o.orgform_kurzbz');
|
||||
$this->addJoin('public.tbl_person pers', 'person_id');
|
||||
|
||||
$this->db->where_in($this->dbTable . '.studiengang_kz', $studiengang_kzs);
|
||||
$this->db->where_in('ps.status_kurzbz', $this->config->item('antrag_prestudentstatus_whitelist'));
|
||||
$this->db->where($this->dbTable . ".aktiv", true);
|
||||
|
||||
if ($not_antrag_typ !== null && is_array($not_antrag_typ)) {
|
||||
$this->addJoin('campus.tbl_studierendenantrag a', 'a.prestudent_id=p.prestudent_id', 'LEFT');
|
||||
$this->db->group_start();
|
||||
$this->db->where_not_in('a.typ', $not_antrag_typ);
|
||||
$this->db->or_where('a.typ IS NULL');
|
||||
$this->db->group_end();
|
||||
}
|
||||
|
||||
return $this->load();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ class Studienplan_model extends DB_Model
|
||||
$whereArray["tbl_studienplan.sprache"] = $sprache;
|
||||
}
|
||||
|
||||
return $this->StudienplanModel->loadWhere($whereArray);
|
||||
return $this->loadWhere($whereArray);
|
||||
}
|
||||
|
||||
public function getStudienplanLehrveranstaltung($studienplan_id, $semester)
|
||||
@@ -53,6 +53,38 @@ class Studienplan_model extends DB_Model
|
||||
$this->addJoin('lehre.tbl_studienplan_lehrveranstaltung', 'studienplan_id');
|
||||
$this->addJoin('lehre.tbl_lehrveranstaltung', 'lehrveranstaltung_id');
|
||||
$this->addOrder('tbl_lehrveranstaltung.sort');
|
||||
|
||||
return $this->loadWhere(array(
|
||||
'studienplan_id' => $studienplan_id,
|
||||
'tbl_studienplan_lehrveranstaltung.semester' => $semester
|
||||
));
|
||||
}
|
||||
|
||||
public function getStudienplanLehrveranstaltungForPrestudent($studienplan_id, $semester, $prestudent_id, $note_stsem)
|
||||
{
|
||||
$lang = 'SELECT index FROM public.tbl_sprache WHERE sprache=' . $this->escape(getUserLanguage());
|
||||
$sql = 'SELECT student_uid FROM public.tbl_student WHERE prestudent_id=' . $this->escape($prestudent_id);
|
||||
|
||||
$this->addSelect($this->dbTable . '.*');
|
||||
$this->addSelect('lv.*');
|
||||
$this->addSelect('COALESCE(n.bezeichnung_mehrsprachig[(' . $lang . ')], NULL) AS note');
|
||||
$this->addSelect('n.positiv');
|
||||
$this->addSelect('lehre.tbl_studienplan_lehrveranstaltung.studienplan_lehrveranstaltung_id');
|
||||
$this->addSelect('lehre.tbl_studienplan_lehrveranstaltung.sort plan_sort');
|
||||
$this->addSelect('lehre.tbl_studienplan_lehrveranstaltung.studienplan_lehrveranstaltung_id_parent');
|
||||
|
||||
$this->addJoin('lehre.tbl_studienplan_lehrveranstaltung', 'studienplan_id');
|
||||
$this->addJoin('lehre.tbl_lehrveranstaltung lv', 'lehrveranstaltung_id');
|
||||
$this->addJoin(
|
||||
'lehre.tbl_zeugnisnote zn',
|
||||
'zn.lehrveranstaltung_id=lv.lehrveranstaltung_id AND zn.student_uid=(' . $sql . ') AND zn.studiensemester_kurzbz=' . $this->escape($note_stsem),
|
||||
'LEFT'
|
||||
);
|
||||
$this->addJoin('lehre.tbl_note n', 'n.note=zn.note', 'LEFT');
|
||||
|
||||
$this->addOrder('lehre.tbl_studienplan_lehrveranstaltung.sort');
|
||||
$this->addOrder('lv.sort');
|
||||
|
||||
return $this->loadWhere(array(
|
||||
'studienplan_id' => $studienplan_id,
|
||||
'tbl_studienplan_lehrveranstaltung.semester' => $semester
|
||||
|
||||
@@ -204,4 +204,34 @@ class Studiensemester_model extends DB_Model
|
||||
|
||||
return $this->execQuery($query, array($studiensemester_kurzbz));
|
||||
}
|
||||
|
||||
public function getFollowingSemester($studienplan_ids, $studiensemester_kurzbz, $ausbildungssemester)
|
||||
{
|
||||
$query = '
|
||||
WITH RECURSIVE following(studiensemester_kurzbz, semester, start) AS (
|
||||
SELECT studiensemester_kurzbz, ?, start
|
||||
FROM public.tbl_studiensemester
|
||||
WHERE studiensemester_kurzbz=?
|
||||
UNION ALL
|
||||
SELECT * FROM (
|
||||
SELECT s.studiensemester_kurzbz, s.semester, ss.start
|
||||
FROM lehre.tbl_studienplan_semester s
|
||||
JOIN public.tbl_studiensemester ss USING(studiensemester_kurzbz)
|
||||
INNER JOIN following a ON(s.semester=a.semester+1 AND ss.start > a.start)
|
||||
WHERE studienplan_id IN ?
|
||||
ORDER BY start ASC
|
||||
LIMIT 1
|
||||
) wrapper
|
||||
)
|
||||
SELECT sem.*, following.semester
|
||||
FROM following
|
||||
LEFT JOIN ' . $this->dbTable . ' sem USING(studiensemester_kurzbz)
|
||||
ORDER BY start';
|
||||
|
||||
return $this->execQuery($query, [
|
||||
$ausbildungssemester,
|
||||
$studiensemester_kurzbz,
|
||||
$studienplan_ids
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -335,4 +335,17 @@ class Person_model extends DB_Model
|
||||
|
||||
return $this->execQuery($qry, array($person_id, $person_id, $person_id));
|
||||
}
|
||||
|
||||
public function loadPrestudent($prestudent_id)
|
||||
{
|
||||
$this->addSelect($this->dbTable . '.*');
|
||||
|
||||
$this->addJoin('public.tbl_prestudent p', 'person_id');
|
||||
|
||||
$this->addLimit(1);
|
||||
|
||||
return $this->loadWhere([
|
||||
'prestudent_id' => $prestudent_id
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
$sitesettings = array(
|
||||
'title' => 'Antrag auf Änderung des Studierendenstatus',
|
||||
'cis' => true,
|
||||
'vue3' => true,
|
||||
'axios027' => true,
|
||||
'bootstrap5' => true,
|
||||
'fontawesome6' => true,
|
||||
'phrases' => array(
|
||||
),
|
||||
'customJSModules' => array('public/js/apps/lehre/Antrag.js'),
|
||||
'customCSSs' => array(
|
||||
'public/css/Fhc.css',
|
||||
'vendor/vuepic/vue-datepicker-css/main.css'
|
||||
),
|
||||
'customJSs' => array(
|
||||
)
|
||||
);
|
||||
|
||||
$this->load->view(
|
||||
'templates/FHC-Header',
|
||||
$sitesettings
|
||||
);
|
||||
?>
|
||||
|
||||
<div id="wrapper">
|
||||
<div class="fhc-header">
|
||||
<h1 class="h2"><?= $this->p->t('studierendenantrag', 'antrag_header'); ?></h1>
|
||||
</div>
|
||||
|
||||
<div class="fhc-container row">
|
||||
<div class="col-sm-8 mb-3">
|
||||
<studierendenantrag-antrag
|
||||
prestudent-id="<?= $prestudent_id; ?>"
|
||||
antrag-type="<?= $antrag_type; ?>"
|
||||
studierendenantrag-id="<?= $studierendenantrag_id; ?>"
|
||||
v-model:info-array="infoArray"
|
||||
v-model:status-msg="statusMsg"
|
||||
v-model:status-severity="statusSeverity"
|
||||
>
|
||||
</studierendenantrag-antrag>
|
||||
</div>
|
||||
<div class="col-sm-4 mb-3">
|
||||
<studierendenantrag-status :msg="statusMsg" :severity="statusSeverity"></studierendenantrag-status>
|
||||
<studierendenantrag-infoblock :infos="infoArray"></studierendenantrag-infoblock>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$this->load->view(
|
||||
'templates/FHC-Footer',
|
||||
$sitesettings
|
||||
);
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
use \DateTime as DateTime;
|
||||
|
||||
$sitesettings = array(
|
||||
'title' => 'Anträge auf Änderung des Studierendenstatus',
|
||||
'cis' => true,
|
||||
'vue3' => true,
|
||||
'axios027' => true,
|
||||
'bootstrap5' => true,
|
||||
'tabulator5' => true,
|
||||
'fontawesome6' => true,
|
||||
'primevue3' => true,
|
||||
'phrases' => array(
|
||||
'global',
|
||||
'studierendenantrag',
|
||||
'lehre',
|
||||
'person',
|
||||
),
|
||||
'customJSModules' => array('public/js/apps/lehre/Antrag/Leitung.js'),
|
||||
'customCSSs' => array(
|
||||
'public/css/Fhc.css'
|
||||
),
|
||||
'customJSs' => array(
|
||||
)
|
||||
);
|
||||
|
||||
$this->load->view(
|
||||
'templates/FHC-Header',
|
||||
$sitesettings
|
||||
);
|
||||
?>
|
||||
|
||||
<div id="wrapper">
|
||||
<div class="fhc-header">
|
||||
<h1><?= $this->p->t('studierendenantrag', 'antraege_header'); ?></h1>
|
||||
</div>
|
||||
|
||||
<div class="fhc-container row">
|
||||
<div class="col-xs-8">
|
||||
|
||||
<studierendenantrag-leitung
|
||||
:stg-a="<?= htmlspecialchars(json_encode(array_values($stgA))); ?>"
|
||||
:stg-l="<?= htmlspecialchars(json_encode(array_values($stgL))); ?>"
|
||||
>
|
||||
</studierendenantrag-leitung>
|
||||
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$this->load->view(
|
||||
'templates/FHC-Footer',
|
||||
$sitesettings
|
||||
);
|
||||
@@ -0,0 +1,151 @@
|
||||
<?php
|
||||
$sitesettings = array(
|
||||
'title' => 'Antrag auf Änderung des Studierendenstatus',
|
||||
'cis' => true,
|
||||
'vue3' => true,
|
||||
'axios027' => true,
|
||||
'bootstrap5' => true,
|
||||
'fontawesome6' => true,
|
||||
'phrases' => array(
|
||||
),
|
||||
'customJSModules' => array('public/js/apps/lehre/Antrag/Student.js'),
|
||||
'customCSSs' => array(
|
||||
'public/css/Fhc.css'
|
||||
),
|
||||
'customJSs' => array(
|
||||
)
|
||||
);
|
||||
|
||||
$this->load->view(
|
||||
'templates/FHC-Header',
|
||||
$sitesettings
|
||||
);
|
||||
?>
|
||||
|
||||
<div id="wrapper">
|
||||
|
||||
<div class="fhc-header">
|
||||
<h1 class="h2"><?= $this->p->t('studierendenantrag', 'antraege_header'); ?></h1>
|
||||
</div>
|
||||
|
||||
<div class="fhc-container row">
|
||||
<div class="col-xs-8">
|
||||
<?php if ($antraege) { ?>
|
||||
<?php foreach($antraege as $prestudent_id => $array){ ?>
|
||||
<h4><?= $array['bezeichnungStg']; ?> (<?= $array['bezeichnungOrgform']; ?>)</h4>
|
||||
<?php switch(count($array['allowedNewTypes'])) {
|
||||
case 0: ?>
|
||||
<button class="btn btn-outline-secondary" type="button" disabled>
|
||||
<i class="fa-regular fa-plus fa-xl"></i> <?= $this->p->t('studierendenantrag', 'btn_new'); ?>
|
||||
</button>
|
||||
<?php
|
||||
break;
|
||||
case 1:
|
||||
?>
|
||||
<a class="btn btn-outline-secondary" href="<?= site_url('lehre/Studierendenantrag/' . strtolower($array['allowedNewTypes'][0]) . '/' . $prestudent_id); ?>"><i class="fa-regular fa-plus fa-xl"></i> <?= $array['allowedNewTypes'][0]; ?> <?= $this->p->t('studierendenantrag', 'btn_new'); ?></a>
|
||||
<?php
|
||||
break;
|
||||
default:
|
||||
?>
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-outline-secondary dropdown-toggle" type="button" id="dropdownMenuButton1" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<i class="fa-regular fa-plus fa-xl"></i> <?= $this->p->t('studierendenantrag', 'btn_new'); ?>
|
||||
</button>
|
||||
<ul class="dropdown-menu" aria-labelledby="dropdownMenuButton1">
|
||||
<?php foreach($array['allowedNewTypes'] as $type){ ?>
|
||||
<li><a class="dropdown-item" href="<?= site_url('lehre/Studierendenantrag/' . strtolower($type) . '/' . $prestudent_id); ?>"><?= $this->p->t('studierendenantrag', 'antrag_typ_' . $type); ?></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th><?= $this->p->t('studierendenantrag', 'antrag_typ'); ?></th>
|
||||
<th><?= $this->p->t('studierendenantrag', 'antrag_status'); ?></th>
|
||||
<th><?= $this->p->t('studierendenantrag', 'antrag_studiensemester'); ?></th>
|
||||
<th><?= $this->p->t('studierendenantrag', 'antrag_erstelldatum'); ?></th>
|
||||
<th><?= $this->p->t('studierendenantrag', 'antrag_datum_wiedereinstieg'); ?></th>
|
||||
<th><?= $this->p->t('studierendenantrag', 'antrag_grund'); ?></th>
|
||||
<th><?= $this->p->t('studierendenantrag', 'antrag_dateianhaenge'); ?></th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($array['antraege'] as $antrag){ ?>
|
||||
<tr>
|
||||
<td><?= $antrag->studierendenantrag_id; ?></td>
|
||||
<td><?= $this->p->t('studierendenantrag', 'antrag_typ_' . $antrag->typ); ?></td>
|
||||
<td><?= $antrag->status_bezeichnung; ?></td>
|
||||
<td><?= $antrag->studiensemester_kurzbz; ?></td>
|
||||
<td><?= (new DateTime($antrag->datum))->format('d.m.Y'); ?></td>
|
||||
<td><?= $antrag->datum_wiedereinstieg ? (new DateTime($antrag->datum_wiedereinstieg))->format('d.m.Y') : ''; ?></td>
|
||||
<td><!-- Button trigger modal -->
|
||||
<?php if($antrag->grund){ ?>
|
||||
<a href="#modalgrund<?= $antrag->studierendenantrag_id; ?>" data-bs-toggle="modal">
|
||||
<?= $this->p->t('studierendenantrag', 'antrag_grund'); ?>
|
||||
</a>
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="modalgrund<?= $antrag->studierendenantrag_id; ?>" tabindex="-1" aria-labelledby="modalgrundLabel<?= $antrag->studierendenantrag_id; ?>" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="modalgrundLabel<?= $antrag->studierendenantrag_id; ?>"><?= $this->p->t('studierendenantrag', 'antrag_grund'); ?></h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<pre><?= $antrag->grund; ?></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if($antrag->dms_id) {?>
|
||||
<a
|
||||
class="text-decoration-none"
|
||||
href="<?= site_url('lehre/Antrag/Attachment/show/' . $antrag->dms_id) ?>"
|
||||
target="_blank">
|
||||
<i class="fa fa-paperclip" aria-hidden="true"></i> <?= $this->p->t('studierendenantrag', 'antrag_anhang'); ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?= site_url('lehre/Studierendenantrag/' . strtolower($antrag->typ) . '/' . $antrag->prestudent_id . '/' . $antrag->studierendenantrag_id); ?>"><i class="fa-solid fa-pen" title="<?= $this->p->t('studierendenantrag', 'btn_edit'); ?>"></i></a>
|
||||
<?php if ($antrag->typ != Studierendenantrag_model::TYP_WIEDERHOLUNG && $antrag->status == Studierendenantragstatus_model::STATUS_APPROVED) { ?>
|
||||
<a class="ms-2" target="_blank" href="<?= base_url('cis/private/pdfExport.php?xml=Antrag' . $antrag->typ . '.xml.php&xsl=Antrag' . $antrag->typ . '&id=' . $antrag->studierendenantrag_id . '&uid=' . getAuthUID()); ?>"><i class="fa-solid fa-download" title="<?= $this->p->t('studierendenantrag', 'btn_download_antrag'); ?>"></i></a>
|
||||
<?php } ?>
|
||||
<?php if ($antrag->typ == Studierendenantrag_model::TYP_WIEDERHOLUNG && $antrag->status == Studierendenantragstatus_model::STATUS_APPROVED) { ?>
|
||||
<a class="btn btn-outline-secondary" href="#modalgrund<?= $antrag->studierendenantrag_id; ?>" data-bs-toggle="modal">
|
||||
<?= $this->p->t('studierendenantrag', 'btn_show_lvs'); ?>
|
||||
</a>
|
||||
<lv-popup id="modalgrund<?= $antrag->studierendenantrag_id; ?>" antrag-id = "<?= $antrag->studierendenantrag_id; ?>">
|
||||
<?= $this->p->t('studierendenantrag', 'my_lvs'); ?>
|
||||
</lv-popup>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php } ?>
|
||||
<?php } else { ?>
|
||||
<p class="alert alert-danger" role="alert">
|
||||
<?= $this->p->t('studierendenantrag', 'error_no_student'); ?>
|
||||
</p>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$this->load->view(
|
||||
'templates/FHC-Footer',
|
||||
$sitesettings
|
||||
);
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
$sitesettings = array(
|
||||
'title' => 'Antrag Wiederholung vom Studium',
|
||||
'cis' => true,
|
||||
'vue3' => true,
|
||||
'axios027' => true,
|
||||
'bootstrap5' => true,
|
||||
'fontawesome6' => true,
|
||||
'tabulator5' => true,
|
||||
'phrases' => array(
|
||||
'ui',
|
||||
'lehre',
|
||||
'global'
|
||||
),
|
||||
'customJSModules' => array('public/js/apps/lehre/Antrag/Lvzuweisung.js'),
|
||||
'customCSSs' => array(
|
||||
),
|
||||
'customJSs' => array(
|
||||
)
|
||||
);
|
||||
|
||||
$this->load->view(
|
||||
'templates/FHC-Header',
|
||||
$sitesettings
|
||||
);
|
||||
?>
|
||||
|
||||
<div id="wrapper" class="overflow-hidden">
|
||||
<?php if (!$frame) { ?>
|
||||
<div class="fhc-header">
|
||||
<h1 class="h2"><?= $this->p->t('studierendenantrag', 'title_lvzuweisen', ['name' => $antrag->name]);?></h1>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="fhc-container row mt-3">
|
||||
<lv-zuweisung antrag-id="<?= $antrag_id; ?>" initial-status-code="<?= $antrag->status; ?>" initial-status-msg="<?= $antrag->statustyp; ?>"<?= ($antrag->status != Studierendenantragstatus_model::STATUS_CREATED && $antrag->status != Studierendenantragstatus_model::STATUS_LVSASSIGNED) ? ' disabled' : ''; ?>></lv-zuweisung>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$this->load->view(
|
||||
'templates/FHC-Footer',
|
||||
$sitesettings
|
||||
);
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<RDF:RDF
|
||||
xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:NOTE="<?= $url; ?>/rdf#"
|
||||
>
|
||||
<?php if($lvs) { ?>
|
||||
<RDF:Seq about="<?= $url; ?>/liste">
|
||||
<?php foreach($lvs as $row) { ?>
|
||||
<?php $freigabedatum = new DateTime($row->freigabedatum); ?>
|
||||
<?php $benotungsdatum = new DateTime($row->insertamum); ?>
|
||||
<RDF:li>
|
||||
<RDF:Description id="<?= $row->studierendenantrag_lehrveranstaltung_id; ?>/<?= $row->prestudent_id; ?>/<?= $row->studiensemester_kurzbz; ?>" about="<?= $url; ?>/<?= $row->studierendenantrag_lehrveranstaltung_id; ?>/<?= $row->prestudent_id; ?>/<?= $row->studiensemester_kurzbz; ?>" >
|
||||
<NOTE:studierendenantrag_lehrveranstaltung_id><![CDATA[<?= $row->studierendenantrag_lehrveranstaltung_id; ?>]]></NOTE:studierendenantrag_lehrveranstaltung_id>
|
||||
<NOTE:lehrveranstaltung_id><![CDATA[<?= $row->lehrveranstaltung_id; ?>]]></NOTE:lehrveranstaltung_id>
|
||||
<NOTE:prestudent_id><![CDATA[<?= $row->prestudent_id; ?>]]></NOTE:prestudent_id>
|
||||
<NOTE:mitarbeiter_uid><![CDATA[<?= $row->insertvon; ?>]]></NOTE:mitarbeiter_uid>
|
||||
<NOTE:studiensemester_kurzbz><![CDATA[<?= $row->studiensemester_kurzbz; ?>]]></NOTE:studiensemester_kurzbz>
|
||||
<NOTE:note><![CDATA[<?= $row->note; ?>]]></NOTE:note>
|
||||
<NOTE:freigabedatum_iso><![CDATA[<?= $freigabedatum->format('c'); ?>]]></NOTE:freigabedatum_iso>
|
||||
<NOTE:freigabedatum><![CDATA[<?= $freigabedatum->format('d.m.Y'); ?>]]></NOTE:freigabedatum>
|
||||
<NOTE:benotungsdatum_iso><![CDATA[<?= $benotungsdatum->format('c'); ?>]]></NOTE:benotungsdatum_iso>
|
||||
<NOTE:benotungsdatum><![CDATA[<?= $benotungsdatum->format('d.m.Y'); ?>]]></NOTE:benotungsdatum>
|
||||
<NOTE:note_bezeichnung><![CDATA[<?= $row->note_bezeichnung; ?>]]></NOTE:note_bezeichnung>
|
||||
<NOTE:lehrveranstaltung_bezeichnung><![CDATA[<?= $row->lv_bezeichnung; ?>]]></NOTE:lehrveranstaltung_bezeichnung>
|
||||
<NOTE:studiengang><![CDATA[<?= $row->stg_bezeichnung; ?>]]></NOTE:studiengang>
|
||||
</RDF:Description>
|
||||
</RDF:li>
|
||||
<?php } ?>
|
||||
</RDF:Seq>
|
||||
<?php } ?>
|
||||
</RDF:RDF>
|
||||
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<RDF:RDF
|
||||
xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:NC="http://home.netscape.com/NC-rdf#"
|
||||
xmlns:DBDML="http://www.technikum-wien.at/dbdml/rdf#"
|
||||
>
|
||||
<RDF:Seq RDF:about="http://www.technikum-wien.at/dbdml/msg">
|
||||
<RDF:li>
|
||||
<RDF:Description RDF:about="http://www.technikum-wien.at/dbdml/0" >
|
||||
<DBDML:return><?= $return ? 'true' : 'false'; ?></DBDML:return>
|
||||
<DBDML:errormsg><![CDATA[<?= implode("/n", $errormsg);?>]]></DBDML:errormsg>
|
||||
<DBDML:warning><![CDATA[]]></DBDML:warning>
|
||||
<DBDML:data><![CDATA[]]></DBDML:data>
|
||||
</RDF:Description>
|
||||
</RDF:li>
|
||||
</RDF:Seq>
|
||||
</RDF:RDF>
|
||||
@@ -34,6 +34,7 @@
|
||||
// Internal resources
|
||||
$ajaxlib = isset($ajaxlib) ? $ajaxlib : false;
|
||||
$bootstrapper = isset($bootstrapper) ? $bootstrapper : false;
|
||||
$cis = isset($cis) ? $cis : false;
|
||||
$dialoglib = isset($dialoglib) ? $dialoglib : false;
|
||||
$filtercomponent = isset($filtercomponent) ? $filtercomponent : false;
|
||||
$filterwidget = isset($filterwidget) ? $filterwidget : false;
|
||||
@@ -43,4 +44,3 @@
|
||||
$tablewidget = isset($tablewidget) ? $tablewidget : false;
|
||||
$udfs = isset($udfs) ? $udfs : false;
|
||||
$widgets = isset($widgets) ? $widgets : false;
|
||||
|
||||
|
||||
@@ -118,6 +118,9 @@
|
||||
// HTML Widget CSS
|
||||
if ($widgets === true) generateCSSsInclude('public/css/Widgets.css');
|
||||
|
||||
// CIS
|
||||
if ($cis === true) generateCSSsInclude('public/css/cis_bs5.css');
|
||||
|
||||
// Eventually required CSS
|
||||
generateCSSsInclude($customCSSs); // Eventually required CSS
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user