mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-21 08:52:21 +00:00
Merge branch 'master' into feature-30660/FHC4_StudierendenGUI_Prototyp
This commit is contained in:
@@ -0,0 +1,169 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
$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';
|
||||
|
||||
/**
|
||||
* before this exam dates for Wiederholer will be ignored
|
||||
*
|
||||
* @var string A string formated as Date
|
||||
*
|
||||
*/
|
||||
$config['digitalization_start'] = '2022-07-01';
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 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'] = '+2 weeks';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* System User - uid of a user that is allowed to set prestudentstatus
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
$config['antrag_job_systemuser'] = '';
|
||||
|
||||
|
||||
/**
|
||||
* 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'] = [];
|
||||
|
||||
/**
|
||||
* Blacklisted noten for negative committee exams
|
||||
* noten with this ids won't be seen as negative
|
||||
*
|
||||
* @var array An array of noten ids
|
||||
*/
|
||||
$config['note_blacklist_wiederholung'] = [];
|
||||
@@ -0,0 +1,438 @@
|
||||
<?php
|
||||
|
||||
if (! defined("BASEPATH")) exit("No direct script access allowed");
|
||||
|
||||
class UHSTAT1 extends FHC_Controller
|
||||
{
|
||||
const BERECHTIGUNG_UHSTAT_VERWALTEN = 'student/uhstat1daten_verwalten';
|
||||
const PERSON_ID_SESSION_INDEX = 'bewerbung/personId';
|
||||
const CODEX_OESTERREICH = 'A';
|
||||
const LOWER_BOUNDARY_YEARS = 160;
|
||||
const UPPER_BOUNDARY_YEARS = 20;
|
||||
|
||||
private $_uid;
|
||||
private $_uhstat1Fields = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
// load ci libs
|
||||
$this->load->library('form_validation');
|
||||
|
||||
// load ci helpers
|
||||
$this->load->helper(array('form', 'url'));
|
||||
|
||||
// load libraries
|
||||
$this->load->library('AuthLib');
|
||||
$this->load->library('PermissionLib');
|
||||
|
||||
// load models
|
||||
$this->load->model('codex/Oehbeitrag_model', 'OehbeitragModel');
|
||||
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
|
||||
$this->load->model('system/Sprache_model', 'SpracheModel');
|
||||
$this->load->model('codex/Abschluss_model', 'AbschlussModel');
|
||||
$this->load->model('codex/Uhstat1daten_model', 'Uhstat1datenModel');
|
||||
|
||||
$this->loadPhrases(
|
||||
array(
|
||||
'ui',
|
||||
'uhstat'
|
||||
)
|
||||
);
|
||||
|
||||
$this->_uid = getAuthUID();
|
||||
|
||||
// set form field information
|
||||
$this->_uhstat1Fields = array(
|
||||
'mutter_geburtsstaat' => array('name' => 'Geburtsstaat Mutter'),
|
||||
'mutter_geburtsjahr' => array('name' => 'Geburtsjahr Mutter'),
|
||||
'mutter_bildungsstaat' => array('name' => 'Bildungsstaat Mutter'),
|
||||
'mutter_bildungmax' => array(
|
||||
'name' => 'Geburtsjahr Mutter',
|
||||
'rules' => array(
|
||||
'callback_bildungsstaat_bildungmax_check[m]' => array(
|
||||
'bildungsstaat_bildungmax_check' => $this->p->t('uhstat', 'ausbildungBildungsstaatUebereinstimmung')
|
||||
)
|
||||
)
|
||||
),
|
||||
'vater_geburtsstaat' => array('name' => 'Geburtsstaat Vater'),
|
||||
'vater_geburtsjahr' => array('name' => 'Geburtsjahr Vater'),
|
||||
'vater_bildungsstaat' => array('name' => 'Bildungsstaat Vater'),
|
||||
'vater_bildungmax' => array('name' => 'Geburtsjahr Vater'),
|
||||
'vater_bildungmax' => array(
|
||||
'name' => 'Geburtsjahr Vater',
|
||||
'rules' => array(
|
||||
'callback_bildungsstaat_bildungmax_check[v]' => array(
|
||||
'bildungsstaat_bildungmax_check' => $this->p->t('uhstat', 'ausbildungBildungsstaatUebereinstimmung')
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
public function index()
|
||||
{
|
||||
$formMetaData = $this->_getFormMetaData();
|
||||
|
||||
if (isError($formMetaData)) show_error(getError($formMetaData));
|
||||
|
||||
if (!hasData($formMetaData)) show_error("No form meta data could be loaded");
|
||||
|
||||
$uhstatData = $this->_getUHSTAT1Data();
|
||||
|
||||
if (isError($uhstatData)) show_error(getError($uhstatData));
|
||||
|
||||
$this->load->view("codex/uhstat1.php", array(
|
||||
'formMetaData' => getData($formMetaData),
|
||||
'uhstatData' => getData($uhstatData)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add or update UHSTAT1 data
|
||||
*/
|
||||
public function saveUHSTAT1Data()
|
||||
{
|
||||
$saved = false;
|
||||
|
||||
$person_id = $this->_getValidPersonId('sui');
|
||||
|
||||
$this->form_validation->set_error_delimiters('<span class="text-danger">', '</span>');
|
||||
|
||||
foreach ($this->_uhstat1Fields as $field => $params)
|
||||
{
|
||||
// all fields are required
|
||||
$ruleNames = 'required';
|
||||
$ruleMessages = array('required' => $this->p->t('uhstat', 'angabeFehlt'));
|
||||
|
||||
// add additional rules
|
||||
if (isset($params['rules']))
|
||||
{
|
||||
foreach ($params['rules'] as $ruleName => $ruleMessage)
|
||||
{
|
||||
$ruleNames .= '|'.$ruleName;
|
||||
$ruleMessages = array_merge($ruleMessages, $ruleMessage);
|
||||
}
|
||||
}
|
||||
|
||||
$this->form_validation->set_rules(
|
||||
$field,
|
||||
$params['name'],
|
||||
$ruleNames,
|
||||
$ruleMessages
|
||||
);
|
||||
}
|
||||
|
||||
$uhstat1datenRes = null;
|
||||
if ($this->form_validation->run()) // if valid
|
||||
{
|
||||
// get post fields
|
||||
$uhstatData = array();
|
||||
foreach ($this->_uhstat1Fields as $field => $params)
|
||||
{
|
||||
$uhstatData[$field] = $this->input->post($field);
|
||||
}
|
||||
|
||||
// check if entry already exists
|
||||
$uhstat1datenloadRes = $this->Uhstat1datenModel->loadWhere(array('person_id' => $person_id));
|
||||
|
||||
// if yes, update
|
||||
if (hasData($uhstat1datenloadRes))
|
||||
{
|
||||
$uhstatData['updateamum'] = 'NOW()';
|
||||
$uhstatData['updatevon'] = $this->_uid;
|
||||
$uhstat1datenRes = $this->Uhstat1datenModel->update(
|
||||
array('person_id' => $person_id),
|
||||
$uhstatData
|
||||
);
|
||||
}
|
||||
else // otherwise insert
|
||||
{
|
||||
$uhstatData['insertamum'] = 'NOW()';
|
||||
$uhstatData['insertvon'] = $this->_uid;
|
||||
$uhstat1datenRes = $this->Uhstat1datenModel->insert(
|
||||
array_merge($uhstatData, array('person_id' => $person_id))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$formMetaData = $this->_getFormMetaData();
|
||||
|
||||
if (isError($formMetaData)) show_error(getError($formMetaData));
|
||||
|
||||
if (!hasData($formMetaData)) show_error("No form meta data could be loaded");
|
||||
|
||||
$successMessage = '';
|
||||
$errorMessage = '';
|
||||
// pass success/error messages to view
|
||||
if (isset($uhstat1datenRes))
|
||||
{
|
||||
if (isSuccess($uhstat1datenRes))
|
||||
{
|
||||
$successMessage = $this->p->t('uhstat', 'erfolgreichGespeichert');
|
||||
$saved = true;
|
||||
}
|
||||
else
|
||||
$errorMessage = $this->p->t('uhstat', 'fehlerBeimSpeichern');
|
||||
}
|
||||
|
||||
// load view with form data
|
||||
$this->load->view("codex/uhstat1.php", array(
|
||||
'formMetaData' => getData($formMetaData),
|
||||
'saved' => $saved,
|
||||
'successMessage' => $successMessage,
|
||||
'errorMessage' => $errorMessage
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check callback for Bildungsstaat - if Bildungsstaat is Austria, a highest education should be in Austria.
|
||||
* @param $bildungmax
|
||||
* @param $bildungsstaat_typ - mother (m) or father (v)
|
||||
* @return bool true if valid, false otherwise
|
||||
*/
|
||||
public function bildungsstaat_bildungmax_check($bildungmax, $bildungsstaat_typ)
|
||||
{
|
||||
// valid if no type passed
|
||||
if (!isset($bildungsstaat_typ) || !isset($bildungmax)) return true;
|
||||
|
||||
// get correct input
|
||||
if ($bildungsstaat_typ == 'm') // mutter
|
||||
$bildungsstaat = $this->input->post('mutter_bildungsstaat');
|
||||
elseif ($bildungsstaat_typ == 'v') // vater
|
||||
$bildungsstaat = $this->input->post('vater_bildungsstaat');
|
||||
else
|
||||
return true;
|
||||
|
||||
if (!isset($bildungsstaat)) return true;
|
||||
|
||||
// find out if abschluss is in Austria
|
||||
$this->AbschlussModel->addSelect("in_oesterreich");
|
||||
$abschlussRes = $this->AbschlussModel->load($bildungmax);
|
||||
|
||||
if (hasData($abschlussRes))
|
||||
{
|
||||
$in_oesterreich = getData($abschlussRes)[0]->in_oesterreich;
|
||||
// invalid if abschluss in Austria, but not Bildungsstaat, or abschluss not in Austria, but Bildungsstaat in Austria
|
||||
return ($in_oesterreich && $bildungsstaat == self::CODEX_OESTERREICH) || (!$in_oesterreich && $bildungsstaat != self::CODEX_OESTERREICH);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes UHSTAT1 entry.
|
||||
*/
|
||||
public function deleteUHSTAT1Data()
|
||||
{
|
||||
$saved = false;
|
||||
|
||||
// uhstat data can only be deleted with permission
|
||||
if (!$this->_checkPermission('suid')) show_error('no permission');
|
||||
|
||||
$person_id = $this->_getValidPersonId('suid');
|
||||
|
||||
$uhstat1datenRes = $this->Uhstat1datenModel->delete(
|
||||
array('person_id' => $person_id)
|
||||
);
|
||||
|
||||
$formMetaData = $this->_getFormMetaData();
|
||||
|
||||
if (isError($formMetaData)) show_error(getError($formMetaData));
|
||||
|
||||
if (!hasData($formMetaData)) show_error("No form meta data could be loaded");
|
||||
|
||||
$successMessage = '';
|
||||
$errorMessage = '';
|
||||
// pass success/error messages to view
|
||||
if (isset($uhstat1datenRes))
|
||||
{
|
||||
if (isSuccess($uhstat1datenRes))
|
||||
{
|
||||
$successMessage = $this->p->t('uhstat', 'erfolgreichGeloescht');
|
||||
}
|
||||
else
|
||||
$errorMessage = $this->p->t('uhstat', 'fehlerBeimLoeschen');
|
||||
}
|
||||
|
||||
// load view with form data
|
||||
$this->load->view("codex/uhstat1.php", array(
|
||||
'formMetaData' => getData($formMetaData),
|
||||
'successMessage' => $successMessage,
|
||||
'errorMessage' => $errorMessage
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Private methods
|
||||
|
||||
/**
|
||||
* Gets initial data needed to display UHSTAT1 form.
|
||||
*/
|
||||
private function _getFormMetaData()
|
||||
{
|
||||
$person_id = $this->_getValidPersonId('s');
|
||||
|
||||
// read only display param
|
||||
$readOnly = $this->input->get('readOnly');
|
||||
|
||||
// depending on permissions, editing or deleting is possible
|
||||
$editPermission = $this->_checkPermission('sui');
|
||||
$deletePermission = $this->_checkPermission('suid');
|
||||
|
||||
$languageIdx = $this->_getLanguageIndex();
|
||||
|
||||
$formMetaData = array(
|
||||
'nation' => array(),
|
||||
'abschluss_oesterreich' => array(),
|
||||
'abschluss_nicht_oesterreich' => array(),
|
||||
'jahre' => array(),
|
||||
'person_id' => $person_id,
|
||||
'editPermission' => $editPermission,
|
||||
'deletePermission' => $deletePermission,
|
||||
'readOnly' => $readOnly
|
||||
);
|
||||
|
||||
// get person data
|
||||
$this->load->model('person/Person_model', 'PersonModel');
|
||||
$this->PersonModel->addSelect("vorname, nachname");
|
||||
$personRes = $this->PersonModel->load($person_id);
|
||||
|
||||
if (isError($personRes)) return $personRes;
|
||||
|
||||
if (hasData($personRes))
|
||||
{
|
||||
$person = getData($personRes)[0];
|
||||
$formMetaData['vorname'] = $person->vorname;
|
||||
$formMetaData['nachname'] = $person->nachname;
|
||||
}
|
||||
|
||||
$nationTextFieldName = $languageIdx == 1 ? 'langtext' : 'engltext';
|
||||
|
||||
// get nation list
|
||||
$this->load->model('codex/Nation_model', 'NationModel');
|
||||
|
||||
$this->NationModel->addSelect("nation_code, $nationTextFieldName AS nation_text");
|
||||
$this->NationModel->addOrder("nation_text");
|
||||
$nationRes = $this->NationModel->loadWhere('sperre IS NULL OR sperre = FALSE');
|
||||
|
||||
if (isError($nationRes)) return $nationRes;
|
||||
|
||||
if (hasData($nationRes))
|
||||
{
|
||||
$nations = getData($nationRes);
|
||||
|
||||
// put austria in beginning of selection
|
||||
foreach ($nations as $nation)
|
||||
{
|
||||
if ($nation->nation_code == self::CODEX_OESTERREICH) array_unshift($nations, $nation);
|
||||
}
|
||||
|
||||
$formMetaData['nation'] = $nations;
|
||||
}
|
||||
|
||||
// get abschluss list
|
||||
$abschlussRes = $this->AbschlussModel->getActiveAbschluesse($languageIdx);
|
||||
|
||||
if (isError($abschlussRes)) return $abschlussRes;
|
||||
|
||||
$abschlussData = getData($abschlussRes);
|
||||
|
||||
if (hasData($abschlussRes))
|
||||
{
|
||||
foreach (getData($abschlussRes) as $abschluss)
|
||||
{
|
||||
if ($abschluss->in_oesterreich === true)
|
||||
$formMetaData['abschluss_oesterreich'][] = $abschluss;
|
||||
elseif ($abschluss->in_oesterreich === false)
|
||||
$formMetaData['abschluss_nicht_oesterreich'][] = $abschluss;
|
||||
else
|
||||
{
|
||||
$formMetaData['abschluss_oesterreich'][] = $abschluss;
|
||||
$formMetaData['abschluss_nicht_oesterreich'][] = $abschluss;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// get realistic birth years, dated back from current year
|
||||
$currYear = date("Y");
|
||||
$formMetaData['jahre'] = range($currYear - self::UPPER_BOUNDARY_YEARS, $currYear - self::LOWER_BOUNDARY_YEARS);
|
||||
|
||||
return success($formMetaData);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets initial data needed to display UHSTAT1 form.
|
||||
*/
|
||||
private function _getUHSTAT1Data()
|
||||
{
|
||||
$person_id = $this->_getValidPersonId('s');
|
||||
|
||||
$this->Uhstat1datenModel->addSelect(
|
||||
implode(', ', array_keys($this->_uhstat1Fields))
|
||||
);
|
||||
$uhstatRes = $this->Uhstat1datenModel->loadWhere(array('person_id' => $person_id));
|
||||
|
||||
if (isError($uhstatRes)) return $uhstatRes;
|
||||
|
||||
return success(hasData($uhstatRes) ? getData($uhstatRes)[0] : null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets language index of currently logged in user.
|
||||
* @return int (the index, start at 1)
|
||||
*/
|
||||
private function _getLanguageIndex()
|
||||
{
|
||||
$idx = 1;
|
||||
$this->SpracheModel->addSelect('index');
|
||||
$langRes = $this->SpracheModel->loadWhere(array('sprache' => getUserLanguage()));
|
||||
|
||||
if (hasData($langRes))
|
||||
{
|
||||
$idx = getData($langRes)[0]->index;
|
||||
}
|
||||
|
||||
return $idx;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets Id of person having permissions to manage UHSTAT1 data.
|
||||
* Can be passed as parameter or be in session.
|
||||
* @return int person_id
|
||||
*/
|
||||
private function _getValidPersonId($berechtigungsArt)
|
||||
{
|
||||
// if coming from bewerbungstool - person id is in session (person must be logged in bewerbungstool)
|
||||
if (isset($_SESSION[self::PERSON_ID_SESSION_INDEX]) && is_numeric($_SESSION[self::PERSON_ID_SESSION_INDEX]))
|
||||
return $_SESSION[self::PERSON_ID_SESSION_INDEX];
|
||||
|
||||
// if person id passed directly...
|
||||
$person_id = $this->input->post('person_id');
|
||||
if (!isset($person_id)) $person_id = $this->input->get('person_id');
|
||||
|
||||
if (!isset($person_id) || !is_numeric($person_id)) show_error("invalid person id");
|
||||
|
||||
// ...check if there is a permission for editing UHSTAT1 data
|
||||
if ($this->_checkPermission($berechtigungsArt)) return $person_id;
|
||||
|
||||
show_error("No permission");
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if logged user has the UHSTAT management permission.
|
||||
* @param $art - type of permission, e.g. suid for full permissions
|
||||
* @return bool
|
||||
*/
|
||||
private function _checkPermission($art)
|
||||
{
|
||||
return $this->permissionlib->isBerechtigt(self::BERECHTIGUNG_UHSTAT_VERWALTEN, $art);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,218 @@
|
||||
<?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,
|
||||
Studierendenantrag_model::TYP_ABMELDUNG_STGL
|
||||
]
|
||||
);
|
||||
if (isError($result)) {
|
||||
return $this->outputJsonError(getError($result));
|
||||
}
|
||||
|
||||
$data = getData($result);
|
||||
|
||||
$data->canCancel = (
|
||||
$data->status == Studierendenantragstatus_model::STATUS_CREATED &&
|
||||
$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 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_ABMELDUNG_STGL && $data->typ !== Studierendenantrag_model::TYP_ABMELDUNG)
|
||||
return show_404();
|
||||
|
||||
$data->canCancel = (
|
||||
$data->status == Studierendenantragstatus_model::STATUS_CREATED &&
|
||||
$this->antraglib->isEntitledToCancelAntrag($data->studierendenantrag_id)
|
||||
);
|
||||
|
||||
$this->outputJsonSuccess($data);
|
||||
}
|
||||
|
||||
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');
|
||||
|
||||
$_POST = json_decode($this->input->raw_input_stream, true);
|
||||
$query = $this->input->post('query');
|
||||
|
||||
$studiengaenge = $this->permissionlib->getSTG_isEntitledFor('student/studierendenantrag');
|
||||
|
||||
$result = $this->antraglib->getAktivePrestudentenInStgs($studiengaenge, $query);
|
||||
if (isError($result)) {
|
||||
return $this->outputJsonError(getError($result));
|
||||
}
|
||||
$result = getData($result);
|
||||
if (!$result) {
|
||||
return $this->outputJsonSuccess([]);
|
||||
}
|
||||
|
||||
return $this->outputJsonSuccess($result);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,413 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
use \stdClass as stdClass;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
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 getActiveStgs()
|
||||
{
|
||||
$studiengaenge = $this->permissionlib->getSTG_isEntitledFor('student/antragfreigabe');
|
||||
$stgsNeuanlage = $this->permissionlib->getSTG_isEntitledFor('student/studierendenantrag');
|
||||
|
||||
$stgs = [];
|
||||
|
||||
if ($studiengaenge) {
|
||||
$result = $this->StudierendenantragModel->loadForStudiengaenge($studiengaenge);
|
||||
|
||||
if (isError($result))
|
||||
return $this->outputJson($result);
|
||||
$antraege = getData($result) ?: [];
|
||||
|
||||
foreach ($antraege as $antrag) {
|
||||
if (!isset($stgs[$antrag->studiengang_kz])) {
|
||||
$stgs[$antrag->studiengang_kz] = new stdClass();
|
||||
$stgs[$antrag->studiengang_kz]->bezeichnung = $antrag->bezeichnung;
|
||||
$stgs[$antrag->studiengang_kz]->orgform = $antrag->orgform;
|
||||
$stgs[$antrag->studiengang_kz]->studiengang_kz = $antrag->studiengang_kz;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($stgsNeuanlage) {
|
||||
$result = $this->StudierendenantragModel->loadForStudiengaenge($stgsNeuanlage);
|
||||
|
||||
if (isError($result))
|
||||
return $this->outputJson($result);
|
||||
$antraege = getData($result) ?: [];
|
||||
|
||||
foreach ($antraege as $antrag) {
|
||||
if (!isset($stgs[$antrag->studiengang_kz])) {
|
||||
$stgs[$antrag->studiengang_kz] = new stdClass();
|
||||
$stgs[$antrag->studiengang_kz]->bezeichnung = $antrag->bezeichnung;
|
||||
$stgs[$antrag->studiengang_kz]->orgform = $antrag->orgform;
|
||||
$stgs[$antrag->studiengang_kz]->studiengang_kz = $antrag->studiengang_kz;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->outputJsonSuccess($stgs);
|
||||
}
|
||||
|
||||
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');
|
||||
}
|
||||
if(hasData($result))
|
||||
{
|
||||
$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');
|
||||
$grund = $this->input->post('grund');
|
||||
|
||||
$result = $this->antraglib->denyObjectionAbmeldung($studierendenantrag_id, getAuthUID(), $grund);
|
||||
|
||||
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->hasType($studierendenantrag_id, Studierendenantrag_model::TYP_ABMELDUNG_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 approveAbmeldungStgl()
|
||||
{
|
||||
return $this->approveAbmeldung();
|
||||
}
|
||||
|
||||
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,233 @@
|
||||
<?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',
|
||||
'ui'
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// 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->studiensemester_kurzbz);
|
||||
|
||||
$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,372 @@
|
||||
<?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([
|
||||
'global',
|
||||
'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) {
|
||||
$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)
|
||||
{
|
||||
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,22 @@
|
||||
<?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()));
|
||||
}
|
||||
}
|
||||
@@ -37,6 +37,9 @@ class AnrechnungJob extends JOB_Controller
|
||||
$this->load->helper('hlp_sancho_helper');
|
||||
|
||||
$this->load->library('AnrechnungLib');
|
||||
|
||||
// Load configs
|
||||
$this->load->config('anrechnung');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -213,7 +216,7 @@ class AnrechnungJob extends JOB_Controller
|
||||
'datentabelle' => $anrechnungen_table,
|
||||
'link' => anchor($url, 'Anrechnungsanträge Übersicht')
|
||||
);
|
||||
|
||||
|
||||
// Send mail
|
||||
sendSanchoMail(
|
||||
'AnrechnungAntragStellen',
|
||||
@@ -227,6 +230,82 @@ class AnrechnungJob extends JOB_Controller
|
||||
$this->logInfo('SUCCEDED: Sending emails to STGL about yesterdays new Anrechnungen succeded.');
|
||||
}
|
||||
|
||||
// Send Sancho mail to LV-Leitung (fallback Lectors) that were requested for recommendation yesterday.
|
||||
public function sendMailRecommendationRequests(){
|
||||
|
||||
$this->logInfo('Start AnrechnungJob sendMailRecommendationRequests to inform lecturers about yesterdays requests for recommendation.');
|
||||
|
||||
// Get Anrechnungen, für die gestern eine Empfehlung angefragt worden ist
|
||||
$this->AnrechnungModel->addSelect('astat.anrechnung_id, astat.datum, astat.insertamum');
|
||||
$this->AnrechnungModel->addDistinct('astat.anrechnung_id');
|
||||
$this->AnrechnungModel->addJoin('lehre.tbl_anrechnung_anrechnungstatus astat', 'anrechnung_id');
|
||||
|
||||
$result = $this->AnrechnungModel->loadWhere('
|
||||
studiensemester_kurzbz = (SELECT studiensemester_kurzbz FROM tbl_studiensemester WHERE now()::date BETWEEN start AND ende)
|
||||
AND genehmigt_von IS NULL
|
||||
AND empfehlung_anrechnung IS NULL
|
||||
AND status_kurzbz = '. $this->db->escape(self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR) .' -- in Bearbeitung durch Lektor
|
||||
AND NOW()::date = (astat.datum + interval \'1 day\') -- nur gestrige Empfehlungsanfrage
|
||||
ORDER BY astat.anrechnung_id, astat.datum DESC, astat.insertamum DESC -- nur letzten status dabei prüfen
|
||||
');
|
||||
|
||||
// Exit, wenn es gestern keine Empfehlungsanfragen gab
|
||||
if (!hasData($result))
|
||||
{
|
||||
$this->logInfo('End AnrechnungJob sendMailRecommendationRequests, because no recommendations were requested yesterday.');
|
||||
exit;
|
||||
}
|
||||
|
||||
$anrechnung_id_arr = array_column(getData($result), 'anrechnung_id');
|
||||
|
||||
$arr_lvLector_arr = array();
|
||||
foreach ($anrechnung_id_arr as $anrechnung_id)
|
||||
{
|
||||
// Get full name of Fachbereichsleitung or LV Leitung.
|
||||
if($this->config->item('fbl') === TRUE)
|
||||
{
|
||||
$arr_lvLector_arr[] = $this->anrechnunglib->getLeitungOfLvOe($anrechnung_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
$arr_lvLector_arr[] = $this->anrechnunglib->getLectors($anrechnung_id); // Returns LV Leitung. If not present, then all lectors of LV.
|
||||
}
|
||||
}
|
||||
|
||||
// Unique lector array to send only one mail per lector
|
||||
$arr_lvLector_arr = array_unique($arr_lvLector_arr, SORT_REGULAR);
|
||||
|
||||
// Link to 'Anrechnungen prüfen' dashboard
|
||||
$url =
|
||||
CIS_ROOT. 'cis/index.php?menu='.
|
||||
CIS_ROOT. 'cis/menu.php?content_id=&content='.
|
||||
CIS_ROOT. index_page(). self::REVIEW_ANRECHNUNG_URI;
|
||||
|
||||
foreach ($arr_lvLector_arr as $lvLector_arr)
|
||||
{
|
||||
foreach ($lvLector_arr as $lector)
|
||||
{
|
||||
// Prepare mail content
|
||||
$fields = array(
|
||||
'vorname' => $lector->vorname,
|
||||
'stgl_name' => 'Die Studiengangsleitung',
|
||||
'link' => anchor($url, 'Anrechnungsanträge Übersicht')
|
||||
);
|
||||
|
||||
// Send mail
|
||||
sendSanchoMail(
|
||||
'AnrechnungEmpfehlungAnfordern',
|
||||
$fields,
|
||||
$lector->uid. '@'. DOMAIN,
|
||||
'Deine Empfehlung wird benötigt zur Anerkennung nachgewiesener Kenntnisse'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$this->logInfo('SUCCEDED AnrechnungJob sendMailRecommendationRequests');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Send Sancho mail to students, whose Anrechnungen were approved 24 hours ago.
|
||||
*/
|
||||
@@ -308,7 +387,7 @@ class AnrechnungJob extends JOB_Controller
|
||||
|
||||
$db = new DB_Model();
|
||||
$result = $db->execReadOnlyQuery($qry);
|
||||
|
||||
|
||||
// Exit if there are no rejected Anrechnungen
|
||||
if (!hasData($result))
|
||||
{
|
||||
@@ -361,9 +440,9 @@ html;
|
||||
|
||||
$result = $this->AnrechnungModel->loadWhere('
|
||||
studiensemester_kurzbz = (
|
||||
SELECT studiensemester_kurzbz FROM tbl_studiensemester WHERE now()::date BETWEEN start AND ende)
|
||||
SELECT studiensemester_kurzbz FROM tbl_studiensemester WHERE now()::date BETWEEN start AND ende
|
||||
)
|
||||
AND genehmigt_von IS NULL
|
||||
AND genehmigt_von IS NULL
|
||||
AND empfehlung_anrechnung IS NULL
|
||||
AND status_kurzbz = '. $this->db->escape(self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR) .' -- in Bearbeitung durch Lektor
|
||||
AND NOW()::date = (astat.datum + interval \'1 week\') -- eine Woche nach Empfehlungsanfrage
|
||||
@@ -376,7 +455,7 @@ html;
|
||||
$this->logInfo('End AnrechnungJob sendMailRemindRecommendation, because no recommendations to be done.');
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
$anrechnung_id_arr = array_column(getData($result), 'anrechnung_id');
|
||||
|
||||
$arr_lvLector_arr = array();
|
||||
@@ -435,7 +514,7 @@ html;
|
||||
'vorname' => $stgl->vorname
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
return $stglMailAdress_arr;
|
||||
}
|
||||
// If not available, get assistance mail address
|
||||
|
||||
@@ -0,0 +1,615 @@
|
||||
<?php
|
||||
|
||||
if (!defined("BASEPATH")) exit("No direct script access allowed");
|
||||
|
||||
use \DateTime as DateTime;
|
||||
|
||||
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');
|
||||
$this->load->model('crm/Student_model', 'StudentModel');
|
||||
$this->load->model('organisation/Studiengang_model', 'StudiengangModel');
|
||||
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
|
||||
}
|
||||
|
||||
/**
|
||||
* Send infomail to Stgl
|
||||
*/
|
||||
public function sendStglSammelmail()
|
||||
{
|
||||
$this->load->model('person/Person_model', 'PersonModel');
|
||||
|
||||
$this->logInfo('Start Job sendStglSammelmail');
|
||||
|
||||
$this->load->model('organisation/Studiengang_model', 'StudiengangModel');
|
||||
|
||||
$this->StudierendenantragModel->addJoin('public.tbl_prestudent', 'prestudent_id');
|
||||
$this->db->group_start();
|
||||
$this->db->where('typ', Studierendenantrag_model::TYP_ABMELDUNG);
|
||||
$this->db->where('campus.get_status_studierendenantrag(studierendenantrag_id)', Studierendenantragstatus_model::STATUS_CREATED);
|
||||
$this->db->group_end();
|
||||
|
||||
$this->db->or_group_start();
|
||||
$this->db->where('typ', Studierendenantrag_model::TYP_ABMELDUNG_STGL);
|
||||
$this->db->where('campus.get_status_studierendenantrag(studierendenantrag_id)', Studierendenantragstatus_model::STATUS_CREATED);
|
||||
$this->db->group_end();
|
||||
|
||||
$this->db->or_group_start();
|
||||
$this->db->where('typ', Studierendenantrag_model::TYP_UNTERBRECHUNG);
|
||||
$this->db->where('campus.get_status_studierendenantrag(studierendenantrag_id)', Studierendenantragstatus_model::STATUS_CREATED);
|
||||
$this->db->group_end();
|
||||
|
||||
$this->db->or_group_start();
|
||||
$this->db->where('typ', Studierendenantrag_model::TYP_WIEDERHOLUNG);
|
||||
$this->db->where('campus.get_status_studierendenantrag(studierendenantrag_id)', Studierendenantragstatus_model::STATUS_LVSASSIGNED);
|
||||
$this->db->group_end();
|
||||
|
||||
$result = $this->StudierendenantragModel->load();
|
||||
if(isError($result))
|
||||
return $this->logError(getError($result));
|
||||
|
||||
if(!hasData($result))
|
||||
return $this->logInfo('End Job sendStglSammelmail: 0 Mails sent');
|
||||
|
||||
$antraege = getData($result);
|
||||
|
||||
$stgs = array();
|
||||
$stgLeitungen = array();
|
||||
|
||||
foreach ($antraege as $antrag)
|
||||
{
|
||||
if (!isset($stgs[$antrag->studiengang_kz]))
|
||||
{
|
||||
$result = $this->StudiengangModel->getLeitung($antrag->studiengang_kz);
|
||||
if (isError($result))
|
||||
{
|
||||
$this->logError(getError($result));
|
||||
continue;
|
||||
}
|
||||
if (!hasData($result))
|
||||
{
|
||||
$this->logError('Keine Leitung für Studiengang ' . $antrag->studiengang_kz . ' gefunden!');
|
||||
continue;
|
||||
}
|
||||
|
||||
$leitung = current(getData($result));
|
||||
if (!isset($stgLeitungen[$leitung->uid]))
|
||||
{
|
||||
$stgLeitungen[$leitung->uid] = [ 'Details' => $leitung, 'stgs' => [] ];
|
||||
}
|
||||
$stgLeitungen[$leitung->uid]['stgs'][] = $antrag->studiengang_kz;
|
||||
|
||||
$result = $this->StudierendenantragModel->getStgAndSem($antrag->studierendenantrag_id);
|
||||
if (isError($result))
|
||||
{
|
||||
$this->logError(getError($result));
|
||||
continue;
|
||||
}
|
||||
if (!hasData($result))
|
||||
{
|
||||
$this->logError('Keine Details für Studiengang ' . $antrag->studiengang_kz . ' gefunden!');
|
||||
continue;
|
||||
}
|
||||
$details = current(getData($result));
|
||||
|
||||
$stgs[$antrag->studiengang_kz] = [
|
||||
'Abmeldung' => [],
|
||||
'Unterbrechung' => [],
|
||||
'Wiederholung' => [],
|
||||
'Details' => $details
|
||||
];
|
||||
}
|
||||
$stgs[$antrag->studiengang_kz][str_replace('Stgl', '', $antrag->typ)] = $antrag;
|
||||
}
|
||||
|
||||
$this->load->model('system/Sprache_model', 'SpracheModel');
|
||||
$result = $this->SpracheModel->loadWhere(['content' => true]);
|
||||
if (isError($result)) {
|
||||
$this->logError(getError($result));
|
||||
$languages = [DEFAULT_LANGUAGE];
|
||||
} elseif (!hasData($result)) {
|
||||
$languages = [DEFAULT_LANGUAGE];
|
||||
} else {
|
||||
$languages = array_map(function ($row) {
|
||||
return $row->sprache;
|
||||
}, getData($result));
|
||||
}
|
||||
|
||||
$count = 0;
|
||||
foreach ($stgLeitungen as $leitung)
|
||||
{
|
||||
$data = [
|
||||
'name' => trim($leitung['Details']->vorname . ' ' . $leitung['Details']->nachname),
|
||||
'vorname' => $leitung['Details']->vorname,
|
||||
'nachname' => $leitung['Details']->nachname
|
||||
];
|
||||
|
||||
foreach ($languages as $lang) {
|
||||
unset($this->p);
|
||||
$this->loadPhrases(['studierendenantrag'], $lang);
|
||||
|
||||
$table = '';
|
||||
foreach ($leitung['stgs'] as $studiengang_kz) {
|
||||
$rows = '';
|
||||
$stg = $stgs[$studiengang_kz];
|
||||
foreach (['Abmeldung', 'Unterbrechung', 'Wiederholung'] as $typ) {
|
||||
$c = count($stg[$typ]);
|
||||
if ($c) {
|
||||
$rows .= $this->p->t('studierendenantrag', 'mail_part_x_new_' . $typ, ['count' => $c]);
|
||||
}
|
||||
}
|
||||
$table .= $this->p->t('studierendenantrag', 'mail_part_table', [
|
||||
'stg_bezeichnung' => $stg['Details']->bezeichnung,
|
||||
'stg_orgform_kurzbz' => $stg['Details']->orgform_kurzbz,
|
||||
'rows' => $rows
|
||||
]);
|
||||
}
|
||||
$data['table_' . $lang] = $table;
|
||||
}
|
||||
|
||||
$data['table'] = $data['table_' . DEFAULT_LANGUAGE];
|
||||
$data['leitungLink'] = APP_ROOT. 'index.ci.php/lehre/Studierendenantrag/leitung';
|
||||
|
||||
//Mail an Stgl und Assistenz
|
||||
$to = $leitung['Details']->uid . '@' . DOMAIN;
|
||||
$cc = $leitung['Details']->email;
|
||||
|
||||
// NOTE(chris): Sancho mail
|
||||
if (sendSanchoMail("Sancho_Mail_Antrag_Stgl", $data, $to, 'Anträge - Aktion(en) erforderlich', DEFAULT_SANCHO_HEADER_IMG, DEFAULT_SANCHO_FOOTER_IMG, '', $cc))
|
||||
$count++;
|
||||
}
|
||||
|
||||
$this->logInfo($count . " Emails erfolgreich versandt");
|
||||
|
||||
$this->logInfo('End Job sendStglSammelmail');
|
||||
}
|
||||
|
||||
/**
|
||||
* 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)
|
||||
{
|
||||
$res = $this->StudierendenantragModel->getStgAndSem($antrag->studierendenantrag_id);
|
||||
$stg = '';
|
||||
$orgform = '';
|
||||
if (hasData($res)) {
|
||||
$studiengang = current(getData($res));
|
||||
$stg = $studiengang->bezeichnung;
|
||||
$orgform = $studiengang->orgform_kurzbz;
|
||||
}
|
||||
|
||||
$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'),
|
||||
'vorname' => $antrag->vorname,
|
||||
'nachname' => $antrag->nachname,
|
||||
'Orgform' => $orgform,
|
||||
'stg' => $stg
|
||||
);
|
||||
$result = $this->StudentModel->loadWhere(['prestudent_id'=> $antrag->prestudent_id]);
|
||||
if (hasData($result)) {
|
||||
$student = current(getData($result));
|
||||
$data['UID'] = $student->student_uid;
|
||||
}
|
||||
|
||||
// NOTE(chris): Sancho mail
|
||||
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;
|
||||
}
|
||||
|
||||
$digi_start= $this->config->item('digitalization_start');
|
||||
if($digi_start)
|
||||
$digi_start = new DateTime($digi_start);
|
||||
|
||||
$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,
|
||||
$digi_start
|
||||
);
|
||||
if(isError($result))
|
||||
{
|
||||
$this->logError(getError($result));
|
||||
}
|
||||
else
|
||||
{
|
||||
$prestudents = getData($result) ?: [];
|
||||
$count = 0;
|
||||
|
||||
$prestudents = $this->prestudentsGetUnique($prestudents);
|
||||
|
||||
|
||||
foreach ($prestudents as $prestudent)
|
||||
{
|
||||
$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));
|
||||
|
||||
$this->StudierendenantragModel->addSelect('prestudent_id');
|
||||
$this->StudierendenantragModel->addSelect('studiensemester_kurzbz');
|
||||
$this->StudierendenantragModel->addSelect('s.insertamum');
|
||||
$this->StudierendenantragModel->addSelect('s.insertvon');
|
||||
|
||||
$this->StudierendenantragModel->db->where_in('public.get_rolle_prestudent(prestudent_id, studiensemester_kurzbz)', $this->config->item('antrag_prestudentstatus_whitelist'));
|
||||
|
||||
$result = $this->StudierendenantragModel->getWithLastStatusWhere([
|
||||
'typ' => Studierendenantrag_model::TYP_ABMELDUNG_STGL,
|
||||
'studierendenantrag_statustyp_kurzbz' => Studierendenantragstatus_model::STATUS_APPROVED,
|
||||
's.insertamum <=' => $dateDeadline->format('c')
|
||||
]);
|
||||
|
||||
if(isError($result))
|
||||
{
|
||||
$this->logError(getError($result));
|
||||
}
|
||||
else
|
||||
{
|
||||
$antraege = getData($result) ?: [];
|
||||
$count = 0;
|
||||
|
||||
foreach ($antraege as $antrag)
|
||||
{
|
||||
$result = $this->prestudentlib->setAbbrecher(
|
||||
$antrag->prestudent_id,
|
||||
$antrag->studiensemester_kurzbz,
|
||||
'AntragJob',
|
||||
'abbrecherStgl',
|
||||
$antrag->insertamum,
|
||||
null,
|
||||
$antrag->insertvon ?: $insertvon
|
||||
);
|
||||
if (isError($result))
|
||||
$this->logError(getError($result));
|
||||
else
|
||||
{
|
||||
$count++;
|
||||
$result = $this->PrestudentModel->load($antrag->prestudent_id);
|
||||
if(!hasData($result)) {
|
||||
$this->logWarning('No Prestudent found');
|
||||
continue;
|
||||
}
|
||||
$prestudent = current(getData($result));
|
||||
$result = $this->StudiengangModel->load($prestudent->studiengang_kz);
|
||||
if(!hasData($result)) {
|
||||
$this->logWarning('No Studiengang found');
|
||||
continue;
|
||||
}
|
||||
$studiengang = current(getData($result));
|
||||
$result = $this->PersonModel->loadPrestudent($antrag->prestudent_id);
|
||||
if(!hasData($result))
|
||||
{
|
||||
$this->logWarning('No Person found');
|
||||
continue;
|
||||
}
|
||||
$person = current(getData($result));
|
||||
$email = $studiengang->email;
|
||||
$dataMail = array(
|
||||
'prestudent' => $antrag->prestudent_id,
|
||||
'studiensemester' => $antrag->studiensemester_kurzbz,
|
||||
'name' => trim($person->vorname . ' '. $person->nachname),
|
||||
);
|
||||
|
||||
if(!sendSanchoMail('Sancho_Mail_Antrag_A_Assist', $dataMail, $email, 'Einspruchsfrist abgelaufen'))
|
||||
{
|
||||
$this->logWarning("Failed to send Notification to " . $email);
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->logInfo($count . "/" . count($antraege) . " 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');
|
||||
|
||||
$digi_start = $this->config->item('digitalization_start');
|
||||
if ($digi_start) {
|
||||
try {
|
||||
$digi_start = new DateTime($digi_start);
|
||||
} catch(Exception $e) {
|
||||
}
|
||||
}
|
||||
|
||||
if ($modifier_deadline) {
|
||||
$dateDeadline = new DateTime();
|
||||
$dateDeadline->sub(DateInterval::createFromDateString($modifier_deadline));
|
||||
|
||||
if ($digi_start)
|
||||
$dateDeadline = max($digi_start, $dateDeadline);
|
||||
} else {
|
||||
$dateDeadline = $digi_start ?: null;
|
||||
}
|
||||
|
||||
//first request
|
||||
if ($modifier_request_1) {
|
||||
$dateStichtag = new DateTime();
|
||||
$dateStichtag->sub(DateInterval::createFromDateString($modifier_request_1));
|
||||
if (!$dateDeadline || $dateStichtag > $dateDeadline)
|
||||
$this->sendReminder(
|
||||
'Request1',
|
||||
null,
|
||||
Studierendenantragstatus_model::STATUS_REQUESTSENT_1,
|
||||
$dateDeadline,
|
||||
$dateStichtag,
|
||||
$modifier_deadline,
|
||||
'Aufforderung: Bekanntgabe Wiederholung'
|
||||
);
|
||||
} else
|
||||
$this->logError('Config "wiederholung_job_request_1_date_modifier" nicht gesetzt');
|
||||
|
||||
//second request
|
||||
if ($modifier_request_2) {
|
||||
$dateStichtag = new DateTime();
|
||||
$dateStichtag->sub(DateInterval::createFromDateString($modifier_request_2));
|
||||
if (!$dateDeadline || $dateStichtag > $dateDeadline)
|
||||
$this->sendReminder(
|
||||
'Request2',
|
||||
Studierendenantragstatus_model::STATUS_REQUESTSENT_1,
|
||||
Studierendenantragstatus_model::STATUS_REQUESTSENT_2,
|
||||
$dateDeadline,
|
||||
$dateStichtag,
|
||||
$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_stichtag, $modifier_deadline, $subject)
|
||||
{
|
||||
$this->logInfo('Start Job sendAufforderungWiederholer ' . $name);
|
||||
|
||||
$result = $this->PruefungModel->getAllPrestudentsWhereCommitteeExamFailed($status_from, $date_stichtag, $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);
|
||||
$urlCIS = CIS_ROOT . 'index.ci.php/lehre/Studierendenantrag/wiederholung/' . $prestudent->prestudent_id;
|
||||
$email = $this->StudentModel->getEmailFH($this->StudentModel->getUID($prestudent->prestudent_id));
|
||||
|
||||
$fristende = new DateTime($prestudent->datum);
|
||||
$fristende->add(DateInterval::createFromDateString($modifier_deadline));
|
||||
|
||||
$datum_kp = new DateTime($prestudent->datum);
|
||||
|
||||
$result = $this->StudiensemesterModel->getNextFrom($prestudent->studiensemester_kurzbz);
|
||||
$next_sem = "";
|
||||
$sem_after_next_sem = "";
|
||||
if (hasData($result)) {
|
||||
$next_sem = current(getData($result))->studiensemester_kurzbz;
|
||||
$result = $this->StudiensemesterModel->getNextFrom($next_sem);
|
||||
if (hasData($result)) {
|
||||
$sem_after_next_sem = current(getData($result))->studiensemester_kurzbz;
|
||||
}
|
||||
}
|
||||
|
||||
$this->load->model('crm/Prestudentstatus_model', 'PrestudentstatusModel');
|
||||
$result = $this->PrestudentstatusModel->loadLastWithStgDetails($prestudent->prestudent_id, $prestudent->studiensemester_kurzbz);
|
||||
if (hasData($result)) {
|
||||
$ausbildungssemester = current(getData($result))->semester;
|
||||
}
|
||||
|
||||
$dataMail = array(
|
||||
'name'=> trim($prestudent->vorname . ' '. $prestudent->nachname),
|
||||
'vorname' => $prestudent->vorname,
|
||||
'nachname' => $prestudent->nachname,
|
||||
'pers_kz'=> $prestudent->matrikelnr,
|
||||
'stg' => $prestudent->bezeichnung,
|
||||
'lvbezeichnung' => $prestudent->lvbezeichnung,
|
||||
'datum_kp' => $datum_kp->format('d.m.Y'),
|
||||
'studiensemester'=> $prestudent->studiensemester_kurzbz,
|
||||
'Orgform'=> $prestudent->orgform,
|
||||
'prestudent_id' => $prestudent->prestudent_id,
|
||||
'url' => $url,
|
||||
'urlCIS' => $urlCIS,
|
||||
'fristablauf' => $fristende->format('d.m.Y'),
|
||||
'pre_wiederholer_sem' => $next_sem,
|
||||
'wiederholer_sem' => $sem_after_next_sem,
|
||||
'sem' => $ausbildungssemester
|
||||
);
|
||||
|
||||
// NOTE(chris): Sancho mail
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,9 @@ if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class ReihungstestJob extends JOB_Controller
|
||||
{
|
||||
|
||||
const LAST_DAYS_PRESTUDENTSTATUS = 5;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
@@ -826,7 +829,7 @@ class ReihungstestJob extends JOB_Controller
|
||||
AND tbl_studiengang.typ IN ('b', 'm')
|
||||
)
|
||||
SELECT * FROM prst
|
||||
WHERE prestudenstatus_datum >= (SELECT CURRENT_DATE - 1)
|
||||
WHERE prestudenstatus_datum >= (SELECT CURRENT_DATE - ". self::LAST_DAYS_PRESTUDENTSTATUS .")
|
||||
AND (studiengang_typ = 'b' OR (studiengang_typ = 'm' AND EXISTS (SELECT 1 /* Master Studiengänge berücksichtigen wenn auch Bachelor im gleichen Semester */
|
||||
FROM prst prstb
|
||||
WHERE studiengang_typ = 'b'
|
||||
@@ -868,7 +871,8 @@ class ReihungstestJob extends JOB_Controller
|
||||
tbl_person.nachname,
|
||||
tbl_person.vorname,
|
||||
tbl_prestudent.*,
|
||||
tbl_studiengang.typ AS studiengang_typ
|
||||
tbl_studiengang.typ AS studiengang_typ,
|
||||
tbl_prestudentstatus.datum
|
||||
FROM PUBLIC.tbl_person
|
||||
JOIN PUBLIC.tbl_prestudent USING (person_id)
|
||||
JOIN PUBLIC.tbl_prestudentstatus USING (prestudent_id)
|
||||
@@ -901,7 +905,7 @@ class ReihungstestJob extends JOB_Controller
|
||||
$mailArray[$rowNiedrPrios->studiengang_kz][$rowNiedrPrios->orgform_kurzbz]['AufnahmeHoeherePrio'][]
|
||||
= $rowNiedrPrios->nachname.' '.$rowNiedrPrios->vorname.' ('.$rowNiedrPrios->prestudent_id.')';
|
||||
}
|
||||
elseif ($rowNiedrPrios->laststatus == 'Bewerber')
|
||||
elseif ($rowNiedrPrios->laststatus == 'Bewerber' && $row_ps->prestudenstatus_datum > $rowNiedrPrios->datum)
|
||||
{
|
||||
// Abgewiesenen-Status mit Statusgrund "Aufnahme anderer Studiengang" (ID 5) setzen
|
||||
$lastStatus = $this->PrestudentstatusModel->getLastStatus($rowNiedrPrios->prestudent_id);
|
||||
@@ -927,7 +931,7 @@ class ReihungstestJob extends JOB_Controller
|
||||
= $rowNiedrPrios->nachname.' '.$rowNiedrPrios->vorname.' ('.$rowNiedrPrios->prestudent_id.')';
|
||||
}
|
||||
}
|
||||
elseif ($rowNiedrPrios->laststatus == 'Wartender')
|
||||
elseif ($rowNiedrPrios->laststatus == 'Wartender' && $row_ps->prestudenstatus_datum > $rowNiedrPrios->datum)
|
||||
{
|
||||
// Abgewiesenen-Status mit Statusgrund "Aufnahme anderer Studiengang" (ID 5) setzen
|
||||
// Mail zur Info an Assistenz schicken
|
||||
|
||||
@@ -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,48 @@
|
||||
<?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)
|
||||
{
|
||||
|
||||
$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)
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,188 @@
|
||||
<?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->getPrestudentWiederholungsBerechtigt($antrag->prestudent_id);
|
||||
if (getData($result) == 1)
|
||||
$prestudentenArr[$antrag->prestudent_id]['allowedNewTypes'][] = 'Wiederholung';
|
||||
|
||||
$result = $this->antraglib->getPrestudentUnterbrechungsBerechtigt($antrag->prestudent_id);
|
||||
if (getData($result) == 1)
|
||||
$prestudentenArr[$antrag->prestudent_id]['allowedNewTypes'][] = 'Unterbrechung';
|
||||
|
||||
$result = $this->antraglib->getPrestudentAbmeldeBerechtigt($antrag->prestudent_id);
|
||||
if (getData($result) == 1)
|
||||
$prestudentenArr[$antrag->prestudent_id]['allowedNewTypes'][] = 'Abmeldung';
|
||||
}
|
||||
if ($antrag->studierendenantrag_id == null)
|
||||
continue;
|
||||
if ($antrag->typ == Studierendenantrag_model::TYP_ABMELDUNG_STGL && (!$antrag->isapproved))
|
||||
continue;
|
||||
|
||||
$prestudentenArr[$antrag->prestudent_id]['antraege'][] = $antrag;
|
||||
}
|
||||
|
||||
$this->load->view('lehre/Antrag/Student/List', [
|
||||
'antraege' => $prestudentenArr
|
||||
]);
|
||||
}
|
||||
|
||||
public function leitung()
|
||||
{
|
||||
$stgL = $this->permissionlib->getSTG_isEntitledFor('student/antragfreigabe') ?: [];
|
||||
|
||||
$stgA = $this->permissionlib->getSTG_isEntitledFor('student/studierendenantrag') ?: [];
|
||||
|
||||
$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 abmeldungstgl($prestudent_id, $studierendenantrag_id = null)
|
||||
{
|
||||
$this->load->view('lehre/Antrag/Create', [
|
||||
'prestudent_id' => $prestudent_id,
|
||||
'studierendenantrag_id' => $studierendenantrag_id,
|
||||
'antrag_type' => 'AbmeldungStgl'
|
||||
]);
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -242,7 +242,7 @@ class approveAnrechnungDetail extends Auth_Controller
|
||||
$empfehlungsanfrage_an = !isEmptyArray($result) ? implode(', ', array_column($result, 'fullname')) : '';
|
||||
|
||||
// Request Recommendation
|
||||
if($this->anrechnunglib->requestRecommendation($anrechnung_id))
|
||||
if ($this->anrechnunglib->requestRecommendation($anrechnung_id))
|
||||
{
|
||||
$retval[]= array(
|
||||
'anrechnung_id' => $anrechnung_id,
|
||||
@@ -254,31 +254,23 @@ class approveAnrechnungDetail extends Auth_Controller
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send mails to lectors
|
||||
* NOTE: mails are sent at the end to ensure sending only ONE mail to each LV-Leitung or lector
|
||||
* even if they are required for more recommendations
|
||||
* */
|
||||
if (!isEmptyArray($retval))
|
||||
{
|
||||
if ($this->config->item('send_mail') === TRUE)
|
||||
{
|
||||
$this->_sendSanchoMailToLectors($anrechnung_id);
|
||||
}
|
||||
|
||||
// Output json to ajax
|
||||
return $this->outputJsonSuccess($retval);
|
||||
}
|
||||
|
||||
// Output json to ajax
|
||||
if ($empfehlungsanfrage_an == '')
|
||||
{
|
||||
$this->terminateWithJsonError(
|
||||
"Empfehlung wurde nicht angefordert,\nDer LV sind keine LektorInnen zugeteilt."
|
||||
);
|
||||
}
|
||||
|
||||
if (isEmptyArray($retval))
|
||||
{
|
||||
$this->terminateWithJsonError(
|
||||
"Empfehlung wurde nicht angefordert,\nDer LV sind keine LektorInnen zugeteilt."
|
||||
);
|
||||
$this->terminateWithJsonError("Empfehlung wurde nicht angefordert");
|
||||
}
|
||||
|
||||
$this->terminateWithJsonError($this->p->t('ui', 'errorNichtAusgefuehrt'));
|
||||
else
|
||||
{
|
||||
// Output json to ajax
|
||||
return $this->outputJsonSuccess($retval);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -249,19 +249,6 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Send mails
|
||||
* NOTE: mails are sent at the end to ensure sending only ONE mail to each LV-Leitung or lector
|
||||
* even if they are required for more recommendations
|
||||
* */
|
||||
if (!isEmptyArray($retval))
|
||||
{
|
||||
if ($this->config->item('send_mail') === TRUE)
|
||||
{
|
||||
$this->_sendSanchoMail($retval);
|
||||
}
|
||||
}
|
||||
|
||||
// Output json to ajax
|
||||
if (isEmptyArray($retval))
|
||||
{
|
||||
@@ -273,7 +260,7 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
||||
$this->terminateWithJsonError('Es wurden keine Empfehlungen angefordert');
|
||||
}
|
||||
|
||||
return $this->outputJsonSuccess($retval);
|
||||
$this->outputJsonSuccess($retval);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -111,6 +111,8 @@ class requestAnrechnung extends Auth_Controller
|
||||
$lehrveranstaltung_id = $this->input->post('lv_id');
|
||||
$studiensemester_kurzbz = $this->input->post('studiensemester');
|
||||
$bestaetigung = $this->input->post('bestaetigung');
|
||||
$begruendung_ects = $this->input->post('begruendung_ects');
|
||||
$begruendung_lvinhalt = $this->input->post('begruendung_lvinhalt');
|
||||
|
||||
// Validate data
|
||||
if (empty($_FILES['uploadfile']['name']))
|
||||
@@ -121,7 +123,9 @@ class requestAnrechnung extends Auth_Controller
|
||||
if (isEmptyString($begruendung_id) ||
|
||||
isEmptyString($anmerkung) ||
|
||||
isEmptyString($lehrveranstaltung_id) ||
|
||||
isEmptyString($studiensemester_kurzbz))
|
||||
isEmptyString($studiensemester_kurzbz) ||
|
||||
isEmptyString($begruendung_ects) ||
|
||||
isEmptyString($begruendung_lvinhalt))
|
||||
{
|
||||
return $this->outputJsonError($this->p->t('ui', 'errorFelderFehlen'));
|
||||
}
|
||||
@@ -172,7 +176,9 @@ class requestAnrechnung extends Auth_Controller
|
||||
$lehrveranstaltung_id,
|
||||
$begruendung_id,
|
||||
$lastInsert_dms_id,
|
||||
$anmerkung
|
||||
$anmerkung,
|
||||
$begruendung_ects,
|
||||
$begruendung_lvinhalt
|
||||
);
|
||||
|
||||
if (isError($result))
|
||||
|
||||
@@ -21,6 +21,7 @@ class InfoCenter extends Auth_Controller
|
||||
const FREIGEGEBEN_PAGE = 'freigegeben';
|
||||
const REIHUNGSTESTABSOLVIERT_PAGE = 'reihungstestAbsolviert';
|
||||
const ABGEWIESEN_PAGE = 'abgewiesen';
|
||||
const AUFGENOMMEN_PAGE = 'aufgenommen';
|
||||
const SHOW_DETAILS_PAGE = 'showDetails';
|
||||
const SHOW_ZGV_DETAILS_PAGE = 'showZGVDetails';
|
||||
const ZGV_UBERPRUEFUNG_PAGE = 'ZGVUeberpruefung';
|
||||
@@ -115,6 +116,7 @@ class InfoCenter extends Auth_Controller
|
||||
'index' => 'infocenter:r',
|
||||
'freigegeben' => 'infocenter:r',
|
||||
'abgewiesen' => 'infocenter:r',
|
||||
'aufgenommen' => 'infocenter:r',
|
||||
'reihungstestAbsolviert' => 'infocenter:r',
|
||||
'showDetails' => 'infocenter:r',
|
||||
'showZGVDetails' => 'lehre/zgvpruefung:r',
|
||||
@@ -228,6 +230,16 @@ class InfoCenter extends Auth_Controller
|
||||
|
||||
$this->load->view('system/infocenter/infocenterAbgewiesen.php');
|
||||
}
|
||||
|
||||
/**
|
||||
* Aufgenommene page of the InfoCenter tool
|
||||
*/
|
||||
public function aufgenommen()
|
||||
{
|
||||
$this->_setNavigationMenu(self::AUFGENOMMEN_PAGE); // define the navigation menu for this page
|
||||
|
||||
$this->load->view('system/infocenter/infocenterAufgenommen.php');
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -314,7 +326,7 @@ class InfoCenter extends Auth_Controller
|
||||
show_error('Person does not exist!');
|
||||
|
||||
$origin_page = $this->input->get(self::ORIGIN_PAGE);
|
||||
if ($origin_page == self::INDEX_PAGE)
|
||||
if (in_array($origin_page, array(self::INDEX_PAGE, self::ABGEWIESEN_PAGE)))
|
||||
{
|
||||
// mark person as locked for editing
|
||||
$result = $this->PersonLockModel->lockPerson($person_id, $this->_uid, self::APP);
|
||||
@@ -359,7 +371,14 @@ class InfoCenter extends Auth_Controller
|
||||
|
||||
if (isError($result)) show_error(getError($result));
|
||||
|
||||
$redirectLink = '/'.self::INFOCENTER_URI.'?'.self::FHC_CONTROLLER_ID.'='.$this->getControllerId();
|
||||
$origin_page = $this->input->get(self::ORIGIN_PAGE);
|
||||
|
||||
if ($origin_page === self::ABGEWIESEN_PAGE)
|
||||
$redirectLink = self::INFOCENTER_URI. '/' .self::ABGEWIESEN_PAGE;
|
||||
else
|
||||
$redirectLink = '/'.self::INFOCENTER_URI;
|
||||
|
||||
$redirectLink .= '?'.self::FHC_CONTROLLER_ID.'='.$this->getControllerId();
|
||||
|
||||
// Force reload of Dataset after Unlock
|
||||
$redirectLink .= '&'.self::KEEP_TABLESORTER_FILTER.'=true';
|
||||
@@ -1526,6 +1545,7 @@ class InfoCenter extends Auth_Controller
|
||||
$freigegebenLink = site_url(self::INFOCENTER_URI.'/'.self::FREIGEGEBEN_PAGE);
|
||||
$reihungstestAbsolviertLink = site_url(self::INFOCENTER_URI.'/'.self::REIHUNGSTESTABSOLVIERT_PAGE);
|
||||
$abgewiesenLink = site_url(self::INFOCENTER_URI.'/'.self::ABGEWIESEN_PAGE);
|
||||
$aufgenommenLink = site_url(self::INFOCENTER_URI.'/'.self::AUFGENOMMEN_PAGE);
|
||||
|
||||
$currentFilterId = $this->input->get(self::FILTER_ID);
|
||||
if (isset($currentFilterId))
|
||||
@@ -1533,6 +1553,7 @@ class InfoCenter extends Auth_Controller
|
||||
$freigegebenLink .= '?'.self::PREV_FILTER_ID.'='.$currentFilterId;
|
||||
$reihungstestAbsolviertLink .= '?'.self::PREV_FILTER_ID.'='.$currentFilterId;
|
||||
$abgewiesenLink .= '?'.self::PREV_FILTER_ID.'='.$currentFilterId;
|
||||
$aufgenommenLink .= '?'.self::PREV_FILTER_ID.'='.$currentFilterId;
|
||||
}
|
||||
|
||||
$this->navigationlib->setSessionMenu(
|
||||
@@ -1583,7 +1604,19 @@ class InfoCenter extends Auth_Controller
|
||||
null, // subscriptLinkValue
|
||||
'', // target
|
||||
30 // sort
|
||||
)
|
||||
),
|
||||
'aufgenommen' => $this->navigationlib->oneLevel(
|
||||
'Aufgenommene', // description
|
||||
$aufgenommenLink, // link
|
||||
null, // children
|
||||
'check', // icon
|
||||
null, // subscriptDescription
|
||||
false, // expand
|
||||
null, // subscriptLinkClass
|
||||
null, // subscriptLinkValue
|
||||
'', // target
|
||||
40 // sort
|
||||
),
|
||||
)
|
||||
);
|
||||
}
|
||||
@@ -1611,6 +1644,9 @@ class InfoCenter extends Auth_Controller
|
||||
if ($origin_page === self::ABGEWIESEN_PAGE)
|
||||
$link = site_url(self::INFOCENTER_URI.'/'.self::ABGEWIESEN_PAGE);
|
||||
|
||||
if ($origin_page === self::AUFGENOMMEN_PAGE)
|
||||
$link = site_url(self::INFOCENTER_URI.'/'.self::AUFGENOMMEN_PAGE);
|
||||
|
||||
$prevFilterId = $this->input->get(self::PREV_FILTER_ID);
|
||||
if (isset($prevFilterId))
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -174,6 +174,8 @@ class AnrechnungLib
|
||||
$anrechnung_data->insertvon = '';
|
||||
$anrechnung_data->studiensemester_kurzbz = '';
|
||||
$anrechnung_data->empfehlung = '';
|
||||
$anrechnung_data->begruendung_ects = '';
|
||||
$anrechnung_data->begruendung_lvinhalt = '';
|
||||
$anrechnung_data->status_kurzbz = '';
|
||||
$anrechnung_data->status = getUserLanguage() == 'German' ? 'neu' : 'new';
|
||||
$anrechnung_data->dokumentname = '';
|
||||
@@ -894,6 +896,8 @@ class AnrechnungLib
|
||||
$anrechnung_data->insertvon= $anrechnung->insertvon;
|
||||
$anrechnung_data->studiensemester_kurzbz= $anrechnung->studiensemester_kurzbz;
|
||||
$anrechnung_data->empfehlung= $anrechnung->empfehlung_anrechnung;
|
||||
$anrechnung_data->begruendung_ects = $anrechnung->begruendung_ects;
|
||||
$anrechnung_data->begruendung_lvinhalt = $anrechnung->begruendung_lvinhalt;
|
||||
|
||||
// Get last status_kurzbz
|
||||
$result = $this->ci->AnrechnungModel->getLastAnrechnungstatus($anrechnung->anrechnung_id);
|
||||
|
||||
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(
|
||||
|
||||
@@ -182,6 +182,7 @@ class MailLib
|
||||
{
|
||||
if ($this->sended == $this->email_number_per_time_range)
|
||||
{
|
||||
$this->sended = 0;
|
||||
sleep($this->email_time_range); // Wait!!!
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,412 @@
|
||||
<?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');
|
||||
$this->_ci->load->model('organisation/Studiengang_model', 'StudiengangModel');
|
||||
}
|
||||
|
||||
public function setAbbrecher($prestudent_id, $studiensemester_kurzbz, $insertvon = null, $statusgrund_kurzbz = null, $datum = null, $bestaetigtam = null, $bestaetigtvon = null)
|
||||
{
|
||||
if (!$insertvon)
|
||||
$insertvon = getAuthUID();
|
||||
if (!$bestaetigtvon)
|
||||
$bestaetigtvon = $insertvon;
|
||||
|
||||
$result = $this->_ci->PrestudentstatusModel->getLastStatus($prestudent_id, $studiensemester_kurzbz);
|
||||
if (isError($result))
|
||||
return $result;
|
||||
$result = getData($result);
|
||||
if (!$result)
|
||||
return error($this->_ci->p->t('studierendenantrag', 'error_no_prestudent_in_sem', [
|
||||
'prestudent_id' => $prestudent_id,
|
||||
'studiensemester_kurzbz' => $studiensemester_kurzbz
|
||||
]));
|
||||
|
||||
$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($this->_ci->p->t('studierendenantrag', 'error_no_student_for_prestudent', ['prestudent_id' => $prestudent_id]));
|
||||
|
||||
$student = current($result);
|
||||
|
||||
if(!$datum)
|
||||
$datum = date('c');
|
||||
|
||||
if(!$bestaetigtam)
|
||||
$bestaetigtam = date('c');
|
||||
|
||||
//Status und Statusgrund updaten
|
||||
$result = $this->_ci->PrestudentstatusModel->withGrund($statusgrund_kurzbz)->insert([
|
||||
'prestudent_id' => $prestudent_id,
|
||||
'status_kurzbz' => Prestudentstatus_model::STATUS_ABBRECHER,
|
||||
'studiensemester_kurzbz' => $studiensemester_kurzbz,
|
||||
'ausbildungssemester' => $prestudent_status->ausbildungssemester,
|
||||
'datum' => $datum,
|
||||
'insertvon' => $insertvon,
|
||||
'insertamum' => date('c'),
|
||||
'orgform_kurzbz'=> $prestudent_status->orgform_kurzbz,
|
||||
'studienplan_id'=> $prestudent_status->studienplan_id,
|
||||
'bestaetigtvon' => $bestaetigtvon,
|
||||
'bestaetigtam' => $bestaetigtam
|
||||
]);
|
||||
|
||||
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)
|
||||
{
|
||||
$ausbildungssemester_plus = 0;
|
||||
if (!$insertvon)
|
||||
$insertvon = getAuthUID();
|
||||
|
||||
$result = $this->_ci->PrestudentstatusModel->getLastStatus($prestudent_id, $studiensemester_kurzbz);
|
||||
if (isError($result))
|
||||
return $result;
|
||||
$result = getData($result);
|
||||
if (!$result) {
|
||||
//NOTE(manu): only valid if nextSemester focus max
|
||||
|
||||
$result = $this->_ci->PrestudentstatusModel->getLastStatus($prestudent_id);
|
||||
if (isError($result))
|
||||
return $result;
|
||||
$result = getData($result);
|
||||
|
||||
//check if ausbildungssemester is last
|
||||
$this->_ci->StudiengangModel->addJoin('public.tbl_prestudent p', 'studiengang_kz');
|
||||
$res = $this->_ci->StudiengangModel->loadWhere(['p.prestudent_id' => $prestudent_id]);
|
||||
if(isError($res))
|
||||
return $res;
|
||||
if(!hasData($res))
|
||||
return error($this->_ci->p->t('studierendenantrag', 'error_no_stg_for_prestudent', [
|
||||
'prestudent_id' => $prestudent_id
|
||||
]));
|
||||
|
||||
$studiengang = current(getData($res));
|
||||
$prestudent_status = current($result);
|
||||
if($prestudent_status->ausbildungssemester + 1 < $studiengang->max_semester)
|
||||
$ausbildungssemester_plus = 1;
|
||||
|
||||
if(!$result)
|
||||
{
|
||||
return error($this->_ci->p->t('studierendenantrag', 'error_no_prestudent_in_sem', [
|
||||
'prestudent_id' => $prestudent_id,
|
||||
'studiensemester_kurzbz' => $studiensemester_kurzbz
|
||||
]));
|
||||
}
|
||||
}
|
||||
|
||||
$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($this->_ci->p->t('studierendenantrag', 'error_no_student_for_prestudent', ['prestudent_id' => $prestudent_id]));
|
||||
|
||||
$student = current($result);
|
||||
|
||||
$resultAntrag = $this->_ci->StudierendenantragModel->load($studierendenantrag_id);
|
||||
if (isError($resultAntrag))
|
||||
return $resultAntrag;
|
||||
$resultAntrag = getData($resultAntrag);
|
||||
if (!$resultAntrag)
|
||||
return error($this->_ci->p->t('studierendenantrag', 'error_no_antrag_found', ['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 + $ausbildungssemester_plus,
|
||||
'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
|
||||
]);
|
||||
|
||||
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
|
||||
$result = $this->_ci->StudentlehrverbandModel->loadWhere([
|
||||
'studiensemester_kurzbz' => $studiensemester_kurzbz,
|
||||
'student_uid' => $student->student_uid
|
||||
]);
|
||||
if (hasData($result)) {
|
||||
$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
|
||||
]);
|
||||
} else {
|
||||
$this->_ci->StudentlehrverbandModel->insert([
|
||||
'student_uid' => $student->student_uid,
|
||||
'studiensemester_kurzbz' => $studiensemester_kurzbz,
|
||||
'studiengang_kz' => $student->studiengang_kz,
|
||||
'semester' => 0,
|
||||
'verband' => 'B',
|
||||
'gruppe' => '',
|
||||
'insertamum' => date('c'),
|
||||
'insertvon' => $insertvon
|
||||
]);
|
||||
}
|
||||
|
||||
return success();
|
||||
}
|
||||
}
|
||||
@@ -85,6 +85,12 @@ class GbDatumWeitZurueck extends PlausiChecker
|
||||
$params[] = $studiengang_kz;
|
||||
}
|
||||
|
||||
if (isset($exkludierte_studiengang_kz) && !isEmptyArray($exkludierte_studiengang_kz))
|
||||
{
|
||||
$qry .= " AND stg.studiengang_kz NOT IN ?";
|
||||
$params[] = $exkludierte_studiengang_kz;
|
||||
}
|
||||
|
||||
$qry .= ")";
|
||||
|
||||
if (isset($person_id))
|
||||
@@ -93,12 +99,6 @@ class GbDatumWeitZurueck extends PlausiChecker
|
||||
$params[] = $person_id;
|
||||
}
|
||||
|
||||
if (isset($exkludierte_studiengang_kz) && !isEmptyArray($exkludierte_studiengang_kz))
|
||||
{
|
||||
$qry .= " AND stg.studiengang_kz NOT IN ?";
|
||||
$params[] = $exkludierte_studiengang_kz;
|
||||
}
|
||||
|
||||
return $this->_db->execReadOnlyQuery($qry, $params);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
class Abschluss_model extends DB_Model
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->dbTable = 'bis.tbl_abschluss';
|
||||
$this->pk = 'ausbildung_code';
|
||||
}
|
||||
|
||||
public function getActiveAbschluesse($languageIndex)
|
||||
{
|
||||
return $this->execQuery(
|
||||
'
|
||||
SELECT
|
||||
ausbildung_code, bezeichnung[?], in_oesterreich
|
||||
FROM
|
||||
bis.tbl_abschluss
|
||||
WHERE
|
||||
aktiv
|
||||
ORDER BY
|
||||
CASE WHEN in_oesterreich THEN 0 ELSE 1 END, ausbildung_code',
|
||||
array($languageIndex)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
class Uhstat1daten_model extends DB_Model
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->dbTable = 'bis.tbl_uhstat1daten';
|
||||
$this->pk = 'uhstat1daten_id';
|
||||
}
|
||||
}
|
||||
@@ -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,112 @@ 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_orgform.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.bezeichnung AS stg_bezeichnung,
|
||||
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', 'COALESCE(tbl_studienplan.orgform_kurzbz, ' . $this->dbTable . '.orgform_kurzbz, tbl_studiengang.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('lehre.tbl_studienplan plan', 'studienplan_id', 'LEFT');
|
||||
$this->addJoin('bis.tbl_orgform o', 'COALESCE(plan.orgform_kurzbz, ' . $this->dbTable . '.orgform_kurzbz, 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);
|
||||
}
|
||||
|
||||
/**
|
||||
* call like this:
|
||||
* $this->PrestudentstatusModel->withGrund('grund_kurzbz')->update($id, $otherData);
|
||||
* or:
|
||||
* $this->PrestudentstatusModel->withGrund('grund_kurzbz')->insert($otherData);
|
||||
* @param string $statusgrund_kurzbz
|
||||
* @return object $this
|
||||
*/
|
||||
public function withGrund($statusgrund_kurzbz)
|
||||
{
|
||||
if($statusgrund_kurzbz)
|
||||
$this->db->set(
|
||||
'statusgrund_id',
|
||||
'(SELECT statusgrund_id FROM public.tbl_status_grund WHERE statusgrund_kurzbz =' . $this->db->escape($statusgrund_kurzbz) .')',
|
||||
false
|
||||
);
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ class Rueckstellung_model extends DB_Model
|
||||
$this->addLimit(1);
|
||||
$this->addJoin('tbl_rueckstellung_status', 'status_kurzbz');
|
||||
$this->addSelect('*,
|
||||
array_to_json(bezeichnung_mehrsprachig::varchar[])->>'.$language_index . 'as bezeichnung');
|
||||
array_to_json(bezeichnung_mehrsprachig::varchar[])->>'.$language_index . ' as bezeichnung');
|
||||
$this->addOrder('datum_bis', 'DESC');
|
||||
|
||||
$where['person_id'] = $person_id;
|
||||
|
||||
@@ -82,4 +82,14 @@ class Student_model extends DB_Model
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the FH-Email for a student (not the private kontakt emailt)
|
||||
* @param $student_uid
|
||||
* @return string
|
||||
*/
|
||||
public function getEmailFH($student_uid)
|
||||
{
|
||||
return $student_uid . '@' . DOMAIN;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ class Anrechnung_model extends DB_Model
|
||||
*/
|
||||
public function createAnrechnungsantrag(
|
||||
$prestudent_id, $studiensemester_kurzbz, $lehrveranstaltung_id,
|
||||
$begruendung_id, $dms_id, $anmerkung_student = null
|
||||
$begruendung_id, $dms_id, $anmerkung_student = null, $begruendung_ects = null, $begruendung_lvinhalt = null
|
||||
)
|
||||
{
|
||||
// Start DB transaction
|
||||
@@ -44,6 +44,8 @@ class Anrechnung_model extends DB_Model
|
||||
'dms_id' => $dms_id,
|
||||
'studiensemester_kurzbz' => $studiensemester_kurzbz,
|
||||
'anmerkung_student' => $anmerkung_student,
|
||||
'begruendung_ects' => $begruendung_ects,
|
||||
'begruendung_lvinhalt' => $begruendung_lvinhalt,
|
||||
'insertvon' => $this->_uid
|
||||
));
|
||||
|
||||
|
||||
@@ -29,11 +29,223 @@ 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));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* NOTE(chris): not used
|
||||
* @return string
|
||||
*/
|
||||
protected function loadWhereThreeExamsFailed()
|
||||
{
|
||||
$this->load->config('studierendenantrag');
|
||||
|
||||
$this->dbTable = 'lehre.tbl_pruefung p';
|
||||
|
||||
$sprache_index = "SELECT index FROM public.tbl_sprache WHERE sprache='" . getUserLanguage() . "' LIMIT 1";
|
||||
|
||||
$this->addSelect('max(p.datum) as 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->addSelect('count(1) as count');
|
||||
|
||||
$this->addGroupBy([
|
||||
'pers.vorname',
|
||||
'pers.nachname',
|
||||
'pers.person_id',
|
||||
's.matrikelnr',
|
||||
'g.bezeichnung',
|
||||
'g.studiengang_kz',
|
||||
'o.bezeichnung_mehrsprachig',
|
||||
'ps.prestudent_id',
|
||||
'lv.bezeichnung',
|
||||
'le.studiensemester_kurzbz',
|
||||
'a.typ',
|
||||
'a.studierendenantrag_id'
|
||||
]);
|
||||
$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('public.tbl_prestudentstatus pss', 'pss.prestudent_id=ps.prestudent_id AND pss.studiensemester_kurzbz=le.studiensemester_kurzbz AND pss.status_kurzbz=get_rolle_prestudent(ps.prestudent_id, le.studiensemester_kurzbz)', 'LEFT');
|
||||
$this->addJoin('lehre.tbl_studienplan plan', 'studienplan_id', 'LEFT');
|
||||
$this->addJoin('bis.tbl_orgform o', 'COALESCE(plan.orgform_kurzbz, pss.orgform_kurzbz, 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_in("p.pruefungstyp_kurzbz1", ['kommPruef','zusKommPruef']);*/
|
||||
$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_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
|
||||
);
|
||||
|
||||
return $this->db->get_compiled_select($this->dbTable);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return stdClass
|
||||
*/
|
||||
public function loadWhereCommitteeExamsFailed()
|
||||
{
|
||||
$this->load->config('studierendenantrag');
|
||||
|
||||
$this->dbTable = 'lehre.tbl_pruefung p';
|
||||
|
||||
$this->addSelect('p.datum');
|
||||
|
||||
$this->addJoin('lehre.tbl_note n', 'note');
|
||||
|
||||
$this->db->where("n.positiv", false);
|
||||
$note_blacklist = $this->config->item('note_blacklist_wiederholung');
|
||||
if ($note_blacklist)
|
||||
$this->db->where_not_in("n.note", $note_blacklist);
|
||||
$this->db->where_in("p.pruefungstyp_kurzbz", ['kommPruef','zusKommPruef']);
|
||||
|
||||
return $this->load();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
protected function withDetailsForStudierendenAntrag()
|
||||
{
|
||||
$this->load->config('studierendenantrag');
|
||||
|
||||
$sprache_index = "SELECT index FROM public.tbl_sprache WHERE sprache='" . getUserLanguage() . "' LIMIT 1";
|
||||
|
||||
$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_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('public.tbl_prestudentstatus pss', 'pss.prestudent_id=ps.prestudent_id AND pss.studiensemester_kurzbz=le.studiensemester_kurzbz AND pss.status_kurzbz=get_rolle_prestudent(ps.prestudent_id, le.studiensemester_kurzbz)', 'LEFT');
|
||||
$this->addJoin('lehre.tbl_studienplan plan', 'studienplan_id', 'LEFT');
|
||||
$this->addJoin('bis.tbl_orgform o', 'COALESCE(plan.orgform_kurzbz, pss.orgform_kurzbz, g.orgform_kurzbz)=o.orgform_kurzbz');
|
||||
$this->addJoin('campus.tbl_studierendenantrag a', 'ps.prestudent_id=a.prestudent_id and a.typ=' . $this->escape(Studierendenantrag_model::TYP_WIEDERHOLUNG), 'LEFT');
|
||||
|
||||
$this->db->where_in("get_rolle_prestudent(ps.prestudent_id, null)", $this->config->item('antrag_prestudentstatus_whitelist'));
|
||||
|
||||
$this->db->where("g.aktiv", true);
|
||||
|
||||
$statusgruende = $this->config->item('status_gruende_wiederholer');
|
||||
if (is_array($statusgruende) && !isEmptyArray($statusgruende)) {
|
||||
foreach ($statusgruende as $k => $v) {
|
||||
$statusgruende[$k] = $this->db->escape($v);
|
||||
}
|
||||
$this->db->where('lv.studiengang_kz NOT IN(
|
||||
SELECT ps1.studiengang_kz
|
||||
FROM
|
||||
public.tbl_prestudent ps1
|
||||
JOIN public.tbl_prestudentstatus pss USING (prestudent_id)
|
||||
WHERE pss.statusgrund_id in (' . implode(',', $statusgruende) . ')
|
||||
AND ps.prestudent_id = ps1.prestudent_id)', null, false);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param integer $prestudent_id student_uid
|
||||
*
|
||||
* @return stdClass
|
||||
*/
|
||||
public function loadWhereCommitteeExamFailedForPrestudent($prestudent_id)
|
||||
{
|
||||
$this->withDetailsForStudierendenAntrag();
|
||||
|
||||
$this->db->where('ps.prestudent_id', $prestudent_id);
|
||||
|
||||
return $this->loadWhereCommitteeExamsFailed();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $status
|
||||
* @param \DateTime $maxDate
|
||||
* @param \DateTime $minDate
|
||||
*
|
||||
* @return stdClass
|
||||
*/
|
||||
public function getAllPrestudentsWhereCommitteeExamFailed($status, $maxDate, $minDate)
|
||||
{
|
||||
$this->withDetailsForStudierendenAntrag();
|
||||
|
||||
if ($maxDate)
|
||||
$this->db->where("p.datum <= ", $maxDate->format('Y-m-d'));
|
||||
if ($minDate)
|
||||
$this->db->where("p.datum > ", $minDate->format('Y-m-d'));
|
||||
|
||||
$this->db->where("b.aktiv", true);
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
return $this->loadWhereCommitteeExamsFailed();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,250 @@
|
||||
<?php
|
||||
class Studierendenantrag_model extends DB_Model
|
||||
{
|
||||
|
||||
const TYP_ABMELDUNG = 'Abmeldung';
|
||||
const TYP_ABMELDUNG_STGL = 'AbmeldungStgl';
|
||||
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('p.prestudent_id');
|
||||
$this->addSelect('p.studiengang_kz');
|
||||
$this->addSelect('semester');
|
||||
$this->addSelect($this->dbTable . '.grund');
|
||||
$this->addSelect($this->dbTable . '.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 ss', 'studiensemester_kurzbz');
|
||||
$this->addJoin('public.tbl_prestudentstatus ps', 'ps.prestudent_id=p.prestudent_id AND ps.studiensemester_kurzbz=ss.studiensemester_kurzbz AND ps.status_kurzbz=get_rolle_prestudent(p.prestudent_id, ss.studiensemester_kurzbz)');
|
||||
$this->addJoin('lehre.tbl_studienplan plan', 'studienplan_id', 'LEFT');
|
||||
$this->addJoin('bis.tbl_orgform of', 'of.orgform_kurzbz=COALESCE(plan.orgform_kurzbz, ps.orgform_kurzbz, stg.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, $types = null)
|
||||
{
|
||||
$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'
|
||||
);
|
||||
|
||||
if ($types && is_array($types)) {
|
||||
$this->db->where_in('typ', $types);
|
||||
}
|
||||
|
||||
$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('stg.bezeichnung');
|
||||
$this->addSelect('s.ausbildungssemester');
|
||||
$this->addSelect('COALESCE(plan.orgform_kurzbz, s.orgform_kurzbz, stg.orgform_kurzbz) AS 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->addJoin('public.tbl_studiengang stg', 'studiengang_kz', 'LEFT');
|
||||
$this->addJoin('lehre.tbl_studienplan plan', 'studienplan_id', 'LEFT');
|
||||
|
||||
$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->addSelect("(SELECT count(1) FROM campus.tbl_studierendenantrag_status WHERE studierendenantrag_id = " . $this->dbTable . ".studierendenantrag_id AND studierendenantrag_statustyp_kurzbz = 'Genehmigt') AS isapproved", false);
|
||||
|
||||
$this->addJoin('public.tbl_prestudent p', 'prestudent_id', 'RIGHT');
|
||||
$this->addJoin('public.tbl_studiengang stg', 'p.studiengang_kz=stg.studiengang_kz');
|
||||
$this->addJoin('public.tbl_prestudentstatus ps', 'ps.prestudent_id=p.prestudent_id AND ps.studiensemester_kurzbz=' . $this->dbTable . '.studiensemester_kurzbz AND ps.status_kurzbz=get_rolle_prestudent(p.prestudent_id, ' . $this->dbTable . '.studiensemester_kurzbz)', 'LEFT');
|
||||
$this->addJoin('lehre.tbl_studienplan plan', 'studienplan_id', 'LEFT');
|
||||
$this->addJoin('bis.tbl_orgform of', 'of.orgform_kurzbz=COALESCE(plan.orgform_kurzbz, ps.orgform_kurzbz, stg.orgform_kurzbz)');
|
||||
$this->addJoin(
|
||||
'campus.tbl_studierendenantrag_statustyp st',
|
||||
'campus.get_status_studierendenantrag(studierendenantrag_id)=st.studierendenantrag_statustyp_kurzbz',
|
||||
'LEFT'
|
||||
);
|
||||
|
||||
$this->db->where("(SELECT status_kurzbz FROM public.tbl_prestudentstatus WHERE prestudent_id=p.prestudent_id AND status_kurzbz='Student' LIMIT 1) IS NOT NULL", null, false);
|
||||
|
||||
|
||||
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,84 @@
|
||||
<?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'
|
||||
);
|
||||
$this->addJoin('lehre.tbl_note zn', 'z.note = zn.note', '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 AND zn.positiv))' => null
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
class Studierendenantragstatus_model extends DB_Model
|
||||
{
|
||||
|
||||
const STATUS_CREATED = 'Erstellt';
|
||||
const STATUS_APPROVED = 'Genehmigt';
|
||||
const STATUS_REJECTED = 'Abgelehnt';
|
||||
const STATUS_PASS = 'Verzichtet';
|
||||
const STATUS_REOPENED = 'Offen';
|
||||
const STATUS_CANCELLED = 'Zurueckgezogen';
|
||||
const STATUS_LVSASSIGNED = 'Lvszugewiesen';
|
||||
const STATUS_REMINDERSENT = 'EmailVersandt';
|
||||
const STATUS_REQUESTSENT_1 = 'ErsteAufforderungVersandt';
|
||||
const STATUS_REQUESTSENT_2 = 'ZweiteAufforderungVersandt';
|
||||
const STATUS_OBJECTED = 'Beeinsprucht';
|
||||
const STATUS_OBJECTION_DENIED = 'EinspruchAbgelehnt';
|
||||
|
||||
/**
|
||||
* 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,80 @@ 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, $query = 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->addSelect("CONCAT(UPPER(pers.nachname), ' ', pers.vorname, ' (', " . $this->dbTable . ".bezeichnung, ')') AS name");
|
||||
|
||||
$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('lehre.tbl_studienplan plan', 'studienplan_id');
|
||||
$this->addJoin('bis.tbl_orgform o', 'COALESCE(plan.orgform_kurzbz, ps.orgform_kurzbz, ' . $this->dbTable . '.orgform_kurzbz)=o.orgform_kurzbz');
|
||||
$this->addJoin('public.tbl_person pers', 'person_id');
|
||||
$this->addJoin('public.tbl_student stud', 'p.prestudent_id=stud.prestudent_id', 'LEFT');
|
||||
|
||||
$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)) {
|
||||
foreach($not_antrag_typ as $k => $v)
|
||||
$not_antrag_typ[$k] = $this->db->escape($v);
|
||||
$this->addJoin(
|
||||
'campus.tbl_studierendenantrag a',
|
||||
'a.prestudent_id=p.prestudent_id and a.typ in ('.
|
||||
implode(',', $not_antrag_typ).
|
||||
") AND campus.get_status_studierendenantrag (a.studierendenantrag_id)<>'" .
|
||||
Studierendenantragstatus_model::STATUS_CANCELLED . "'",
|
||||
'LEFT'
|
||||
);
|
||||
$this->db->where('a.typ IS NULL');
|
||||
}
|
||||
|
||||
if ($query) {
|
||||
$query = explode(' ', $query);
|
||||
$this->db->group_start();
|
||||
foreach ($query as $q) {
|
||||
$this->db->group_start();
|
||||
$this->db->where('pers.vorname ILIKE', "%" . $q . "%");
|
||||
$this->db->or_where('pers.nachname ILIKE', "%" . $q . "%");
|
||||
$this->db->or_where('stud.student_uid ILIKE', "%" . $q . "%");
|
||||
$this->db->or_where($this->dbTable . '.bezeichnung ILIKE', "%" . $q . "%");
|
||||
if (is_numeric($q))
|
||||
$this->db->or_where('p.prestudent_id', $q);
|
||||
$this->db->group_end();
|
||||
}
|
||||
$this->db->group_end();
|
||||
}
|
||||
|
||||
$this->addOrder('name');
|
||||
|
||||
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,14 @@ class Studiensemester_model extends DB_Model
|
||||
|
||||
return $this->execQuery($query, array($studiensemester_kurzbz));
|
||||
}
|
||||
|
||||
public function getAktAndFutureSemester()
|
||||
{
|
||||
$query = 'SELECT studiensemester_kurzbz
|
||||
FROM public.tbl_studiensemester
|
||||
WHERE start >= NOW() OR (start <= NOW() AND ende >= NOW())
|
||||
ORDER BY start';
|
||||
|
||||
return $this->execQuery($query);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -326,13 +326,28 @@ class Person_model extends DB_Model
|
||||
|
||||
SELECT p2.person_id
|
||||
FROM tbl_person p1
|
||||
JOIN tbl_prestudent ps ON p1.person_id = ps.person_id
|
||||
INNER JOIN (
|
||||
SELECT vorname, nachname, gebdatum, person_id
|
||||
FROM tbl_person
|
||||
) p2
|
||||
SELECT vorname, nachname, gebdatum, person.person_id
|
||||
FROM tbl_person person
|
||||
JOIN tbl_prestudent sps ON person.person_id = sps.person_id
|
||||
) p2
|
||||
ON (lower(p1.vorname) = lower(p2.vorname) AND lower(p1.nachname) = lower(p2.nachname) AND p1.gebdatum = p2.gebdatum)
|
||||
WHERE p1.person_id != p2.person_id AND (p1.person_id = ?)";
|
||||
|
||||
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,274 @@
|
||||
<?php
|
||||
$this->load->view(
|
||||
'templates/FHC-Header',
|
||||
array(
|
||||
'title' => 'UHSTAT1Formular',
|
||||
'jquery3' => true,
|
||||
'bootstrap3' => true,
|
||||
'fontawesome4' => true,
|
||||
'phrases' => array(
|
||||
'ui' => array('speichern')
|
||||
),
|
||||
'customCSSs' => array('public/css/codex/uhstat1.css'),
|
||||
'customJSs' => array('public/js/codex/uhstat1.js')
|
||||
)
|
||||
);
|
||||
?>
|
||||
<?php
|
||||
// initialise form fields
|
||||
$mutter_geburtsjahr = isset($uhstatData->mutter_geburtsjahr) ? $uhstatData->mutter_geburtsjahr : set_value('mutter_geburtsjahr');
|
||||
$mutter_geburtsstaat = isset($uhstatData->mutter_geburtsstaat) ? $uhstatData->mutter_geburtsstaat : set_value('mutter_geburtsstaat');
|
||||
$mutter_bildungsstaat = isset($uhstatData->mutter_bildungsstaat) ? $uhstatData->mutter_bildungsstaat : set_value('mutter_bildungsstaat');
|
||||
$mutter_bildungmax = isset($uhstatData->mutter_bildungmax) ? $uhstatData->mutter_bildungmax : set_value('mutter_bildungmax');
|
||||
$vater_geburtsjahr = isset($uhstatData->vater_geburtsjahr) ? $uhstatData->vater_geburtsjahr : set_value('vater_geburtsjahr');
|
||||
$vater_geburtsstaat = isset($uhstatData->vater_geburtsstaat) ? $uhstatData->vater_geburtsstaat : set_value('vater_geburtsstaat');
|
||||
$vater_bildungsstaat = isset($uhstatData->vater_bildungsstaat) ? $uhstatData->vater_bildungsstaat : set_value('vater_bildungsstaat');
|
||||
$vater_bildungmax = isset($uhstatData->vater_bildungmax) ? $uhstatData->vater_bildungmax : set_value('vater_bildungmax');
|
||||
$readOnly = isset($formMetaData['readOnly']);
|
||||
$disabled = $readOnly ? ' disabled' : '';
|
||||
$editPermission = isset($formMetaData['editPermission']) && $formMetaData['editPermission'] === true;
|
||||
$deletePermission = isset($formMetaData['deletePermission']) && $formMetaData['deletePermission'] === true;
|
||||
$saved = isset($saved) && $saved === true;
|
||||
?>
|
||||
|
||||
<div class='container' id='uhstat1Container'>
|
||||
<h1 class="text-center">
|
||||
<?php echo isset($formMetaData['nachname'])
|
||||
? 'UHSTAT1 Daten für '.(isset($formMetaData['vorname']) ? $formMetaData['vorname'].' ' : '').$formMetaData['nachname']
|
||||
: ''
|
||||
?>
|
||||
</h1>
|
||||
<div id="uhstat1Subcontainer">
|
||||
<input type='hidden' id='uhstat1Saved' value='<?php echo $saved ? 1 : 0 ?>' />
|
||||
<h2><?php echo $this->p->t('uhstat', 'uhstat1AnmeldungUeberschrift') ?></h2>
|
||||
<p>
|
||||
<?php echo $this->p->t('uhstat', 'rechtsbelehrung') ?>
|
||||
</p>
|
||||
<p>
|
||||
<?php echo $this->p->t('uhstat', 'uhstat1AnmeldungEinleitungstext') ?>
|
||||
</p>
|
||||
<br>
|
||||
<?php if ($editPermission): ?>
|
||||
<?php if (isset($successMessage) && !isEmptyString($successMessage)): ?>
|
||||
<div class="alert alert-success" id="uhstat_success_alert">
|
||||
<button type="button" class="close" data-dismiss="alert">x</button>
|
||||
<strong><?php echo $successMessage ?></strong>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($errorMessage) && !isEmptyString($errorMessage)): ?>
|
||||
<div class='alert alert-danger text-center'><?php echo $errorMessage ?></div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<form class="form-horizontal" method="POST" action="<?php echo site_url('codex/UHSTAT1/saveUHSTAT1Data') ?>" id="uhstat1Form">
|
||||
<input type='hidden' id='person_id' name='person_id' value='<?php echo $formMetaData['person_id'] ?>' />
|
||||
<fieldset>
|
||||
<legend><?php echo $this->p->t('uhstat', 'angabenErziehungsberechtigte') ?></legend>
|
||||
<p>
|
||||
<?php echo $this->p->t('uhstat', 'angabenErziehungsberechtigteEinleitungstext') ?>
|
||||
</p>
|
||||
<br>
|
||||
<h4><?php echo $this->p->t('uhstat', 'erziehungsberechtigtePersonEins') ?></h4>
|
||||
<div class="form-group">
|
||||
<label for="mutter_geburtsjahr" class="col-sm-3 control-label"><?php echo ucfirst($this->p->t('uhstat', 'geburtsjahr')) ?></label>
|
||||
<div class="col-sm-9">
|
||||
<select type="text" name="mutter_geburtsjahr" id="mutter_geburtsjahr" class="form-control" <?php echo $disabled ?>>
|
||||
<option disabled selected value=""><?php echo $this->p->t('uhstat', 'bitteAuswaehlen') ?></option>
|
||||
<?php foreach ($formMetaData['jahre'] as $jahr): ?>
|
||||
<option
|
||||
value="<?php echo $jahr ?>"
|
||||
<?php echo $jahr == $mutter_geburtsjahr ? " selected" : "" ?>>
|
||||
<?php echo $jahr ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<?php echo form_error('mutter_geburtsjahr'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="mutter_geburtsstaat" class="col-sm-3 control-label">
|
||||
<?php echo ucfirst($this->p->t('uhstat', 'geburtsstaat')) ?>
|
||||
<br>
|
||||
<?php echo '('.ucfirst($this->p->t('uhstat', 'inDenHeutigenGrenzen')).')' ?>
|
||||
</label>
|
||||
<div class="col-sm-9">
|
||||
<select type="text" name="mutter_geburtsstaat" id="mutter_geburtsstaat" class="form-control" <?php echo $disabled ?>>
|
||||
<option disabled selected value=""><?php echo $this->p->t('uhstat', 'bitteAuswaehlen') ?></option>
|
||||
<?php foreach ($formMetaData['nation'] as $nation): ?>
|
||||
<option
|
||||
value="<?php echo $nation->nation_code ?>"
|
||||
<?php echo $mutter_geburtsstaat == $nation->nation_code ? " selected" : "" ?>>
|
||||
<?php echo $nation->nation_text ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<?php echo form_error('mutter_geburtsstaat'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="mutter_bildungsstaat" class="col-sm-3 control-label">
|
||||
<?php echo ucfirst($this->p->t('uhstat', 'hoechsterAbschlussStaat')) ?>
|
||||
<br>
|
||||
<?php echo '('.ucfirst($this->p->t('uhstat', 'inDenHeutigenGrenzen')).')' ?>
|
||||
</label>
|
||||
<div class="col-sm-9">
|
||||
<select type="text" name="mutter_bildungsstaat" id="mutter_bildungsstaat" class="form-control" <?php echo $disabled ?>>
|
||||
<option disabled selected value=""><?php echo $this->p->t('uhstat', 'bitteAuswaehlen') ?></option>
|
||||
<?php foreach ($formMetaData['nation'] as $nation): ?>
|
||||
<option
|
||||
value="<?php echo $nation->nation_code ?>"
|
||||
<?php echo $mutter_bildungsstaat == $nation->nation_code ? " selected" : "" ?>>
|
||||
<?php echo $nation->nation_text ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<?php echo form_error('mutter_bildungsstaat'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="mutter_bildungmax" class="col-sm-3 control-label"><?php echo ucfirst($this->p->t('uhstat', 'hoechsterAbschluss')) ?></label>
|
||||
<div class="col-sm-9">
|
||||
<select type="text" name="mutter_bildungmax" id="mutter_bildungmax" class="form-control" <?php echo $disabled ?>>
|
||||
<option disabled selected value=""><?php echo $this->p->t('uhstat', 'bitteAuswaehlen') ?></option>
|
||||
<optgroup label="<?php echo $this->p->t('uhstat', 'wennAbschlussInOesterreich') ?>">
|
||||
<?php echo $this->p->t('uhstat', 'bitteAuswaehlen') ?>
|
||||
<?php foreach ($formMetaData['abschluss_oesterreich'] as $abschluss): ?>
|
||||
<option
|
||||
value="<?php echo $abschluss->ausbildung_code ?>"
|
||||
<?php echo $mutter_bildungmax == $abschluss->ausbildung_code ? " selected" : "" ?>>
|
||||
<?php echo $abschluss->bezeichnung ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</optgroup>
|
||||
<optgroup label="<?php echo $this->p->t('uhstat', 'wennAbschlussNichtInOesterreich') ?>">
|
||||
<?php echo $this->p->t('uhstat', 'bitteAuswaehlen') ?>
|
||||
<?php foreach ($formMetaData['abschluss_nicht_oesterreich'] as $abschluss): ?>
|
||||
<option
|
||||
value="<?php echo $abschluss->ausbildung_code ?>"
|
||||
<?php echo $mutter_bildungmax == $abschluss->ausbildung_code ? " selected" : "" ?>>
|
||||
<?php echo $abschluss->bezeichnung ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</optgroup>
|
||||
</select>
|
||||
<?php echo form_error('mutter_bildungmax'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<h4><?php echo $this->p->t('uhstat', 'erziehungsberechtigtePersonZwei') ?></h4>
|
||||
<div class="form-group">
|
||||
<label for="vater_geburtsjahr" class="col-sm-3 control-label"><?php echo ucfirst($this->p->t('uhstat', 'geburtsjahr')) ?></label>
|
||||
<div class="col-sm-9">
|
||||
<select type="text" name="vater_geburtsjahr" id="vater_geburtsjahr" class="form-control" <?php echo $disabled ?>>
|
||||
<option disabled selected value=""><?php echo $this->p->t('uhstat', 'bitteAuswaehlen') ?></option>
|
||||
<?php foreach ($formMetaData['jahre'] as $jahr): ?>
|
||||
<option
|
||||
value="<?php echo $jahr ?>"
|
||||
<?php echo $vater_geburtsjahr == $jahr ? " selected" : "" ?>>
|
||||
<?php echo $jahr ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<?php echo form_error('vater_geburtsjahr'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="vater_geburtsstaat" class="col-sm-3 control-label">
|
||||
<?php echo ucfirst($this->p->t('uhstat', 'geburtsstaat')) ?>
|
||||
<br>
|
||||
<?php echo '('.ucfirst($this->p->t('uhstat', 'inDenHeutigenGrenzen')).')' ?>
|
||||
</label>
|
||||
<div class="col-sm-9">
|
||||
<select type="text" name="vater_geburtsstaat" id="vater_geburtsstaat" class="form-control" <?php echo $disabled ?>>
|
||||
<option disabled selected value=""><?php echo $this->p->t('uhstat', 'bitteAuswaehlen') ?></option>
|
||||
<?php foreach ($formMetaData['nation'] as $nation): ?>
|
||||
<option
|
||||
value="<?php echo $nation->nation_code ?>"
|
||||
<?php echo $vater_geburtsstaat == $nation->nation_code ? " selected" : "" ?>>
|
||||
<?php echo $nation->nation_text ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<?php echo form_error('vater_geburtsstaat'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="vater_bildungsstaat" class="col-sm-3 control-label">
|
||||
<?php echo $this->p->t('uhstat', 'hoechsterAbschlussStaat') ?>
|
||||
<br>
|
||||
<?php echo '('.ucfirst($this->p->t('uhstat', 'inDenHeutigenGrenzen')).')' ?>
|
||||
</label>
|
||||
<div class="col-sm-9">
|
||||
<select type="text" name="vater_bildungsstaat" id="vater_bildungsstaat" class="form-control" <?php echo $disabled ?>>
|
||||
<option disabled selected value=""><?php echo $this->p->t('uhstat', 'bitteAuswaehlen') ?></option>
|
||||
<?php foreach ($formMetaData['nation'] as $nation): ?>
|
||||
<option
|
||||
value="<?php echo $nation->nation_code ?>"
|
||||
<?php echo $vater_bildungsstaat == $nation->nation_code ? " selected" : "" ?>>
|
||||
<?php echo $nation->nation_text ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<?php echo form_error('vater_bildungsstaat'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="vater_bildungmax" class="col-sm-3 control-label">
|
||||
<?php echo ucfirst($this->p->t('uhstat', 'hoechsterAbschluss')) ?>
|
||||
</label>
|
||||
<div class="col-sm-9">
|
||||
<select type="text" name="vater_bildungmax" id="vater_bildungmax" class="form-control" <?php echo $disabled ?>>
|
||||
<option disabled selected value=""><?php echo $this->p->t('uhstat', 'bitteAuswaehlen') ?></option>
|
||||
<optgroup label="<?php echo $this->p->t('uhstat', 'wennAbschlussInOesterreich') ?>">
|
||||
<?php echo $this->p->t('uhstat', 'bitteAuswaehlen') ?>
|
||||
<?php foreach ($formMetaData['abschluss_oesterreich'] as $abschluss): ?>
|
||||
<option
|
||||
value="<?php echo $abschluss->ausbildung_code ?>"
|
||||
<?php echo $vater_bildungmax == $abschluss->ausbildung_code ? " selected" : "" ?>>
|
||||
<?php echo $abschluss->bezeichnung ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</optgroup>
|
||||
<optgroup label="<?php echo $this->p->t('uhstat', 'wennAbschlussNichtInOesterreich') ?>">
|
||||
<?php echo $this->p->t('uhstat', 'bitteAuswaehlen') ?>
|
||||
<?php foreach ($formMetaData['abschluss_nicht_oesterreich'] as $abschluss): ?>
|
||||
<option
|
||||
value="<?php echo $abschluss->ausbildung_code ?>"
|
||||
<?php echo $vater_bildungmax == $abschluss->ausbildung_code ? " selected" : "" ?>>
|
||||
<?php echo $abschluss->bezeichnung ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</optgroup>
|
||||
</select>
|
||||
<?php echo form_error('vater_bildungmax'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<?php if ($editPermission && !$readOnly): ?>
|
||||
<br>
|
||||
<fieldset>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 text-right">
|
||||
<button class="btn btn-success btn-md" type="submit" id="uhstat1Submit">
|
||||
<?php echo $this->p->t('uhstat', 'pruefenUndSpeichern') ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<?php endif; ?>
|
||||
</form>
|
||||
<?php if ($deletePermission && !$readOnly): ?>
|
||||
<form class="form-horizontal" method="POST" action="<?php echo site_url('codex/UHSTAT1/deleteUHSTAT1Data') ?>" id="uhstat1DeleteForm">
|
||||
<input type='hidden' id='person_id' name='person_id' value='<?php echo $formMetaData['person_id'] ?>' />
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12">
|
||||
<button class="btn btn-danger btn-md" type="submit" id="uhstat1Delete">
|
||||
<?php echo $this->p->t('uhstat', 'datenLoeschen') ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php $this->load->view('templates/FHC-Footer'); ?>
|
||||
@@ -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/vuejs/vuedatepicker_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="status.msg"
|
||||
v-model:status-severity="status.severity"
|
||||
>
|
||||
</studierendenantrag-antrag>
|
||||
</div>
|
||||
<div class="col-sm-4 mb-3">
|
||||
<studierendenantrag-status :msg="status.msg" :severity="status.severity"></studierendenantrag-status>
|
||||
<studierendenantrag-infoblock :infos="infoArray"></studierendenantrag-infoblock>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$this->load->view(
|
||||
'templates/FHC-Footer',
|
||||
$sitesettings
|
||||
);
|
||||
@@ -0,0 +1,59 @@
|
||||
<?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',
|
||||
'ui',
|
||||
'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', 'antrag_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,139 @@
|
||||
<?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', 'antrag_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 foreach ($array['allowedNewTypes'] as $type) { ?>
|
||||
<div class="alert alert-secondary">
|
||||
<p><?= $this->p->t('studierendenantrag', 'calltoaction_' . $type); ?></p>
|
||||
<hr>
|
||||
<a href="<?= site_url('lehre/Studierendenantrag/' . strtolower($type) . '/' . $prestudent_id); ?>" class="btn btn-outline-secondary">
|
||||
<i class="fa fa-plus"></i> <?= $this->p->t('studierendenantrag', 'antrag_typ_' . $type); ?>
|
||||
</a>
|
||||
</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">
|
||||
<textarea class="form-control" style="width: 100%; height: 250px;" readonly><?= $antrag->grund; ?></textarea>
|
||||
</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 && in_array($antrag->status, [
|
||||
Studierendenantragstatus_model::STATUS_APPROVED,
|
||||
Studierendenantragstatus_model::STATUS_OBJECTED,
|
||||
Studierendenantragstatus_model::STATUS_OBJECTION_DENIED,
|
||||
Studierendenantragstatus_model::STATUS_REMINDERSENT
|
||||
])) { ?>
|
||||
<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="ms-2" href="#modallv<?= $antrag->studierendenantrag_id; ?>" data-bs-toggle="modal"><?= $this->p->t('studierendenantrag', 'btn_show_lvs'); ?></a>
|
||||
<lv-popup id="modallv<?= $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,41 @@
|
||||
<?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">
|
||||
<div class="fhc-header" v-if="notinframe">
|
||||
<h1 class="h2"><?= $this->p->t('studierendenantrag', 'title_lvzuweisen', ['name' => $antrag->name]);?></h1>
|
||||
</div>
|
||||
<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>
|
||||
@@ -92,85 +92,93 @@ $this->load->view(
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div class="col-lg-4">
|
||||
<table class="table table-bordered table-condensed table-fixed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class="col-xs-4"><?php echo ucfirst($this->p->t('person', 'studentIn')); ?></th>
|
||||
<th class="col-xs-5"><?php echo ucfirst($this->p->t('person', 'studentIn')); ?></th>
|
||||
<td><?php echo $antragData->vorname . ' ' . $antragData->nachname; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col-xs-4"><?php echo $this->p->t('person', 'personenkennzeichen'); ?></th>
|
||||
<th class="col-xs-5"><?php echo $this->p->t('person', 'personenkennzeichen'); ?></th>
|
||||
<td><?php echo $antragData->matrikelnr ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col-xs-4"><?php echo ucfirst($this->p->t('lehre', 'studiensemester')); ?></th>
|
||||
<th class="col-xs-5"><?php echo ucfirst($this->p->t('lehre', 'studiensemester')); ?></th>
|
||||
<td><?php echo $antragData->studiensemester_kurzbz ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col-xs-4"><?php echo ucfirst($this->p->t('lehre', 'studiengang')); ?></th>
|
||||
<th class="col-xs-5"><?php echo ucfirst($this->p->t('lehre', 'studiengang')); ?></th>
|
||||
<td><?php echo $antragData->stg_bezeichnung ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col-xs-4"><?php echo $this->p->t('lehre', 'lehrveranstaltung'); ?></th>
|
||||
<th class="col-xs-5"><?php echo $this->p->t('lehre', 'lehrveranstaltung'); ?></th>
|
||||
<td><?php echo $antragData->lv_bezeichnung ?></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<table class="table table-bordered table-condensed table-fixed">
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<th class="col-xs-4"><?php echo $this->p->t('lehre', 'ects'); ?></th>
|
||||
<td colspan="3"><span id="ects"><?php echo $antragData->ects ?></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col-xs-4">
|
||||
<?php echo $this->p->t('anrechnung', 'bisherAngerechneteEcts'); ?>
|
||||
<th class="col-xs-5"><?php echo $this->p->t('lehre', 'lektorInnen'); ?></th>
|
||||
<td>
|
||||
<?php $len = count($antragData->lektoren) - 1 ?>
|
||||
<?php foreach ($antragData->lektoren as $key => $lektor): ?>
|
||||
<?php echo $lektor->vorname . ' ' . $lektor->nachname;
|
||||
echo $key === $len ? '' : ', ' ?>
|
||||
<?php endforeach; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col-xs-5"><?php echo $this->p->t('lehre', 'ects'); ?></th>
|
||||
<td><span id="ects"><?php echo $antragData->ects ?></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col-xs-5">
|
||||
<?php echo $this->p->t('anrechnung', 'bisherAngerechneteEcts'); ?>
|
||||
<span class="approveAnrechnungDetail-anrechnungEctsTooltip"
|
||||
data-toggle="tooltip" data-placement="right"
|
||||
title="<?php echo $this->p->t('anrechnung', 'anrechnungEctsTooltipText'); ?>">
|
||||
<i class="fa fa-lg fa-info-circle" aria-hidden="true"></i>
|
||||
</span>
|
||||
</th>
|
||||
<td colspan="3">
|
||||
<td>
|
||||
Total: <span id="sumEctsTotal"><?php echo number_format($antragData->sumEctsSchulisch + $antragData->sumEctsBeruflich, 1) ?></span>
|
||||
[Schulisch: <span id="sumEctsSchulisch" value="<?php echo $antragData->sumEctsSchulisch ?>"><?php echo $antragData->sumEctsSchulisch ?></span> /
|
||||
Beruflich: <span id="sumEctsBeruflich" value="<?php echo $antragData->sumEctsBeruflich ?>"><?php echo $antragData->sumEctsBeruflich ?></span> ]
|
||||
<span id="sumEctsMsg"></span>
|
||||
<span id="sumEctsMsg"></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-lg-8">
|
||||
<table class="table table-bordered table-condensed table-fixed">
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<th class="col-xs-4"><?php echo $this->p->t('lehre', 'lektorInnen'); ?></th>
|
||||
<td colspan="3">
|
||||
<?php $len = count($antragData->lektoren) - 1 ?>
|
||||
<?php foreach ($antragData->lektoren as $key => $lektor): ?>
|
||||
<?php echo $lektor->vorname . ' ' . $lektor->nachname;
|
||||
echo $key === $len ? '' : ', ' ?>
|
||||
<?php endforeach; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col-xs-4"><?php echo ucfirst($this->p->t('global', 'zgv')); ?></th>
|
||||
<td colspan="3"><?php echo $antragData->zgv ?></td>
|
||||
<th class="col-xs-3"><?php echo ucfirst($this->p->t('global', 'zgv')); ?></th>
|
||||
<td><?php echo $antragData->zgv ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col-xs-4"><?php echo $this->p->t('anrechnung', 'herkunftDerKenntnisse'); ?></th>
|
||||
<td colspan="3"><?php echo $anrechnungData->anmerkung ?></td>
|
||||
<td><?php echo $anrechnungData->anmerkung ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col-xs-4"><?php echo $this->p->t('anrechnung', 'nachweisdokumente'); ?></th>
|
||||
<td colspan="3">
|
||||
<td>
|
||||
<a href="<?php echo current_url() . '/download?dms_id=' . $anrechnungData->dms_id; ?>"
|
||||
target="_blank"><?php echo htmlentities($anrechnungData->dokumentname) ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col-xs-4"><?php echo $this->p->t('global', 'begruendung'); ?></th>
|
||||
<td colspan="3"><span id="begruendung_id" data-begruendung_id="<?php echo $anrechnungData->begruendung_id ?>" ><?php echo $anrechnungData->begruendung ?></span></td>
|
||||
<td><span id="begruendung_id" data-begruendung_id="<?php echo $anrechnungData->begruendung_id ?>" ><?php echo $anrechnungData->begruendung ?></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col-xs-4"><?php echo $this->p->t('anrechnung', 'begruendungEctsLabel'); ?></th>
|
||||
<td><span><?php echo $anrechnungData->begruendung_ects ?></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col-xs-4"><?php echo $this->p->t('anrechnung', 'begruendungLvinhaltLabel'); ?></th>
|
||||
<td><span><?php echo $anrechnungData->begruendung_lvinhalt ?></span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<?php
|
||||
const HERKUNFT_DER_KENNTNISSE_MAX_LENGTH = 125;
|
||||
const CHAR_LENGTH125 = 125;
|
||||
const CHAR_LENGTH150 = 150;
|
||||
const CHAR_LENGTH500 = 500;
|
||||
const CHAR_LENGTH1000 = 1000;
|
||||
|
||||
$this->load->view(
|
||||
'templates/FHC-Header',
|
||||
@@ -197,6 +200,46 @@ $this->load->view(
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Begruendung ECTS -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<b><?php echo $this->p->t('anrechnung', 'begruendungEcts'); ?></b> 
|
||||
<span class="requestAnrechnung-anrechnungInfoTooltip" data-toggle="tooltip" data-placement="right"
|
||||
title="<?php echo $this->p->t('anrechnung', 'anrechnungBegruendungEctsTooltipText'); ?>">
|
||||
<i class="fa fa-lg fa-info-circle" aria-hidden="true"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<textarea class="form-control" name="begruendung_ects" rows="1" id="requestAnrechnung-begruendungEcts"
|
||||
maxlength="<?php echo CHAR_LENGTH150 ?>" required><?php echo $anrechnungData->begruendung_ects; ?></textarea>
|
||||
<small><span class="text-muted pull-right"><?php echo $this->p->t('ui', 'maxZeichen'); ?> :<span id="requestAnrechnung-begruendungEcts-charCounter"><?php echo CHAR_LENGTH150 ?></span></span></small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Begruendung LV Inhalt -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<b><?php echo $this->p->t('anrechnung', 'begruendungLvinhalt'); ?></b> 
|
||||
<span class="requestAnrechnung-anrechnungInfoTooltip" data-toggle="tooltip" data-placement="right"
|
||||
title="<?php echo $this->p->t('anrechnung', 'anrechnungBegruendungLvinhaltTooltipText'); ?>">
|
||||
<i class="fa fa-lg fa-info-circle" aria-hidden="true"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<textarea class="form-control" name="begruendung_lvinhalt" rows="7" id="requestAnrechnung-begruendungLvinhalt"
|
||||
minlength="<?php echo CHAR_LENGTH500 ?>"
|
||||
maxlength="<?php echo CHAR_LENGTH1000 ?>" required><?php echo $anrechnungData->begruendung_lvinhalt; ?></textarea>
|
||||
<small><span class="text-muted pull-right"> / <?php echo $this->p->t('ui', 'maxZeichen'); ?> :<span id="requestAnrechnung-begruendungLvinhalt-charCounterMax"><?php echo CHAR_LENGTH1000 ?></span></span></small>
|
||||
<small><span class="text-muted pull-right"><?php echo $this->p->t('ui', 'fehlendeMinZeichen'); ?> :<span id="requestAnrechnung-begruendungLvinhalt-charCounterMin"><?php echo CHAR_LENGTH500 ?></span></span></small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Dokument Upload-->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
@@ -242,8 +285,8 @@ $this->load->view(
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<textarea class="form-control" name="anmerkung" rows="1" id="requestAnrechnung-herkunftDerKenntnisse"
|
||||
maxlength="<?php echo HERKUNFT_DER_KENNTNISSE_MAX_LENGTH ?>" required><?php echo $anrechnungData->anmerkung; ?></textarea>
|
||||
<small><span class="text-muted pull-right"><?php echo $this->p->t('ui', 'maxZeichen'); ?> :<span id="requestAnrechnung-herkunftDerKenntnisse-charCounter"><?php echo HERKUNFT_DER_KENNTNISSE_MAX_LENGTH ?></span></span></small>
|
||||
maxlength="<?php echo CHAR_LENGTH125 ?>" required><?php echo $anrechnungData->anmerkung; ?></textarea>
|
||||
<small><span class="text-muted pull-right"><?php echo $this->p->t('ui', 'maxZeichen'); ?> :<span id="requestAnrechnung-herkunftDerKenntnisse-charCounter"><?php echo CHAR_LENGTH125 ?></span></span></small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -16,6 +16,23 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Referenzbeispiele ECTS Berechnung panel -->
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading" role="tab" id="headingBegruendung">
|
||||
<h4 class="panel-title">
|
||||
<a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseBegruendung"
|
||||
aria-expanded="false" aria-controls="collapseBegruendung">
|
||||
<i class="fa fa-lg fa-info-circle" aria-hidden="true"></i> 
|
||||
<?php echo $this->p->t('anrechnung', 'requestAnrechnungInfoEctsBerechnungTitle'); ?>
|
||||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="collapseBegruendung" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingBegruendung">
|
||||
<div class="panel-body">
|
||||
<?php echo $this->p->t('anrechnung', 'requestAnrechnungInfoEctsBerechnungBody'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Nachweisdokumente: Voraussetzung panel -->
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading" role="tab" id="headingTwo">
|
||||
|
||||
@@ -84,49 +84,50 @@ $this->load->view(
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div class="col-lg-4">
|
||||
<table class="table table-bordered table-condensed table-fixed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class="col-xs-4"><?php echo ucfirst($this->p->t('person', 'studentIn')); ?></th>
|
||||
<th class="col-xs-5"><?php echo ucfirst($this->p->t('person', 'studentIn')); ?></th>
|
||||
<td><?php echo $antragData->vorname . ' ' . $antragData->nachname; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col-xs-4"><?php echo $this->p->t('person', 'personenkennzeichen'); ?></th>
|
||||
<th class="col-xs-5"><?php echo $this->p->t('person', 'personenkennzeichen'); ?></th>
|
||||
<td><?php echo $antragData->matrikelnr ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col-xs-4"><?php echo ucfirst($this->p->t('lehre', 'studiensemester')); ?></th>
|
||||
<th class="col-xs-5"><?php echo ucfirst($this->p->t('lehre', 'studiensemester')); ?></th>
|
||||
<td><?php echo $antragData->studiensemester_kurzbz ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col-xs-4"><?php echo ucfirst($this->p->t('lehre', 'studiengang')); ?></th>
|
||||
<th class="col-xs-5"><?php echo ucfirst($this->p->t('lehre', 'studiengang')); ?></th>
|
||||
<td><?php echo $antragData->stg_bezeichnung ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col-xs-4"><?php echo $this->p->t('lehre', 'lehrveranstaltung'); ?></th>
|
||||
<th class="col-xs-5"><?php echo $this->p->t('lehre', 'lehrveranstaltung'); ?></th>
|
||||
<td><?php echo $antragData->lv_bezeichnung ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<table class="table table-bordered table-condensed table-fixed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class="col-xs-4"><?php echo $this->p->t('lehre', 'ects'); ?></th>
|
||||
<td><?php echo $antragData->ects ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col-xs-4"><?php echo $this->p->t('lehre', 'lektorInnen'); ?></th>
|
||||
<td>
|
||||
<tr>
|
||||
<th class="col-xs-5"><?php echo $this->p->t('lehre', 'ects'); ?></th>
|
||||
<td><?php echo $antragData->ects ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col-xs-5"><?php echo $this->p->t('lehre', 'lektorInnen'); ?></th>
|
||||
<td>
|
||||
<?php $len = count($antragData->lektoren) - 1 ?>
|
||||
<?php foreach ($antragData->lektoren as $key => $lektor): ?>
|
||||
<?php echo $lektor->vorname . ' ' . $lektor->nachname;
|
||||
echo $key === $len ? '' : ', ' ?>
|
||||
<?php endforeach; ?>
|
||||
</td>
|
||||
</tr>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-lg-8">
|
||||
<table class="table table-bordered table-condensed table-fixed">
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<th class="col-xs-4"><?php echo ucfirst($this->p->t('global', 'zgv')); ?></th>
|
||||
<td><?php echo $antragData->zgv ?></td>
|
||||
@@ -142,6 +143,14 @@ $this->load->view(
|
||||
target="_blank"><?php echo htmlentities($anrechnungData->dokumentname) ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col-xs-4"><?php echo $this->p->t('anrechnung', 'begruendungEctsLabel'); ?></th>
|
||||
<td><span><?php echo $anrechnungData->begruendung_ects ?></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col-xs-4"><?php echo $this->p->t('anrechnung', 'begruendungLvinhaltLabel'); ?></th>
|
||||
<td><span><?php echo $anrechnungData->begruendung_lvinhalt ?></span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -15,6 +15,22 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading" role="tab" id="headingBegruendung">
|
||||
<h4 class="panel-title">
|
||||
<a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseBegruendung"
|
||||
aria-expanded="false" aria-controls="collapseBegruendung">
|
||||
<i class="fa fa-lg fa-info-circle" aria-hidden="true"></i> 
|
||||
<?php echo $this->p->t('anrechnung', 'requestAnrechnungInfoEctsBerechnungTitle'); ?>
|
||||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="collapseBegruendung" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingBegruendung">
|
||||
<div class="panel-body">
|
||||
<?php echo $this->p->t('anrechnung', 'requestAnrechnungInfoEctsBerechnungBody'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading" role="tab" id="headingZero">
|
||||
<h4 class="panel-title">
|
||||
|
||||
@@ -142,7 +142,7 @@ FROM
|
||||
WHEN oe.organisationseinheittyp_kurzbz = \'Department\' THEN (\'DEP \' || oe.bezeichnung)
|
||||
ELSE (oe.organisationseinheittyp_kurzbz || \' \' || oe.bezeichnung)
|
||||
END AS "lv_oe_kurzbz",
|
||||
TRUNC(lema.semesterstunden, 1) AS "stunden",
|
||||
TRUNC(lema.semesterstunden, 2) AS "stunden",
|
||||
TRUNC((lema.semesterstunden * lema.stundensatz), 2) AS "betrag",
|
||||
vertrag_id,
|
||||
vertragsstunden AS "vertrag_stunden",
|
||||
@@ -232,7 +232,7 @@ FROM
|
||||
SELECT
|
||||
pa.lehreinheit_id,
|
||||
lv.lehrveranstaltung_id,
|
||||
pa.projektarbeit_id AS "projektarbeit_id",
|
||||
pa.projektarbeit_id::text AS "projektarbeit_id",
|
||||
le.studiensemester_kurzbz,
|
||||
stg.studiengang_kz,
|
||||
upper(stg.typ || stg.kurzbz) AS "stg_typ_kurzbz",
|
||||
@@ -375,9 +375,9 @@ $filterWidgetArray = array(
|
||||
orgform_kurzbz: {visible: false, headerFilter:"input"},
|
||||
person_id: {visible: false, headerFilter:"input"},
|
||||
lv_oe_kurzbz: {visible: false, headerFilter:"input"},
|
||||
stunden: {align:"right", formatter: form_formatNulltoStringNumber, formatterParams:{precision:1},
|
||||
stunden: {align:"right", formatter: form_formatNulltoStringNumber, formatterParams:{precision:2},
|
||||
headerFilter:"input", headerFilterFunc: hf_filterStringnumberWithOperator,
|
||||
bottomCalc:"sum", bottomCalcParams:{precision:1}
|
||||
bottomCalc:"sum", bottomCalcParams:{precision:2}
|
||||
},
|
||||
betrag: {align:"right", formatter: form_formatNulltoStringNumber,
|
||||
headerFilter:"input", headerFilterFunc: hf_filterStringnumberWithOperator,
|
||||
|
||||
@@ -149,7 +149,7 @@ FROM
|
||||
ELSE (oe.organisationseinheittyp_kurzbz || \' \' || oe.bezeichnung)
|
||||
END AS "lv_oe_kurzbz",
|
||||
(person.nachname || \' \' || person.vorname) AS "lektor",
|
||||
TRUNC(lema.semesterstunden, 1) AS "stunden",
|
||||
TRUNC(lema.semesterstunden, 2) AS "stunden",
|
||||
lema.stundensatz,
|
||||
TRUNC((lema.semesterstunden * lema.stundensatz), 2) AS "betrag",
|
||||
vertrag_id,
|
||||
@@ -400,9 +400,9 @@ $filterWidgetArray = array(
|
||||
person_id: {visible: false, headerFilter:"input"},
|
||||
lv_oe_kurzbz: {visible: false, headerFilter:"input"},
|
||||
lektor: {headerFilter:"input", widthGrow: 2},
|
||||
stunden: {align:"right", formatter: form_formatNulltoStringNumber, formatterParams:{precision:1},
|
||||
stunden: {align:"right", formatter: form_formatNulltoStringNumber, formatterParams:{precision:2},
|
||||
headerFilter:"input", headerFilterFunc: hf_filterStringnumberWithOperator,
|
||||
bottomCalc:"sum", bottomCalcParams:{precision:1}},
|
||||
bottomCalc:"sum", bottomCalcParams:{precision:2}},
|
||||
stundensatz: {visible: true, align:"right", formatter: form_formatNulltoStringNumber,
|
||||
headerFilter:"input", headerFilterFunc: hf_filterStringnumberWithOperator},
|
||||
betrag: {align:"right", formatter: form_formatNulltoStringNumber,
|
||||
|
||||
@@ -159,7 +159,7 @@ FROM
|
||||
(
|
||||
SELECT
|
||||
/* lehrauftraege also planned with dummies, therefore personalnummer is needed */
|
||||
ma.personalnummer,
|
||||
ma.personalnummer::text,
|
||||
lema.lehreinheit_id,
|
||||
lv.lehrveranstaltung_id,
|
||||
lv.bezeichnung AS "lv_bezeichnung",
|
||||
@@ -179,7 +179,7 @@ FROM
|
||||
ELSE (oe.organisationseinheittyp_kurzbz || \' \' || oe.bezeichnung)
|
||||
END AS "lv_oe_kurzbz",
|
||||
(person.nachname || \' \' || person.vorname) AS "lektor",
|
||||
TRUNC(lema.semesterstunden, 1) AS "stunden",
|
||||
TRUNC(lema.semesterstunden, 2) AS "stunden",
|
||||
lema.stundensatz,
|
||||
TRUNC((lema.semesterstunden * lema.stundensatz), 2) AS "betrag",
|
||||
vertrag_id,
|
||||
@@ -219,7 +219,7 @@ FROM
|
||||
(SELECT
|
||||
uid
|
||||
FROM
|
||||
public.tbl_benutzer JOIN public.tbl_mitarbeiter ma
|
||||
public.tbl_benutzer JOIN public.tbl_mitarbeiter ma
|
||||
ON tbl_benutzer.uid = ma.mitarbeiter_uid
|
||||
WHERE
|
||||
person_id = tmp_projektbetreuung.person_id
|
||||
@@ -272,7 +272,7 @@ FROM
|
||||
pa.lehreinheit_id,
|
||||
lv.lehrveranstaltung_id,
|
||||
lv.bezeichnung AS "lv_bezeichnung",
|
||||
pa.projektarbeit_id AS "projektarbeit_id",
|
||||
pa.projektarbeit_id::text AS "projektarbeit_id",
|
||||
le.studiensemester_kurzbz,
|
||||
stg.studiengang_kz,
|
||||
upper(stg.typ || stg.kurzbz) AS "stg_typ_kurzbz",
|
||||
@@ -414,7 +414,7 @@ $filterWidgetArray = array(
|
||||
row_index: {visible: false},
|
||||
personalnummer: {visible: false, headerFilter:"input"},
|
||||
auftrag: {
|
||||
headerFilter:"input", widthGrow: 2,
|
||||
headerFilter:"input", widthGrow: 2,
|
||||
bottomCalc:"count", bottomCalcFormatter:function(cell){return "'. ucfirst($this->p->t('global', 'anzahl')). ': " + cell.getValue();}
|
||||
},
|
||||
stg_typ_kurzbz: {headerFilter:"input"},
|
||||
@@ -432,9 +432,9 @@ $filterWidgetArray = array(
|
||||
person_id: {visible: false, headerFilter:"input"},
|
||||
lv_oe_kurzbz: {headerFilter:"input"},
|
||||
lektor: {headerFilter:"input", widthGrow: 2},
|
||||
stunden: {align:"right", formatter: form_formatNulltoStringNumber, formatterParams:{precision:1},
|
||||
stunden: {align:"right", formatter: form_formatNulltoStringNumber, formatterParams:{precision:2},
|
||||
headerFilter:"input", headerFilterFunc: hf_filterStringnumberWithOperator,
|
||||
bottomCalc:"sum", bottomCalcParams:{precision:1}},
|
||||
bottomCalc:"sum", bottomCalcParams:{precision:2}},
|
||||
stundensatz: {visible: true, align:"right", formatter: form_formatNulltoStringNumber,
|
||||
headerFilter:"input", headerFilterFunc: hf_filterStringnumberWithOperator},
|
||||
betrag: {align:"right", formatter: form_formatNulltoStringNumber,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
$this->config->load('infocenter');
|
||||
$APP = '\'infocenter\'';
|
||||
$ABGEWIESENEN_STATUS = '\'Abgewiesener\'';
|
||||
$STUDIENGANG_TYP = '\''.$this->variablelib->getVar('infocenter_studiensgangtyp').'\'';
|
||||
$ADDITIONAL_STG = $this->config->item('infocenter_studiengang_kz');
|
||||
@@ -17,6 +18,8 @@ $query = '
|
||||
p.nachname AS "Nachname",
|
||||
so.studiengangkurzbzlang as "Studiengang",
|
||||
pss.insertamum AS "AbgewiesenAm",
|
||||
pl.zeitpunkt AS "LockDate",
|
||||
pl.lockuser AS "LockUser",
|
||||
(
|
||||
SELECT l.zeitpunkt
|
||||
FROM system.tbl_log l
|
||||
@@ -54,6 +57,15 @@ $query = '
|
||||
JOIN public.tbl_studiengang sg USING(studiengang_kz)
|
||||
JOIN lehre.tbl_studienplan sp USING(studienplan_id)
|
||||
JOIN lehre.tbl_studienordnung so USING(studienordnung_id)
|
||||
LEFT JOIN (
|
||||
SELECT tpl.person_id,
|
||||
tpl.zeitpunkt,
|
||||
sp.nachname AS lockuser
|
||||
FROM system.tbl_person_lock tpl
|
||||
JOIN public.tbl_benutzer sb USING (uid)
|
||||
JOIN public.tbl_person sp ON sb.person_id = sp.person_id
|
||||
WHERE tpl.app = '.$APP.'
|
||||
) pl USING(person_id)
|
||||
WHERE pss.status_kurzbz = '. $ABGEWIESENEN_STATUS .'
|
||||
AND pss.studiensemester_kurzbz = '. $STUDIENSEMESTER .'
|
||||
AND (sg.typ IN ('. $STUDIENGANG_TYP .')
|
||||
@@ -70,6 +82,7 @@ $query = '
|
||||
'requiredPermissions' => 'infocenter',
|
||||
'datasetRepresentation' => 'tablesorter',
|
||||
'checkboxes' => 'PersonId',
|
||||
'additionalColumns' => array('Details'),
|
||||
'columnsAliases' => array(
|
||||
'PersonId',
|
||||
'PreStudentID',
|
||||
@@ -77,11 +90,23 @@ $query = '
|
||||
ucfirst($this->p->t('person', 'nachname')),
|
||||
ucfirst($this->p->t('lehre', 'studiengang')),
|
||||
ucfirst($this->p->t('infocenter', 'abgewiesenam')),
|
||||
ucfirst($this->p->t('global', 'sperrdatum')),
|
||||
ucfirst($this->p->t('global', 'gesperrtVon')),
|
||||
ucfirst($this->p->t('global', 'nachricht')),
|
||||
ucfirst($this->p->t('infocenter', 'kaution'))
|
||||
),
|
||||
|
||||
'formatRow' => function($datasetRaw) {
|
||||
/* NOTE: Dont use $this here for PHP Version compatibility */
|
||||
$datasetRaw->{'Details'} = sprintf(
|
||||
'<a href="%s?person_id=%s&origin_page=%s&fhc_controller_id=%s&prev_filter_id=%s">Details</a>',
|
||||
site_url('system/infocenter/InfoCenter/showDetails'),
|
||||
$datasetRaw->{'PersonId'},
|
||||
'abgewiesen',
|
||||
(isset($_GET['fhc_controller_id']) ? $_GET['fhc_controller_id'] : ''),
|
||||
(isset($_GET['filter_id']) ? $_GET['filter_id'] : '')
|
||||
);
|
||||
|
||||
if ($datasetRaw->{'Nachricht'} === null)
|
||||
{
|
||||
$datasetRaw->{'Nachricht'} = 'Nein';
|
||||
@@ -103,10 +128,29 @@ $query = '
|
||||
{
|
||||
$datasetRaw->{'Kaution'} = 'Offen';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'LockDate'} == null)
|
||||
{
|
||||
$datasetRaw->{'LockDate'} = '-';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'LockUser'} == null)
|
||||
{
|
||||
$datasetRaw->{'LockUser'} = '-';
|
||||
}
|
||||
|
||||
$datasetRaw->{'AbgewiesenAm'} = date_format(date_create($datasetRaw->{'AbgewiesenAm'}),'Y-m-d H:i');
|
||||
return $datasetRaw;
|
||||
},
|
||||
|
||||
'markRow' => function($datasetRaw) {
|
||||
|
||||
if ($datasetRaw->LockDate != null)
|
||||
{
|
||||
return FilterWidget::DEFAULT_MARK_ROW_CLASS;
|
||||
}
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
echo $this->widgetlib->widget('FilterWidget', $filterWidgetArray);
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
$this->load->view(
|
||||
'templates/FHC-Header',
|
||||
array(
|
||||
'title' => 'Info Center',
|
||||
'jquery3' => true,
|
||||
'jqueryui1' => true,
|
||||
'jquerycheckboxes1' => true,
|
||||
'bootstrap3' => true,
|
||||
'fontawesome4' => true,
|
||||
'sbadmintemplate3' => true,
|
||||
'tablesorter2' => true,
|
||||
'ajaxlib' => true,
|
||||
'filterwidget' => true,
|
||||
'navigationwidget' => true,
|
||||
'dialoglib' => true,
|
||||
'phrases' => array(
|
||||
'person' => array('vorname', 'nachname'),
|
||||
'global' => array('mailAnXversandt'),
|
||||
'ui' => array('bitteEintragWaehlen')
|
||||
),
|
||||
'customCSSs' => array('public/css/sbadmin2/tablesort_bootstrap.css', 'public/css/infocenter/infocenterPersonDataset.css'),
|
||||
'customJSs' => array('public/js/bootstrapper.js', 'public/js/infocenter/infocenterPersonDataset.js')
|
||||
)
|
||||
);
|
||||
?>
|
||||
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
|
||||
<?php echo $this->widgetlib->widget('NavigationWidget'); ?>
|
||||
|
||||
<div id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h3 class="page-header">
|
||||
Aufgenommen
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<?php $this->load->view('system/infocenter/infocenterAufgenommenData.php'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<?php $this->load->view('templates/FHC-Footer'); ?>
|
||||
@@ -0,0 +1,95 @@
|
||||
<?php
|
||||
|
||||
$this->config->load('infocenter');
|
||||
$AUFGENOMMENER_STATUS = '\'Aufgenommener\'';
|
||||
$REJECTED_STATUS = '\'Abgewiesener\'';
|
||||
$STUDIENGANG_TYP = '\'l\'';
|
||||
$STUDIENSEMESTER = '\''.$this->variablelib->getVar('infocenter_studiensemester').'\'';
|
||||
$LOGDATA_NAME = '\'Message sent\'';
|
||||
$LOGDATA_VON = '\'online\'';
|
||||
|
||||
$query = '
|
||||
SELECT
|
||||
p.person_id AS "PersonId",
|
||||
p.vorname AS "Vorname",
|
||||
p.nachname AS "Nachname",
|
||||
(
|
||||
SELECT ARRAY_TO_STRING(ARRAY_AGG(DISTINCT UPPER(sg.typ) || UPPER(sg.kurzbz)), \', \')
|
||||
FROM public.tbl_prestudentstatus pss
|
||||
JOIN public.tbl_prestudent ps USING(prestudent_id)
|
||||
JOIN public.tbl_studiengang sg USING(studiengang_kz)
|
||||
WHERE
|
||||
pss.status_kurzbz = '. $AUFGENOMMENER_STATUS .'
|
||||
AND ps.person_id = p.person_id
|
||||
AND sg.typ IN ('.$STUDIENGANG_TYP.')
|
||||
AND pss.studiensemester_kurzbz = '.$STUDIENSEMESTER.'
|
||||
AND NOT EXISTS (
|
||||
SELECT 1
|
||||
FROM tbl_prestudentstatus spss
|
||||
WHERE spss.prestudent_id = pss.prestudent_id
|
||||
AND spss.status_kurzbz = '. $REJECTED_STATUS .'
|
||||
AND spss.studiensemester_kurzbz IN (
|
||||
SELECT ss.studiensemester_kurzbz FROM public.tbl_studiensemester ss WHERE ss.ende >
|
||||
(SELECT start FROM public.tbl_studiensemester sss WHERE studiensemester_kurzbz = '. $STUDIENSEMESTER .'))
|
||||
)
|
||||
LIMIT 1
|
||||
) AS "Studiengang"
|
||||
FROM
|
||||
public.tbl_person p
|
||||
WHERE
|
||||
EXISTS (
|
||||
SELECT 1
|
||||
FROM public.tbl_prestudent sps
|
||||
JOIN public.tbl_studiengang ssg USING(studiengang_kz)
|
||||
WHERE sps.person_id = p.person_id
|
||||
AND ssg.typ IN (' . $STUDIENGANG_TYP . ')
|
||||
AND ' . $AUFGENOMMENER_STATUS . ' = (
|
||||
SELECT spss.status_kurzbz
|
||||
FROM public.tbl_prestudentstatus spss
|
||||
WHERE spss.prestudent_id = sps.prestudent_id
|
||||
ORDER BY spss.datum DESC, spss.insertamum DESC, spss.ext_id DESC
|
||||
LIMIT 1
|
||||
)
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM tbl_prestudentstatus spss
|
||||
WHERE spss.prestudent_id = sps.prestudent_id
|
||||
AND spss.status_kurzbz = ' . $AUFGENOMMENER_STATUS . '
|
||||
AND spss.studiensemester_kurzbz = ' . $STUDIENSEMESTER . '
|
||||
)
|
||||
)
|
||||
|
||||
';
|
||||
|
||||
$filterWidgetArray = array(
|
||||
'query' => $query,
|
||||
'app' => InfoCenter::APP,
|
||||
'datasetName' => 'aufgenommen',
|
||||
'filter_id' => $this->input->get('filter_id'),
|
||||
'requiredPermissions' => 'infocenter',
|
||||
'datasetRepresentation' => 'tablesorter',
|
||||
'checkboxes' => 'PersonId',
|
||||
'additionalColumns' => array('Details'),
|
||||
'columnsAliases' => array(
|
||||
'PersonId',
|
||||
ucfirst($this->p->t('person', 'vorname')) ,
|
||||
ucfirst($this->p->t('person', 'nachname')),
|
||||
ucfirst($this->p->t('lehre', 'studiengang'))
|
||||
),
|
||||
|
||||
'formatRow' => function($datasetRaw)
|
||||
{
|
||||
$datasetRaw->{'Details'} = sprintf(
|
||||
'<a href="%s?person_id=%s&origin_page=%s&fhc_controller_id=%s&prev_filter_id=%s">Details</a>',
|
||||
site_url('system/infocenter/InfoCenter/showDetails'),
|
||||
$datasetRaw->{'PersonId'},
|
||||
'aufgenommen',
|
||||
(isset($_GET['fhc_controller_id']) ? $_GET['fhc_controller_id'] : ''),
|
||||
(isset($_GET['filter_id']) ? $_GET['filter_id'] : '')
|
||||
);
|
||||
return $datasetRaw;
|
||||
}
|
||||
);
|
||||
|
||||
echo $this->widgetlib->widget('FilterWidget', $filterWidgetArray);
|
||||
?>
|
||||
@@ -57,10 +57,11 @@
|
||||
if (isset($lockedby)):
|
||||
echo $this->p->t('global', 'wirdBearbeitetVon').': ';
|
||||
echo $lockedby;
|
||||
if ($origin_page == 'index'):
|
||||
if (in_array($origin_page, array('index', 'abgewiesen'))):
|
||||
$unlockpath = 'unlockPerson/'.$stammdaten->person_id;
|
||||
$unlockpath .= '?fhc_controller_id='.$fhc_controller_id;
|
||||
$unlockpath .= '&filter_id='.$prev_filter_id;
|
||||
$unlockpath .= '&origin_page='.$origin_page;
|
||||
?>
|
||||
|
||||
<a href="<?php echo $unlockpath; ?>">
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -122,6 +122,7 @@
|
||||
generateJSsInclude('vendor/npm-asset/primevue/column/column.min.js');
|
||||
generateJSsInclude('vendor/npm-asset/primevue/calendar/calendar.min.js');
|
||||
generateJSsInclude('vendor/npm-asset/primevue/skeleton/skeleton.min.js');
|
||||
generateJSsInclude('vendor/npm-asset/primevue/autocomplete/autocomplete.min.js');
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
}
|
||||
|
||||
// Tabulator 5 CSS
|
||||
if ($tabulator5 === true) generateCSSsInclude('vendor/olifolkerd/tabulator5/dist/css/tabulator_bootstrap5.min.css');
|
||||
if ($tabulator5 === true) generateCSSsInclude('public/css/Tabulator5.css');
|
||||
|
||||
// Tinymce 4 CSS
|
||||
if ($tinymce4 === true) generateCSSsInclude('public/css/TinyMCE4.css');
|
||||
@@ -119,6 +119,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