mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
Merge branch 'master' into feature-55354/Studierendenverwaltung_Karteireiter_Archiv
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
|
||||
// Deadline for Application given as Time-Interval after Semesterstart.
|
||||
@@ -24,3 +24,12 @@ $config['send_mail'] = TRUE;
|
||||
|
||||
// Display fields to explain equivalence of ECTS and LV-Inhalte
|
||||
$config['explain_equivalence'] = TRUE;
|
||||
|
||||
// Displays infobox if set to true
|
||||
$config['display_infobox'] = [
|
||||
'fristen' => TRUE,
|
||||
'referenzbeispiele_ects' => TRUE,
|
||||
'voraussetzungen' => TRUE,
|
||||
'nachweisdokumente' => TRUE,
|
||||
'herkunft_kenntnisse' => TRUE
|
||||
];
|
||||
|
||||
@@ -4,6 +4,6 @@ if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
|
||||
// CMS Content Id for CIS4 Menu Root
|
||||
$config['cis_menu_root_content_id'] = 11066;
|
||||
$config['cis_menu_root_content_id'] = 11087;
|
||||
// send Mails for ProfilUpdate
|
||||
$config['cis_send_profil_update_mails'] = true;
|
||||
|
||||
@@ -32,3 +32,18 @@ $config['validate'] = false; // If true then the email address will be validated
|
||||
|
||||
// If enabled will be logged info about emails in Codeigniter error logs
|
||||
$config['enable_debug'] = false;
|
||||
|
||||
// default sender
|
||||
$config['sancho_mail_default_sender'] = defined('SANCHO_MAIL_DEFAULT_SENDER') ? SANCHO_MAIL_DEFAULT_SENDER : '';
|
||||
|
||||
// If to use images for custom mails
|
||||
$config['sancho_mail_use_images'] = defined('SANCHO_MAIL_USE_IMAGES') ? SANCHO_MAIL_USE_IMAGES : false;
|
||||
|
||||
// image path for sancho mail, relativ to document root
|
||||
$config['sancho_mail_img_path'] = defined('SANCHO_MAIL_IMG_PATH') ? SANCHO_MAIL_IMG_PATH : '';
|
||||
|
||||
// header image for custom mails
|
||||
$config['sancho_mail_header_img'] = defined('SANCHO_MAIL_HEADER_IMG') ? SANCHO_MAIL_HEADER_IMG : '';
|
||||
|
||||
// footer image for custom mails
|
||||
$config['sancho_mail_footer_img'] = defined('SANCHO_MAIL_FOOTER_IMG') ? SANCHO_MAIL_FOOTER_IMG : '';
|
||||
|
||||
@@ -61,8 +61,7 @@ $route['api/v1/organisation/[O|o]rganisationseinheit/(:any)'] = 'api/v1/organisa
|
||||
$route['api/v1/ressource/[B|b]etriebsmittelperson/(:any)'] = 'api/v1/ressource/betriebsmittelperson2/$1';
|
||||
$route['api/v1/system/[S|s]prache/(:any)'] = 'api/v1/system/sprache2/$1';
|
||||
|
||||
$route['CisVue'] = 'CisVue/dashboard';
|
||||
$route['Cis/Stundenplan/(:any)'] = 'Cis/Stundenplan';
|
||||
$route['Cis/Stundenplan/.*'] = 'Cis/Stundenplan/index/$1';
|
||||
|
||||
// load routes from extensions
|
||||
$subdir = 'application/config/extensions';
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
$config['tabs'] =
|
||||
[
|
||||
'details' => [
|
||||
//all fields can be configured to be hidden, see class attribute stv-details-details-name for name
|
||||
'hiddenFields' => [],
|
||||
'hideUDFs' => false
|
||||
],
|
||||
|
||||
'prestudent' => [
|
||||
|
||||
//all fields can be configured to be hidden, see class attribute stv-details-prestudent-name for name
|
||||
'hiddenFields' => [
|
||||
|
||||
//propably used by FH-Communities
|
||||
'aufnahmeschluessel', 'standort_code', 'facheinschlaegigBerufstaetig'
|
||||
|
||||
],
|
||||
'hideUDFs' => false
|
||||
],
|
||||
'finalexam' => [
|
||||
'documents' => [
|
||||
'pruefungsprotokoll' => [
|
||||
'de' => [
|
||||
'Bakk' => 'PrProtBA',
|
||||
'Master' => 'PrProtMA',
|
||||
],
|
||||
'en' => [
|
||||
'Bakk' => 'PrProtBAEng',
|
||||
'Master' => 'PrProtMAEng',
|
||||
],
|
||||
],
|
||||
'pruefungszeugnis' => [
|
||||
'de' => [
|
||||
'Bakk' => 'Bakkzeugnis',
|
||||
'Master' => 'Diplomzeugnis',
|
||||
],
|
||||
'en' => [
|
||||
'Bakk' => 'BakkzeugnisEng',
|
||||
'Master' => 'DiplomzeugnisEng',
|
||||
],
|
||||
],
|
||||
'urkunde' => [
|
||||
'de' => [
|
||||
'Bakk' => 'Bakkurkunde',
|
||||
'Master' => 'Diplomurkunde',
|
||||
],
|
||||
'en' => [
|
||||
'Bakk' => 'BakkurkundeEng',
|
||||
'Master' => 'DiplomurkundeEng',
|
||||
],
|
||||
],
|
||||
],
|
||||
]
|
||||
];
|
||||
|
||||
// List of fields to show when ZGV_DOKTOR_ANZEIGEN is defined
|
||||
$fieldsZgvDoktor = ['zgvdoktorort', 'zgvdoktordatum', 'zgvdoktornation', 'zgvdoktor_erfuellt', 'zgvdoktor_code'];
|
||||
|
||||
// List of fields to show when ZGV_ERFUELLT_ANZEIGEN is defined
|
||||
$fieldsZgvErfuellt = ['zgv_erfuellt', 'zgvmas_erfuellt','zgvdoktor_erfuellt'];
|
||||
|
||||
//order important: to show zgf_erfuellt_doktor just in case visibility of doktor is true
|
||||
if (!defined('ZGV_ERFUELLT_ANZEIGEN') || !ZGV_ERFUELLT_ANZEIGEN) {
|
||||
$config['tabs']['prestudent']['hiddenFields'] = array_merge(
|
||||
$config['tabs']['prestudent']['hiddenFields'], $fieldsZgvErfuellt
|
||||
);
|
||||
}
|
||||
|
||||
if (!defined('ZGV_DOKTOR_ANZEIGEN') || !ZGV_DOKTOR_ANZEIGEN) {
|
||||
$config['tabs']['prestudent']['hiddenFields'] = array_merge(
|
||||
$config['tabs']['prestudent']['hiddenFields'],
|
||||
$fieldsZgvDoktor
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class InfoTerminal extends Auth_Controller
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'index' => ['basis/cis:r'],
|
||||
]);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->load->view('Cis/InfoTerminal.php', []);
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,12 @@ class MyLv extends Auth_Controller
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->load->view('Cis/MyLv');
|
||||
|
||||
$viewData = array(
|
||||
|
||||
);
|
||||
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData, 'route' => 'MyLv']);
|
||||
}
|
||||
|
||||
public function Info($studien_semester,$lvid)
|
||||
|
||||
@@ -55,7 +55,10 @@ class Profil extends Auth_Controller
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->load->view('Cis/Profil');
|
||||
$viewData = array(
|
||||
|
||||
);
|
||||
$this->load->view('CisRouterView/CisRouterView.php',['viewData' => $viewData, 'route' => 'profilIndex']);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -65,7 +68,9 @@ class Profil extends Auth_Controller
|
||||
*/
|
||||
public function View($uid)
|
||||
{
|
||||
$this->load->view('Cis/Profil');
|
||||
$viewData = array ('uid' => $uid);
|
||||
|
||||
$this->load->view('CisRouterView/CisRouterView.php',['viewData' => $viewData, 'route' => 'profilViewUid']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -25,6 +25,11 @@ class Stundenplan extends Auth_Controller
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->load->view('Cis/Stundenplan');
|
||||
|
||||
$viewData = array(
|
||||
'uid'=>getAuthUID(),
|
||||
);
|
||||
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData, 'route' => 'Stundenplan']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,6 @@ class Cis4 extends Auth_Controller
|
||||
'person_id' => $personData->person_id
|
||||
);
|
||||
|
||||
$this->load->view('CisVue/Dashboard.php',['viewData' => $viewData]);
|
||||
$this->load->view('CisRouterView/CisRouterView.php',['viewData' => $viewData, 'route' => 'FhcDashboard']);
|
||||
}
|
||||
}
|
||||
@@ -60,7 +60,14 @@ class Cms extends Auth_Controller
|
||||
|
||||
$content = current($content);
|
||||
|
||||
$this->load->view('CisVue/Cms/Content', ['content_id' => $content_id, 'template_kurzbz' => $content->template_kurzbz, 'version' => $version, 'sprache' => $sprache, 'sichtbar' => $sichtbar]);
|
||||
$viewData = array(
|
||||
'content_id' => $content_id,
|
||||
'template_kurzbz' => $content->template_kurzbz,
|
||||
'version' => $version,
|
||||
'sichtbar' => $sichtbar
|
||||
);
|
||||
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData, 'route' => 'Content']);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -75,53 +82,15 @@ class Cms extends Auth_Controller
|
||||
* @return void
|
||||
*/
|
||||
public function news($infoscreen = false, $studiengang_kz = null, $semester = null, $mischen = true, $titel = '', $edit = false, $sichtbar = true)
|
||||
{
|
||||
$this->load->view('CisVue/Cms/Content', ['infoscreen' => $infoscreen, 'studiengang_kz' => $studiengang_kz, 'semester' => $semester, 'mischen' => $mischen, 'titel' => $titel, 'edit' => $edit, 'sichtbar' => $sichtbar]);
|
||||
{
|
||||
$viewData = array();
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['viewData'=>$viewData, 'route' => 'News']);
|
||||
}
|
||||
|
||||
public function getNews($infoscreen = false, $studiengang_kz = null, $semester = null, $mischen = true, $titel = '', $edit = false, $sichtbar = true)
|
||||
{
|
||||
$get_page = intval($this->input->get('page', true));
|
||||
$get_page_size = intval($this->input->get('page_size', true));
|
||||
if ($get_page) {
|
||||
$page = $get_page;
|
||||
}
|
||||
if ($get_page_size) {
|
||||
$page_size = $get_page_size;
|
||||
} else {
|
||||
$page_size = $this->page_size;
|
||||
}
|
||||
$news = $this->cmslib->getNews($infoscreen, $studiengang_kz, $semester, $mischen, $titel, $edit, $sichtbar, $page, $page_size);
|
||||
|
||||
if (isError($news)) {
|
||||
$this->terminateWithJsonError(getError($news));
|
||||
}
|
||||
$news = hasData($news) ? getData($news) : null;
|
||||
if ($news) {
|
||||
echo json_encode($news);
|
||||
} else {
|
||||
show_error("News: No data found");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function getNewsRowCount($infoscreen = false, $studiengang_kz = null, $semester = null, $mischen = true, $titel = '', $fachbereich_kurzbz = null, $maxalter = 0, $edit = false, $sichtbar = true, $page = 1, $page_size = 10)
|
||||
{
|
||||
list($studiengang_kz, $semester) = $this->cmslib->getStgAndSem($studiengang_kz, $semester);
|
||||
$all = $edit;
|
||||
$num_rows = $this->NewsModel->countNewsWithContent(getSprache(), $studiengang_kz, $semester, $fachbereich_kurzbz, $sichtbar, $maxalter, $page, $this->page_size, $all, $mischen);
|
||||
if (isError($num_rows)) {
|
||||
$this->terminateWithJsonError(getError($num_rows));
|
||||
}
|
||||
$num_rows = hasData($num_rows) ? getData($num_rows) : null;
|
||||
if ($num_rows) {
|
||||
echo json_encode($num_rows);
|
||||
} else {
|
||||
show_error("News number rows: No data found");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function getRoomInformation($ort_kurzbz){
|
||||
$this->load->view('CisVue/Cms/RoomInformation',['ort_kurzbz'=>$ort_kurzbz]);
|
||||
$viewData = array(
|
||||
'ort_kurzbz' => $ort_kurzbz
|
||||
);
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData, 'route' => 'CmsRoom']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,17 +29,15 @@ class Dashboard extends Auth_Controller
|
||||
{
|
||||
|
||||
$this->load->model('person/Person_model','PersonModel');
|
||||
$begruesung = $this->PersonModel->getFirstName(getAuthUID());
|
||||
if(isError($begruesung))
|
||||
{
|
||||
show_error("name couldn't be loaded for username ".getAuthUID());
|
||||
}
|
||||
$begruesung = getData($begruesung);
|
||||
$personData = getData($this->PersonModel->getByUid(getAuthUID()))[0];
|
||||
|
||||
$viewData = array(
|
||||
'name' => $begruesung
|
||||
'uid' => getAuthUID(),
|
||||
'name' => $personData->vorname,
|
||||
'person_id' => $personData->person_id
|
||||
);
|
||||
|
||||
$this->load->view('CisVue/Dashboard.php', ['viewData' => $viewData]);
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData]);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -30,7 +30,8 @@ class Studentenverwaltung extends Auth_Controller
|
||||
'admin' => $this->permissionlib->isBerechtigt('admin'),
|
||||
'assistenz_schreibrechte' => $this->permissionlib->isBerechtigt('assistenz','suid'),
|
||||
'student/keine_studstatuspruefung' => $this->permissionlib->isBerechtigt('student/keine_studstatuspruefung'),
|
||||
'lehre/reihungstestAufsicht' => $this->permissionlib->isBerechtigt('lehre/reihungstestAufsicht')
|
||||
'lehre/reihungstestAufsicht' => $this->permissionlib->isBerechtigt('lehre/reihungstestAufsicht'),
|
||||
'system/change_outputformat' => $this->permissionlib->getOE_isEntitledFor('system/change_outputformat'),
|
||||
],
|
||||
'variables' => [
|
||||
'semester_aktuell' => $this->variablelib->getVar('semester_aktuell')
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2024 fhcomplete.org
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class AuthInfo extends FHCAPI_Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* Object initialization
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'getAuthUID' => self::PERM_LOGGED,
|
||||
]);
|
||||
|
||||
$this->uid = getAuthUID();
|
||||
$this->pid = getAuthPersonID();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* returns the uid of the currently logged in user
|
||||
* @access public
|
||||
*
|
||||
*/
|
||||
public function getAuthUID()
|
||||
{
|
||||
$this->terminateWithSuccess(['uid'=>$this->uid]);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ class Bookmark extends FHCAPI_Controller
|
||||
'getBookmarks' => self::PERM_LOGGED,
|
||||
'delete' => self::PERM_LOGGED,
|
||||
'insert' => self::PERM_LOGGED,
|
||||
'update' => self::PERM_LOGGED,
|
||||
]);
|
||||
|
||||
$this->load->model('dashboard/Bookmark_model', 'BookmarkModel');
|
||||
@@ -50,7 +51,8 @@ class Bookmark extends FHCAPI_Controller
|
||||
*/
|
||||
public function getBookmarks()
|
||||
{
|
||||
$bookmarks = $this->BookmarkModel->loadWhere(["uid"=>$this->uid]);
|
||||
$this->BookmarkModel->addOrder("bookmark_id");
|
||||
$bookmarks = $this->BookmarkModel->loadWhere(["uid"=>$this->uid]);
|
||||
|
||||
$bookmarks = $this->getDataOrTerminateWithError($bookmarks);
|
||||
|
||||
@@ -104,6 +106,33 @@ class Bookmark extends FHCAPI_Controller
|
||||
|
||||
$this->terminateWithSuccess($insert_into_result);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* updates bookmark in the bookmark table
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function update($bookmark_id)
|
||||
{
|
||||
// form validation
|
||||
$this->load->library('form_validation');
|
||||
$this->form_validation->set_rules('url', 'URL', 'required|valid_url|max_length[511]');
|
||||
$this->form_validation->set_rules('title', 'Title', 'required|max_length[255]');
|
||||
if($this->form_validation->run() == FALSE) $this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
$url = $this->input->post('url',true);
|
||||
$title = $this->input->post('title',true);
|
||||
|
||||
$now = new DateTime();
|
||||
$now = $now->format('Y-m-d H:i:s');
|
||||
|
||||
$update_result = $this->BookmarkModel->update($bookmark_id,['url'=>$url, 'title'=>$title,'updateamum'=>$now]);
|
||||
|
||||
$update_result = $this->getDataOrTerminateWithError($update_result);
|
||||
|
||||
$this->terminateWithSuccess($update_result);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2024 fhcomplete.org
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Cis4FhcApi extends FHCAPI_Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* Object initialization
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'getViewData' => self::PERM_LOGGED,
|
||||
]);
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* fetches ViewData
|
||||
*/
|
||||
public function getViewData()
|
||||
{
|
||||
$this->load->model('person/Person_model','PersonModel');
|
||||
$personData = getData($this->PersonModel->getByUid(getAuthUID()))[0];
|
||||
|
||||
$viewData = array(
|
||||
'uid' => getAuthUID(),
|
||||
'name' => $personData->vorname,
|
||||
'person_id' => $personData->person_id
|
||||
);
|
||||
|
||||
$this->terminateWithSuccess($viewData);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2024 fhcomplete.org
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
|
||||
class CisMenu extends FHCAPI_Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* Object initialization
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'getMenu' => self::PERM_LOGGED,
|
||||
]);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* fetches the menu for CIS from the database based on the userLanguage
|
||||
*/
|
||||
public function getMenu()
|
||||
{
|
||||
$this->load->model('content/Content_model', 'ContentModel');
|
||||
$this->load->config('cis');
|
||||
$cis4_content_id =$this->config->item('cis_menu_root_content_id');
|
||||
$result = $this->ContentModel->getMenu($cis4_content_id, getAuthUID(),getUserLanguage());
|
||||
$result = $this->getDataOrTerminateWithError($result);
|
||||
$menu = $result->childs ?? [];
|
||||
$this->terminateWithSuccess($menu);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -106,7 +106,6 @@ class Cms extends FHCAPI_Controller
|
||||
$this->terminateWithSuccess($content_id);
|
||||
}
|
||||
|
||||
//todo: there is the method news and getNews but only one should exist
|
||||
public function news()
|
||||
{
|
||||
|
||||
@@ -125,25 +124,35 @@ class Cms extends FHCAPI_Controller
|
||||
|
||||
//get the data or terminate with error
|
||||
$news = $this->getDataOrTerminateWithError($news);
|
||||
|
||||
// array that keeps track of which news don't have a betreff and have to be removed from the news array
|
||||
$newsToRemove = array();
|
||||
// collect the content of the news
|
||||
foreach($news as $news_element){
|
||||
$this->addMeta("content_id",$news_element->content_id);
|
||||
foreach($news as $index=>$news_element){
|
||||
|
||||
//todo: quick fix, for query builder error when fetching content
|
||||
$this->NewsModel->resetQuery();
|
||||
$content = $this->cmslib->getContent($news_element->content_id);
|
||||
|
||||
$content = getData($content);
|
||||
|
||||
$news_element->content_obj = $content;
|
||||
if(isError($content))
|
||||
{
|
||||
// removes the news from the news array, so that the response does not include a invalid news
|
||||
array_push($newsToRemove,$index);
|
||||
//add the error to the api response? visual feedback
|
||||
//$this->addError(print_r($content->retval,true));
|
||||
continue;
|
||||
}
|
||||
$content = getData($content);
|
||||
$news_element->content_obj = $content;
|
||||
}
|
||||
|
||||
//removes all news that don't have a betreff
|
||||
foreach($newsToRemove as $removeNewsIndex)
|
||||
{
|
||||
unset($news[$removeNewsIndex]);
|
||||
}
|
||||
|
||||
$withContent = function($news) {
|
||||
return $news->content_obj != null;
|
||||
};
|
||||
|
||||
};
|
||||
$newsWithContent = array_filter($news, $withContent);
|
||||
|
||||
$this->terminateWithSuccess($newsWithContent);
|
||||
|
||||
}
|
||||
@@ -176,15 +185,18 @@ class Cms extends FHCAPI_Controller
|
||||
// getting the GET parameters
|
||||
$page = intval($this->input->get('page', true));
|
||||
$page_size = intval($this->input->get('page_size', true));
|
||||
$sprache = $this->input->get('sprache', true);
|
||||
if(!$sprache)
|
||||
{
|
||||
$sprache = getUserLanguage();
|
||||
}
|
||||
|
||||
// default value for the page_size is 10
|
||||
$page_size = $page_size ?? 10;
|
||||
|
||||
$news = $this->cmslib->getNews($infoscreen, $studiengang_kz, $semester, $mischen, $titel, $edit, $sichtbar, $page, $page_size);
|
||||
|
||||
$news = $this->cmslib->getNews($infoscreen, $studiengang_kz, $semester, $mischen, $titel, $edit, $sichtbar, $page, $page_size, $sprache);
|
||||
$news = $this->getDataOrTerminateWithError($news);
|
||||
|
||||
$this->addMeta('test', $this->p->t('global', 'studiengangsleitung'));
|
||||
$this->addMeta('phrases', json_decode($this->p->getJson()));
|
||||
$this->terminateWithSuccess($news);
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ class Filter extends FHCAPI_Controller
|
||||
*/
|
||||
public function applyFilterFields()
|
||||
{
|
||||
$this->form_validation->set_rules('filterFields', 'filterFields', 'required');
|
||||
$this->form_validation->set_rules('filterFields[]', 'filterFields', 'required');
|
||||
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
@@ -30,6 +30,7 @@ class Lehre extends FHCAPI_Controller
|
||||
parent::__construct([
|
||||
'lvStudentenMail' => self::PERM_LOGGED,
|
||||
'LV' => self::PERM_LOGGED,
|
||||
'Pruefungen' => self::PERM_LOGGED,
|
||||
]);
|
||||
|
||||
|
||||
@@ -76,6 +77,23 @@ class Lehre extends FHCAPI_Controller
|
||||
|
||||
$this->terminateWithSuccess($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* fetches all Pruefungen of a student for a specific lehrveranstaltung
|
||||
* if the student passed the Pruefung on the first attempt, no information about the Pruefungen is stored in the database
|
||||
* @param mixed $lehrveranstaltung_id
|
||||
* @return void
|
||||
*/
|
||||
public function Pruefungen($lehrveranstaltung_id)
|
||||
{
|
||||
$this->load->model('education/Pruefung_model', 'PruefungModel');
|
||||
|
||||
$result = $this->PruefungModel->getByStudentAndLv(getAuthUID(), $lehrveranstaltung_id, getUserLanguage());
|
||||
|
||||
$result = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($result);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -58,6 +58,22 @@ class LvMenu extends FHCAPI_Controller
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
|
||||
/**
|
||||
* alternative function to get multiple lvMenus with a single http request
|
||||
*/
|
||||
public function getMultipleLvMenu($lvMenuOptionList){
|
||||
$result =[];
|
||||
foreach($lvMenuOptionList as $lvMenuOptions){
|
||||
$lvMenu = $this->getLvMenu($lvMenuOptions['lvid'],$lvMenuOptions['studiensemester_kurzbz']);
|
||||
if(isError($lvMenu)){
|
||||
// TODO: some lvMenu threw an error, handle error here
|
||||
}
|
||||
$result[$lvMenuOptions['lvid']]=$lvMenu;
|
||||
}
|
||||
$this->terminateWithSuccess($result);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@@ -91,20 +107,24 @@ class LvMenu extends FHCAPI_Controller
|
||||
$lvres = $this->Lehrveranstaltung_model->load($lvid);
|
||||
if(!hasData($lvres))
|
||||
{
|
||||
$this->terminateWithError('LV ' . $lvid . ' not found.');
|
||||
$this->terminateWithError('LV ' . $lvid . ' not found.');
|
||||
}
|
||||
$lv = (getData($lvres))[0];
|
||||
|
||||
$this->addMeta('lvInfo',$lv);
|
||||
// define studiengang_kz / semester / lehrverzeichnis
|
||||
$studiengang_kz = $lv->studiengang_kz;
|
||||
$semester = $lv->semester;
|
||||
$short = $lv->lehreverzeichnis;
|
||||
// return empty menu for studiengang_kz = 0
|
||||
if($studiengang_kz == 0){
|
||||
$this->terminateWithSuccess("organisatorische_einheit");
|
||||
}
|
||||
|
||||
// load studiengang
|
||||
$stgres = $this->Studiengang_model->load($lv->studiengang_kz);
|
||||
$stgres = $this->Studiengang_model->load(strval($studiengang_kz));
|
||||
if(!hasData($stgres))
|
||||
{
|
||||
$this->terminateWithError('Stg ' . $lv->studiengang_kz . ' nof found.');
|
||||
$this->terminateWithError('Stg ' . $lv->studiengang_kz . ' not found.');
|
||||
}
|
||||
$stg = (getData($stgres))[0];
|
||||
$kurzbz = strtoupper($stg->typ . $stg->kurzbz);
|
||||
@@ -284,24 +304,6 @@ class LvMenu extends FHCAPI_Controller
|
||||
|
||||
}
|
||||
|
||||
|
||||
private function fhc_menu_digitale_anwesenheiten(&$menu, $angemeldet, $studiengang_kz, $semester, $lvid, $angezeigtes_stsem){
|
||||
|
||||
// DIGITALE ANWESENHEITEN
|
||||
if (defined('CIS_LEHRVERANSTALTUNG_ANWESENHEIT_ANZEIGEN') && CIS_LEHRVERANSTALTUNG_ANWESENHEIT_ANZEIGEN && $angemeldet) {
|
||||
|
||||
$menu[] = array
|
||||
(
|
||||
'id' => 'core_menu_digitale_anwesenheitslisten',
|
||||
'position' => '50',
|
||||
'name' => $this->p->t('lehre', 'digiAnw'),
|
||||
'c4_icon' => base_url('skin/images/button_kreuzerltool.png'),
|
||||
'c4_link' => base_url("index.ci.php/extensions/FHC-Core-Anwesenheiten/?stg_kz=$studiengang_kz&sem=$semester&lvid=$lvid&sem_kurzbz=$angezeigtes_stsem&nav=false"),
|
||||
'c4_linkList' => []
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
private function fhc_menu_lvinfo(&$menu, $lvid, $studiengang_kz, $lektor_der_lv, $is_lector, $lehrfach_oe_kurzbz_arr){
|
||||
|
||||
// LVINFO
|
||||
|
||||
@@ -73,11 +73,22 @@ class Phrasen extends FHCAPI_Controller
|
||||
// gets all languages that are set as active in the database
|
||||
public function getAllLanguages()
|
||||
{
|
||||
$langs = getDBActiveLanguages();
|
||||
$this->load->model('system/Sprache_model', 'SprachenModel');
|
||||
|
||||
// Add order clause by index and select the sprache,bezeichnung and index column
|
||||
$this->SprachenModel->addOrder('index');
|
||||
$this->SprachenModel->addSelect('sprache, bezeichnung, index');
|
||||
|
||||
// Retrieves from public.tbl_sprache
|
||||
$langs = $this->SprachenModel->loadWhere(array('content' => true));
|
||||
$langs = $this->getDataOrTerminateWithError($langs);
|
||||
$langs = array_map(function($lang){
|
||||
return $lang->sprache;
|
||||
$data = new stdClass();
|
||||
$data->sprache = $lang->sprache;
|
||||
$data->bezeichnung = $lang->bezeichnung[($lang->index-1)];
|
||||
return $data;
|
||||
}, $langs);
|
||||
|
||||
$this->terminateWithSuccess($langs);
|
||||
}
|
||||
|
||||
|
||||
@@ -499,7 +499,7 @@ class Profil extends FHCAPI_Controller
|
||||
/** @param integer $geburtsInfo */
|
||||
if ($geburtsInfo) {
|
||||
array_push($selectClause, "gebort");
|
||||
array_push($selectClause, "gebdatum");
|
||||
array_push($selectClause, "TO_CHAR(gebdatum, 'DD.MM.YYYY') as gebdatum");
|
||||
}
|
||||
$this->BenutzerModel->addSelect($selectClause);
|
||||
$this->BenutzerModel->addJoin("tbl_person", "person_id");
|
||||
@@ -567,7 +567,7 @@ class Profil extends FHCAPI_Controller
|
||||
*/
|
||||
private function getStudentInfo($uid)
|
||||
{
|
||||
$this->StudentModel->addSelect(['tbl_studiengang.bezeichnung as studiengang', 'tbl_student.semester', 'tbl_student.verband', 'tbl_student.gruppe', 'tbl_student.matrikelnr as personenkennzeichen']);
|
||||
$this->StudentModel->addSelect(['tbl_studiengang.bezeichnung as studiengang', 'tbl_studiengang.studiengang_kz as studiengang_kz', 'tbl_student.semester', 'tbl_student.verband', 'tbl_student.gruppe', 'tbl_student.matrikelnr as personenkennzeichen']);
|
||||
$this->StudentModel->addJoin('tbl_studiengang', "tbl_studiengang.studiengang_kz=tbl_student.studiengang_kz");
|
||||
|
||||
$student_res = $this->StudentModel->load([$uid]);
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2024 fhcomplete.org
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
class Studgang extends FHCAPI_Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* Object initialization
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'getStudiengangInfo'=> self::PERM_LOGGED,
|
||||
|
||||
]);
|
||||
|
||||
$this->load->model('organisation/Studiengang_model', 'StudiengangModel');
|
||||
$this->load->model('ressource/mitarbeiter_model', 'MitarbeiterModel');
|
||||
|
||||
// Loads phrases system
|
||||
$this->loadPhrases([
|
||||
'global'
|
||||
]);
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
public function getStudiengangInfo(){
|
||||
$isMitarbeiter = $this->MitarbeiterModel->isMitarbeiter(getAuthUID());
|
||||
$isMitarbeiter = $this->getDataOrTerminateWithError($isMitarbeiter);
|
||||
if($isMitarbeiter) {
|
||||
$this->terminateWithSuccess(null);
|
||||
}
|
||||
|
||||
// fetches the Studiengang Information which is used next to the news
|
||||
$studiengangInfo = $this->StudiengangModel->getStudiengangInfoForNews();
|
||||
$studiengangInfo= $this->getDataOrTerminateWithError($studiengangInfo);
|
||||
$this->terminateWithSuccess($studiengangInfo);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Private methods
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@ class Stundenplan extends FHCAPI_Controller
|
||||
'Reservierungen' => self::PERM_LOGGED,
|
||||
'getStundenplan' => self::PERM_LOGGED,
|
||||
'getLehreinheitStudiensemester' => self::PERM_LOGGED,
|
||||
'studiensemesterDateInterval' => self::PERM_LOGGED,
|
||||
]);
|
||||
|
||||
$this->load->library('LogLib');
|
||||
@@ -56,6 +57,15 @@ class Stundenplan extends FHCAPI_Controller
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
//TODO: delete this function if we don't use the old calendar export endpoints anymore
|
||||
public function studiensemesterDateInterval($date){
|
||||
$this->load->model('organisation/Studiensemester_model','StudiensemesterModel');
|
||||
$studiensemester =$this->StudiensemesterModel->getByDate(date_format(date_create($date),'Y-m-d'));
|
||||
$studiensemester =current($this->getDataOrTerminateWithError($studiensemester));
|
||||
$this->terminateWithSuccess($studiensemester);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* fetches Stunden layout from database
|
||||
* @access public
|
||||
@@ -107,7 +117,7 @@ class Stundenplan extends FHCAPI_Controller
|
||||
* @access public
|
||||
*
|
||||
*/
|
||||
//TODO: getStundenplan fuer Mitarbeiter anpassen
|
||||
|
||||
public function getStundenplan(){
|
||||
|
||||
$this->load->model('ressource/Mitarbeiter_model','MitarbeiterModel');
|
||||
@@ -126,42 +136,63 @@ class Stundenplan extends FHCAPI_Controller
|
||||
// storing the get parameter in local variables
|
||||
$start_date = $this->input->get('start_date', TRUE);
|
||||
$end_date = $this->input->get('end_date', TRUE);
|
||||
$lv_id = $this->input->get('lv_id', TRUE);
|
||||
|
||||
$student_uid = getAuthUID();
|
||||
if(is_null($student_uid))
|
||||
{
|
||||
$this->terminateWithError("No UID");
|
||||
}
|
||||
|
||||
$semester_range = $this->studienSemesterErmitteln($start_date,$end_date);
|
||||
$this->sortStudienSemester($semester_range);
|
||||
$this->applyLoadUeberSemesterHaelfte($semester_range);
|
||||
|
||||
if($lv_id) { // fetch Stundenplan for lva, irrelevant of who is requesting it (for now)
|
||||
|
||||
$stundenplan_data = $this->StundenplanModel->getStundenplanLVA($start_date, $end_date, $lv_id);
|
||||
$stundenplan_data = $this->getDataOrTerminateWithError($stundenplan_data) ?? [];
|
||||
$this->expand_object_information($stundenplan_data);
|
||||
|
||||
// query lv itself in case its Stundenplan is being queried and it has no entries
|
||||
$this->load->model('education/Lehrveranstaltung_model','LehrveranstaltungModel');
|
||||
$lv = getData($this->LehrveranstaltungModel->load($lv_id))[0];
|
||||
$this->addMeta('lv', $lv);
|
||||
$this->terminateWithSuccess($stundenplan_data);
|
||||
|
||||
}
|
||||
|
||||
$is_mitarbeiter = getData($this->MitarbeiterModel->isMitarbeiter($student_uid));
|
||||
if($is_mitarbeiter)
|
||||
{
|
||||
$this->terminateWithError("Not possible to look at the Student Calendar as a Mitarbeiter");
|
||||
|
||||
$stundenplan_data = $this->StundenplanModel->getStundenplanMitarbeiter($start_date, $end_date, $student_uid);
|
||||
$stundenplan_data = $this->getDataOrTerminateWithError($stundenplan_data) ?? [];
|
||||
$this->expand_object_information($stundenplan_data);
|
||||
$this->terminateWithSuccess($stundenplan_data);
|
||||
} else {
|
||||
// getting the gruppen_kurzbz of the student in the different studiensemester
|
||||
$benutzer_gruppen = $this->fetchBenutzerGruppenFromStudiensemester($semester_range);
|
||||
|
||||
// getting the student_lehrverbaende of the student in the different studiensemester
|
||||
$student_lehrverband = $this->fetchStudentlehrverbandFromStudiensemester($semester_range);
|
||||
|
||||
$stundenplan_query = $this->StundenplanModel->getStundenplanQuery($start_date, $end_date, $semester_range, $benutzer_gruppen, $student_lehrverband);
|
||||
if(!$stundenplan_query)
|
||||
{
|
||||
$this->terminateWithSuccess([]);
|
||||
}
|
||||
$stundenplan_data = $this->StundenplanModel->stundenplanGruppierung($stundenplan_query);
|
||||
$stundenplan_data = $this->getDataOrTerminateWithError($stundenplan_data) ?? [];
|
||||
|
||||
$this->expand_object_information($stundenplan_data);
|
||||
|
||||
$this->returnObj['$stundenplan_query'] = $stundenplan_query;
|
||||
$this->returnObj['$student_lehrverband'] = $student_lehrverband;
|
||||
$this->returnObj['$benutzer_gruppen'] = $benutzer_gruppen;
|
||||
$this->terminateWithSuccess($stundenplan_data);
|
||||
}
|
||||
|
||||
$semester_range = $this->studienSemesterErmitteln($start_date,$end_date);
|
||||
|
||||
$this->sortStudienSemester($semester_range);
|
||||
|
||||
$this->applyLoadUeberSemesterHaelfte($semester_range);
|
||||
|
||||
// getting the gruppen_kurzbz of the student in the different studiensemester
|
||||
$benutzer_gruppen = $this->fetchBenutzerGruppenFromStudiensemester($semester_range);
|
||||
|
||||
// getting the student_lehrverbaende of the student in the different studiensemester
|
||||
$student_lehrverband = $this->fetchStudentlehrverbandFromStudiensemester($semester_range);
|
||||
|
||||
$stundenplan_query = $this->StundenplanModel->getStundenplanQuery($start_date, $end_date, $semester_range, $benutzer_gruppen, $student_lehrverband);
|
||||
if(!$stundenplan_query)
|
||||
{
|
||||
$this->terminateWithSuccess([]);
|
||||
}
|
||||
$stundenplan_data = $this->StundenplanModel->stundenplanGruppierung($stundenplan_query);
|
||||
$stundenplan_data = $this->getDataOrTerminateWithError($stundenplan_data) ?? [];
|
||||
|
||||
$this->expand_object_information($stundenplan_data);
|
||||
|
||||
$this->terminateWithSuccess($stundenplan_data);
|
||||
}
|
||||
|
||||
// gets the reservierungen of a room if the ort_kurzbz parameter is supplied otherwise gets the reservierungen of the stundenplan of a student
|
||||
@@ -174,19 +205,25 @@ class Stundenplan extends FHCAPI_Controller
|
||||
$this->form_validation->set_rules('end_date', "EndDate", "required");
|
||||
if($this->form_validation->run() == FALSE) $this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
// storing the get parameter in local variables
|
||||
$this->load->model('ressource/Mitarbeiter_model','MitarbeiterModel');
|
||||
|
||||
// storing the get parameter in local variables
|
||||
$start_date = $this->input->get('start_date', TRUE);
|
||||
$end_date = $this->input->get('end_date', TRUE);
|
||||
|
||||
// querying the reservierungen
|
||||
$reservierungen = $this->ReservierungModel->getReservierungen($start_date, $end_date, $ort_kurzbz);
|
||||
|
||||
$reservierungen = $this->getDataOrTerminateWithError($reservierungen) ?? [];
|
||||
|
||||
$is_mitarbeiter = getData($this->MitarbeiterModel->isMitarbeiter(getAuthUID()));
|
||||
if($is_mitarbeiter)
|
||||
{
|
||||
$reservierungen = $this->ReservierungModel->getReservierungenMitarbeiter($start_date, $end_date, $ort_kurzbz);
|
||||
} else {
|
||||
// querying the reservierungen
|
||||
$reservierungen = $this->ReservierungModel->getReservierungen($start_date, $end_date, $ort_kurzbz);
|
||||
}
|
||||
|
||||
$reservierungen = $this->getDataOrTerminateWithError($reservierungen) ?? [];
|
||||
$this->expand_object_information($reservierungen);
|
||||
|
||||
$this->terminateWithSuccess($reservierungen);
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function getLehreinheitStudiensemester($lehreinheit_id){
|
||||
@@ -246,6 +283,23 @@ class Stundenplan extends FHCAPI_Controller
|
||||
|
||||
$gruppe_obj_array[] = $lv_gruppe_object;
|
||||
}
|
||||
|
||||
if($item->ort_kurzbz) {
|
||||
|
||||
$ort_content_object = $this->StundenplanModel->execReadOnlyQuery("
|
||||
SELECT content_id
|
||||
FROM public.tbl_ort
|
||||
WHERE ort_kurzbz = ?", [$item->ort_kurzbz]);
|
||||
if (isError($ort_content_object)) {
|
||||
$this->show_error(getError($ort_content_object));
|
||||
}
|
||||
$ort_content_object = getData($ort_content_object)[0];
|
||||
if($ort_content_object) {
|
||||
$item->ort_content_id = $ort_content_object->content_id;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
$item->gruppe = $gruppe_obj_array;
|
||||
$item->lektor = $lektor_obj_array;
|
||||
@@ -536,7 +590,7 @@ class Stundenplan extends FHCAPI_Controller
|
||||
private function studienSemesterErmitteln($start_date,$end_date){
|
||||
|
||||
// gets all studiensemester from the student from start_date to end_date
|
||||
$semester_range = $this->StudiensemesterModel->getByDate($start_date,$end_date);
|
||||
$semester_range = $this->StudiensemesterModel->getByDateRange($start_date,$end_date);
|
||||
$semester_range = array_map(
|
||||
function($sem)
|
||||
{
|
||||
|
||||
@@ -342,7 +342,7 @@ class BetriebsmittelP extends FHCAPI_Controller
|
||||
$this->terminateWithError($this->p->t('ui', 'error_missingId', ['id' => 'Betriebsmittelperson_id']), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
$this->terminateWithSuccess(current(getData($result)));
|
||||
return $this->terminateWithSuccess(current(getData($result)));
|
||||
}
|
||||
|
||||
public function deleteBetriebsmittel($betriebsmittelperson_id)
|
||||
@@ -358,7 +358,7 @@ class BetriebsmittelP extends FHCAPI_Controller
|
||||
if (!hasData($result)) {
|
||||
return $this->terminateWithError($this->p->t('ui', 'error_missingId', ['id' => 'Betriebsmittelperson_id']), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
return $this->outputJsonSuccess(current(getData($result)));
|
||||
$this->terminateWithSuccess(current(getData($result)));
|
||||
}
|
||||
|
||||
public function getTypenBetriebsmittel()
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
/**
|
||||
* FH-Complete
|
||||
*
|
||||
* @package FHC-API
|
||||
* @author FHC-Team
|
||||
* @copyright Copyright (c) 2016, fhcomplete.org
|
||||
* @license GPLv3
|
||||
* @link http://fhcomplete.org
|
||||
* @since Version 1.0
|
||||
* @filesource
|
||||
*/
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class StudiengangEP extends FHCAPI_Controller
|
||||
{
|
||||
/**
|
||||
* StudiengangEP API constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct(
|
||||
array(
|
||||
'getStudiengangByKz' => self::PERM_LOGGED
|
||||
)
|
||||
);
|
||||
// Load model StudiengangModel
|
||||
$this->load->model('organisation/studiengang_model', 'StudiengangModel');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function getStudiengangByKz()
|
||||
{
|
||||
$studiengang_kz = intval($this->input->get('studiengang_kz'));
|
||||
|
||||
$this->StudiengangModel->addSelect('studiengang_kz, kurzbz, kurzbzlang, '
|
||||
. 'typ, bezeichnung, english, aktiv, orgform_kurzbz, sprache, '
|
||||
. 'oe_kurzbz');
|
||||
$result = $this->StudiengangModel->load($studiengang_kz);
|
||||
|
||||
if (isError($result))
|
||||
{
|
||||
$this->terminateWithError(getError($result), self::ERROR_TYPE_DB);
|
||||
}
|
||||
|
||||
$stg = null;
|
||||
if(hasData($result))
|
||||
{
|
||||
$stg = (getData($result))[0];
|
||||
}
|
||||
$this->terminateWithSuccess($stg);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
<?php
|
||||
/**
|
||||
* FH-Complete
|
||||
*
|
||||
* @package FHC-API
|
||||
* @author FHC-Team
|
||||
* @copyright Copyright (c) 2016, fhcomplete.org
|
||||
* @license GPLv3
|
||||
* @link http://fhcomplete.org
|
||||
* @since Version 1.0
|
||||
* @filesource
|
||||
*/
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Studienjahr extends FHCAPI_Controller
|
||||
{
|
||||
/**
|
||||
* Studienjahr API constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct(
|
||||
array(
|
||||
'getAll' => self::PERM_LOGGED,
|
||||
'getNext' => self::PERM_LOGGED
|
||||
)
|
||||
);
|
||||
// Load model StudiensemesterModel
|
||||
$this->load->model('organisation/studienjahr_model', 'StudienjahrModel');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all Studienjahre.
|
||||
*
|
||||
* @param null|string $order Sorting order for the Studienjahr, 'asc' or 'desc'. Defaults to 'asc'.
|
||||
* @param null|string $start Starting Studienjahre with given studienjahr_kurzbz
|
||||
*/
|
||||
public function getAll()
|
||||
{
|
||||
$order = $this->input->get('order');
|
||||
$start = $this->input->get('studienjahr_kurzbz');
|
||||
|
||||
if (strcasecmp($order, 'DESC') == 0) {
|
||||
$this->StudienjahrModel->addOrder('studienjahr_kurzbz', 'DESC');
|
||||
} else {
|
||||
$this->StudienjahrModel->addOrder('studienjahr_kurzbz', 'ASC');
|
||||
}
|
||||
|
||||
if ($start) {
|
||||
$result = $this->StudienjahrModel->loadWhere([
|
||||
'studienjahr_kurzbz >= ' => $start
|
||||
]);
|
||||
} else {
|
||||
$result = $this->StudienjahrModel->load();
|
||||
}
|
||||
|
||||
if (isError($result)) {
|
||||
$this->terminateWithError(getError($result), self::ERROR_TYPE_DB);
|
||||
}
|
||||
|
||||
$this->terminateWithSuccess((getData($result) ?: []));
|
||||
}
|
||||
|
||||
public function getNext()
|
||||
{
|
||||
$this->StudienjahrModel->addJoin('public.tbl_studiensemester', 'studienjahr_kurzbz');
|
||||
$this->StudienjahrModel->addOrder('start');
|
||||
$this->StudienjahrModel->addLimit(1);
|
||||
|
||||
$result = $this->StudienjahrModel->loadWhere(['start >' => 'NOW()']);
|
||||
|
||||
if (isError($result)) {
|
||||
$this->terminateWithError(getError($result), self::ERROR_TYPE_DB);
|
||||
}
|
||||
|
||||
$this->terminateWithSuccess(current(getData($result)));
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,8 @@ class Studiensemester extends FHCAPI_Controller
|
||||
parent::__construct(
|
||||
array(
|
||||
'getAll' => self::PERM_LOGGED,
|
||||
'getAktNext' => self::PERM_LOGGED
|
||||
'getAktNext' => self::PERM_LOGGED,
|
||||
'getStudienjahrByStudiensemester' => self::PERM_LOGGED
|
||||
)
|
||||
);
|
||||
// Load model StudiensemesterModel
|
||||
@@ -115,4 +116,40 @@ class Studiensemester extends FHCAPI_Controller
|
||||
|
||||
$this->terminateWithSuccess((getData($result) ?: ''));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Studienjahr by Studiensemester.
|
||||
* input param semester: studiensemester_kurzbz
|
||||
*/
|
||||
public function getStudienjahrByStudiensemester()
|
||||
{
|
||||
$semester = $this->input->get('semester');
|
||||
|
||||
$studienjahrObj = null;
|
||||
|
||||
if (!is_numeric($semester))
|
||||
{
|
||||
$this->StudiensemesterModel->addSelect('studienjahr_kurzbz');
|
||||
$result = $this->StudiensemesterModel->loadWhere(array('studiensemester_kurzbz =' => $semester));
|
||||
}
|
||||
|
||||
if (hasData($result))
|
||||
{
|
||||
$studienjahr = getData($result)[0]->studienjahr_kurzbz;
|
||||
$startstudienjahr = substr($studienjahr, 0, 4);
|
||||
$endstudienjahr = substr($studienjahr, 0, 2) . substr($studienjahr, -2);
|
||||
|
||||
$studienjahrObj = new StdClass();
|
||||
|
||||
$studienjahrObj->studienjahr_kurzbz = $studienjahr;
|
||||
$studienjahrObj->startstudienjahr = $startstudienjahr;
|
||||
$studienjahrObj->endstudienjahr= $endstudienjahr;
|
||||
}
|
||||
|
||||
if (isError($result)) {
|
||||
$this->terminateWithError(getError($result), self::ERROR_TYPE_DB);
|
||||
}
|
||||
|
||||
$this->terminateWithSuccess((getData(success($studienjahrObj))));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,420 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
use \DateTime as DateTime;
|
||||
|
||||
class Abschlusspruefung extends FHCAPI_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'getAbschlusspruefung' => ['admin:r', 'assistenz:r'],
|
||||
'loadAbschlusspruefung' => ['admin:r', 'assistenz:r'],
|
||||
'insertAbschlusspruefung' => ['admin:rw', 'assistenz:rw'],
|
||||
'updateAbschlusspruefung' => ['admin:rw', 'assistenz:rw'],
|
||||
'deleteAbschlusspruefung' => ['admin:rw', 'assistenz:rw'],
|
||||
'getTypenAbschlusspruefung' => ['admin:rw', 'assistenz:rw'],
|
||||
'getNoten' => ['admin:rw', 'assistenz:rw'],
|
||||
'getTypenAntritte' => ['admin:rw', 'assistenz:rw'],
|
||||
'getBeurteilungen' => ['admin:rw', 'assistenz:rw'],
|
||||
'getAkadGrade' => ['admin:rw', 'assistenz:rw'],
|
||||
'getMitarbeiter' => ['admin:rw', 'assistenz:rw'],
|
||||
'getPruefer' => ['admin:rw', 'assistenz:rw'],
|
||||
'getTypStudiengang' => ['admin:rw', 'assistenz:rw'],
|
||||
'checkForExistingExams' => ['admin:rw', 'assistenz:rw'],
|
||||
]);
|
||||
|
||||
// Load Libraries
|
||||
$this->load->library('VariableLib', ['uid' => getAuthUID()]);
|
||||
$this->load->library('form_validation');
|
||||
|
||||
// Load language phrases
|
||||
$this->loadPhrases([
|
||||
'ui',
|
||||
'person',
|
||||
'abschlusspruefung'
|
||||
]);
|
||||
|
||||
// Load models
|
||||
$this->load->model('education/Abschlusspruefung_model', 'AbschlusspruefungModel');
|
||||
}
|
||||
|
||||
public function getAbschlusspruefung($student_uid)
|
||||
{
|
||||
$result = $this->AbschlusspruefungModel->getAbschlusspruefungForPrestudent($student_uid);
|
||||
|
||||
if (isError($result)) {
|
||||
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
$this->terminateWithSuccess((getData($result) ?: []));
|
||||
}
|
||||
|
||||
public function loadAbschlusspruefung()
|
||||
{
|
||||
$abschlusspruefung_id = $this->input->post('id');
|
||||
|
||||
$this->AbschlusspruefungModel->addSelect('lehre.tbl_abschlusspruefung.*');
|
||||
$this->AbschlusspruefungModel->addSelect("
|
||||
CASE
|
||||
WHEN pruefer1 IS NOT NULL
|
||||
THEN CONCAT(p1.nachname, ' ', p1.vorname, COALESCE(' ' || p1.titelpre, ''))
|
||||
ELSE NULL
|
||||
END AS p1
|
||||
");
|
||||
$this->AbschlusspruefungModel->addSelect("
|
||||
CASE
|
||||
WHEN pruefer2 IS NOT NULL
|
||||
THEN CONCAT(p2.nachname, ' ', p2.vorname, COALESCE(' ' || p2.titelpre, ''))
|
||||
ELSE NULL
|
||||
END AS p2
|
||||
");
|
||||
$this->AbschlusspruefungModel->addSelect("
|
||||
CASE
|
||||
WHEN pruefer3 IS NOT NULL
|
||||
THEN CONCAT(p3.nachname, ' ', p3.vorname, COALESCE(' ' || p3.titelpre, ''))
|
||||
ELSE NULL
|
||||
END AS p3
|
||||
");
|
||||
$this->AbschlusspruefungModel->addSelect("
|
||||
CASE
|
||||
WHEN vorsitz IS NOT NULL
|
||||
THEN CONCAT(pv.nachname, ' ', pv.vorname, COALESCE(' ' || pv.titelpre, ''), ' (', ben.uid , ')' )
|
||||
ELSE NULL
|
||||
END AS pv
|
||||
");
|
||||
$this->AbschlusspruefungModel->addJoin('public.tbl_benutzer ben', 'ON (ben.uid = lehre.tbl_abschlusspruefung.vorsitz)', 'LEFT');
|
||||
$this->AbschlusspruefungModel->addJoin('public.tbl_person pv', 'ON (pv.person_id = ben.person_id)', 'LEFT');
|
||||
$this->AbschlusspruefungModel->addJoin('public.tbl_person p1', 'ON (p1.person_id = lehre.tbl_abschlusspruefung.pruefer1)', 'LEFT');
|
||||
$this->AbschlusspruefungModel->addJoin('public.tbl_person p2', 'ON (p2.person_id = lehre.tbl_abschlusspruefung.pruefer2)', 'LEFT');
|
||||
$this->AbschlusspruefungModel->addJoin('public.tbl_person p3', 'ON (p3.person_id = lehre.tbl_abschlusspruefung.pruefer3)', 'LEFT');
|
||||
$result = $this->AbschlusspruefungModel->loadWhere(
|
||||
array('abschlusspruefung_id' => $abschlusspruefung_id)
|
||||
);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess(current($data));
|
||||
}
|
||||
|
||||
public function getTypenAbschlusspruefung()
|
||||
{
|
||||
$this->load->model('education/Pruefungstyp_model', 'PruefungstypModel');
|
||||
|
||||
$result = $this->PruefungstypModel->loadWhere(
|
||||
array('abschluss' => true)
|
||||
);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getTypenAntritte()
|
||||
{
|
||||
$this->load->model('education/Pruefungsantritt_model', 'PruefungsantrittModel');
|
||||
|
||||
$result = $this->PruefungsantrittModel->load();
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getBeurteilungen()
|
||||
{
|
||||
$this->load->model('education/Abschlussbeurteilung_model', 'AbschlussbeurteilungModel');
|
||||
|
||||
$result = $this->AbschlussbeurteilungModel->load();
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getAkadGrade()
|
||||
{
|
||||
$studiengang_kz= $this->input->post('studiengang_kz');
|
||||
|
||||
|
||||
$this->load->model('education/Akadgrad_model', 'AkadgradModel');
|
||||
|
||||
$result = $this->AkadgradModel->loadWhere(
|
||||
array('studiengang_kz' => $studiengang_kz)
|
||||
);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getTypStudiengang()
|
||||
{
|
||||
$studiengang_kz= $this->input->post('studiengang_kz');
|
||||
|
||||
/* if (!$studiengang_kzs || !is_array($studiengang_kzs)) {
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$this->form_validation->set_rules('studiengang_kzs', '', 'required|is_null', [
|
||||
'is_null' => $this->p->t('ui', 'error_fieldMustBeArray')
|
||||
]);
|
||||
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
}*/
|
||||
|
||||
|
||||
$this->load->model('organisation/Studiengang_model', 'StudiengangModel');
|
||||
|
||||
$result = $this->StudiengangModel->loadWhere(
|
||||
array('studiengang_kz' => $studiengang_kz)
|
||||
);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$typStudiengang = current($data)->typ;
|
||||
|
||||
$this->terminateWithSuccess($typStudiengang);
|
||||
}
|
||||
|
||||
public function getMitarbeiter($searchString)
|
||||
{
|
||||
$this->load->model('ressource/Mitarbeiter_model', 'MitarbeiterModel');
|
||||
|
||||
$result = $this->MitarbeiterModel->searchMitarbeiter($searchString, 'mitAkadGrad');
|
||||
|
||||
if (isError($result)) {
|
||||
$this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
$this->terminateWithSuccess($result ?: []);
|
||||
}
|
||||
|
||||
public function getPruefer($searchString)
|
||||
{
|
||||
$this->load->model('ressource/Mitarbeiter_model', 'MitarbeiterModel');
|
||||
|
||||
$result = $this->MitarbeiterModel->searchMitarbeiter($searchString, 'ohneMaUid');
|
||||
|
||||
if (isError($result)) {
|
||||
$this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
$this->terminateWithSuccess($result ?: []);
|
||||
}
|
||||
|
||||
public function getNoten()
|
||||
{
|
||||
$this->load->model('education/Note_model', 'NoteModel');
|
||||
|
||||
$this->NoteModel->addOrder('note', 'ASC');
|
||||
$result = $this->NoteModel->load();
|
||||
|
||||
if (isError($result)) {
|
||||
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
return $this->terminateWithSuccess(getData($result) ?: []);
|
||||
}
|
||||
|
||||
public function insertAbschlusspruefung()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$student_uid = $this->input->post('uid');
|
||||
|
||||
if(!$student_uid)
|
||||
{
|
||||
return $this->terminateWithError($this->p->t('ui', 'error_missingId', ['id'=> 'Student UID']), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
$formData = $this->input->post('formData');
|
||||
|
||||
$_POST['pruefungstyp_kurzbz'] = $formData['pruefungstyp_kurzbz'];
|
||||
$_POST['akadgrad_id']= $formData['akadgrad_id'];
|
||||
$_POST['vorsitz'] = isset($formData['vorsitz']['mitarbeiter_uid']) ? $formData['vorsitz']['mitarbeiter_uid'] : $formData['vorsitz'];
|
||||
$_POST['pruefer1'] = isset($formData['pruefer1']['person_id']) ? $formData['pruefer1']['person_id'] : $formData['pruefer1'];
|
||||
$_POST['pruefer2'] = isset($formData['pruefer2']['person_id']) ? $formData['pruefer2']['person_id'] : $formData['pruefer2'];
|
||||
$_POST['pruefer3'] = isset($formData['pruefer3']['person_id']) ? $formData['pruefer3']['person_id'] : $formData['pruefer3'];
|
||||
$_POST['pruefungsantritt_kurzbz'] = $formData['pruefungsantritt_kurzbz'];
|
||||
$_POST['abschlussbeurteilung_kurzbz'] = $formData['abschlussbeurteilung_kurzbz'];
|
||||
$_POST['datum']= $formData['datum'];
|
||||
$_POST['sponsion']= $formData['sponsion'];
|
||||
$_POST['anmerkung'] = $formData['anmerkung'];
|
||||
$_POST['protokoll']= $formData['protokoll'];
|
||||
$_POST['note'] = $formData['note'];
|
||||
|
||||
$this->form_validation->set_rules('pruefungstyp_kurzbz', 'Typ', 'required', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'Typ'])
|
||||
]);
|
||||
|
||||
$this->form_validation->set_rules('akadgrad_id', 'AkadGrad', 'required', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'AkadGrad'])
|
||||
]);
|
||||
|
||||
$this->form_validation->set_rules('datum', 'Datum', 'is_valid_date', [
|
||||
'is_valid_date' => $this->p->t('ui', 'error_notValidDate', ['field' => 'Datum'])
|
||||
]);
|
||||
|
||||
$this->form_validation->set_rules('sponsion', 'Sponsion', 'is_valid_date', [
|
||||
'is_valid_date' => $this->p->t('ui', 'error_notValidDate', ['field' => 'Sponsion'])
|
||||
]);
|
||||
|
||||
if ($this->form_validation->run() == false)
|
||||
{
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
}
|
||||
|
||||
$result = $this->AbschlusspruefungModel->insert([
|
||||
'student_uid' => $student_uid,
|
||||
'pruefungstyp_kurzbz' => $this->input->post('pruefungstyp_kurzbz'),
|
||||
'akadgrad_id' => $this->input->post('akadgrad_id'),
|
||||
'vorsitz' => $this->input->post('vorsitz'),
|
||||
'pruefungsantritt_kurzbz' => $this->input->post('pruefungsantritt_kurzbz'),
|
||||
'abschlussbeurteilung_kurzbz' => $this->input->post('abschlussbeurteilung_kurzbz'),
|
||||
'datum' => $this->input->post('datum'), //TODO(Manu) check if minute format like FAS
|
||||
'sponsion' => $this->input->post('sponsion'),
|
||||
'pruefer1' => $this->input->post('pruefer1'),
|
||||
'pruefer2' => $this->input->post('pruefer2'),
|
||||
'pruefer3' => $this->input->post('pruefer3'),
|
||||
'protokoll' => $this->input->post('protokoll'),
|
||||
'note' => $this->input->post('note'),
|
||||
'anmerkung' => $this->input->post('anmerkung'),
|
||||
'insertamum' => date('c'),
|
||||
'insertvon' => getAuthUID()
|
||||
]);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function updateAbschlusspruefung()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$abschlusspruefung_id = $this->input->post('id');
|
||||
|
||||
if(!$abschlusspruefung_id)
|
||||
{
|
||||
return $this->terminateWithError($this->p->t('ui', 'error_missingId', ['id'=> 'Abschlussprüfung ID']), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
$formData = $this->input->post('formData');
|
||||
$_POST['student_uid'] = $formData['student_uid'];
|
||||
$_POST['pruefungstyp_kurzbz'] = $formData['pruefungstyp_kurzbz'];
|
||||
$_POST['akadgrad_id']= $formData['akadgrad_id'];
|
||||
$_POST['vorsitz'] = isset($formData['vorsitz']['mitarbeiter_uid']) ? $formData['vorsitz']['mitarbeiter_uid'] : $formData['vorsitz'];
|
||||
$_POST['pruefer1'] = isset($formData['pruefer1']['person_id']) ? $formData['pruefer1']['person_id'] : $formData['pruefer1'];
|
||||
$_POST['pruefer2'] = isset($formData['pruefer2']['person_id']) ? $formData['pruefer2']['person_id'] : $formData['pruefer2'];
|
||||
$_POST['pruefer3'] = isset($formData['pruefer3']['person_id']) ? $formData['pruefer3']['person_id'] : $formData['pruefer3'];
|
||||
$_POST['pruefungsantritt_kurzbz'] = $formData['pruefungsantritt_kurzbz'];
|
||||
$_POST['abschlussbeurteilung_kurzbz'] = $formData['abschlussbeurteilung_kurzbz'];
|
||||
$_POST['datum']= $formData['datum'];
|
||||
$_POST['sponsion']= $formData['sponsion'];
|
||||
$_POST['anmerkung'] = $formData['anmerkung'];
|
||||
$_POST['protokoll']= $formData['protokoll'];
|
||||
$_POST['note'] = $formData['note'];
|
||||
|
||||
$this->form_validation->set_rules('pruefungstyp_kurzbz', 'Typ', 'required', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'Typ'])
|
||||
]);
|
||||
|
||||
$this->form_validation->set_rules('akadgrad_id', 'AkadGrad', 'required', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'AkadGrad'])
|
||||
]);
|
||||
|
||||
$this->form_validation->set_rules('datum', 'Datum', 'is_valid_date', [
|
||||
'is_valid_date' => $this->p->t('ui', 'error_notValidDate', ['field' => 'Datum'])
|
||||
]);
|
||||
|
||||
$this->form_validation->set_rules('sponsion', 'Sponsion', 'is_valid_date', [
|
||||
'is_valid_date' => $this->p->t('ui', 'error_notValidDate', ['field' => 'Sponsion'])
|
||||
]);
|
||||
|
||||
|
||||
if ($this->form_validation->run() == false)
|
||||
{
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
}
|
||||
|
||||
$result = $this->AbschlusspruefungModel->update(
|
||||
[
|
||||
'abschlusspruefung_id' => $abschlusspruefung_id
|
||||
],
|
||||
[
|
||||
'student_uid' => $this->input->post('student_uid'),
|
||||
'pruefungstyp_kurzbz' => $this->input->post('pruefungstyp_kurzbz'),
|
||||
'akadgrad_id' => $this->input->post('akadgrad_id'),
|
||||
'vorsitz' => $this->input->post('vorsitz'),
|
||||
'pruefungsantritt_kurzbz' => $this->input->post('pruefungsantritt_kurzbz'),
|
||||
'abschlussbeurteilung_kurzbz' => $this->input->post('abschlussbeurteilung_kurzbz'),
|
||||
'datum' => $this->input->post('datum'),
|
||||
'sponsion' => $this->input->post('sponsion'),
|
||||
'pruefer1' => $this->input->post('pruefer1'),
|
||||
'pruefer2' => $this->input->post('pruefer2'),
|
||||
'pruefer3' => $this->input->post('pruefer3'),
|
||||
'protokoll' => $this->input->post('protokoll'),
|
||||
'note' => $this->input->post('note'),
|
||||
'anmerkung' => $this->input->post('anmerkung'),
|
||||
'insertamum' => date('c'),
|
||||
'insertvon' => getAuthUID()
|
||||
]
|
||||
);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function deleteAbschlusspruefung()
|
||||
{
|
||||
$abschlusspruefung_id = $this->input->post('id');
|
||||
|
||||
$result = $this->AbschlusspruefungModel->delete(
|
||||
array('abschlusspruefung_id' => $abschlusspruefung_id)
|
||||
);
|
||||
|
||||
if (isError($result))
|
||||
{
|
||||
return $this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
if (!hasData($result))
|
||||
{
|
||||
$this->outputJson($result);
|
||||
}
|
||||
return $this->terminateWithSuccess(current(getData($result)) ? : null);
|
||||
}
|
||||
|
||||
public function checkForExistingExams()
|
||||
{
|
||||
$warning = false;
|
||||
$output = [];
|
||||
|
||||
$student_uids = $this->input->post('uids');
|
||||
|
||||
if (empty($student_uids)) {
|
||||
throw new InvalidArgumentException("Keine UID(s) übergeben.");
|
||||
}
|
||||
|
||||
if( !is_array($student_uids) )
|
||||
{
|
||||
$student_uids = array($student_uids);
|
||||
}
|
||||
|
||||
foreach ($student_uids as $uid)
|
||||
{
|
||||
$result = $this->AbschlusspruefungModel->loadWhere(
|
||||
array('student_uid' => $uid)
|
||||
);
|
||||
if (isError($result)) {
|
||||
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
if (!hasData($result))
|
||||
{
|
||||
$warning = true;
|
||||
$output[] = $uid;
|
||||
}
|
||||
}
|
||||
if($warning)
|
||||
{
|
||||
$uids = is_array($output) ? implode(", ", $output) : $output;
|
||||
return $this->terminateWithError($this->p->t('abschlusspruefung', 'error_studentOhneFinalExam', ['id'=> $uids]), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
$this->terminateWithSuccess('step3');
|
||||
}
|
||||
}
|
||||
@@ -45,7 +45,7 @@ class Address extends FHCAPI_Controller
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getPlaces($plz)
|
||||
public function getPlaces($plz = null)
|
||||
{
|
||||
$this->load->model('codex/Gemeinde_model', 'GemeindeModel');
|
||||
|
||||
@@ -53,7 +53,7 @@ class Address extends FHCAPI_Controller
|
||||
|
||||
$this->form_validation->set_data(['address.plz' => $plz]);
|
||||
|
||||
$this->form_validation->set_rules('address.plz', 'PLZ', 'numeric|less_than[10000]');
|
||||
$this->form_validation->set_rules('address.plz', 'PLZ', 'required|numeric|less_than[10000]');
|
||||
|
||||
if (!$this->form_validation->run())
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
|
||||
@@ -44,16 +44,23 @@ class Config extends FHCAPI_Controller
|
||||
'person',
|
||||
'lehre',
|
||||
'stv',
|
||||
'konto'
|
||||
'konto',
|
||||
'abschlusspruefung'
|
||||
]);
|
||||
|
||||
// Load Config
|
||||
$this->load->config('stv');
|
||||
}
|
||||
|
||||
public function student()
|
||||
{
|
||||
$result = [];
|
||||
$config = $this->config->item('tabs');
|
||||
|
||||
$result['details'] = [
|
||||
'title' => $this->p->t('stv', 'tab_details'),
|
||||
'component' => './Stv/Studentenverwaltung/Details/Details.js'
|
||||
'component' => './Stv/Studentenverwaltung/Details/Details.js',
|
||||
'config' => $config['details']
|
||||
];
|
||||
$result['notes'] = [
|
||||
'title' => $this->p->t('stv', 'tab_notes'),
|
||||
@@ -69,7 +76,8 @@ class Config extends FHCAPI_Controller
|
||||
];
|
||||
$result['prestudent'] = [
|
||||
'title' => $this->p->t('stv', 'tab_prestudent'),
|
||||
'component' => './Stv/Studentenverwaltung/Details/Prestudent.js'
|
||||
'component' => './Stv/Studentenverwaltung/Details/Prestudent.js',
|
||||
'config' => $config['prestudent']
|
||||
];
|
||||
$result['status'] = [
|
||||
'title' => 'Status',
|
||||
@@ -91,12 +99,35 @@ class Config extends FHCAPI_Controller
|
||||
'title' => $this->p->t('stv', 'tab_resources'),
|
||||
'component' => './Stv/Studentenverwaltung/Details/Betriebsmittel.js'
|
||||
];
|
||||
/* TODO(chris): Ausgeblendet für Testing
|
||||
$result['grades'] = [
|
||||
'title' => $this->p->t('stv', 'tab_grades'),
|
||||
'component' => './Stv/Studentenverwaltung/Details/Noten.js'
|
||||
'component' => './Stv/Studentenverwaltung/Details/Noten.js',
|
||||
'showOnlyWithUid' => true,
|
||||
'config' => [
|
||||
'usePoints' => defined('CIS_GESAMTNOTE_PUNKTE') && CIS_GESAMTNOTE_PUNKTE,
|
||||
'edit' => 'both', // Possible values: both|header|inline
|
||||
'delete' => 'both', // Possible values: both|header|inline
|
||||
'documents' => 'both', // Possible values: both|header|inline
|
||||
'documentslist' => $this->gradesDocumentsList()
|
||||
]
|
||||
];
|
||||
*/
|
||||
|
||||
$result['exam'] = [
|
||||
'title' => $this->p->t('stv', 'tab_exam'),
|
||||
'component' => './Stv/Studentenverwaltung/Details/Pruefung.js'
|
||||
];
|
||||
|
||||
$result['finalexam'] = [
|
||||
'title' => $this->p->t('stv', 'tab_finalexam'),
|
||||
'component' => './Stv/Studentenverwaltung/Details/Abschlusspruefung.js',
|
||||
'config' => $config['finalexam']
|
||||
];
|
||||
|
||||
$result['mobility'] = [
|
||||
'title' => $this->p->t('stv', 'tab_mobility'),
|
||||
'component' => './Stv/Studentenverwaltung/Details/Mobility.js'
|
||||
];
|
||||
|
||||
$result['archive'] = [
|
||||
'title' => $this->p->t('stv', 'tab_archive'),
|
||||
'component' => './Stv/Studentenverwaltung/Details/Archiv.js',
|
||||
@@ -115,6 +146,7 @@ class Config extends FHCAPI_Controller
|
||||
public function students()
|
||||
{
|
||||
$result = [];
|
||||
$config = $this->config->item('tabs');
|
||||
$result['banking'] = [
|
||||
'title' => $this->p->t('stv', 'tab_banking'),
|
||||
'component' => './Stv/Studentenverwaltung/Details/Konto.js',
|
||||
@@ -138,6 +170,11 @@ class Config extends FHCAPI_Controller
|
||||
'changeStatusToAbsolvent' => $this->permissionlib->isBerechtigt('admin')
|
||||
]
|
||||
];
|
||||
$result['finalexam'] = [
|
||||
'title' => $this->p->t('stv', 'tab_finalexam'),
|
||||
'component' => './Stv/Studentenverwaltung/Details/Abschlusspruefung.js',
|
||||
'config' => $config['finalexam']
|
||||
];
|
||||
$result['archive'] = [
|
||||
'title' => $this->p->t('stv', 'tab_archive'),
|
||||
'component' => './Stv/Studentenverwaltung/Details/Archiv.js',
|
||||
|
||||
@@ -48,7 +48,7 @@ class Favorites extends FHCAPI_Controller
|
||||
if (!$data)
|
||||
$this->terminateWithSuccess(null);
|
||||
else
|
||||
$this->terminateWithSuccess($data['stv_favorites']);
|
||||
$this->terminateWithSuccess($data['stv_favorites'] ?? null);
|
||||
}
|
||||
|
||||
public function set()
|
||||
|
||||
@@ -97,7 +97,14 @@ class Kontakt extends FHCAPI_Controller
|
||||
|| $this->router->method == 'deleteContact'
|
||||
|| $this->router->method == 'deleteBankverbindung'
|
||||
) {
|
||||
$id = current(array_slice($this->uri->rsegments, 2));
|
||||
if($this->input->post('address_id'))
|
||||
$id = $this->input->post('address_id');
|
||||
if($this->input->post('adresse_id'))
|
||||
$id = $this->input->post('adresse_id');
|
||||
if($this->input->post('bankverbindung_id'))
|
||||
$id = $this->input->post('bankverbindung_id');
|
||||
if($this->input->post('kontakt_id'))
|
||||
$id = $this->input->post('kontakt_id');
|
||||
|
||||
$model = 'person/Adresse_model';
|
||||
if ($this->router->method == 'loadContact'
|
||||
@@ -125,7 +132,12 @@ class Kontakt extends FHCAPI_Controller
|
||||
}
|
||||
public function getAdressen($person_id)
|
||||
{
|
||||
$this->AdresseModel->addSelect('public.tbl_adresse.*');
|
||||
$this->AdresseModel->addSelect("public.tbl_adresse.*,
|
||||
(CASE
|
||||
WHEN public.tbl_adresse.updateamum >= public.tbl_adresse.insertamum
|
||||
THEN public.tbl_adresse.updateamum
|
||||
ELSE public.tbl_adresse.insertamum
|
||||
END) AS lastUpdate");
|
||||
$this->AdresseModel->addSelect('t.*');
|
||||
$this->AdresseModel->addSelect('f.firma_id');
|
||||
$this->AdresseModel->addSelect('f.name as firmenname');
|
||||
@@ -143,15 +155,26 @@ class Kontakt extends FHCAPI_Controller
|
||||
|
||||
public function addNewAddress($person_id)
|
||||
{
|
||||
$this->form_validation->set_rules('plz', 'PLZ', 'required|numeric', [
|
||||
$this->form_validation->set_data(['address.plz' => $_POST['plz']]);
|
||||
|
||||
$this->form_validation->set_rules('address.plz', 'PLZ', 'required', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'PLZ']),
|
||||
'numeric' => $this->p->t('ui', 'error_fieldNotNumeric', ['field' => 'PLZ'])
|
||||
]);
|
||||
|
||||
if(isset($_POST['gemeinde']) && isset($_POST['ort']))
|
||||
$this->form_validation->set_rules('plz', 'Postleitzahl', 'callback_validateLocationCombination', [
|
||||
'validateLocationCombination' => $this->p->t('ui', 'error_location_combination')
|
||||
]);
|
||||
if(isset($_POST['nation']) && $_POST['nation'] == 'A')
|
||||
{
|
||||
$this->form_validation->set_rules('address.plz', 'PLZ', 'required|numeric', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'PLZ']),
|
||||
'numeric' => $this->p->t('ui', 'error_fieldNotNumeric', ['field' => 'PLZ'])
|
||||
]);
|
||||
}
|
||||
|
||||
if(isset($_POST['gemeinde']) && isset($_POST['ort']) && isset($_POST['nation']) && $_POST['nation'] == 'A')
|
||||
{
|
||||
$this->form_validation->set_rules('address.plz', 'Postleitzahl', 'callback_validateLocationCombination', [
|
||||
'validateLocationCombination' => $this->p->t('ui', 'error_location_combination')
|
||||
]);
|
||||
}
|
||||
|
||||
if ($this->form_validation->run() == false)
|
||||
{
|
||||
@@ -196,25 +219,37 @@ class Kontakt extends FHCAPI_Controller
|
||||
|
||||
]
|
||||
);
|
||||
if (isError($result))
|
||||
{
|
||||
return $this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
return $this->outputJsonSuccess(true);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function updateAddress($address_id)
|
||||
public function updateAddress()
|
||||
{
|
||||
$address_id = $this->input->post('adresse_id');
|
||||
|
||||
$this->form_validation->set_data(['address.plz' => $_POST['plz']]);
|
||||
|
||||
$uid = getAuthUID();
|
||||
$this->form_validation->set_rules('plz', 'PLZ', 'required|numeric', [
|
||||
|
||||
$this->form_validation->set_rules('address.plz', 'PLZ', 'required', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'PLZ']),
|
||||
'numeric' => $this->p->t('ui', 'error_fieldNotNumeric', ['field' => 'PLZ'])
|
||||
]);
|
||||
|
||||
if(isset($_POST['gemeinde']) && isset($_POST['ort']))
|
||||
$this->form_validation->set_rules('plz', 'Postleitzahl', 'callback_validateLocationCombination', [
|
||||
if(isset($_POST['nation']) && $_POST['nation'] == 'A')
|
||||
{
|
||||
$this->form_validation->set_rules('address.plz', 'PLZ', 'required|numeric', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'PLZ']),
|
||||
'numeric' => $this->p->t('ui', 'error_fieldNotNumeric', ['field' => 'PLZ'])
|
||||
]);
|
||||
}
|
||||
|
||||
if(isset($_POST['gemeinde']) && isset($_POST['ort']) && isset($_POST['nation']) && $_POST['nation'] == 'A')
|
||||
{
|
||||
$this->form_validation->set_rules('address.plz', 'Postleitzahl', 'callback_validateLocationCombination', [
|
||||
'validateLocationCombination' => $this->p->t('ui', 'error_location_combination')
|
||||
]);
|
||||
}
|
||||
|
||||
if ($this->form_validation->run() == false)
|
||||
{
|
||||
@@ -272,15 +307,15 @@ class Kontakt extends FHCAPI_Controller
|
||||
]
|
||||
);
|
||||
|
||||
if (isError($result))
|
||||
{
|
||||
return $this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
return $this->outputJsonSuccess(true);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function loadAddress($adresse_id)
|
||||
public function loadAddress()
|
||||
{
|
||||
$adresse_id = $this->input->post('address_id');
|
||||
|
||||
$this->load->model('person/Adresse_model', 'AdresseModel');
|
||||
|
||||
$this->AdresseModel->addSelect('public.tbl_adresse.*');
|
||||
@@ -306,8 +341,10 @@ class Kontakt extends FHCAPI_Controller
|
||||
$this->terminateWithSuccess(current(getData($result)) ? : null);
|
||||
}
|
||||
|
||||
public function deleteAddress($adresse_id)
|
||||
public function deleteAddress()
|
||||
{
|
||||
$adresse_id = $this->input->post('address_id');
|
||||
|
||||
$this->load->model('person/Adresse_model', 'AdresseModel');
|
||||
$result = $this->AdresseModel->load([
|
||||
'adresse_id'=> $adresse_id,
|
||||
@@ -366,10 +403,10 @@ class Kontakt extends FHCAPI_Controller
|
||||
$this->load->model('organisation/standort_model', 'StandortModel');
|
||||
|
||||
$result = $this->StandortModel->searchStandorte($searchString);
|
||||
if (isError($result)) {
|
||||
$this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
$this->terminateWithSuccess($result ?: []);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getStandorteByFirma($firma_id)
|
||||
@@ -386,11 +423,11 @@ class Kontakt extends FHCAPI_Controller
|
||||
public function getKontakte($person_id)
|
||||
{
|
||||
$this->KontaktModel->addSelect("public.tbl_kontakt.*,
|
||||
TO_CHAR (CASE
|
||||
WHEN public.tbl_kontakt.updateamum >= public.tbl_kontakt.insertamum
|
||||
THEN public.tbl_kontakt.updateamum
|
||||
ELSE public.tbl_kontakt.insertamum
|
||||
END::timestamp, 'DD.MM.YYYY HH24:MI:SS') AS lastUpdate, st.bezeichnung, f.name");
|
||||
(CASE
|
||||
WHEN public.tbl_kontakt.updateamum >= public.tbl_kontakt.insertamum
|
||||
THEN public.tbl_kontakt.updateamum
|
||||
ELSE public.tbl_kontakt.insertamum
|
||||
END) AS lastUpdate, st.bezeichnung, f.name");
|
||||
$this->StandortModel->addJoin('public.tbl_standort st', 'ON (public.tbl_kontakt.standort_id = st.standort_id)', 'LEFT');
|
||||
$this->FirmaModel->addJoin('public.tbl_firma f', 'ON (f.firma_id = st.firma_id)', 'LEFT');
|
||||
$result = $this->KontaktModel->loadWhere(
|
||||
@@ -418,8 +455,9 @@ class Kontakt extends FHCAPI_Controller
|
||||
}
|
||||
}
|
||||
|
||||
public function loadContact($kontakt_id)
|
||||
public function loadContact()
|
||||
{
|
||||
$kontakt_id = $this->input->post('kontakt_id');
|
||||
$this->load->model('person/Kontakt_model', 'KontaktModel');
|
||||
|
||||
$this->KontaktModel->addSelect('*, public.tbl_kontakt.*');
|
||||
@@ -439,7 +477,6 @@ class Kontakt extends FHCAPI_Controller
|
||||
{
|
||||
return $this->terminateWithError($this->p->t('ui', 'error_missingId', ['id'=> 'Kontakt_id']), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
// $this->outputJsonSuccess(current(getData($result)));
|
||||
$this->terminateWithSuccess(current(getData($result)));
|
||||
}
|
||||
|
||||
@@ -492,11 +529,12 @@ class Kontakt extends FHCAPI_Controller
|
||||
{
|
||||
return $this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
return $this->outputJsonSuccess(true);
|
||||
$this->terminateWithSuccess($result);
|
||||
}
|
||||
|
||||
public function updateContact($kontakt_id)
|
||||
public function updateContact()
|
||||
{
|
||||
$kontakt_id = $this->input->post('kontakt_id');
|
||||
$this->load->model('person/Kontakt_model', 'KontaktModel');
|
||||
|
||||
if(!$kontakt_id)
|
||||
@@ -523,13 +561,6 @@ class Kontakt extends FHCAPI_Controller
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
}
|
||||
|
||||
/* if(isset($_POST['standort']))
|
||||
{
|
||||
$standort_id = $_POST['standort']['standort_id'];
|
||||
}
|
||||
else
|
||||
$standort_id = null;*/
|
||||
|
||||
$uid = getAuthUID();
|
||||
$kontakttyp = $this->input->post('kontakttyp');
|
||||
$anmerkung = $this->input->post('anmerkung');
|
||||
@@ -538,8 +569,6 @@ class Kontakt extends FHCAPI_Controller
|
||||
$person_id = $this->input->post('person_id');
|
||||
$standort_id = $this->input->post('standort_id');
|
||||
|
||||
//return $this->terminateWithError("in update " . $standort_id, self::ERROR_TYPE_GENERAL);
|
||||
|
||||
$result = $this->KontaktModel->update(
|
||||
[
|
||||
'kontakt_id' => $kontakt_id
|
||||
@@ -557,15 +586,14 @@ class Kontakt extends FHCAPI_Controller
|
||||
]
|
||||
);
|
||||
|
||||
if (isError($result))
|
||||
{
|
||||
return $this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
return $this->outputJsonSuccess(true);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function deleteContact($kontakt_id)
|
||||
public function deleteContact()
|
||||
{
|
||||
$kontakt_id = $this->input->post('kontakt_id');
|
||||
$this->load->model('person/Kontakt_model', 'KontaktModel');
|
||||
|
||||
$result = $this->KontaktModel->delete(
|
||||
@@ -643,15 +671,15 @@ class Kontakt extends FHCAPI_Controller
|
||||
'orgform_kurzbz' => $orgform_kurzbz
|
||||
]
|
||||
);
|
||||
if (isError($result))
|
||||
{
|
||||
return $this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
return $this->outputJsonSuccess(true);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function loadBankverbindung($bankverbindung_id)
|
||||
public function loadBankverbindung()
|
||||
{
|
||||
$bankverbindung_id = $this->input->post('bankverbindung_id');
|
||||
|
||||
$this->load->model('person/Bankverbindung_model', 'BankverbindungModel');
|
||||
|
||||
$this->BankverbindungModel->addSelect('*');
|
||||
@@ -719,15 +747,15 @@ class Kontakt extends FHCAPI_Controller
|
||||
]
|
||||
);
|
||||
|
||||
if (isError($result))
|
||||
{
|
||||
return $this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
return $this->outputJsonSuccess(true);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function deleteBankverbindung($bankverbindung_id)
|
||||
public function deleteBankverbindung()
|
||||
{
|
||||
$bankverbindung_id = $this->input->post('bankverbindung_id');
|
||||
|
||||
$this->load->model('person/Bankverbindung_model', 'BankverbindungModel');
|
||||
|
||||
$result = $this->BankverbindungModel->delete(
|
||||
@@ -740,7 +768,7 @@ class Kontakt extends FHCAPI_Controller
|
||||
}
|
||||
if (!hasData($result))
|
||||
{
|
||||
$this->outputJson($result);
|
||||
return $this->terminateWithError($this->p->t('ui', 'error_missingId', ['id'=> 'Bankverbindung_id']), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
return $this->terminateWithSuccess(current(getData($result)) ? : null);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,528 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
use \DateTime as DateTime;
|
||||
|
||||
class Mobility extends FHCAPI_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'getMobilitaeten' => ['admin:r', 'assistenz:r'],
|
||||
'loadMobility' => ['admin:r', 'assistenz:r'],
|
||||
'insertMobility' => ['admin:rw', 'assistenz:rw'],
|
||||
'updateMobility' => ['admin:rw', 'assistenz:rw'],
|
||||
'deleteMobility' => ['admin:rw', 'assistenz:rw'],
|
||||
'getProgramsMobility' => ['admin:r', 'assistenz:r'],
|
||||
'getLVList' => ['admin:r', 'assistenz:r'],
|
||||
'getAllLehreinheiten' => ['admin:r', 'assistenz:r'],
|
||||
'getLvsandLesByStudent' => ['admin:r', 'assistenz:r'],
|
||||
'getPurposes' => ['admin:r', 'assistenz:r'],
|
||||
'getSupports' => ['admin:r', 'assistenz:r'],
|
||||
'getListPurposes' => ['admin:r', 'assistenz:r'],
|
||||
'getListSupports' => ['admin:r', 'assistenz:r'],
|
||||
'deleteMobilityPurpose' => ['admin:r', 'assistenz:r'],
|
||||
'addMobilityPurpose' => ['admin:r', 'assistenz:r'],
|
||||
'deleteMobilitySupport' => ['admin:r', 'assistenz:r'],
|
||||
'addMobilitySupport' => ['admin:r', 'assistenz:r'],
|
||||
]);
|
||||
|
||||
// Load Libraries
|
||||
$this->load->library('VariableLib', ['uid' => getAuthUID()]);
|
||||
$this->load->library('form_validation');
|
||||
|
||||
// Load language phrases
|
||||
$this->loadPhrases([
|
||||
'ui',
|
||||
'mobility'
|
||||
]);
|
||||
|
||||
// Load models
|
||||
$this->load->model('codex/Bisio_model', 'BisioModel');
|
||||
}
|
||||
|
||||
public function getMobilitaeten($student_uid)
|
||||
{
|
||||
$this->BisioModel->addSelect("*");
|
||||
$this->BisioModel->addJoin('bis.tbl_mobilitaetsprogramm mp', 'ON (mp.mobilitaetsprogramm_code = bis.tbl_bisio.mobilitaetsprogramm_code)', 'LEFT');
|
||||
$this->BisioModel->addJoin('lehre.tbl_lehreinheit le', 'ON (le.lehreinheit_id = bis.tbl_bisio.lehreinheit_id)','LEFT');
|
||||
$this->BisioModel->addOrder('von', 'DESC');
|
||||
$this->BisioModel->addOrder('bis', 'DESC');
|
||||
$this->BisioModel->addOrder('bisio_id', 'DESC');
|
||||
$result = $this->BisioModel->loadWhere(
|
||||
array('student_uid' => $student_uid)
|
||||
);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getProgramsMobility()
|
||||
{
|
||||
$this->load->model('codex/Mobilitaetsprogramm_model', 'MobilitaetsprogrammModel');
|
||||
|
||||
$result = $this->MobilitaetsprogrammModel->load();
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function insertMobility()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
$authUID = getAuthUID();
|
||||
|
||||
$student_uid = $this->input->post('uid');
|
||||
|
||||
if(!$student_uid)
|
||||
{
|
||||
return $this->terminateWithError($this->p->t('ui', 'error_missingId', ['id'=> 'Student UID']), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
$formData = $this->input->post('formData');
|
||||
|
||||
$_POST['von'] = (isset($formData['von']) && !empty($formData['von'])) ? $formData['von'] : null;
|
||||
$_POST['bis'] = (isset($formData['bis']) && !empty($formData['bis'])) ? $formData['bis'] : null;
|
||||
$_POST['nation_code'] = (isset($formData['nation_code']) && !empty($formData['nation_code'])) ? $formData['nation_code'] : 'A';
|
||||
$_POST['mobilitaetsprogramm_code'] = (isset($formData['mobilitaetsprogramm_code']) && !empty($formData['mobilitaetsprogramm_code'])) ? $formData['mobilitaetsprogramm_code'] : null;
|
||||
$_POST['herkunftsland_code'] = (isset($formData['herkunftsland_code']) && !empty($formData['herkunftsland_code'])) ? $formData['herkunftsland_code'] : 'A';
|
||||
$_POST['ects_erworben'] = (isset($formData['ects_erworben']) && !empty($formData['ects_erworben'])) ? $formData['ects_erworben'] : null;
|
||||
$_POST['ects_angerechnet'] = (isset($formData['ects_angerechnet']) && !empty($formData['ects_angerechnet'])) ? $formData['ects_angerechnet'] : null;
|
||||
$_POST['lehreinheit_id'] = (isset($formData['lehreinheit_id']) && !empty($formData['lehreinheit_id'])) ? $formData['lehreinheit_id'] : null;
|
||||
|
||||
$this->form_validation->set_rules('nation_code', 'Nation_code', 'required', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'Nation_code'])
|
||||
]);
|
||||
$this->form_validation->set_rules('herkunftsland_code', 'Herkunftsland_code', 'required', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'Herkunftsland_code'])
|
||||
]);
|
||||
$this->form_validation->set_rules('mobilitaetsprogramm_code', 'Mobilitaetsprogramm_code', 'required', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'Mobilitaetsprogramm_code'])
|
||||
]);
|
||||
$this->form_validation->set_rules('von', 'VonDatum', 'is_valid_date', [
|
||||
'is_valid_date' => $this->p->t('ui', 'error_notValidDate', ['field' => 'VonDatum'])
|
||||
]);
|
||||
|
||||
$this->form_validation->set_rules('bis', 'VBisDatum', 'is_valid_date', [
|
||||
'is_valid_date' => $this->p->t('ui', 'error_notValidDate', ['field' => 'VBisDatum'])
|
||||
]);
|
||||
|
||||
$this->form_validation->set_rules('ects_erworben', 'Ects_erworben', 'numeric', [
|
||||
'numeric' => $this->p->t('ui', 'error_fieldNotNumeric', ['field' => 'Ects_erworben'])
|
||||
]);
|
||||
|
||||
$this->form_validation->set_rules('ects_angerechnet', 'Ects_angerechnet', 'numeric', [
|
||||
'numeric' => $this->p->t('ui', 'error_fieldNotNumeric', ['field' => 'Ects_angerechnet'])
|
||||
]);
|
||||
|
||||
$this->form_validation->set_rules('lehreinheit_id', 'Lehreinheit', 'numeric', [
|
||||
'numeric' => $this->p->t('ui', 'error_fieldNotNumeric', ['field' => 'Lehreinheit'])
|
||||
]);
|
||||
|
||||
if ($this->form_validation->run() == false)
|
||||
{
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
}
|
||||
|
||||
$ort = (isset($formData['ort']) && !empty($formData['ort'])) ? $formData['ort'] : null;
|
||||
$universitaet = (isset($formData['universitaet']) && !empty($formData['universitaet'])) ? $formData['universitaet'] : null;
|
||||
$localPurposes = (isset($formData['localPurposes']) && !empty($formData['localPurposes'])) ? $formData['localPurposes'] : null;
|
||||
$localSupports = (isset($formData['localSupports']) && !empty($formData['localSupports'])) ? $formData['localSupports'] : null;
|
||||
|
||||
$result = $this->BisioModel->insert([
|
||||
'student_uid' => $student_uid,
|
||||
'von' => $_POST['von'],
|
||||
'bis' => $_POST['bis'],
|
||||
'mobilitaetsprogramm_code' => $_POST['mobilitaetsprogramm_code'],
|
||||
'nation_code' => $_POST['nation_code'],
|
||||
'herkunftsland_code' => $_POST['herkunftsland_code'],
|
||||
'lehreinheit_id' => $_POST['lehreinheit_id'],
|
||||
'ort' => $ort,
|
||||
'universitaet' => $universitaet,
|
||||
'ects_erworben' => $_POST['ects_erworben'] ,
|
||||
'ects_angerechnet' => $_POST['ects_angerechnet'],
|
||||
'insertamum' => date('c'),
|
||||
'insertvon' => $authUID,
|
||||
]);
|
||||
|
||||
$bisio_id = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
//check if localData (purposes)
|
||||
if(count($localPurposes) > 0){
|
||||
foreach ($localPurposes as $zweck){
|
||||
$zweck = (int)$zweck;
|
||||
$this->addMobilityPurpose($bisio_id, $zweck);
|
||||
}
|
||||
}
|
||||
|
||||
//check if localData (supports)
|
||||
if(count($localSupports) > 0){
|
||||
foreach ($localSupports as $support){
|
||||
$this->addMobilitySupport($bisio_id, $support);
|
||||
}
|
||||
}
|
||||
|
||||
$this->terminateWithSuccess($bisio_id);
|
||||
}
|
||||
|
||||
public function loadMobility($bisio_id)
|
||||
{
|
||||
$this->BisioModel->addSelect("*");
|
||||
$this->BisioModel->addJoin('bis.tbl_mobilitaetsprogramm mp', 'ON (mp.mobilitaetsprogramm_code = bis.tbl_bisio.mobilitaetsprogramm_code)', 'LEFT');
|
||||
$this->BisioModel->addJoin('lehre.tbl_lehreinheit le', 'ON (le.lehreinheit_id = bis.tbl_bisio.lehreinheit_id)','LEFT');
|
||||
$result = $this->BisioModel->loadWhere(
|
||||
array('bisio_id' => $bisio_id)
|
||||
);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess(current($data));
|
||||
}
|
||||
|
||||
public function updateMobility()
|
||||
{
|
||||
|
||||
$this->load->library('form_validation');
|
||||
$authUID = getAuthUID();
|
||||
|
||||
$student_uid = $this->input->post('uid');
|
||||
|
||||
if(!$student_uid)
|
||||
{
|
||||
return $this->terminateWithError($this->p->t('ui', 'error_missingId', ['id'=> 'Student UID']), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
$formData = $this->input->post('formData');
|
||||
|
||||
$_POST['von'] = (isset($formData['von']) && !empty($formData['von'])) ? $formData['von'] : null;
|
||||
$_POST['bis'] = (isset($formData['bis']) && !empty($formData['bis'])) ? $formData['bis'] : null;
|
||||
$_POST['nation_code'] = (isset($formData['nation_code']) && !empty($formData['nation_code'])) ? $formData['nation_code'] : 'A';
|
||||
$_POST['mobilitaetsprogramm_code'] = (isset($formData['mobilitaetsprogramm_code']) && !empty($formData['mobilitaetsprogramm_code'])) ? $formData['mobilitaetsprogramm_code'] : null;
|
||||
$_POST['herkunftsland_code'] = (isset($formData['herkunftsland_code']) && !empty($formData['herkunftsland_code'])) ? $formData['herkunftsland_code'] : 'A';
|
||||
$_POST['ects_erworben'] = (isset($formData['ects_erworben']) && !empty($formData['ects_erworben'])) ? $formData['ects_erworben'] : null;
|
||||
$_POST['ects_angerechnet'] = (isset($formData['ects_angerechnet']) && !empty($formData['ects_angerechnet'])) ? $formData['ects_angerechnet'] : null;
|
||||
$_POST['lehreinheit_id'] = (isset($formData['lehreinheit_id']) && !empty($formData['lehreinheit_id'])) ? $formData['lehreinheit_id'] : null;
|
||||
|
||||
$this->form_validation->set_rules('nation_code', 'Nation_code', 'required', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'Nation_code'])
|
||||
]);
|
||||
$this->form_validation->set_rules('herkunftsland_code', 'Herkunftsland_code', 'required', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'Herkunftsland_code'])
|
||||
]);
|
||||
$this->form_validation->set_rules('mobilitaetsprogramm_code', 'Mobilitaetsprogramm_code', 'required', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'Mobilitaetsprogramm_code'])
|
||||
]);
|
||||
$this->form_validation->set_rules('von', 'VonDatum', 'is_valid_date', [
|
||||
'is_valid_date' => $this->p->t('ui', 'error_notValidDate', ['field' => 'VonDatum'])
|
||||
]);
|
||||
|
||||
$this->form_validation->set_rules('bis', 'VBisDatum', 'is_valid_date', [
|
||||
'is_valid_date' => $this->p->t('ui', 'error_notValidDate', ['field' => 'VBisDatum'])
|
||||
]);
|
||||
|
||||
$this->form_validation->set_rules('ects_erworben', 'Ects_erworben', 'numeric', [
|
||||
'numeric' => $this->p->t('ui', 'error_fieldNotNumeric', ['field' => 'Ects_erworben'])
|
||||
]);
|
||||
|
||||
$this->form_validation->set_rules('ects_angerechnet', 'Ects_angerechnet', 'numeric', [
|
||||
'numeric' => $this->p->t('ui', 'error_fieldNotNumeric', ['field' => 'Ects_angerechnet'])
|
||||
]);
|
||||
|
||||
$this->form_validation->set_rules('lehreinheit_id', 'Lehreinheit', 'numeric', [
|
||||
'numeric' => $this->p->t('ui', 'error_fieldNotNumeric', ['field' => 'Lehreinheit'])
|
||||
]);
|
||||
|
||||
if ($this->form_validation->run() == false)
|
||||
{
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
}
|
||||
|
||||
$result = $this->BisioModel->update(
|
||||
[
|
||||
'bisio_id' => $formData['bisio_id']
|
||||
],
|
||||
[
|
||||
'student_uid' => $student_uid,
|
||||
'von' => $_POST['von'],
|
||||
'bis' => $_POST['bis'],
|
||||
'mobilitaetsprogramm_code' => $_POST['mobilitaetsprogramm_code'],
|
||||
'nation_code' => $_POST['nation_code'],
|
||||
'herkunftsland_code' => $_POST['herkunftsland_code'],
|
||||
'lehreinheit_id' => $_POST['lehreinheit_id'],
|
||||
'ort' => $formData['ort'],
|
||||
'universitaet' => $formData['universitaet'],
|
||||
'ects_erworben' => $_POST['ects_erworben'] ,
|
||||
'ects_angerechnet' => $_POST['ects_angerechnet'],
|
||||
'updateamum' => date('c'),
|
||||
'updatevon' => $authUID,
|
||||
]
|
||||
);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess(current($data));
|
||||
}
|
||||
|
||||
public function deleteMobility($bisio_id)
|
||||
{
|
||||
//check if extension table exists
|
||||
$result = $this->BisioModel->tableExists('extension', 'tbl_mo_bisioidzuordnung');
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
//if table exists check if existing entry
|
||||
if(!empty($data))
|
||||
{
|
||||
$this->BisioModel->addSelect("count(*)");
|
||||
$this->BisioModel->addJoin('extension.tbl_mo_bisioidzuordnung mo', 'ON (mo.bisio_id = bis.tbl_bisio.bisio_id)', 'LEFT');
|
||||
|
||||
$resultCheckMo = $this->BisioModel->loadWhere(
|
||||
array('mo.bisio_id' => $bisio_id)
|
||||
);
|
||||
|
||||
$resultCheckMo = $this->getDataOrTerminateWithError($resultCheckMo);
|
||||
$count = current($resultCheckMo)->count;
|
||||
|
||||
$existsInExtension = $count > 0 ? true : false;
|
||||
|
||||
if($existsInExtension)
|
||||
$this->terminateWithError($this->p->t('mobility', 'error_existingEntryInExtension'), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
$result = $this->BisioModel->delete(
|
||||
array('bisio_id' => $bisio_id)
|
||||
);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getLVList($studiengang_kz)
|
||||
{
|
||||
$this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel');
|
||||
|
||||
$result = $this->LehrveranstaltungModel->getLvsByStudiengangkz($studiengang_kz);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getAllLehreinheiten()
|
||||
{
|
||||
$lv_id = $this->input->post('lv_id');
|
||||
$studiensemester_kurzbz = $this->input->post('studiensemester_kurzbz');
|
||||
|
||||
$this->load->model('education/Lehreinheit_model', 'LehreinheitModel');
|
||||
|
||||
$result = $this->LehreinheitModel->getLesFromLvIds($lv_id, $studiensemester_kurzbz);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getLvsandLesByStudent($student_uid)
|
||||
{
|
||||
$this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel');
|
||||
|
||||
$result = $this->LehrveranstaltungModel->getLvsByStudent($student_uid);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$lv_ids = array();
|
||||
$allData = array();
|
||||
|
||||
foreach ($data as $lehrveranstaltung) {
|
||||
$lv_ids[] = $lehrveranstaltung->lehrveranstaltung_id;
|
||||
}
|
||||
|
||||
$this->load->model('education/Lehreinheit_model', 'LehreinheitModel');
|
||||
|
||||
foreach ($lv_ids as $id)
|
||||
{
|
||||
$result = $this->LehreinheitModel->getLesFromLvIds($id);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
if (is_array($data)) {
|
||||
$allData = array_merge($allData, $data);
|
||||
}
|
||||
}
|
||||
|
||||
return $this->terminateWithSuccess($allData);
|
||||
}
|
||||
|
||||
public function getPurposes($bisio_id)
|
||||
{
|
||||
$bisio_id = (int)$bisio_id;
|
||||
|
||||
$this->load->model('codex/Bisiozweck_model', 'BisiozweckModel');
|
||||
|
||||
$this->BisiozweckModel->addSelect("*");
|
||||
$this->BisiozweckModel->addJoin('bis.tbl_zweck zw', 'ON (zw.zweck_code = bis.tbl_bisio_zweck.zweck_code)');
|
||||
|
||||
$result = $this->BisiozweckModel->loadWhere(
|
||||
array('bisio_id' => $bisio_id)
|
||||
);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getSupports($bisio_id)
|
||||
{
|
||||
$bisio_id = (int)$bisio_id;
|
||||
|
||||
$this->load->model('codex/Bisioaufenthaltfoerderung_model', 'BisioaufenthaltfoerderungModel');
|
||||
|
||||
$this->BisioaufenthaltfoerderungModel->addSelect("*");
|
||||
$this->BisioaufenthaltfoerderungModel->addJoin('bis.tbl_aufenthaltfoerderung af', 'ON (af.aufenthaltfoerderung_code = bis.tbl_bisio_aufenthaltfoerderung.aufenthaltfoerderung_code)');
|
||||
|
||||
$result = $this->BisioaufenthaltfoerderungModel->loadWhere(
|
||||
array('bisio_id' => $bisio_id)
|
||||
);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getListPurposes()
|
||||
{
|
||||
$this->load->model('codex/Zweck_model', 'ZweckModel');
|
||||
|
||||
$result = $this->ZweckModel->load();
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getListSupports()
|
||||
{
|
||||
$this->load->model('codex/Aufenthaltfoerderung_model', 'AufenthaltfoerderungModel');
|
||||
|
||||
$result = $this->AufenthaltfoerderungModel->load();
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function addMobilityPurpose($bisio_id, $local_purpose = null)
|
||||
{
|
||||
$zweck_code = $this->input->post('zweck_code');
|
||||
|
||||
if($local_purpose){
|
||||
$zweck_code = $local_purpose;
|
||||
}
|
||||
|
||||
$this->load->model('codex/Bisiozweck_model', 'BisiozweckModel');
|
||||
if(!$local_purpose)
|
||||
{
|
||||
$check = $this->BisiozweckModel->loadWhere(
|
||||
[
|
||||
'bisio_id' => $bisio_id,
|
||||
'zweck_code' => $zweck_code,
|
||||
]
|
||||
);
|
||||
if (hasData($check))
|
||||
{
|
||||
$this->terminateWithError($this->p->t('ui', 'error_entryExisting'), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
}
|
||||
|
||||
$result = $this->BisiozweckModel->insert(
|
||||
array(
|
||||
'bisio_id' => $bisio_id,
|
||||
'zweck_code' => $zweck_code
|
||||
)
|
||||
);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
if($local_purpose)
|
||||
{
|
||||
return $data;
|
||||
}
|
||||
|
||||
return $this->terminateWithSuccess(current($data));
|
||||
}
|
||||
|
||||
public function deleteMobilityPurpose($bisio_id)
|
||||
{
|
||||
$zweck_code = $this->input->post('zweck_code');
|
||||
|
||||
$this->load->model('codex/Bisiozweck_model', 'BisiozweckModel');
|
||||
|
||||
|
||||
$result = $this->BisiozweckModel->delete(
|
||||
array(
|
||||
'bisio_id' => $bisio_id,
|
||||
'zweck_code' => $zweck_code
|
||||
)
|
||||
);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
return $this->terminateWithSuccess(current($data));
|
||||
}
|
||||
|
||||
public function addMobilitySupport($bisio_id, $local_support = null)
|
||||
{
|
||||
$aufenthaltfoerderung_code = $this->input->post('aufenthaltfoerderung_code');
|
||||
|
||||
if($local_support){
|
||||
$aufenthaltfoerderung_code = $local_support;
|
||||
}
|
||||
|
||||
$this->load->model('codex/Bisioaufenthaltfoerderung_model', 'BisioaufenthaltfoerderungModel');
|
||||
|
||||
if(!$local_support)
|
||||
{
|
||||
$check = $this->BisioaufenthaltfoerderungModel->loadWhere(
|
||||
[
|
||||
'bisio_id' => $bisio_id,
|
||||
'aufenthaltfoerderung_code' => $aufenthaltfoerderung_code,
|
||||
]
|
||||
);
|
||||
if (hasData($check))
|
||||
{
|
||||
$this->terminateWithError($this->p->t('ui', 'error_entryExisting'), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
}
|
||||
|
||||
$result = $this->BisioaufenthaltfoerderungModel->insert(
|
||||
array(
|
||||
'bisio_id' => $bisio_id,
|
||||
'aufenthaltfoerderung_code' => $aufenthaltfoerderung_code
|
||||
)
|
||||
);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
if($local_support)
|
||||
{
|
||||
return $data;
|
||||
}
|
||||
|
||||
return $this->terminateWithSuccess(current($data));
|
||||
}
|
||||
|
||||
public function deleteMobilitySupport($bisio_id)
|
||||
{
|
||||
$aufenthaltfoerderung_code = $this->input->post('aufenthaltfoerderung_code');
|
||||
|
||||
$this->load->model('codex/Bisioaufenthaltfoerderung_model', 'BisioaufenthaltfoerderungModel');
|
||||
|
||||
$result = $this->BisioaufenthaltfoerderungModel->delete(
|
||||
array(
|
||||
'bisio_id' => $bisio_id,
|
||||
'aufenthaltfoerderung_code' => $aufenthaltfoerderung_code
|
||||
)
|
||||
);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
return $this->terminateWithSuccess(current($data));
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,7 @@ class Prestudent extends FHCAPI_Controller
|
||||
'getAufmerksamdurch' => ['admin:r', 'assistenz:r'],
|
||||
'getBerufstaetigkeit' => ['admin:r', 'assistenz:r'],
|
||||
'getTypenStg' => ['admin:r', 'assistenz:r'],
|
||||
'getBisstandort' => ['admin:r', 'assistenz:r'],
|
||||
'getStudienplaene' => ['admin:r', 'assistenz:r'],
|
||||
'getStudiengang' => ['admin:r', 'assistenz:r']
|
||||
]);
|
||||
@@ -265,6 +266,17 @@ class Prestudent extends FHCAPI_Controller
|
||||
return $this->terminateWithSuccess(getData($result) ?: []);
|
||||
}
|
||||
|
||||
public function getBisstandort()
|
||||
{
|
||||
$this->load->model('codex/Bisstandort_model', 'BisstandortModel');
|
||||
|
||||
$result = $this->BisstandortModel->load();
|
||||
if (isError($result)) {
|
||||
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
return $this->terminateWithSuccess(getData($result) ?: []);
|
||||
}
|
||||
|
||||
public function getStudienplaene($prestudent_id)
|
||||
{
|
||||
$this->load->model('organisation/Studienplan_model', 'StudienplanModel');
|
||||
|
||||
@@ -0,0 +1,577 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2024 fhcomplete.org
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* This controller operates between (interface) the JS (GUI) and the back-end
|
||||
* Provides data to the ajax get calls about addresses
|
||||
* This controller works with JSON calls on the HTTP GET or POST and the output is always JSON
|
||||
*/
|
||||
class Pruefung extends FHCAPI_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'getPruefungen' => ['admin:r', 'assistenz:r'],
|
||||
'loadPruefung' => ['admin:r', 'assistenz:r'],
|
||||
'getTypenPruefungen' => ['admin:r', 'assistenz:r'],
|
||||
'getLehreinheiten' => ['admin:r', 'assistenz:r'],
|
||||
'getAllLehreinheiten' => ['admin:r', 'assistenz:r'],
|
||||
'getLvsByStudent' => ['admin:r', 'assistenz:r'],
|
||||
'getLvsandLesByStudent' => ['admin:r', 'assistenz:r'],
|
||||
'getLvsAndMas' => ['admin:r', 'assistenz:r'],
|
||||
'getMitarbeiterLv' => ['admin:r', 'assistenz:r'],
|
||||
'getNoten' => ['admin:r', 'assistenz:r'],
|
||||
'checkZeugnisnoteLv' => ['admin:r', 'assistenz:r'],
|
||||
'checkTermin1' => ['admin:r', 'assistenz:r'],
|
||||
'insertPruefung' => self::PERM_LOGGED,
|
||||
'updatePruefung' =>self::PERM_LOGGED,
|
||||
'deletePruefung' =>self::PERM_LOGGED,
|
||||
]);
|
||||
|
||||
//Load Models
|
||||
$this->load->model('education/LePruefung_model', 'PruefungModel');
|
||||
|
||||
//version with postParameter
|
||||
if ($this->router->method == 'insertPruefung')
|
||||
{
|
||||
$student_uid = $this->input->post('student_uid');
|
||||
|
||||
$this->load->model('crm/Student_model', 'StudentModel');
|
||||
$result = $this->StudentModel->load([$student_uid]);
|
||||
$student = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$prestudent_id = current($student)->prestudent_id;
|
||||
$this->checkPermissionsForPrestudent($prestudent_id, ['admin:w', 'assistenz:w']);
|
||||
}
|
||||
|
||||
// parameter from uri
|
||||
if ($this->router->method == 'updatePruefung' || $this->router->method == 'deletePruefung')
|
||||
{
|
||||
$pruefung_id = current(array_slice($this->uri->rsegments, 2));
|
||||
|
||||
$result = $this->PruefungModel->load($pruefung_id);
|
||||
$pruefung = $this->getDataOrTerminateWithError($result);
|
||||
$student_uid = current($pruefung)->student_uid;
|
||||
|
||||
|
||||
$this->load->model('crm/Student_model', 'StudentModel');
|
||||
$result = $this->StudentModel->load([$student_uid]);
|
||||
$student = $this->getDataOrTerminateWithError($result);
|
||||
$prestudent_id = current($student)->prestudent_id;
|
||||
|
||||
$this->checkPermissionsForPrestudent($prestudent_id, ['admin:rw', 'assistenz:rw']);
|
||||
}
|
||||
|
||||
if ($this->router->method == 'loadPruefung')
|
||||
{
|
||||
$pruefung_id = current(array_slice($this->uri->rsegments, 2));
|
||||
|
||||
$result = $this->PruefungModel->load($pruefung_id);
|
||||
$pruefung = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
|
||||
$student_uid = current($pruefung)->student_uid;
|
||||
|
||||
$this->load->model('crm/Student_model', 'StudentModel');
|
||||
$result = $this->StudentModel->load([$student_uid]);
|
||||
$student = $this->getDataOrTerminateWithError($result);
|
||||
$prestudent_id = current($student)->prestudent_id;
|
||||
|
||||
$this->checkPermissionsForPrestudent($prestudent_id, ['admin:r', 'assistenz:r']);
|
||||
}
|
||||
|
||||
if ($this->router->method == 'getPruefungen')
|
||||
{
|
||||
$student_uid = current(array_slice($this->uri->rsegments, 2));
|
||||
|
||||
$this->load->model('crm/Student_model', 'StudentModel');
|
||||
$result = $this->StudentModel->load([$student_uid]);
|
||||
$student = $this->getDataOrTerminateWithError($result);
|
||||
$prestudent_id = current($student)->prestudent_id;
|
||||
|
||||
$this->checkPermissionsForPrestudent($prestudent_id, ['admin:r', 'assistenz:r']);
|
||||
}
|
||||
|
||||
// Load language phrases
|
||||
$this->loadPhrases([
|
||||
'global', 'ui','lehre'
|
||||
]);
|
||||
}
|
||||
|
||||
public function getPruefungen($student_uid, $studiensemester_kurzbz = null)
|
||||
{
|
||||
$result = $this->PruefungModel->getPruefungenByStudentuid($student_uid);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function loadPruefung($pruefung_id)
|
||||
{
|
||||
$this->PruefungModel->addSelect('tbl_pruefung.datum');
|
||||
$this->PruefungModel->addSelect("TO_CHAR(tbl_pruefung.datum::timestamp, 'DD.MM.YYYY') AS format_datum");
|
||||
$this->PruefungModel->addSelect('tbl_pruefung.anmerkung');
|
||||
$this->PruefungModel->addSelect('tbl_pruefung.pruefungstyp_kurzbz');
|
||||
$this->PruefungModel->addSelect('tbl_pruefung.pruefung_id');
|
||||
$this->PruefungModel->addSelect('tbl_pruefung.lehreinheit_id');
|
||||
$this->PruefungModel->addSelect('tbl_pruefung.student_uid');
|
||||
$this->PruefungModel->addSelect('tbl_pruefung.mitarbeiter_uid');
|
||||
$this->PruefungModel->addSelect('tbl_pruefung.punkte');
|
||||
$this->PruefungModel->addSelect('tbl_pruefung.note');
|
||||
|
||||
$this->PruefungModel->addSelect('tbl_lehrveranstaltung.bezeichnung as lehrveranstaltung_bezeichnung');
|
||||
$this->PruefungModel->addSelect('tbl_lehrveranstaltung.lehrveranstaltung_id');
|
||||
$this->PruefungModel->addSelect('tbl_lehrveranstaltung.semester');
|
||||
$this->PruefungModel->addSelect('tbl_lehrveranstaltung.lehrform_kurzbz');
|
||||
$this->PruefungModel->addSelect('tbl_note.bezeichnung as note_bezeichnung');
|
||||
$this->PruefungModel->addSelect('tbl_pruefungstyp.beschreibung as typ_beschreibung');
|
||||
$this->PruefungModel->addSelect('tbl_lehreinheit.studiensemester_kurzbz as studiensemester_kurzbz');
|
||||
|
||||
$this->PruefungModel->addJoin('lehre.tbl_lehreinheit', 'lehre.tbl_pruefung.lehreinheit_id = lehre.tbl_lehreinheit.lehreinheit_id');
|
||||
$this->PruefungModel->addJoin('lehre.tbl_lehrveranstaltung', 'lehrveranstaltung_id');
|
||||
$this->PruefungModel->addJoin('lehre.tbl_note', 'note');
|
||||
$this->PruefungModel->addJoin('lehre.tbl_pruefungstyp', 'pruefungstyp_kurzbz');
|
||||
|
||||
|
||||
$this->PruefungModel->addLimit(1);
|
||||
|
||||
$result = $this->PruefungModel->loadWhere(
|
||||
array('pruefung_id' => $pruefung_id)
|
||||
);
|
||||
if (isError($result)) {
|
||||
return $this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
if (!hasData($result))
|
||||
{
|
||||
return $this->terminateWithError($this->p->t('ui', 'error_missingId', ['id'=> 'Pruefung_id']), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
$this->terminateWithSuccess(current(getData($result)) ? : null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserts a pruefung
|
||||
*
|
||||
* @param lehrveranstaltung_id, student_uid, lehreinheit_id
|
||||
*
|
||||
* @return values on success
|
||||
* retval 0: pruefung inserted
|
||||
* reval 1: pruefung and zeugnisnote inserted
|
||||
* retval 2: pruefung inserted, no insert Zeugnisnote
|
||||
* (change after date of examination)
|
||||
* retval 3: pruefung of type Termin2 inserted
|
||||
* and pruefung of type Termin1 as well
|
||||
* retval 5: prueufungen Termin 2 and 1 inserted
|
||||
* and no insert Zeugnisnote (change after date of examination)
|
||||
*/
|
||||
public function insertPruefung()
|
||||
{
|
||||
$authUID = getAuthUID();
|
||||
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$this->form_validation->set_rules('lehrveranstaltung_id', $this->p->t('lehre', 'lehrveranstaltung'), 'required', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('lehre', 'lehrveranstaltung')]),
|
||||
]);
|
||||
$this->form_validation->set_rules('lehreinheit_id', $this->p->t('lehre', 'lehreinheit'), 'required', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('lehre', 'lehreinheit')]),
|
||||
]);
|
||||
$this->form_validation->set_rules('pruefungstyp_kurzbz', $this->p->t('lehre', 'pruefung'), 'required', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('global', 'typ')]),
|
||||
]);
|
||||
$this->form_validation->set_rules(
|
||||
'datum',
|
||||
$this->p->t('global', 'datum'),
|
||||
['is_valid_date']
|
||||
);
|
||||
|
||||
if ($this->form_validation->run() == false)
|
||||
{
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
}
|
||||
|
||||
//calculate studiensemester_kurzbz this from lehreinheit (case newPruefung)
|
||||
$studiensemester_kurzbz = $this->input->post('studiensemester_kurzbz');
|
||||
if (!$studiensemester_kurzbz)
|
||||
{
|
||||
$this->load->model('education/Lehreinheit_model', 'LehreinheitModel');
|
||||
|
||||
$result = $this->LehreinheitModel->load($this->input->post('lehreinheit_id'));
|
||||
|
||||
$lehreinheit = $this->getDataOrTerminateWithError($result);
|
||||
$studiensemester_kurzbz = current($lehreinheit)->studiensemester_kurzbz;
|
||||
|
||||
if (isError($result))
|
||||
{
|
||||
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
}
|
||||
|
||||
$result = $this->PruefungModel->insert([
|
||||
'lehreinheit_id' => $this->input->post('lehreinheit_id'),
|
||||
'student_uid' => $this->input->post('student_uid'),
|
||||
'mitarbeiter_uid' => $this->input->post('mitarbeiter_uid'),
|
||||
'datum' => $this->input->post('datum'),
|
||||
'pruefungstyp_kurzbz' => $this->input->post('pruefungstyp_kurzbz'),
|
||||
'note' => $this->input->post('note'),
|
||||
'anmerkung' => $this->input->post('anmerkung'),
|
||||
'insertamum' => date('c'),
|
||||
'insertvon' => $authUID,
|
||||
]);
|
||||
|
||||
$this->getDataOrTerminateWithError($result);
|
||||
|
||||
//check if existing zeugnisnote
|
||||
$this->load->model('education/Zeugnisnote_model', 'ZeugnisnoteModel');
|
||||
|
||||
$result = $this->ZeugnisnoteModel->loadWhere(array(
|
||||
'lehrveranstaltung_id' => $this->input->post('lehrveranstaltung_id'),
|
||||
'student_uid' => $this->input->post('student_uid'),
|
||||
'studiensemester_kurzbz' => $studiensemester_kurzbz));
|
||||
|
||||
if (isError($result))
|
||||
{
|
||||
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
if (!hasData($result))
|
||||
{
|
||||
//insert zeugnisnote, if not existing
|
||||
$result = $this->ZeugnisnoteModel->insert(array(
|
||||
'lehrveranstaltung_id' => $this->input->post('lehrveranstaltung_id'),
|
||||
'student_uid' => $this->input->post('student_uid'),
|
||||
'studiensemester_kurzbz' => $studiensemester_kurzbz,
|
||||
'note' => $this->input->post('note'),
|
||||
'uebernahmedatum' => date('c'),
|
||||
'benotungsdatum' => $this->input->post('datum'),
|
||||
'insertamum' => date('c'),
|
||||
'insertvon' => $authUID
|
||||
));
|
||||
|
||||
if (isError($result))
|
||||
{
|
||||
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
$this->terminateWithSuccess(1);
|
||||
}
|
||||
|
||||
$return_code = 0;
|
||||
|
||||
//handling Termin1 if not existing
|
||||
if($this->input->post('pruefungstyp_kurzbz') == "Termin2")
|
||||
{
|
||||
$resultP = $this->PruefungModel->loadWhere(array(
|
||||
'lehreinheit_id' => $this->input->post('lehreinheit_id'),
|
||||
'student_uid' => $this->input->post('student_uid'),
|
||||
'pruefungstyp_kurzbz' => 'Termin1'));
|
||||
|
||||
if (isError($resultP))
|
||||
{
|
||||
$this->terminateWithError(getError($resultP), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
if(!hasData($resultP))
|
||||
{
|
||||
//check if existing Zeugnisnote
|
||||
$this->load->model('education/Zeugnisnote_model', 'ZeugnisnoteModel');
|
||||
$this->ZeugnisnoteModel->addJoin('lehre.tbl_lehreinheit', 'lehrveranstaltung_id');
|
||||
|
||||
$resultP = $this->ZeugnisnoteModel->loadWhere(array(
|
||||
'lehrveranstaltung_id' => $this->input->post('lehrveranstaltung_id'),
|
||||
'student_uid' => $this->input->input->post('student_uid'),
|
||||
'lehre.tbl_zeugnisnote.studiensemester_kurzbz' => $studiensemester_kurzbz));
|
||||
if (isError($resultP))
|
||||
{
|
||||
$this->terminateWithError(getError($resultP), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
if (!hasData($resultP))
|
||||
{
|
||||
$this->terminateWithError("Zeugnisnote existiert nicht", self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
$dataNote = current(getData($resultP));
|
||||
|
||||
$resultN = $this->PruefungModel->insert([
|
||||
'lehreinheit_id' => $this->input->post('lehreinheit_id'),
|
||||
'student_uid' => $this->input->post('student_uid'),
|
||||
'mitarbeiter_uid' => $this->input->post('mitarbeiter_uid'),
|
||||
'datum' => $dataNote->benotungsdatum,
|
||||
'pruefungstyp_kurzbz' => 'Termin1',
|
||||
'note' => $dataNote->note,
|
||||
'punkte' => $dataNote->punkte,
|
||||
'anmerkung' => 'automatisiert aus Zeugnisnote erstellt',
|
||||
'insertamum' => date('c'),
|
||||
'insertvon' => $authUID,
|
||||
]);
|
||||
|
||||
if (isError($resultN)) {
|
||||
$this->terminateWithError(getError($resultN), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
$return_code = 3;
|
||||
}
|
||||
}
|
||||
|
||||
$note = current(getData($result));
|
||||
$uebernahmedatum = new DateTime($note->uebernahmedatum);
|
||||
$benotungsdatum = new DateTime($note->benotungsdatum);
|
||||
|
||||
$checkDate = $uebernahmedatum === '' || $benotungsdatum > $uebernahmedatum
|
||||
? $benotungsdatum
|
||||
: $uebernahmedatum;
|
||||
|
||||
if ($checkDate >= $this->input->post('datum') && $note !== $note->note)
|
||||
{
|
||||
$this->terminateWithSuccess($return_code + 2);
|
||||
}
|
||||
$this->terminateWithSuccess($return_code + 2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a pruefung
|
||||
*
|
||||
* @param pruefung_id
|
||||
*
|
||||
* @return success or error
|
||||
*
|
||||
* no impact on lehre.tbl_zeugnisnote
|
||||
*/
|
||||
public function updatePruefung($pruefung_id)
|
||||
{
|
||||
$result = $this->PruefungModel->load($pruefung_id);
|
||||
|
||||
$oldpruefung = $this->getDataOrTerminateWithError($result);
|
||||
if (!$oldpruefung)
|
||||
show_404(); // Pruefung that should be updated does not exist
|
||||
|
||||
$authUID = getAuthUID();
|
||||
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$this->form_validation->set_rules('lehrveranstaltung_id', $this->p->t('lehre', 'lehrveranstaltung'), 'required', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('lehre', 'lehrveranstaltung')]),
|
||||
]);
|
||||
$this->form_validation->set_rules('lehreinheit_id', $this->p->t('lehre', 'lehreinheit'), 'required', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('lehre', 'lehreinheit')]),
|
||||
]);
|
||||
$this->form_validation->set_rules('pruefungstyp_kurzbz', $this->p->t('lehre', 'pruefung'), 'required', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('global', 'typ')]),
|
||||
]);
|
||||
$this->form_validation->set_rules(
|
||||
'datum',
|
||||
$this->p->t('global', 'datum'),
|
||||
['is_valid_date']
|
||||
);
|
||||
|
||||
if ($this->form_validation->run() == false)
|
||||
{
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
}
|
||||
|
||||
$result = $this->PruefungModel->update(
|
||||
[
|
||||
'pruefung_id' => $pruefung_id
|
||||
],
|
||||
[ 'lehreinheit_id' => $this->input->post('lehreinheit_id'),
|
||||
'student_uid' => $this->input->post('student_uid'),
|
||||
'mitarbeiter_uid' => $this->input->post('mitarbeiter_uid'),
|
||||
'note' => $this->input->post('note'),
|
||||
'pruefungstyp_kurzbz' => $this->input->post('pruefungstyp_kurzbz'),
|
||||
'datum' => $this->input->post('datum'),
|
||||
'anmerkung' => $this->input->post('anmerkung'),
|
||||
'updatevon' => $authUID,
|
||||
'updateamum' => date('c'),
|
||||
]
|
||||
);
|
||||
$this->getDataOrTerminateWithError($result);
|
||||
|
||||
return $this->outputJsonSuccess(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a pruefung
|
||||
*
|
||||
* @param pruefung_id
|
||||
*
|
||||
* @return success or error
|
||||
*
|
||||
* no impact on lehre.tbl_zeugnisnote
|
||||
*/
|
||||
public function deletePruefung($pruefung_id)
|
||||
{
|
||||
$result = $this->PruefungModel->load($pruefung_id);
|
||||
|
||||
$oldpruefung = $this->getDataOrTerminateWithError($result);
|
||||
if (!$oldpruefung)
|
||||
show_404(); // Pruefung that should be deleted does not exist
|
||||
|
||||
$result = $this->PruefungModel->delete(
|
||||
[
|
||||
'pruefung_id' => $pruefung_id
|
||||
]
|
||||
);
|
||||
|
||||
$this->getDataOrTerminateWithError($result);
|
||||
|
||||
return $this->terminateWithSuccess(true);
|
||||
}
|
||||
|
||||
public function getTypenPruefungen()
|
||||
{
|
||||
$this->load->model('education/Pruefungstyp_model', 'PruefungtypModel');
|
||||
|
||||
//TODO(Manu) sort Termin3
|
||||
$this->PruefungtypModel->addOrder('sort', 'ASC');
|
||||
$result = $this->PruefungtypModel->loadWhere(
|
||||
array('abschluss' => 'false')
|
||||
);
|
||||
|
||||
if (isError($result)) {
|
||||
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
return $this->terminateWithSuccess(getData($result) ?: []);
|
||||
}
|
||||
|
||||
public function getAllLehreinheiten()
|
||||
{
|
||||
$lv_id = $this->input->post('lv_id');
|
||||
$studiensemester_kurzbz = $this->input->post('studiensemester_kurzbz');
|
||||
|
||||
$this->load->model('education/Lehreinheit_model', 'LehreinheitModel');
|
||||
|
||||
$result = $this->LehreinheitModel->getLesFromLvIds($lv_id, $studiensemester_kurzbz);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getLvsandLesByStudent($student_uid, $semester_kurzbz=null)
|
||||
{
|
||||
$this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel');
|
||||
|
||||
$result = $this->LehrveranstaltungModel->getLvsByStudent($student_uid, $semester_kurzbz);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$lv_ids = array();
|
||||
$allData = array();
|
||||
|
||||
foreach ($data as $lehrveranstaltung) {
|
||||
$lv_ids[] = $lehrveranstaltung->lehrveranstaltung_id;
|
||||
}
|
||||
|
||||
$this->load->model('education/Lehreinheit_model', 'LehreinheitModel');
|
||||
|
||||
foreach ($lv_ids as $id)
|
||||
{
|
||||
$result = $this->LehreinheitModel->getLesFromLvIds($id, $semester_kurzbz);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
if (is_array($data)) {
|
||||
$allData = array_merge($allData, $data);
|
||||
}
|
||||
}
|
||||
|
||||
return $this->terminateWithSuccess($allData);
|
||||
}
|
||||
|
||||
public function getLvsAndMas($student_uid)
|
||||
{
|
||||
$this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel');
|
||||
|
||||
$result = $this->LehrveranstaltungModel->getLvsByStudent($student_uid);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$lv_ids = array();
|
||||
$allDataMa = array();
|
||||
|
||||
foreach ($data as $lehrveranstaltung)
|
||||
{
|
||||
$lv_ids[] = $lehrveranstaltung->lehrveranstaltung_id;
|
||||
}
|
||||
|
||||
$this->load->model('ressource/Mitarbeiter_model', 'MitarbeiterModel');
|
||||
|
||||
foreach ($lv_ids as $id)
|
||||
{
|
||||
$resultMa = $this->MitarbeiterModel->getMitarbeiterFromLV($id);
|
||||
$dataMa = $this->getDataOrTerminateWithError($resultMa);
|
||||
|
||||
if (is_array($dataMa))
|
||||
{
|
||||
$allDataMa = array_merge($allDataMa, $dataMa);
|
||||
}
|
||||
}
|
||||
return $this->terminateWithSuccess($allDataMa);
|
||||
}
|
||||
|
||||
public function getLvsByStudent($student_uid, $studiensemester_kurzbz = null)
|
||||
{
|
||||
$this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel');
|
||||
|
||||
$result = $this->LehrveranstaltungModel->getLvsByStudent($student_uid, $studiensemester_kurzbz);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
return $this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getMitarbeiterLv($lv_id)
|
||||
{
|
||||
$this->load->model('ressource/Mitarbeiter_model', 'MitarbeiterModel');
|
||||
|
||||
$result = $this->MitarbeiterModel->getMitarbeiterFromLV($lv_id);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
return $this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getNoten()
|
||||
{
|
||||
$this->load->model('education/Note_model', 'NoteModel');
|
||||
|
||||
$this->NoteModel->addOrder('note', 'ASC');
|
||||
$result = $this->NoteModel->load();
|
||||
|
||||
if (isError($result)) {
|
||||
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
return $this->terminateWithSuccess(getData($result) ?: []);
|
||||
}
|
||||
|
||||
public function checkZeugnisnoteLv()
|
||||
{
|
||||
$student_uid = $this->input->post('student_uid');
|
||||
$studiensemester_kurzbz = $this->input->post('studiensemester_kurzbz');
|
||||
$lehrveranstaltung_id = $this->input->post('lehrveranstaltung_id');
|
||||
|
||||
$this->load->model('education/Zeugnisnote_model', 'ZeugnisnoteModel');
|
||||
|
||||
$result = $this->ZeugnisnoteModel->loadWhere(array(
|
||||
'lehrveranstaltung_id' => $lehrveranstaltung_id,
|
||||
'student_uid' => $student_uid,
|
||||
'studiensemester_kurzbz' => $studiensemester_kurzbz));
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
return $this->terminateWithSuccess($data);
|
||||
}
|
||||
}
|
||||
@@ -647,15 +647,8 @@ class Status extends FHCAPI_Controller
|
||||
return $this->outputJsonSuccess(true);
|
||||
}
|
||||
|
||||
public function loadStatus()
|
||||
public function loadStatus($prestudent_id, $status_kurzbz, $studiensemester_kurzbz, $ausbildungssemester)
|
||||
{
|
||||
$_POST = json_decode(utf8_encode($this->input->raw_input_stream), true);
|
||||
|
||||
$prestudent_id = $this->input->post('prestudent_id');
|
||||
$status_kurzbz = $this->input->post('status_kurzbz');
|
||||
$ausbildungssemester = $this->input->post('ausbildungssemester');
|
||||
$studiensemester_kurzbz = $this->input->post('studiensemester_kurzbz');
|
||||
|
||||
$result = $this->PrestudentstatusModel->loadWhere(
|
||||
array(
|
||||
'prestudent_id' => $prestudent_id,
|
||||
@@ -1344,13 +1337,13 @@ class Status extends FHCAPI_Controller
|
||||
'updatevon' => $authUID
|
||||
];
|
||||
foreach ([
|
||||
'orgform_kurzbz',
|
||||
'anmerkung',
|
||||
'bewerbung_abgeschicktamum',
|
||||
'studienplan_id',
|
||||
'rt_stufe',
|
||||
'statusgrund_id'
|
||||
] as $key)
|
||||
'orgform_kurzbz',
|
||||
'anmerkung',
|
||||
'bewerbung_abgeschicktamum',
|
||||
'studienplan_id',
|
||||
'rt_stufe',
|
||||
'statusgrund_id'
|
||||
] as $key)
|
||||
if ($this->input->post($key))
|
||||
$updateData[$key] = $this->input->post($key);
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ class Student extends FHCAPI_Controller
|
||||
|
||||
// Load language phrases
|
||||
$this->loadPhrases([
|
||||
'ui'
|
||||
'ui', 'lehre'
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -156,6 +156,8 @@ class Student extends FHCAPI_Controller
|
||||
|
||||
$uid = $student ? current($student)->student_uid : null;
|
||||
|
||||
$studiengang_kz = $student ? current($student)->studiengang_kz : null;
|
||||
|
||||
$result = $this->PrestudentModel->loadWhere(['prestudent_id' => $prestudent_id]);
|
||||
|
||||
$person = $this->getDataOrTerminateWithError($result);
|
||||
@@ -223,20 +225,35 @@ class Student extends FHCAPI_Controller
|
||||
|
||||
// Check PKs
|
||||
if (count($update_lehrverband) + count($update_student) && $uid === null) {
|
||||
// TODO(chris): phrase
|
||||
$this->terminateWithValidationErrors(['' => "Kein/e StudentIn vorhanden!"]);
|
||||
$this->terminateWithValidationErrors(['' => $this->p->t('lehre', 'error_no_student')]);
|
||||
}
|
||||
if (count($update_person) && $person_id === null) {
|
||||
// TODO(chris): phrase
|
||||
$this->terminateWithValidationErrors(['' => "Keine Person vorhanden!"]);
|
||||
$this->terminateWithValidationErrors(['' => $this->p->t('lehre', 'error_no_person')]);
|
||||
}
|
||||
|
||||
// Do Updates
|
||||
if (count($update_lehrverband)) {
|
||||
$result = $this->StudentlehrverbandModel->update([
|
||||
$curstudlvb = $this->StudentlehrverbandModel->load([
|
||||
'studiensemester_kurzbz' => $studiensemester_kurzbz,
|
||||
'student_uid' => $uid
|
||||
], $update_lehrverband);
|
||||
]);
|
||||
|
||||
if(hasData($curstudlvb) && count(getData($curstudlvb)) > 0 )
|
||||
{
|
||||
$result = $this->StudentlehrverbandModel->update([
|
||||
'studiensemester_kurzbz' => $studiensemester_kurzbz,
|
||||
'student_uid' => $uid
|
||||
], $update_lehrverband);
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $this->StudentlehrverbandModel->insert(array_merge([
|
||||
'studiensemester_kurzbz' => $studiensemester_kurzbz,
|
||||
'student_uid' => $uid,
|
||||
'studiengang_kz' => $studiengang_kz
|
||||
], $update_lehrverband));
|
||||
}
|
||||
|
||||
$this->getDataOrTerminateWithError($result);
|
||||
}
|
||||
|
||||
|
||||
@@ -195,10 +195,10 @@ class AnrechnungJob extends JOB_Controller
|
||||
$studiengang_bezeichnung = $this->StudiengangModel->load($studiengang_kz)->retval[0]->stg_bezeichnung;
|
||||
|
||||
// Get STGL mail address
|
||||
$stglMailReceiver_arr = self::_getSTGLMailAddress($studiengang_kz);
|
||||
$stglMailReceiver_arr = $this->_getSTGLMailAddress($studiengang_kz);
|
||||
|
||||
// Get HTML table with new Anrechnungen of that STG plus amount of them
|
||||
list ($anrechnungen_amount, $anrechnungen_table) = self::_getSTGLMailDataTable($studiengang_kz, $anrechnungen);
|
||||
list ($anrechnungen_amount, $anrechnungen_table) = $this->_getSTGLMailDataTable($studiengang_kz, $anrechnungen);
|
||||
|
||||
// Link to Antrag genehmigen dashboard
|
||||
$url =
|
||||
@@ -514,8 +514,6 @@ html;
|
||||
'vorname' => $stgl->vorname
|
||||
);
|
||||
}
|
||||
|
||||
return $stglMailAdress_arr;
|
||||
}
|
||||
// If not available, get assistance mail address
|
||||
else
|
||||
@@ -524,12 +522,13 @@ html;
|
||||
|
||||
if (hasData($result))
|
||||
{
|
||||
return array(
|
||||
$result->retval[0]->email,
|
||||
''
|
||||
$stglMailAdress_arr[]= array(
|
||||
'to' => $result->retval[0]->email,
|
||||
'vorname' => ''
|
||||
);
|
||||
}
|
||||
}
|
||||
return $stglMailAdress_arr;
|
||||
}
|
||||
|
||||
// Build HTML table with yesterdays new Anrechnungen of the given STG
|
||||
|
||||
@@ -183,8 +183,8 @@ class AntragJob extends JOB_Controller
|
||||
$data,
|
||||
$to,
|
||||
'Anträge - Aktion(en) erforderlich',
|
||||
DEFAULT_SANCHO_HEADER_IMG,
|
||||
DEFAULT_SANCHO_FOOTER_IMG,
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
$cc
|
||||
))
|
||||
|
||||
@@ -52,6 +52,7 @@ class OneTimeMessages extends JOB_Controller
|
||||
JOIN public.tbl_prestudentstatus ps USING (prestudent_id)
|
||||
JOIN public.tbl_studiengang s USING (studiengang_kz)
|
||||
WHERE get_rolle_prestudent(ps.prestudent_id, NULL) = \'Wartender\'
|
||||
AND ps.status_kurzbz = \'Wartender\'
|
||||
AND ps.studiensemester_kurzbz = ?
|
||||
AND ps.datum <= NOW() - \''.$days.' days\'::interval
|
||||
AND s.typ = ?
|
||||
|
||||
@@ -431,8 +431,8 @@ class ReihungstestJob extends JOB_Controller
|
||||
$mailcontent_data_arr,
|
||||
$applicant->email,
|
||||
'Ihre Anmeldung zum Reihungstest - Reminder / Your registration for the placement test - Reminder',
|
||||
DEFAULT_SANCHO_HEADER_IMG,
|
||||
DEFAULT_SANCHO_FOOTER_IMG,
|
||||
'',
|
||||
'',
|
||||
$from,
|
||||
'',
|
||||
$bcc);
|
||||
@@ -821,7 +821,7 @@ class ReihungstestJob extends JOB_Controller
|
||||
JOIN lehre.tbl_studienordnung USING (studienordnung_id)
|
||||
JOIN PUBLIC.tbl_studiengang ON (tbl_studienordnung.studiengang_kz = tbl_studiengang.studiengang_kz)
|
||||
WHERE get_rolle_prestudent (tbl_prestudent.prestudent_id, ?) IN ('Aufgenommener','Bewerber','Wartender','Abgewiesener')
|
||||
AND studiensemester_kurzbz = ?
|
||||
AND studiensemester_kurzbz = ?
|
||||
AND tbl_studiengang.typ IN ('b', 'm')
|
||||
)
|
||||
SELECT * FROM prst
|
||||
@@ -861,7 +861,7 @@ class ReihungstestJob extends JOB_Controller
|
||||
{
|
||||
// Alle niedrigeren Prios laden
|
||||
$qryNiedrPrios = "
|
||||
SELECT DISTINCT
|
||||
SELECT DISTINCT ON(prestudent_id)
|
||||
get_rolle_prestudent (tbl_prestudent.prestudent_id, '".$row_ps->studiensemester_kurzbz."') AS laststatus,
|
||||
tbl_studienplan.orgform_kurzbz,
|
||||
tbl_person.nachname,
|
||||
@@ -876,11 +876,11 @@ class ReihungstestJob extends JOB_Controller
|
||||
JOIN PUBLIC.tbl_studiengang ON (tbl_prestudent.studiengang_kz = tbl_studiengang.studiengang_kz)
|
||||
WHERE tbl_prestudent.person_id = ".$row_ps->person_id."
|
||||
AND tbl_prestudent.prestudent_id != ".$row_ps->prestudent_id."
|
||||
AND get_rolle_prestudent (tbl_prestudent.prestudent_id, '".$row_ps->studiensemester_kurzbz."') IN ('Aufgenommener','Bewerber','Wartender')
|
||||
AND get_rolle_prestudent (tbl_prestudent.prestudent_id, '".$row_ps->studiensemester_kurzbz."') IN ('Aufgenommener','Bewerber','Wartender', 'Student')
|
||||
AND studiensemester_kurzbz = '".$row_ps->studiensemester_kurzbz."'
|
||||
AND tbl_studiengang.typ IN ('b', 'm')
|
||||
AND priorisierung > ".$row_ps->priorisierung."
|
||||
ORDER BY studiengang_kz, laststatus
|
||||
ORDER BY prestudent_id, studiengang_kz, laststatus, tbl_prestudentstatus.datum DESC
|
||||
";
|
||||
|
||||
// Wenn der letzte Status "Aufgenommener" ist, alle niedrigeren Prios auf "Abgewiesen" setzen
|
||||
@@ -894,12 +894,22 @@ class ReihungstestJob extends JOB_Controller
|
||||
{
|
||||
foreach ($resultNiedrPrios->retval as $rowNiedrPrios)
|
||||
{
|
||||
// nur Info wenn aufgenommen oder master
|
||||
if ($rowNiedrPrios->laststatus == 'Aufgenommener' || $rowNiedrPrios->studiengang_typ == 'm')
|
||||
// nur Info wenn aufgenommen/student oder master
|
||||
if ($rowNiedrPrios->laststatus == 'Aufgenommener' || $rowNiedrPrios->laststatus == 'Student' || $rowNiedrPrios->studiengang_typ == 'm')
|
||||
{
|
||||
// Mail zur Info an Assistenz schicken, dass in höherer Prio aufgenommen wurde
|
||||
$mailArray[$rowNiedrPrios->studiengang_kz][$rowNiedrPrios->orgform_kurzbz]['AufnahmeHoeherePrio'][]
|
||||
= $rowNiedrPrios->nachname.' '.$rowNiedrPrios->vorname.' ('.$rowNiedrPrios->prestudent_id.')';
|
||||
|
||||
if ($rowNiedrPrios->laststatus == 'Aufgenommener')
|
||||
{
|
||||
// Mail zur Info an Assistenz schicken, dass in höherer Prio aufgenommen wurde
|
||||
$mailArray[$rowNiedrPrios->studiengang_kz][$rowNiedrPrios->orgform_kurzbz]['AufnahmeHoeherePrio'][]
|
||||
= $rowNiedrPrios->nachname.' '.$rowNiedrPrios->vorname.' ('.$rowNiedrPrios->prestudent_id.')';
|
||||
}
|
||||
else if ($rowNiedrPrios->laststatus == 'Student')
|
||||
{
|
||||
$mailArray[$rowNiedrPrios->studiengang_kz][$rowNiedrPrios->orgform_kurzbz]['StudentHoeherePrio'][]
|
||||
= $rowNiedrPrios->nachname.' '.$rowNiedrPrios->vorname.' ('.$rowNiedrPrios->prestudent_id.')';
|
||||
}
|
||||
|
||||
}
|
||||
elseif ($rowNiedrPrios->laststatus == 'Bewerber' && $row_ps->prestudenstatus_datum > $rowNiedrPrios->datum)
|
||||
{
|
||||
@@ -966,7 +976,7 @@ class ReihungstestJob extends JOB_Controller
|
||||
FROM public.tbl_konto
|
||||
WHERE person_id = " . $row_ps->person_id . "
|
||||
AND studiensemester_kurzbz = '" . $row_ps->studiensemester_kurzbz . "'
|
||||
AND buchungstyp_kurzbz = 'StudiengebuehrAnzahlung'";
|
||||
AND buchungstyp_kurzbz IN ('StudiengebuehrAnzahlung','KautionDrittStaat')";
|
||||
|
||||
$resultKautionExists = $db->execReadOnlyQuery($qryKautionExists);
|
||||
if (hasdata($resultKautionExists))
|
||||
@@ -1061,6 +1071,20 @@ class ReihungstestJob extends JOB_Controller
|
||||
$mailcontent .= '</tbody></table>';
|
||||
$content = true;
|
||||
}
|
||||
if (isset($value['StudentHoeherePrio']) && !isEmptyArray($value['StudentHoeherePrio']))
|
||||
{
|
||||
$mailcontent .= '<p style="font-family: verdana, sans-serif;">
|
||||
Folgende Studenten wurden in einem höher priorisierten Studiengang aufgenommen:</p>';
|
||||
$mailcontent .= '<table style="border-collapse: collapse; border: 1px solid grey;">';
|
||||
$mailcontent .= ' <tbody>';
|
||||
sort($value['StudentHoeherePrio']);
|
||||
foreach ($value['StudentHoeherePrio'] AS $key=>$bewerber)
|
||||
{
|
||||
$mailcontent .= '<tr><td style="font-family: verdana, sans-serif; border: 1px solid grey; padding: 3px">'.$bewerber.'</td></tr>';
|
||||
}
|
||||
$mailcontent .= '</tbody></table>';
|
||||
$content = true;
|
||||
}
|
||||
if (isset($value['AbgewiesenHoeherePrio']) && !isEmptyArray($value['AbgewiesenHoeherePrio']))
|
||||
{
|
||||
$mailcontent .= '<p style="font-family: verdana, sans-serif;">
|
||||
|
||||
@@ -991,14 +991,17 @@ class DB_Model extends CI_Model
|
||||
|
||||
// Find and replace all the occurrences of the provided encrypted columns
|
||||
// with the postgresql decryption function
|
||||
$query = str_replace(
|
||||
$encryptedColumn,
|
||||
sprintf(
|
||||
self::CRYPT_WHERE_TEMPLATE,
|
||||
$encryptedColumn,
|
||||
$decryptionPassword,
|
||||
$definition[self::CRYPT_CAST]
|
||||
),
|
||||
$query = preg_replace_callback(
|
||||
'/(?<! (as|AS) )\b(\w+\.)?(' . $encryptedColumn . ')\b/',
|
||||
function($matches) use (&$decryptionPassword, &$definition) {
|
||||
$aliased_column = $matches[2] . $matches[3];
|
||||
return sprintf(
|
||||
self::CRYPT_WHERE_TEMPLATE,
|
||||
$aliased_column,
|
||||
$decryptionPassword,
|
||||
$definition[self::CRYPT_CAST]
|
||||
);
|
||||
},
|
||||
$query
|
||||
);
|
||||
}
|
||||
@@ -1106,14 +1109,17 @@ class DB_Model extends CI_Model
|
||||
{
|
||||
// Find and replace all the occurrences of the provided encrypted columns
|
||||
// with the postgresql decryption function
|
||||
$where = str_replace(
|
||||
$encryptedColumn,
|
||||
sprintf(
|
||||
self::CRYPT_WHERE_TEMPLATE,
|
||||
$encryptedColumn,
|
||||
$decryptionPassword,
|
||||
$definition[self::CRYPT_CAST]
|
||||
),
|
||||
$where = preg_replace_callback(
|
||||
'/(?<! (as|AS) )\b(\w+\.)?(' . $encryptedColumn . ')\b/',
|
||||
function($matches) use (&$decryptionPassword, &$definition) {
|
||||
$aliased_column = $matches[2] . $matches[3];
|
||||
return sprintf(
|
||||
self::CRYPT_WHERE_TEMPLATE,
|
||||
$aliased_column,
|
||||
$decryptionPassword,
|
||||
$definition[self::CRYPT_CAST]
|
||||
);
|
||||
},
|
||||
$where
|
||||
);
|
||||
}
|
||||
|
||||
@@ -309,6 +309,7 @@ abstract class Notiz_Controller extends FHCAPI_Controller
|
||||
}
|
||||
|
||||
//update(1) loading all dms-entries with this notiz_id
|
||||
$dms_id_arr = [];
|
||||
$this->load->model('person/Notizdokument_model', 'NotizdokumentModel');
|
||||
$this->NotizdokumentModel->addJoin('campus.tbl_dms_version', 'dms_id');
|
||||
|
||||
|
||||
@@ -33,22 +33,30 @@ class Tag_Controller extends FHCAPI_Controller
|
||||
|
||||
public function getTag()
|
||||
{
|
||||
$language = $this->_getLanguageIndex();
|
||||
$id = $this->input->get('id');
|
||||
|
||||
$this->NotizModel->addSelect(
|
||||
'tbl_notiz.titel,
|
||||
"tbl_notiz.titel,
|
||||
tbl_notiz.text,
|
||||
array_to_json(bezeichnung_mehrsprachig::varchar[])->>0 as bezeichnung,
|
||||
array_to_json(bezeichnung_mehrsprachig::varchar[])->>". $language. " as bezeichnung,
|
||||
tbl_notiz.notiz_id,
|
||||
tbl_notiz_typ.style,
|
||||
tbl_notiz.erledigt as done,
|
||||
tbl_notiz.insertamum,
|
||||
tbl_notiz.updateamum,
|
||||
tbl_notiz.insertvon,
|
||||
tbl_notiz.updatevon
|
||||
'
|
||||
(verfasserperson.vorname || ' ' || verfasserperson.nachname || ' ' || '(' || verfasserbenutzer.uid || ')') as verfasser,
|
||||
(bearbeiterperson.vorname || ' ' || bearbeiterperson.nachname || ' ' || '(' || bearbeiterbenutzer.uid || ')') as bearbeiter
|
||||
"
|
||||
);
|
||||
$this->NotizModel->addJoin('public.tbl_notiz_typ', 'public.tbl_notiz.typ = public.tbl_notiz_typ.typ_kurzbz');
|
||||
|
||||
$this->NotizModel->addJoin('public.tbl_benutzer verfasserbenutzer', 'tbl_notiz.verfasser_uid = verfasserbenutzer.uid', 'LEFT');
|
||||
$this->NotizModel->addJoin('public.tbl_person verfasserperson', 'verfasserbenutzer.person_id = verfasserperson.person_id', 'LEFT');
|
||||
|
||||
$this->NotizModel->addJoin('public.tbl_benutzer bearbeiterbenutzer', 'tbl_notiz.verfasser_uid = bearbeiterbenutzer.uid', 'LEFT');
|
||||
$this->NotizModel->addJoin('public.tbl_person bearbeiterperson', 'bearbeiterbenutzer.person_id = bearbeiterperson.person_id', 'LEFT');
|
||||
|
||||
$notiz = $this->NotizModel->loadWhere(array('notiz_id' => $id));
|
||||
|
||||
$this->terminateWithSuccess(hasData($notiz) ? getData($notiz)[0] : array());
|
||||
@@ -134,7 +142,11 @@ class Tag_Controller extends FHCAPI_Controller
|
||||
{
|
||||
$postData = $this->getPostJson();
|
||||
$updateData = $this->NotizModel->update(array('notiz_id' => $postData->id),
|
||||
array('text' => $postData->notiz)
|
||||
array('text' => $postData->notiz,
|
||||
'updateamum' => date('Y-m-d H:i:s'),
|
||||
'updatevon' => $this->_uid,
|
||||
'bearbeiter_uid' => $this->_uid,
|
||||
)
|
||||
);
|
||||
$this->terminateWithSuccess($updateData);
|
||||
}
|
||||
@@ -142,7 +154,11 @@ class Tag_Controller extends FHCAPI_Controller
|
||||
{
|
||||
$postData = $this->getPostJson();
|
||||
$updateData = $this->NotizModel->update(array('notiz_id' => $postData->id),
|
||||
array('erledigt' => !$postData->done)
|
||||
array('erledigt' => !$postData->done,
|
||||
'updateamum' => date('Y-m-d H:i:s'),
|
||||
'updatevon' => $this->_uid,
|
||||
'bearbeiter_uid' => $this->_uid,
|
||||
)
|
||||
);
|
||||
|
||||
$this->terminateWithSuccess($updateData);
|
||||
@@ -183,5 +199,14 @@ class Tag_Controller extends FHCAPI_Controller
|
||||
show_error('User authentification failed');
|
||||
}
|
||||
|
||||
private function _getLanguageIndex()
|
||||
{
|
||||
$this->load->model('system/Sprache_model', 'SpracheModel');
|
||||
$this->SpracheModel->addSelect('index');
|
||||
$result = $this->SpracheModel->loadWhere(array('sprache' => getUserLanguage()));
|
||||
|
||||
return hasData($result) ? getData($result)[0]->index : 1;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -87,18 +87,28 @@ function generateCSSsInclude($CSSs)
|
||||
*/
|
||||
function generateJSDataStorageObject($indexPage, $calledPath, $calledMethod)
|
||||
{
|
||||
$ci =& get_instance();
|
||||
$ci->load->model('system/Sprache_model','SpracheModel');
|
||||
$server_language = getData($ci->SpracheModel->loadWhere(['content' => true]));
|
||||
$server_language = array_map(function($language){
|
||||
return ['sprache'=>$language->sprache, 'LC_Time'=>$language->locale, 'bezeichnung'=>$language->bezeichnung[$language->index-1]];
|
||||
}, $server_language);
|
||||
$user_language = getUserLanguage();
|
||||
|
||||
$FHC_JS_DATA_STORAGE_OBJECT = array(
|
||||
'app_root' => APP_ROOT,
|
||||
'ci_router' => $indexPage,
|
||||
'called_path' => $calledPath,
|
||||
'called_method' => $calledMethod,
|
||||
'server_languages' => $server_language,
|
||||
'user_language' => $user_language,
|
||||
'timezone' => date_default_timezone_get(),
|
||||
);
|
||||
|
||||
$toPrint = "\n";
|
||||
$toPrint .= '<script type="text/javascript">';
|
||||
$toPrint .= '
|
||||
var FHC_JS_DATA_STORAGE_OBJECT = {
|
||||
app_root: "'.APP_ROOT.'",
|
||||
ci_router: "'.$indexPage.'",
|
||||
called_path: "'.$calledPath.'",
|
||||
called_method: "'.$calledMethod.'",
|
||||
user_language: "'.$user_language.'"
|
||||
};';
|
||||
var FHC_JS_DATA_STORAGE_OBJECT = '.json_encode($FHC_JS_DATA_STORAGE_OBJECT).';';
|
||||
$toPrint .= "\n";
|
||||
$toPrint .= '</script>';
|
||||
$toPrint .= "\n\n";
|
||||
|
||||
@@ -23,9 +23,6 @@ if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
// Functions needed in the view FHC-Header
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
const DEFAULT_SANCHO_HEADER_IMG = 'sancho_header_DEFAULT.jpg';
|
||||
const DEFAULT_SANCHO_FOOTER_IMG = 'sancho_footer_DEFAULT.jpg';
|
||||
|
||||
/**
|
||||
* Send single Mail with Sancho Design and Layout.
|
||||
* @param string $vorlage_kurzbz Name of the template for specific mail content.
|
||||
@@ -38,27 +35,88 @@ const DEFAULT_SANCHO_FOOTER_IMG = 'sancho_footer_DEFAULT.jpg';
|
||||
* @param string $bcc Sets BCC of mail.
|
||||
* @return void
|
||||
*/
|
||||
function sendSanchoMail($vorlage_kurzbz, $vorlage_data, $to, $subject, $headerImg = DEFAULT_SANCHO_HEADER_IMG, $footerImg = DEFAULT_SANCHO_FOOTER_IMG, $from = null, $cc = null, $bcc = null)
|
||||
function sendSanchoMail(
|
||||
$vorlage_kurzbz,
|
||||
$vorlage_data,
|
||||
$to,
|
||||
$subject,
|
||||
$headerImg = '',
|
||||
$footerImg = '',
|
||||
$from = null,
|
||||
$cc = null,
|
||||
$bcc = null
|
||||
)
|
||||
{
|
||||
$ci =& get_instance();
|
||||
$ci->load->library('email');
|
||||
$ci->load->library('MailLib');
|
||||
|
||||
$sanchoHeader_img = 'skin/images/sancho/'. $headerImg;
|
||||
$sanchoFooter_img = 'skin/images/sancho/'. $footerImg;
|
||||
$sancho_mail_config = $ci->config->item('mail');
|
||||
|
||||
|
||||
if ($from == '')
|
||||
{
|
||||
$from = 'sancho@'.DOMAIN;
|
||||
$from = ((isset($sancho_mail_config['sancho_mail_default_sender'])
|
||||
&& $sancho_mail_config['sancho_mail_default_sender'])
|
||||
? $sancho_mail_config['sancho_mail_default_sender']
|
||||
: 'noreply')
|
||||
. '@' . DOMAIN;
|
||||
}
|
||||
|
||||
// Embed sancho header and footer image
|
||||
// reset important to ensure embedding of images when called in a loop
|
||||
$ci->email->clear(true); // clear vars and attachments
|
||||
$ci->email->attach($sanchoHeader_img);
|
||||
$ci->email->attach($sanchoFooter_img);
|
||||
$cid_header = $ci->email->attachment_cid($sanchoHeader_img); // sets unique content id for embedding
|
||||
$cid_footer = $ci->email->attachment_cid($sanchoFooter_img); // sets unique content id for embedding
|
||||
|
||||
$cid_header = '';
|
||||
$cid_footer = '';
|
||||
|
||||
if (isset($sancho_mail_config['sancho_mail_use_images']) && $sancho_mail_config['sancho_mail_use_images'])
|
||||
{
|
||||
$sanchoHeader_img = '';
|
||||
$sanchoFooter_img = '';
|
||||
|
||||
if (isset($headerImg) && $headerImg != '')
|
||||
{
|
||||
// use provided header image
|
||||
$sanchoHeader_img = $headerImg;
|
||||
}
|
||||
elseif (isset($sancho_mail_config['sancho_mail_header_img']) && $sancho_mail_config['sancho_mail_header_img'])
|
||||
{
|
||||
// use default header image
|
||||
$sanchoHeader_img = $sancho_mail_config['sancho_mail_header_img'];
|
||||
}
|
||||
|
||||
if (isset($footerImg) && $footerImg != '')
|
||||
{
|
||||
// use provided footer image
|
||||
$sanchoFooter_img = $footerImg;
|
||||
}
|
||||
elseif (isset($sancho_mail_config['sancho_mail_footer_img']) && $sancho_mail_config['sancho_mail_footer_img'])
|
||||
{
|
||||
// use default footer image
|
||||
$sanchoFooter_img = $sancho_mail_config['sancho_mail_footer_img'];
|
||||
}
|
||||
|
||||
// add image file paths
|
||||
if (isset($sancho_mail_config['sancho_mail_img_path']))
|
||||
{
|
||||
if ($sanchoHeader_img != '')
|
||||
{
|
||||
$sanchoHeader_img = $sancho_mail_config['sancho_mail_img_path'].$sanchoHeader_img;
|
||||
}
|
||||
|
||||
if ($sanchoFooter_img != '')
|
||||
{
|
||||
$sanchoFooter_img = $sancho_mail_config['sancho_mail_img_path'].$sanchoFooter_img;
|
||||
}
|
||||
}
|
||||
|
||||
// attach header and footer
|
||||
$ci->email->attach($sanchoHeader_img, 'inline');
|
||||
$ci->email->attach($sanchoFooter_img, 'inline');
|
||||
$cid_header = $ci->email->attachment_cid($sanchoHeader_img); // sets unique content id for embedding
|
||||
$cid_footer = $ci->email->attachment_cid($sanchoFooter_img); // sets unique content id for embedding
|
||||
}
|
||||
|
||||
// Set specific mail content into specific content template
|
||||
$content = _parseMailContent($vorlage_kurzbz, $vorlage_data);
|
||||
@@ -74,7 +132,18 @@ function sendSanchoMail($vorlage_kurzbz, $vorlage_data, $to, $subject, $headerIm
|
||||
$body = _parseMailContent('Sancho_Mail_Template', $layout);
|
||||
|
||||
// Send mail
|
||||
return $ci->maillib->send($from, $to, $subject, $body, $alias = '', $cc, $bcc, $altMessage = '', $bulk = true, $autogenerated = true);
|
||||
return $ci->maillib->send(
|
||||
$from,
|
||||
$to,
|
||||
$subject,
|
||||
$body,
|
||||
'', // alias
|
||||
$cc,
|
||||
$bcc,
|
||||
'', // altMessage
|
||||
true, // bulk
|
||||
true // autogenerated
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -43,7 +43,7 @@ class CmsLib
|
||||
* @param string $sprache
|
||||
* @param boolean $sichtbar
|
||||
*
|
||||
* @return void
|
||||
* @return stdClass
|
||||
*/
|
||||
public function getContent($content_id, $version = null, $sprache = null, $sichtbar = true)
|
||||
{
|
||||
@@ -105,7 +105,19 @@ class CmsLib
|
||||
if($content->titel){
|
||||
$betreff = $content->titel;
|
||||
}else{
|
||||
//DomDocument getElementsByTagName returns a DomNodeList
|
||||
$betreff = $XML->getElementsByTagName('betreff');
|
||||
//check if any betreff was found and if it is not empty
|
||||
if($betreff->length > 0 && !empty($betreff->item(0)->nodeValue))
|
||||
{
|
||||
//DomNodeList item() return a DomNode, property nodeValue contains the value of the node
|
||||
$betreff = $betreff->item(0)->nodeValue;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
return error('no betreff found for the content');
|
||||
}
|
||||
}
|
||||
|
||||
$xsltemplate = new DOMDocument();
|
||||
@@ -221,7 +233,7 @@ class CmsLib
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function getNews($infoscreen = false, $studiengang_kz = null, $semester = null, $mischen = true, $titel = '', $edit = false, $sichtbar = true, $page = 1, $page_size = 10)
|
||||
public function getNews($infoscreen = false, $studiengang_kz = null, $semester = null, $mischen = true, $titel = '', $edit = false, $sichtbar = true, $page = 1, $page_size = 10, $sprache)
|
||||
{
|
||||
$this->ci->load->model('organisation/Studiengang_model', 'StudiengangModel');
|
||||
list($studiengang_kz, $semester) = $this->getStgAndSem($studiengang_kz, $semester);
|
||||
@@ -230,13 +242,13 @@ class CmsLib
|
||||
$xml = '<?xml version="1.0" encoding="UTF-8"?><content>';
|
||||
|
||||
$this->ci->load->model('content/News_model', 'NewsModel');
|
||||
$news = $this->ci->NewsModel->getNewsWithContent(getSprache(), $studiengang_kz, $semester, null, $sichtbar, 0, $page, $page_size, $all, $mischen);
|
||||
$news = $this->ci->NewsModel->getNewsWithContent($sprache, $studiengang_kz, $semester, null, $sichtbar, 0, $page, $page_size, $all, $mischen);
|
||||
|
||||
if (isError($news))
|
||||
return $news;
|
||||
|
||||
$news = getData($news);
|
||||
//var_dump($news->maxPageCount);
|
||||
|
||||
foreach ($news as $newsobj) {
|
||||
if ($studiengang_kz && $edit && !$newsobj->studiengang_kz)
|
||||
continue;
|
||||
@@ -247,7 +259,7 @@ class CmsLib
|
||||
$xml .= "<newswrapper>" . $newsobj->content . $datum . $id . "</newswrapper>";
|
||||
}
|
||||
|
||||
if ($studiengang_kz != 0) {
|
||||
/* if ($studiengang_kz != 0) {
|
||||
$stg_obj = $this->ci->StudiengangModel->load($studiengang_kz);
|
||||
if (isError($stg_obj))
|
||||
return $stg_obj;
|
||||
@@ -262,7 +274,7 @@ class CmsLib
|
||||
}
|
||||
$xml .= '<studiengang_bezeichnung><![CDATA[' . $stg_obj->bezeichnung . ']]></studiengang_bezeichnung>';
|
||||
}
|
||||
}
|
||||
} */
|
||||
|
||||
if ($titel != '') {
|
||||
$xml .= '<news_titel>' . $titel . '</news_titel>';
|
||||
|
||||
@@ -371,21 +371,21 @@ class FilterCmptLib
|
||||
foreach ($filterFields as $filterField)
|
||||
{
|
||||
// If not an empty array
|
||||
if ($filterField != null)
|
||||
if (!isEmptyArray($filterField))
|
||||
{
|
||||
//
|
||||
if (isset($filterField->name) && isset($filterField->operation) && isset($filterField->condition)
|
||||
&& !isEmptyString($filterField->name) && !isEmptyString($filterField->operation)
|
||||
&& !isEmptyString($filterField->condition))
|
||||
if (isset($filterField['name']) && isset($filterField['operation']) && isset($filterField['condition'])
|
||||
&& !isEmptyString($filterField['name']) && !isEmptyString($filterField['operation'])
|
||||
&& !isEmptyString((string)$filterField['condition']))
|
||||
{
|
||||
// Fine
|
||||
$filter = new stdClass();
|
||||
$filter->name = $filterField->name;
|
||||
$filter->operation = $filterField->operation;
|
||||
$filter->condition = $filterField->condition;
|
||||
if (isset($filterField->option) && !isEmptyString($filterField->option))
|
||||
$filter->name = $filterField['name'];
|
||||
$filter->operation = $filterField['operation'];
|
||||
$filter->condition = $filterField['condition'];
|
||||
if (isset($filterField['option']) && !isEmptyString($filterField['option']))
|
||||
{
|
||||
$filter->option = $filterField->option;
|
||||
$filter->option = $filterField['option'];
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1173,4 +1173,4 @@ class FilterCmptLib
|
||||
|
||||
return $filterName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ class PermissionLib
|
||||
|
||||
foreach($oe_kurzbz as $value)
|
||||
{
|
||||
$results[] = $this->isBerechtigt($berechtigung_kurzbz, $value, $art, $kostenstelle_id);
|
||||
$results[] = $this->isBerechtigt($berechtigung_kurzbz, $art, $value, $kostenstelle_id);
|
||||
}
|
||||
|
||||
if(!in_array(true, $results))
|
||||
|
||||
@@ -28,9 +28,17 @@ class GehaltsbestandteilLib
|
||||
$this->GehaltsbestandteilModel = $this->CI->GehaltsbestandteilModel;
|
||||
}
|
||||
|
||||
public function fetchGehaltsbestandteile($dienstverhaeltnis_id, $stichtag=null, $includefuture=false)
|
||||
public function fetchGehaltsbestandteileValorisiertForChart($dienstverhaeltnis_id, $stichtag=null, $includefuture=false)
|
||||
{
|
||||
return $this->GehaltsbestandteilModel->getGehaltsbestandteile($dienstverhaeltnis_id, $stichtag, $includefuture);
|
||||
return $this->GehaltsbestandteilModel->getGehaltsbestandteileValorisiertForChart($dienstverhaeltnis_id, $stichtag, $includefuture);
|
||||
}
|
||||
|
||||
public function fetchGehaltsbestandteile($dienstverhaeltnis_id, $stichtag=null,
|
||||
$includefuture=false, $withvalorisationhistory=true)
|
||||
{
|
||||
return $this->GehaltsbestandteilModel->getGehaltsbestandteile(
|
||||
$dienstverhaeltnis_id, $stichtag, $includefuture, $withvalorisationhistory
|
||||
);
|
||||
}
|
||||
|
||||
public function fetchGehaltsbestandteil($gehaltsbestandteil_id)
|
||||
|
||||
@@ -26,6 +26,8 @@ class VertragsbestandteilLib
|
||||
{
|
||||
const INCLUDE_FUTURE = true;
|
||||
const DO_NOT_INCLUDE_FUTURE = false;
|
||||
const WITH_VALORISATION_HISTORY = true;
|
||||
const NOT_WITH_VALORISATION_HISTORY = false;
|
||||
|
||||
protected $CI;
|
||||
/** @var Dienstverhaeltnis_model */
|
||||
@@ -90,10 +92,15 @@ class VertragsbestandteilLib
|
||||
return $dv;
|
||||
}
|
||||
|
||||
public function fetchVertragsbestandteile($dienstverhaeltnis_id, $stichtag=null, $includefuture=false)
|
||||
public function fetchVertragsbestandteile($dienstverhaeltnis_id, $stichtag=null,
|
||||
$includefuture=false, $withvalorisationhistory=true)
|
||||
{
|
||||
$vbs = $this->VertragsbestandteilModel->getVertragsbestandteile($dienstverhaeltnis_id, $stichtag, $includefuture);
|
||||
$gbs = $this->GehaltsbestandteilLib->fetchGehaltsbestandteile($dienstverhaeltnis_id, $stichtag, $includefuture);
|
||||
$vbs = $this->VertragsbestandteilModel->getVertragsbestandteile(
|
||||
$dienstverhaeltnis_id, $stichtag, $includefuture
|
||||
);
|
||||
$gbs = $this->GehaltsbestandteilLib->fetchGehaltsbestandteile(
|
||||
$dienstverhaeltnis_id, $stichtag, $includefuture, $withvalorisationhistory
|
||||
);
|
||||
|
||||
$gbsByVBid = array();
|
||||
foreach( $gbs as $gb )
|
||||
|
||||
@@ -44,4 +44,27 @@ class Bisio_model extends DB_Model
|
||||
else
|
||||
return success("Bisio not found");
|
||||
}
|
||||
|
||||
/**
|
||||
* checks, if an (extension) table exists to avoid later errors
|
||||
* @param String $schema like 'extension'
|
||||
* @param String $table like 'tbl_mo_bisiozuordnung'
|
||||
* @return boolean
|
||||
*/
|
||||
public function tableExists($schema, $table)
|
||||
{
|
||||
$params = array($schema, $table);
|
||||
|
||||
$qry = "SELECT
|
||||
1
|
||||
FROM
|
||||
information_schema.role_table_grants
|
||||
WHERE
|
||||
table_schema = ?
|
||||
AND table_name = ?";
|
||||
|
||||
$result = $this->execQuery($qry, $params);
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
class Bisstandort_model extends DB_Model
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->dbTable = 'bis.tbl_bisstandort';
|
||||
$this->pk = 'standort_code';
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,7 @@ class News_model extends DB_Model
|
||||
{
|
||||
$this->addJoin("campus.tbl_content","content_id");
|
||||
return $this->execReadOnlyQuery('
|
||||
SELECT *
|
||||
SELECT *, TO_CHAR(campus.tbl_news.datum, ?) as datumformatted
|
||||
FROM campus.tbl_news
|
||||
JOIN campus.tbl_content content ON content.content_id = campus.tbl_news.content_id
|
||||
WHERE
|
||||
@@ -29,7 +29,7 @@ class News_model extends DB_Model
|
||||
datum <= NOW() AND (datum_bis IS NULL OR datum_bis >= now()::date)
|
||||
ORDER BY datum DESC
|
||||
LIMIT ' . $this->escape($limit)
|
||||
);
|
||||
, ['DD/MM/YYYY']);
|
||||
}
|
||||
|
||||
public function getNewsContentIDs($limit=10){
|
||||
|
||||
@@ -501,17 +501,14 @@ class Prestudentstatus_model extends DB_Model
|
||||
$this->addSelect('tbl_prestudentstatus.studiensemester_kurzbz');
|
||||
$this->addSelect('tbl_prestudentstatus.ausbildungssemester');
|
||||
$this->addSelect('tbl_prestudentstatus.datum');
|
||||
$this->addSelect("TO_CHAR(tbl_prestudentstatus.datum::timestamp, 'DD.MM.YYYY') AS format_datum");
|
||||
$this->addSelect('tbl_prestudentstatus.insertamum');
|
||||
$this->addSelect('tbl_prestudentstatus.insertvon');
|
||||
$this->addSelect('tbl_prestudentstatus.updateamum');
|
||||
$this->addSelect('tbl_prestudentstatus.updatevon');
|
||||
$this->addSelect('tbl_prestudentstatus.orgform_kurzbz');
|
||||
$this->addSelect('tbl_prestudentstatus.bestaetigtam');
|
||||
$this->addSelect("TO_CHAR(tbl_prestudentstatus.bestaetigtam::timestamp, 'DD.MM.YYYY') AS format_bestaetigtam");
|
||||
$this->addSelect('tbl_prestudentstatus.bestaetigtvon');
|
||||
$this->addSelect('tbl_prestudentstatus.bewerbung_abgeschicktamum');
|
||||
$this->addSelect("TO_CHAR(tbl_prestudentstatus.bewerbung_abgeschicktamum::timestamp, 'DD.MM.YYYY') AS format_bewerbung_abgeschicktamum");
|
||||
$this->addSelect('tbl_prestudentstatus.anmerkung');
|
||||
$this->addSelect('plan.studienplan_id');
|
||||
$this->addSelect('plan.bezeichnung');
|
||||
|
||||
@@ -113,4 +113,61 @@ class Abschlusspruefung_model extends DB_Model
|
||||
|
||||
return success($abschlusspruefungdata);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets data of an Abschlusspruefung
|
||||
* @param $student_uid
|
||||
* @return object
|
||||
*/
|
||||
public function getAbschlusspruefungForPrestudent($student_uid)
|
||||
{
|
||||
$qry = "
|
||||
SELECT
|
||||
exam.*,
|
||||
CONCAT(
|
||||
person_pruefer1.nachname || ' ',
|
||||
person_pruefer1.vorname,
|
||||
COALESCE(' ' || person_pruefer1.titelpre)
|
||||
) AS person_pruefer1,
|
||||
CONCAT(
|
||||
person_pruefer2.nachname || ' ',
|
||||
person_pruefer2.vorname,
|
||||
COALESCE(' ' || person_pruefer2.titelpre)
|
||||
) AS person_pruefer2,
|
||||
CONCAT(
|
||||
person_pruefer3.nachname || ' ',
|
||||
person_pruefer3.vorname,
|
||||
COALESCE(' ' || person_pruefer3.titelpre)
|
||||
) AS person_pruefer3,
|
||||
CONCAT(
|
||||
person_vorsitzender.nachname || ' ',
|
||||
person_vorsitzender.vorname,
|
||||
COALESCE(' ' || person_vorsitzender.titelpre)
|
||||
) AS person_vorsitzender,
|
||||
datum,
|
||||
freigabedatum,
|
||||
sponsion,
|
||||
uhrzeit,
|
||||
person_pruefer1.nachname as p1_nachname,
|
||||
person_pruefer2.nachname as p2_nachname,
|
||||
person_pruefer3.nachname as p3_nachname,
|
||||
person_vorsitzender.nachname as vorsitz_nachname,
|
||||
beurteilung.bezeichnung as beurteilung_bezeichnung,
|
||||
antritt.bezeichnung as antritt_bezeichnung
|
||||
FROM
|
||||
lehre.tbl_abschlusspruefung exam
|
||||
JOIN lehre.tbl_pruefungstyp USING (pruefungstyp_kurzbz)
|
||||
LEFT JOIN public.tbl_benutzer ben_vorsitzender ON (ben_vorsitzender.uid = vorsitz)
|
||||
LEFT JOIN public.tbl_person person_vorsitzender ON (ben_vorsitzender.person_id = person_vorsitzender.person_id)
|
||||
LEFT JOIN public.tbl_person person_pruefer1 ON (person_pruefer1.person_id = pruefer1)
|
||||
LEFT JOIN public.tbl_person person_pruefer2 ON (person_pruefer2.person_id = pruefer2)
|
||||
LEFT JOIN public.tbl_person person_pruefer3 ON (person_pruefer3.person_id = pruefer3)
|
||||
LEFT JOIN lehre.tbl_abschlussbeurteilung beurteilung USING (abschlussbeurteilung_kurzbz)
|
||||
LEFT JOIN lehre.tbl_abschlusspruefung_antritt antritt USING (pruefungsantritt_kurzbz)
|
||||
WHERE student_uid = ?
|
||||
ORDER BY exam.datum DESC
|
||||
";
|
||||
|
||||
return $this->execQuery($qry, array('student_uid' => $student_uid));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
class Akadgrad_model extends DB_Model
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->dbTable = 'lehre.tbl_akadgrad';
|
||||
$this->pk = 'akadgrad_id';
|
||||
}
|
||||
}
|
||||
@@ -11,4 +11,45 @@ class LePruefung_model extends DB_Model
|
||||
$this->dbTable = 'lehre.tbl_pruefung';
|
||||
$this->pk = 'pruefung_id';
|
||||
}
|
||||
|
||||
/**
|
||||
* gets all Pruefungen for a student_uid
|
||||
* @param string $student_uid
|
||||
* @param string $studiensemester_kurzbz
|
||||
*
|
||||
* @return stdClass
|
||||
*/
|
||||
public function getPruefungenByStudentuid($student_uid, $studiensemester_kurzbz = null)
|
||||
{
|
||||
$this->addSelect('tbl_pruefung.datum');
|
||||
$this->addSelect("TO_CHAR(tbl_pruefung.datum::timestamp, 'DD.MM.YYYY') AS format_datum");
|
||||
$this->addSelect('tbl_pruefung.anmerkung');
|
||||
$this->addSelect('tbl_pruefung.pruefungstyp_kurzbz');
|
||||
$this->addSelect('tbl_pruefung.pruefung_id');
|
||||
$this->addSelect('tbl_pruefung.lehreinheit_id');
|
||||
$this->addSelect('tbl_pruefung.student_uid');
|
||||
$this->addSelect('tbl_pruefung.mitarbeiter_uid');
|
||||
$this->addSelect('tbl_pruefung.punkte');
|
||||
|
||||
$this->addSelect('tbl_lehrveranstaltung.bezeichnung as lehrveranstaltung_bezeichnung');
|
||||
$this->addSelect('tbl_lehrveranstaltung.lehrveranstaltung_id');
|
||||
$this->addSelect('tbl_note.bezeichnung as note_bezeichnung');
|
||||
$this->addSelect('tbl_pruefungstyp.beschreibung as typ_beschreibung');
|
||||
$this->addSelect('tbl_lehreinheit.studiensemester_kurzbz as studiensemester_kurzbz');
|
||||
|
||||
$this->addJoin('lehre.tbl_lehreinheit', 'lehre.tbl_pruefung.lehreinheit_id=lehre.tbl_lehreinheit.lehreinheit_id');
|
||||
$this->addJoin('lehre.tbl_lehrveranstaltung', 'lehrveranstaltung_id');
|
||||
$this->addJoin('lehre.tbl_note', 'note');
|
||||
$this->addJoin('lehre.tbl_pruefungstyp', 'pruefungstyp_kurzbz');
|
||||
|
||||
if ($studiensemester_kurzbz)
|
||||
$this->db->where("tbl_lehreinheit.studiensemester_kurzbz = ", $studiensemester_kurzbz);
|
||||
|
||||
$this->addOrder('tbl_pruefung.datum', 'DESC');
|
||||
$this->addOrder('tbl_pruefung.pruefung_id', 'DESC');
|
||||
|
||||
return $this->loadWhere([
|
||||
'student_uid' => $student_uid
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ class Lehreinheit_model extends DB_Model
|
||||
$this->addOrder('lehreinheit_id');
|
||||
$les = $this->loadWhere(
|
||||
array('lehrveranstaltung_id' => $lehrveranstaltung_id,
|
||||
'studiensemester_kurzbz' => $studiensemester)
|
||||
'studiensemester_kurzbz' => $studiensemester)
|
||||
);
|
||||
|
||||
if (hasData($les))
|
||||
@@ -244,4 +244,63 @@ EOSQL;
|
||||
$res = $this->execReadOnlyQuery($query);
|
||||
return $res;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets Lehreinheiten for Lehrveranstaltungen in a Studiensemester.
|
||||
* Without using tbl_lehrfach: bezeichnung and kurzbz ALWAYS from lehrveranstaltung
|
||||
* @param $lehrveranstaltung_id
|
||||
* @param $studiensemester
|
||||
* @return array with Lehreinheiten and their Lehreinheitgruppen
|
||||
*/
|
||||
public function getLesFromLvIds($lehrveranstaltung_id, $studiensemester_kurzbz = null)
|
||||
{
|
||||
$params = array($lehrveranstaltung_id);
|
||||
|
||||
$query = "
|
||||
SELECT
|
||||
lv.lehrveranstaltung_id,
|
||||
le.lehreinheit_id,
|
||||
le.lehrform_kurzbz,
|
||||
lv.kurzbz,
|
||||
lv.bezeichnung,
|
||||
lv.semester,
|
||||
(
|
||||
SELECT
|
||||
STRING_AGG(CONCAT(leg.semester, leg.verband, leg.gruppe), ' ')
|
||||
FROM lehre.tbl_lehreinheitgruppe leg
|
||||
WHERE leg.lehreinheit_id = le.lehreinheit_id
|
||||
) AS gruppe,
|
||||
STRING_AGG(tma.kurzbz, ' ') as kuerzel
|
||||
FROM
|
||||
lehre.tbl_lehreinheit le
|
||||
JOIN
|
||||
lehre.tbl_lehrveranstaltung lv ON lv.lehrveranstaltung_id = le.lehrveranstaltung_id
|
||||
JOIN
|
||||
lehre.tbl_lehreinheitmitarbeiter ma USING (lehreinheit_id)
|
||||
JOIN
|
||||
public.tbl_mitarbeiter tma USING (mitarbeiter_uid)
|
||||
WHERE
|
||||
lv.lehrveranstaltung_id = ?
|
||||
";
|
||||
|
||||
if (isset($studiensemester_kurzbz))
|
||||
{
|
||||
$query .= " AND le.studiensemester_kurzbz = ?";
|
||||
$params[] = $studiensemester_kurzbz;
|
||||
}
|
||||
|
||||
$query .="
|
||||
GROUP BY
|
||||
lv.lehrveranstaltung_id,
|
||||
le.lehreinheit_id,
|
||||
le.lehrform_kurzbz,
|
||||
lv.kurzbz,
|
||||
lv.bezeichnung,
|
||||
lv.semester
|
||||
ORDER BY
|
||||
le.lehreinheit_id;
|
||||
";
|
||||
|
||||
return $this->execQuery($query, $params);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,145 +16,21 @@ class Lehrveranstaltung_model extends DB_Model
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Lehrveranstaltungen by eventQuery string. Use with autocomplete event queries.
|
||||
* @param $eventQuery String
|
||||
* @param string $studiensemester_kurzbz Filter by Studiensemester
|
||||
* @param array $oes Filter by Organisationseinheiten
|
||||
* @return array
|
||||
*/
|
||||
public function getAutocompleteSuggestions($eventQuery, $studiensemester_kurzbz = null, $oes = null)
|
||||
{
|
||||
$subQry = $this->_getQryLvsByStudienplan($studiensemester_kurzbz, $oes);
|
||||
$params = [];
|
||||
|
||||
/* filter by input string */
|
||||
if (is_string($eventQuery)) {
|
||||
$subQry.= ' AND lv.bezeichnung ILIKE ?';
|
||||
$params[] = '%' . $eventQuery . '%';
|
||||
}
|
||||
|
||||
$qry = 'SELECT DISTINCT ON (lehrveranstaltung_id) * FROM ('. $subQry. ') AS tmp';
|
||||
|
||||
return $this->execQuery($qry, $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Lehrveranstaltungen with its Stg, OE and OE-type.
|
||||
* Filter by Studiensemester and Organisationseinheiten if necessary.
|
||||
* @param $eventQuery String
|
||||
* @param string $studiensemester_kurzbz Filter by Studiensemester
|
||||
* @param array $oes Filter by Organisationseinheiten
|
||||
* @param array $lv_ids Filter by Lehrveranstaltung-Ids
|
||||
* @return array
|
||||
*/
|
||||
public function getLvsByStudienplan($studiensemester_kurzbz = null, $oes = null, $lv_ids = null)
|
||||
{
|
||||
$subQry = $this->_getQryLvsByStudienplan($studiensemester_kurzbz, $oes);
|
||||
$qry = 'SELECT * FROM ('. $subQry. ') AS tmp';
|
||||
|
||||
if (isset($lv_ids) && is_array($lv_ids))
|
||||
{
|
||||
/* filter by lv_ids */
|
||||
$implodedLvIds = "'". implode("', '", $lv_ids). "'";
|
||||
$qry.= ' WHERE lehrveranstaltung_id IN ('. $implodedLvIds. ')';
|
||||
}
|
||||
|
||||
$qry.= ' ORDER BY stg_typ_kurzbz, orgform_kurzbz DESC';
|
||||
|
||||
return $this->execQuery($qry);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get basic query to retrieve Lehrveranstaltungen according to the Orgforms and Ausbildungssemesters actual Studienplan.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function _getQryLvsByStudienplan($studiensemester_kurzbz = null, $oes = null, $lehrtyp_kurzbz = 'lv')
|
||||
{
|
||||
$qry = '
|
||||
SELECT
|
||||
lv.oe_kurzbz AS lv_oe_kurzbz,
|
||||
CASE
|
||||
WHEN oe.organisationseinheittyp_kurzbz = \'Kompetenzfeld\' THEN (\'KF \' || oe.bezeichnung)
|
||||
WHEN oe.organisationseinheittyp_kurzbz = \'Department\' THEN (\'DEP \' || oe.bezeichnung)
|
||||
ELSE (oe.organisationseinheittyp_kurzbz || \' \' || oe.bezeichnung)
|
||||
END AS lv_oe_bezeichnung,
|
||||
stplsem.studiensemester_kurzbz,
|
||||
studienordnung_id,
|
||||
sto.studiengang_kz,
|
||||
stpl.studienplan_id,
|
||||
stplsem.semester,
|
||||
stpl.orgform_kurzbz,
|
||||
upper(stg.typ || stg.kurzbz) AS stg_typ_kurzbz,
|
||||
stg.bezeichnung AS stg_bezeichnung,
|
||||
stgtyp.bezeichnung AS stg_typ_bezeichnung,
|
||||
lv.lehrveranstaltung_id,
|
||||
lv.semester,
|
||||
lv.bezeichnung AS lv_bezeichnung,
|
||||
(
|
||||
-- comma seperated string of all lehreinheitgruppen
|
||||
SELECT string_agg(bezeichnung, \', \') AS lehreinheitgruppe_bezeichnung
|
||||
FROM(
|
||||
-- distinct bezeichnung, as may come multiple times from different lehreinheiten
|
||||
SELECT DISTINCT ON (studiengang_kz, bezeichnung) studiengang_kz, bezeichnung FROM
|
||||
(
|
||||
-- distinct lehreinheitgruppe, as may come multiple times from different lehrform
|
||||
SELECT DISTINCT ON (legr.lehreinheitgruppe_id) legr.studiengang_kz,
|
||||
-- get Spezialgruppe or Lehrverbandgruppe
|
||||
COALESCE(
|
||||
legr.gruppe_kurzbz,
|
||||
CONCAT( UPPER(stg1.typ), UPPER(stg1.kurzbz), \'-\', legr.semester, legr.verband, legr.gruppe )
|
||||
) as bezeichnung
|
||||
FROM lehre.tbl_lehreinheitgruppe legr
|
||||
JOIN lehre.tbl_lehreinheit le USING (lehreinheit_id)
|
||||
JOIN lehre.tbl_lehrveranstaltung lv1 USING (lehrveranstaltung_id)
|
||||
JOIN public.tbl_studiengang stg1 ON stg1.studiengang_kz = legr.studiengang_kz
|
||||
WHERE lv1.lehrveranstaltung_id = lv.lehrveranstaltung_id
|
||||
AND le.studiensemester_kurzbz = stplsem.studiensemester_kurzbz
|
||||
) AS lehreinheitgruppen
|
||||
GROUP BY studiengang_kz, bezeichnung
|
||||
ORDER BY studiengang_kz DESC
|
||||
) AS uniqueLehreinheitgruppen_bezeichnung
|
||||
) AS lehreinheitgruppen_bezeichnung
|
||||
FROM
|
||||
lehre.tbl_studienplan stpl
|
||||
JOIN lehre.tbl_studienordnung sto USING (studienordnung_id)
|
||||
JOIN lehre.tbl_studienplan_semester stplsem USING (studienplan_id)
|
||||
JOIN lehre.tbl_studienplan_lehrveranstaltung stpllv ON (stpllv.studienplan_id = stpl.studienplan_id AND stpllv.semester = stplsem.semester)
|
||||
JOIN lehre.tbl_lehrveranstaltung lv USING (lehrveranstaltung_id)
|
||||
JOIN public.tbl_organisationseinheit oe USING (oe_kurzbz)
|
||||
JOIN public.tbl_studiengang stg ON stg.studiengang_kz = sto.studiengang_kz
|
||||
JOIN public.tbl_studiengangstyp stgtyp ON stgtyp.typ = stg.typ
|
||||
/* filter by lehrtyp_kurzbz, default is lvs only */
|
||||
WHERE
|
||||
lehrtyp_kurzbz = '. $this->db->escape($lehrtyp_kurzbz);
|
||||
|
||||
if (isset($studiensemester_kurzbz) && is_string($studiensemester_kurzbz))
|
||||
{
|
||||
/* filter by studiensemester */
|
||||
$qry.= ' AND stplsem.studiensemester_kurzbz = '. $this->db->escape($studiensemester_kurzbz);
|
||||
|
||||
}
|
||||
|
||||
if (isset($oes) && is_array($oes))
|
||||
{
|
||||
/* filter by organisationseinheit */
|
||||
$implodedOes = "'". implode("', '", $oes). "'";
|
||||
$qry.= ' AND lv.oe_kurzbz IN ('. $implodedOes. ')';
|
||||
}
|
||||
|
||||
return $qry;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all Templates and union with all Lehrveranstaltungen of given Studiensemester and Oes, that are assigned to
|
||||
* a template. This data structure can be used for nested tabulator data tree.
|
||||
* Get all Templates and its assigned Lehrveranstaltungen of given Studiensemester and Oes.
|
||||
* Lvs are queried via actual Studienordnung and Studienplan.
|
||||
*
|
||||
* @param null|string $studiensemester_kurzbz
|
||||
* @param null|array $oes
|
||||
* @param null $lehrveranstaltung_id Queries certain LV only
|
||||
* @return array|stdClass|null
|
||||
*/
|
||||
public function getTemplateLvTree($studiensemester_kurzbz = null, $oes = null){
|
||||
public function getTemplateLvTree($studiensemester_kurzbz = null, $oes = null, $studienjahr_kurzbz = null){
|
||||
|
||||
if (is_string($studiensemester_kurzbz) && is_string($studienjahr_kurzbz))
|
||||
{
|
||||
return error('Query not possible for both studiensemester and studienjahr');
|
||||
}
|
||||
|
||||
$params = [];
|
||||
$qry = '
|
||||
WITH
|
||||
@@ -189,6 +65,17 @@ class Lehrveranstaltung_model extends DB_Model
|
||||
|
||||
}
|
||||
|
||||
if (is_string($studienjahr_kurzbz)) {
|
||||
/* filter by studiensemester */
|
||||
$params[] = $studienjahr_kurzbz;
|
||||
$qry .= '
|
||||
AND stplsem.studiensemester_kurzbz IN (
|
||||
SELECT studiensemester_kurzbz
|
||||
FROM public.tbl_studiensemester
|
||||
WHERE studienjahr_kurzbz = ?
|
||||
)';
|
||||
}
|
||||
|
||||
if (is_array($oes))
|
||||
{
|
||||
/* filter by organisationseinheit */
|
||||
@@ -300,7 +187,15 @@ class Lehrveranstaltung_model extends DB_Model
|
||||
JOIN public.tbl_studiengangstyp stgtyp ON stgtyp.typ = stg.typ
|
||||
JOIN public.tbl_organisationseinheit oe ON oe.oe_kurzbz = lv.oe_kurzbz
|
||||
ORDER BY
|
||||
oe.bezeichnung, lv.semester, lv.bezeichnung
|
||||
-- Sort by lv.bezeichnung
|
||||
lv.bezeichnung,
|
||||
-- Within each group, ensure templates appear first
|
||||
CASE
|
||||
WHEN lv.lehrtyp_kurzbz = \'tpl\' THEN 0
|
||||
ELSE 1
|
||||
END,
|
||||
-- Ensure assigend lvs follow their template, grouped by lehrveranstaltung_template_id
|
||||
COALESCE(lv.lehrveranstaltung_template_id, lv.lehrveranstaltung_id)
|
||||
';
|
||||
|
||||
return $this->execQuery($qry, $params);
|
||||
@@ -517,28 +412,29 @@ class Lehrveranstaltung_model extends DB_Model
|
||||
/**
|
||||
* Gets Lehrveranstaltungen of a student
|
||||
* @param $student_uid
|
||||
* @param null $studiensemester_kurzbz
|
||||
* @param $studiensemester_kurzbz
|
||||
* @return array|null
|
||||
*/
|
||||
public function getLvsByStudent($student_uid, $studiensemester_kurzbz = null)
|
||||
{
|
||||
$params = array($student_uid);
|
||||
|
||||
$qry = "SELECT * FROM lehre.tbl_lehrveranstaltung
|
||||
WHERE lehrveranstaltung_id IN(SELECT lehrveranstaltung_id FROM campus.vw_student_lehrveranstaltung
|
||||
WHERE uid=?";
|
||||
WHERE lehrveranstaltung_id IN(
|
||||
SELECT lehrveranstaltung_id FROM campus.vw_student_lehrveranstaltung
|
||||
WHERE uid=?";
|
||||
|
||||
if (isset($studiensemester_kurzbz))
|
||||
{
|
||||
$qry .= " AND studiensemester_kurzbz=?";
|
||||
$params[] = $studiensemester_kurzbz;
|
||||
$qry .= " AND studiensemester_kurzbz=?";
|
||||
}
|
||||
$qry .= ") OR lehrveranstaltung_id IN(SELECT lehrveranstaltung_id FROM lehre.tbl_zeugnisnote WHERE student_uid=?";
|
||||
$qry .= ")";
|
||||
|
||||
$qry .= " OR lehrveranstaltung_id IN(
|
||||
SELECT lehrveranstaltung_id FROM lehre.tbl_zeugnisnote
|
||||
WHERE student_uid=?";
|
||||
$params[] = $student_uid;
|
||||
if (isset($studiensemester_kurzbz))
|
||||
{
|
||||
$qry .= " AND studiensemester_kurzbz=?";
|
||||
$params[] = $studiensemester_kurzbz;
|
||||
}
|
||||
|
||||
$qry .= ") ORDER BY semester, bezeichnung";
|
||||
|
||||
return $this->execQuery($qry, $params);
|
||||
@@ -608,7 +504,11 @@ class Lehrveranstaltung_model extends DB_Model
|
||||
$this->addSelect($lvbezeichnung . ' AS bezeichnung');
|
||||
$this->addSelect($sgbezeichnung . ' AS sg_bezeichnung');
|
||||
$this->addSelect('UPPER(sg.typ::VARCHAR(1) || sg.kurzbz) AS studiengang_kuerzel');
|
||||
|
||||
|
||||
//also adds returns the index of the grade
|
||||
//TODO: ist zeugnissnote immer gleich wie die lvgesamtnote
|
||||
$this->addSelect('COALESCE(zn.note::numeric,gn.note::numeric) as note_index');
|
||||
$this->addSelect('COALESCE(znn.positiv,gnn.positiv) as positiv');
|
||||
$this->addSelect('COALESCE(gnn.' . $bezeichnung . ', gnn.bezeichnung, gn.note::text) AS lvnote');
|
||||
$this->addSelect('COALESCE(znn.' . $bezeichnung . ', znn.bezeichnung, zn.note::text) AS znote');
|
||||
|
||||
@@ -806,6 +706,28 @@ class Lehrveranstaltung_model extends DB_Model
|
||||
return $this->execQuery($qry);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if given LV is a template (Quellkurs)
|
||||
*
|
||||
* @param $lehrveranstaltung_id
|
||||
* @return array|stdClass|void
|
||||
*/
|
||||
public function checkIsTemplate($lehrveranstaltung_id)
|
||||
{
|
||||
$this->addSelect('lehrtyp_kurzbz, lehrveranstaltung_template_id');
|
||||
$result = $this->load($lehrveranstaltung_id);
|
||||
|
||||
if (isError($result))
|
||||
return error(getError($result));
|
||||
|
||||
if (hasData($result))
|
||||
{
|
||||
return success(
|
||||
getData($result)[0]->lehrtyp_kurzbz === 'tpl' &&
|
||||
getData($result)[0]->lehrveranstaltung_template_id === null
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get ECTS Summe pro angerechnetes Quereinstiegssemester.
|
||||
@@ -1043,4 +965,27 @@ class Lehrveranstaltung_model extends DB_Model
|
||||
$res = $this->execReadOnlyQuery($query);
|
||||
return $res;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets lehrveranstaltungen of a studiengang
|
||||
* @param integer $studiengang_kz
|
||||
* @return array|null
|
||||
*/
|
||||
public function getLvsByStudiengangkz($studiengang_kz)
|
||||
{
|
||||
$params = array($studiengang_kz);
|
||||
|
||||
$qry = "SELECT
|
||||
*
|
||||
FROM
|
||||
lehre.tbl_lehrveranstaltung
|
||||
WHERE lehrveranstaltung_id IN
|
||||
(SELECT lehrveranstaltung_id
|
||||
FROM campus.vw_student_lehrveranstaltung
|
||||
WHERE studiengang_kz = ?";
|
||||
|
||||
$qry .= ") ORDER BY semester, bezeichnung";
|
||||
|
||||
return $this->execQuery($qry, $params);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
class Note_model extends DB_Model
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->dbTable = 'lehre.tbl_note';
|
||||
$this->pk = 'note';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
class Pruefungsantritt_model extends DB_Model
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->dbTable = 'lehre.tbl_abschlusspruefung_antritt';
|
||||
$this->pk = 'pruefungsantritt_kurzbz';
|
||||
}
|
||||
}
|
||||
@@ -647,4 +647,135 @@ class Studiengang_model extends DB_Model
|
||||
|
||||
return $this->load();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return stdClass
|
||||
*/
|
||||
public function getStudiengangInfoForNews()
|
||||
{
|
||||
|
||||
$this->load->model('person/Benutzerfunktion_model', 'BenutzerfunktionModel');
|
||||
$this->load->model('person/Person_model', 'PersonModel');
|
||||
$this->load->model('crm/Student_model', 'StudentModel');
|
||||
|
||||
$addEmailProperty= function(&$benutzerfunktionen){
|
||||
if(count($benutzerfunktionen) && defined('DOMAIN'))
|
||||
{
|
||||
$benutzerfunktionen = array_map(function($benutzer)
|
||||
{
|
||||
$benutzer->email = $benutzer->alias."@".DOMAIN;
|
||||
return $benutzer;
|
||||
},$benutzerfunktionen) ;
|
||||
}
|
||||
|
||||
};
|
||||
$addFotoProperty= function(&$collection){
|
||||
$collection = array_map(function($item){
|
||||
$person_id = $this->PersonModel->getByUid($item->uid);
|
||||
if(isError($person_id))
|
||||
return error($person_id);
|
||||
$person_id = current(getData($person_id))->person_id;
|
||||
$this->PersonModel->addSelect('foto');
|
||||
$foto = $this->PersonModel->loadWhere(array('person_id'=>$person_id));
|
||||
if(isError($foto))
|
||||
return error($foto);
|
||||
$foto = current(getData($foto))->foto;
|
||||
$item->foto = $foto;
|
||||
return $item;
|
||||
},$collection);
|
||||
};
|
||||
|
||||
|
||||
$this->load->model('crm/Student_model', 'StudentModel');
|
||||
|
||||
$student = $this->StudentModel->loadWhere(['student_uid' => getAuthUID()]);
|
||||
if (isError($student))
|
||||
return error($student);
|
||||
if (getData($student)) {
|
||||
$student = current(getData($student));
|
||||
$studiengang_kz = $student->studiengang_kz;
|
||||
$semester = $student->semester;
|
||||
}
|
||||
|
||||
$stg_obj = $this->load($studiengang_kz);
|
||||
if(isError($stg_obj))
|
||||
return error($stg_obj);
|
||||
if(getData($stg_obj))
|
||||
{
|
||||
$stg_obj = current(getData($stg_obj));
|
||||
}
|
||||
|
||||
$stg_ltg = $this->getLeitungDetailed($stg_obj->studiengang_kz);
|
||||
if (isError($stg_ltg))
|
||||
return $stg_ltg;
|
||||
$stg_ltg = getData($stg_ltg) ?: [];
|
||||
$addFotoProperty($stg_ltg);
|
||||
|
||||
$gf_ltg = $this->BenutzerfunktionModel->getBenutzerFunktionenDetailed('gLtg', $stg_obj->oe_kurzbz);
|
||||
if (isError($gf_ltg))
|
||||
return $gf_ltg;
|
||||
$gf_ltg = getData($gf_ltg) ?: [];
|
||||
$addEmailProperty($gf_ltg);
|
||||
|
||||
$stv_ltg = $this->BenutzerfunktionModel->getBenutzerFunktionenDetailed('stvLtg', $stg_obj->oe_kurzbz);
|
||||
if (isError($stv_ltg))
|
||||
return $stv_ltg;
|
||||
$stv_ltg = getData($stv_ltg) ?: [];
|
||||
$addEmailProperty($stv_ltg);
|
||||
|
||||
$ass = $this->BenutzerfunktionModel->getBenutzerFunktionenDetailed('ass', $stg_obj->oe_kurzbz);
|
||||
if (isError($ass))
|
||||
return $ass;
|
||||
$ass = getData($ass) ?: [];
|
||||
$addEmailProperty($ass);
|
||||
$addFotoProperty($ass);
|
||||
|
||||
$hochschulvertr = $this->BenutzerfunktionModel->getBenutzerFunktionenDetailed('hsv');
|
||||
if (isError($hochschulvertr))
|
||||
return $hochschulvertr;
|
||||
$hochschulvertr = getData($hochschulvertr) ?: [];
|
||||
$addEmailProperty($hochschulvertr);
|
||||
|
||||
|
||||
$stdv = $this->BenutzerfunktionModel->getBenutzerFunktionenDetailed('stdv', $stg_obj->oe_kurzbz);
|
||||
if (isError($stdv))
|
||||
return $stdv;
|
||||
$stdv = getData($stdv) ?: [];
|
||||
$addEmailProperty($stdv);
|
||||
|
||||
|
||||
$jahrgangsvertr = $this->BenutzerfunktionModel->getBenutzerFunktionenDetailed('jgv', $stg_obj->oe_kurzbz, $semester);
|
||||
if (isError($jahrgangsvertr))
|
||||
return $jahrgangsvertr;
|
||||
$jahrgangsvertr = getData($jahrgangsvertr) ?: [];
|
||||
$addEmailProperty($jahrgangsvertr);
|
||||
|
||||
|
||||
$result_object = new stdClass();
|
||||
$result_object->studiengang = $stg_obj;
|
||||
$result_object->semester = $semester;
|
||||
$result_object->stg_ltg = $stg_ltg;
|
||||
$result_object->gf_ltg = $gf_ltg;
|
||||
$result_object->stv_ltg = $stv_ltg;
|
||||
$result_object->ass = $ass;
|
||||
$result_object->hochschulvertr = $hochschulvertr;
|
||||
$result_object->stdv = $stdv;
|
||||
$result_object->jahrgangsvertr = $jahrgangsvertr;
|
||||
|
||||
return success($result_object);
|
||||
}
|
||||
|
||||
public function getLvaForStudiengangInStudiensemester($studiengang_kz, $orgform_kurzbz, $studiensemester_kurzbz) {
|
||||
$qry = '
|
||||
SELECT DISTINCT ON (lehre.tbl_lehrveranstaltung.lehrveranstaltung_id,
|
||||
kurzbz, bezeichnung, semester,
|
||||
lehre.tbl_lehrveranstaltung.sprache, orgform_kurzbz,
|
||||
lehre.tbl_lehrveranstaltung.lehrform_kurzbz)
|
||||
lehre.tbl_lehrveranstaltung.lehrveranstaltung_id, kurzbz, bezeichnung,
|
||||
semester, lehre.tbl_lehrveranstaltung.sprache, orgform_kurzbz, lehre.tbl_lehrveranstaltung.lehrform_kurzbz
|
||||
FROM lehre.tbl_lehrveranstaltung JOIN lehre.tbl_lehreinheit USING(lehrveranstaltung_id) JOIN lehre.tbl_lehreinheitmitarbeiter USING(lehreinheit_id)
|
||||
WHERE aktiv = TRUE AND studiengang_kz = ? AND orgform_kurzbz = ? AND tbl_lehreinheit.studiensemester_kurzbz IN ?';
|
||||
|
||||
return $this->execReadOnlyQuery($qry, array($studiengang_kz, $orgform_kurzbz, $studiensemester_kurzbz));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
class Studienjahr_model extends DB_Model
|
||||
{
|
||||
|
||||
@@ -29,6 +30,22 @@ class Studienjahr_model extends DB_Model
|
||||
|
||||
return $this->execQuery($query);
|
||||
}
|
||||
public function getNextStudienjahr()
|
||||
{
|
||||
$this->addJoin('public.tbl_studiensemester', 'studienjahr_kurzbz');
|
||||
$this->addOrder('start');
|
||||
$this->addLimit(1);
|
||||
|
||||
return $this->loadWhere(['start >' => 'NOW()']);
|
||||
}
|
||||
public function getNextFrom($studienjahr_kurzbz)
|
||||
{
|
||||
$this->addLimit(1);
|
||||
|
||||
return $this->loadWhere([
|
||||
'studienjahr_kurzbz >' => $studienjahr_kurzbz
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current Studienjahr. During the summer term, continue using the previous Studienjahr.
|
||||
@@ -38,8 +55,7 @@ class Studienjahr_model extends DB_Model
|
||||
*/
|
||||
public function getLastOrAktStudienjahr($days = 60)
|
||||
{
|
||||
if (!is_numeric($days))
|
||||
{
|
||||
if (!is_numeric($days)) {
|
||||
$days = 60;
|
||||
}
|
||||
|
||||
@@ -63,8 +79,7 @@ class Studienjahr_model extends DB_Model
|
||||
*/
|
||||
public function getAktOrNextStudienjahr($days = 62)
|
||||
{
|
||||
if (!is_numeric($days))
|
||||
{
|
||||
if (!is_numeric($days)) {
|
||||
$days = 62;
|
||||
}
|
||||
|
||||
|
||||
@@ -170,13 +170,31 @@ class Studiensemester_model extends DB_Model
|
||||
return $this->execQuery($query, array($studiensemester_kurzbz, $studiengang_kz));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a Studiensemester for a date
|
||||
* @param $date
|
||||
* @return string
|
||||
*/
|
||||
public function getByDate($date)
|
||||
{
|
||||
// gets the studiensemster of a date or the next closest previous studiensemester if a date is not within a studiensemester
|
||||
$query = "
|
||||
SELECT studiensemester_kurzbz, start, ende
|
||||
FROM public.tbl_studiensemester
|
||||
WHERE ( ende >= ?::date AND start <= ?::date ) OR ( ende >= ?::date + '-45 days'::interval AND start <= ?::date + '-45 days'::interval )
|
||||
ORDER BY start DESC
|
||||
LIMIT 1";
|
||||
|
||||
return $this->execQuery($query, array($date,$date,$date,$date));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all Studiensemester between two dates
|
||||
* @param $from
|
||||
* @param $to
|
||||
* @return array|null
|
||||
*/
|
||||
public function getByDate($from, $to)
|
||||
public function getByDateRange($from, $to)
|
||||
{
|
||||
if (date_format(date_create($from), 'Y-m-d') > (date_format(date_create($to), 'Y-m-d')))
|
||||
return success(array());
|
||||
@@ -207,7 +225,7 @@ class Studiensemester_model extends DB_Model
|
||||
|
||||
/**
|
||||
* @param string $student_uid
|
||||
*
|
||||
*
|
||||
* @return StdClass
|
||||
*/
|
||||
public function getWhereStudentHasLvs($student_uid)
|
||||
@@ -220,7 +238,7 @@ class Studiensemester_model extends DB_Model
|
||||
$this->db->where("v.lehreverzeichnis<>''");
|
||||
|
||||
$this->addOrder($this->dbTable . '.start');
|
||||
|
||||
|
||||
return $this->loadWhere(['uid' => $student_uid, 'v.lehre' => true]);
|
||||
}
|
||||
|
||||
@@ -273,6 +291,42 @@ class Studiensemester_model extends DB_Model
|
||||
return $studienjahrNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Studienjahr by Studiensemester.
|
||||
*
|
||||
* @param $studiensemester_kurzbz
|
||||
* @return array|stdClass
|
||||
*/
|
||||
public function getStudienjahrByStudiensemester($studiensemester_kurzbz)
|
||||
{
|
||||
$studienjahrObj = null;
|
||||
|
||||
if (!is_numeric($studiensemester_kurzbz))
|
||||
{
|
||||
$this->StudiensemesterModel->addSelect('studienjahr_kurzbz');
|
||||
$result = $this->StudiensemesterModel->loadWhere(array('studiensemester_kurzbz =' => $studiensemester_kurzbz));
|
||||
}
|
||||
|
||||
if (hasData($result))
|
||||
{
|
||||
$studienjahr = getData($result)[0]->studienjahr_kurzbz;
|
||||
$startstudienjahr = substr($studienjahr, 0, 4);
|
||||
$endstudienjahr = substr($studienjahr, 0, 2) . substr($studienjahr, -2);
|
||||
|
||||
$studienjahrObj = new StdClass();
|
||||
|
||||
$studienjahrObj->studienjahr_kurzbz = $studienjahr;
|
||||
$studienjahrObj->startstudienjahr = $startstudienjahr;
|
||||
$studienjahrObj->endstudienjahr= $endstudienjahr;
|
||||
}
|
||||
|
||||
if (isError($result)) {
|
||||
return error(getError($result));
|
||||
}
|
||||
|
||||
return success($studienjahrObj);
|
||||
}
|
||||
|
||||
/**
|
||||
* Holt Start und Ende des Studiensemester_kurzbz
|
||||
* @param studiensemester_kurzbz
|
||||
|
||||
@@ -156,10 +156,10 @@ class Notiz_model extends DB_Model
|
||||
$qry = "
|
||||
SELECT
|
||||
n.*, count(dms_id) as countDoc, z.notizzuordnung_id,
|
||||
TO_CHAR (CASE
|
||||
(CASE
|
||||
WHEN n.updateamum >= n.insertamum THEN n.updateamum
|
||||
ELSE n.insertamum
|
||||
END::timestamp, 'DD.MM.YYYY HH24:MI:SS') AS lastUpdate,
|
||||
END) AS lastUpdate,
|
||||
regexp_replace(n.text, '<[^>]*>', '', 'g') as text_stripped,
|
||||
TO_CHAR(n.start::timestamp, 'DD.MM.YYYY') AS start_format,
|
||||
TO_CHAR(n.ende::timestamp, 'DD.MM.YYYY') AS ende_format,
|
||||
|
||||
@@ -115,13 +115,18 @@ class Betriebsmittelperson_model extends DB_Model
|
||||
|
||||
$query = "
|
||||
SELECT
|
||||
bm.nummer, bmp.person_id, bm.betriebsmitteltyp, bmp.anmerkung as anmerkung, bmp.retouram, TO_CHAR(bmp.retouram::timestamp, 'DD.MM.YYYY') AS format_retour, bmp.ausgegebenam, TO_CHAR(bmp.ausgegebenam::timestamp, 'DD.MM.YYYY') AS format_ausgabe, bm.beschreibung, bmp.uid, bmp.kaution, bm.betriebsmittel_id, bmp.betriebsmittelperson_id, bm.inventarnummer, bm.nummer2
|
||||
bm.nummer, bmp.person_id, bm.betriebsmitteltyp, bmp.anmerkung as anmerkung,
|
||||
bmp.retouram,
|
||||
bmp.ausgegebenam,
|
||||
bm.beschreibung, bmp.uid, bmp.kaution,
|
||||
bm.betriebsmittel_id, bmp.betriebsmittelperson_id,
|
||||
bm.inventarnummer, bm.nummer2
|
||||
FROM
|
||||
wawi.tbl_betriebsmittelperson bmp
|
||||
wawi.tbl_betriebsmittelperson bmp
|
||||
JOIN
|
||||
wawi.tbl_betriebsmittel bm ON (bmp.betriebsmittel_id = bm.betriebsmittel_id)
|
||||
wawi.tbl_betriebsmittel bm ON (bmp.betriebsmittel_id = bm.betriebsmittel_id)
|
||||
WHERE
|
||||
" . $cond . " = ? ";
|
||||
" . $cond . " = ? ";
|
||||
|
||||
return $this->execQuery($query, array($id));
|
||||
}
|
||||
|
||||
@@ -217,12 +217,28 @@ class Mitarbeiter_model extends DB_Model
|
||||
return success($kurzbz);
|
||||
}
|
||||
|
||||
public function searchMitarbeiter($filter)
|
||||
/**
|
||||
* Search function for mitarbeiter
|
||||
* @param $filter searchstring: searches for nachname, vorname, mitarbeiter_uid
|
||||
* $param $mode gives the resultobject in different version:
|
||||
* null : "[mitarbeiter_uid], Nachname, Vorname, (mitarbeiter_uid)"
|
||||
* 'mitAkadGrad': "[mitarbeiter_uid], Nachname, Vorname, Titelpre, Titelpost (mitarbeiter_uid)"
|
||||
* 'ohneMaUid' : "[mitarbeiter_uid], Nachname, Vorname, Titelpre, Titelpost"
|
||||
* @return object in 3 versions
|
||||
*/
|
||||
public function searchMitarbeiter($filter, $mode=null)
|
||||
{
|
||||
$filter = strtoLower($filter);
|
||||
|
||||
if ($mode == "mitAkadGrad")
|
||||
$returnwert = "ma.mitarbeiter_uid, CONCAT(p.nachname, ' ', p.vorname, ' ', p.titelpost, ' ', p.titelpre, ' (', ma.mitarbeiter_uid , ')') as mitarbeiter";
|
||||
elseif ($mode == "ohneMaUid")
|
||||
$returnwert = "p.person_id, CONCAT(p.nachname, ' ', p.vorname, ' ', p.titelpost, ' ', p.titelpre) as mitarbeiter";
|
||||
else
|
||||
$returnwert = "ma.mitarbeiter_uid, CONCAT(p.nachname, ' ', p.vorname, ' (', ma.mitarbeiter_uid , ')') as mitarbeiter";
|
||||
|
||||
$qry = "
|
||||
SELECT
|
||||
ma.mitarbeiter_uid, CONCAT(p.nachname, ' ', p.vorname, ' (', ma.mitarbeiter_uid , ')') as mitarbeiter
|
||||
SELECT " . $returnwert . "
|
||||
FROM
|
||||
public.tbl_mitarbeiter ma
|
||||
JOIN
|
||||
@@ -238,4 +254,28 @@ class Mitarbeiter_model extends DB_Model
|
||||
|
||||
return $this->execQuery($qry);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets Mitarbeiter for a certain Lehrveranstaltung.
|
||||
*
|
||||
* @param $lehrveranstaltung_id
|
||||
* @return array with Mitarbeiter and their Lehreinheiten
|
||||
*/
|
||||
public function getMitarbeiterFromLV($lehrveranstaltung_id){
|
||||
//TODO(manu) maybe filter that in pruefungslist.js ?
|
||||
$qry = "SELECT DISTINCT
|
||||
lehrveranstaltung_id, uid, vorname, wahlname, vornamen, nachname, titelpre, titelpost, kurzbz, mitarbeiter_uid
|
||||
FROM
|
||||
lehre.tbl_lehreinheitmitarbeiter, campus.vw_mitarbeiter, lehre.tbl_lehreinheit
|
||||
WHERE
|
||||
lehrveranstaltung_id= ?
|
||||
AND
|
||||
mitarbeiter_uid=uid
|
||||
AND
|
||||
tbl_lehreinheitmitarbeiter.lehreinheit_id=tbl_lehreinheit.lehreinheit_id;";
|
||||
|
||||
$parametersArray = array($lehrveranstaltung_id);
|
||||
|
||||
return $this->execQuery($qry, $parametersArray);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,6 +71,51 @@ class Reservierung_model extends DB_Model
|
||||
return $query_result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $uid
|
||||
*
|
||||
* @return stdClass
|
||||
*/
|
||||
public function getReservierungenMitarbeiter($start_date, $end_date, $ort_kurzbz = null)
|
||||
{
|
||||
|
||||
$raum_reservierungen_query = "SELECT res.*, beginn, ende,
|
||||
CASE
|
||||
WHEN res.gruppe_kurzbz IS NOT NULL THEN res.gruppe_kurzbz
|
||||
ELSE CONCAT(UPPER(studg.typ),UPPER(studg.kurzbz),'-',COALESCE(CAST(res.semester AS varchar),'/'),COALESCE(CAST(res.verband AS varchar),'/'))
|
||||
END as gruppen_kuerzel
|
||||
FROM campus.vw_reservierung res
|
||||
JOIN public.tbl_studiengang studg ON studg.studiengang_kz=res.studiengang_kz
|
||||
JOIN lehre.tbl_stunde ON lehre.tbl_stunde.stunde = res.stunde
|
||||
WHERE res.uid = ? AND datum >= ? AND datum <= ?";
|
||||
|
||||
// $subquery = is_null($ort_kurzbz)? $stundenplan_reservierungen_query:$raum_reservierungen_query;
|
||||
$subquery = $raum_reservierungen_query;
|
||||
|
||||
|
||||
$query_result= $this->execReadOnlyQuery("
|
||||
SELECT
|
||||
'reservierung' as type, beginn, ende, datum,
|
||||
COALESCE(titel, beschreibung) as topic,
|
||||
array_agg(DISTINCT mitarbeiter_kurzbz) as lektor,
|
||||
array_agg(DISTINCT (gruppe,verband,semester,studiengang_kz,gruppen_kuerzel)) as gruppe,
|
||||
|
||||
ort_kurzbz, 'FFFFFF' as farbe
|
||||
|
||||
FROM
|
||||
(
|
||||
". $subquery ."
|
||||
) AS subquery
|
||||
|
||||
GROUP BY datum, beginn, ende, ort_kurzbz, titel, beschreibung
|
||||
|
||||
ORDER BY datum, beginn
|
||||
", [getAuthUID(), $start_date, $end_date]);
|
||||
|
||||
|
||||
return $query_result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $uid
|
||||
*
|
||||
|
||||
@@ -186,9 +186,119 @@ class Stundenplan_model extends DB_Model
|
||||
return $query_result;
|
||||
}
|
||||
|
||||
/**
|
||||
* queries Stundenplan but for a whole lva, irrespective of who is requesting it
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function getStundenplanLVA($start_date, $end_date, $lv_id) {
|
||||
return $this->execReadOnlyQuery("
|
||||
|
||||
SELECT
|
||||
'lehreinheit' as type, beginn, ende, datum,
|
||||
CONCAT(lehrfach,'-',lehrform) as topic,
|
||||
array_agg(DISTINCT lektor) as lektor,
|
||||
array_agg(DISTINCT (gruppe,verband,semester,studiengang_kz,gruppen_kuerzel)) as gruppe,
|
||||
string_agg(DISTINCT ort_kurzbz, '/') as ort_kurzbz,
|
||||
array_agg(DISTINCT lehreinheit_id) as lehreinheit_id,
|
||||
|
||||
titel, lehrfach, lehrform, lehrfach_bez, organisationseinheit, farbe, lehrveranstaltung_id
|
||||
|
||||
FROM
|
||||
(
|
||||
SELECT unr,datum,beginn, ende,
|
||||
CASE
|
||||
WHEN sp.mitarbeiter_kurzbz IS NOT NULL THEN sp.mitarbeiter_kurzbz
|
||||
ELSE lektor
|
||||
END as lektor,
|
||||
CASE
|
||||
WHEN gruppe_kurzbz IS NOT NULL THEN gruppe_kurzbz
|
||||
ELSE CONCAT(UPPER(sp.stg_typ),UPPER(sp.stg_kurzbz),'-',COALESCE(CAST(sp.semester AS varchar),'/'),COALESCE(CAST(sp.verband AS varchar),'/'))
|
||||
END as gruppen_kuerzel,
|
||||
(SELECT bezeichnung
|
||||
FROM public.tbl_organisationseinheit
|
||||
WHERE oe_kurzbz IN(
|
||||
SELECT oe_kurzbz
|
||||
FROM lehre.tbl_lehrveranstaltung
|
||||
WHERE lehrveranstaltung_id = sp.lehrveranstaltung_id
|
||||
)) as organisationseinheit,
|
||||
ort_kurzbz, studiengang_kz, titel,lehreinheit_id,lehrfach_id,anmerkung,fix,lehrveranstaltung_id,stg_kurzbzlang,stg_bezeichnung,stg_typ,fachbereich_kurzbz,lehrfach,lehrfach_bez,farbe,lehrform,anmerkung_lehreinheit,gruppe, verband, semester,stg_kurzbz
|
||||
|
||||
FROM (
|
||||
SELECT sp.*
|
||||
FROM lehre.vw_stundenplan sp
|
||||
WHERE
|
||||
sp.datum >= ?
|
||||
AND sp.datum <= ? AND sp.lehrveranstaltung_id = ?
|
||||
) sp
|
||||
JOIN lehre.tbl_stunde ON lehre.tbl_stunde.stunde = sp.stunde
|
||||
|
||||
) as subquery
|
||||
|
||||
GROUP BY unr, datum, beginn, ende, ort_kurzbz, titel, lehrform, lehrfach, lehrfach_bez, organisationseinheit, farbe, lehrveranstaltung_id
|
||||
|
||||
ORDER BY datum, beginn
|
||||
", [$start_date, $end_date, $lv_id]);
|
||||
}
|
||||
|
||||
/**
|
||||
* queries Stundenplan and filters by assigned ma_kurzbz, very similar to get by LVA
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function getStundenplanMitarbeiter($start_date, $end_date, $ma_uid) {
|
||||
return $this->execReadOnlyQuery("
|
||||
|
||||
SELECT
|
||||
'lehreinheit' as type, beginn, ende, datum,
|
||||
CONCAT(lehrfach,'-',lehrform) as topic,
|
||||
array_agg(DISTINCT lektor) as lektor,
|
||||
array_agg(DISTINCT (gruppe,verband,semester,studiengang_kz,gruppen_kuerzel)) as gruppe,
|
||||
string_agg(DISTINCT ort_kurzbz, '/') as ort_kurzbz,
|
||||
array_agg(DISTINCT lehreinheit_id) as lehreinheit_id,
|
||||
|
||||
titel, lehrfach, lehrform, lehrfach_bez, organisationseinheit, farbe, lehrveranstaltung_id
|
||||
|
||||
FROM
|
||||
(
|
||||
SELECT unr,datum,beginn, ende,
|
||||
CASE
|
||||
WHEN sp.mitarbeiter_kurzbz IS NOT NULL THEN sp.mitarbeiter_kurzbz
|
||||
ELSE sp.lektor
|
||||
END as lektor,
|
||||
CASE
|
||||
WHEN gruppe_kurzbz IS NOT NULL THEN gruppe_kurzbz
|
||||
ELSE CONCAT(UPPER(sp.stg_typ),UPPER(sp.stg_kurzbz),'-',COALESCE(CAST(sp.semester AS varchar),'/'),COALESCE(CAST(sp.verband AS varchar),'/'))
|
||||
END as gruppen_kuerzel,
|
||||
(SELECT bezeichnung
|
||||
FROM public.tbl_organisationseinheit
|
||||
WHERE oe_kurzbz IN(
|
||||
SELECT oe_kurzbz
|
||||
FROM lehre.tbl_lehrveranstaltung
|
||||
WHERE lehrveranstaltung_id = sp.lehrveranstaltung_id
|
||||
)) as organisationseinheit,
|
||||
sp.ort_kurzbz, sp.studiengang_kz, sp.titel,sp.lehreinheit_id,sp.lehrfach_id,sp.anmerkung,fix,lehrveranstaltung_id,stg_kurzbzlang,stg_bezeichnung,stg_typ,fachbereich_kurzbz,lehrfach,lehrfach_bez,farbe,lehrform,anmerkung_lehreinheit,gruppe, verband, semester,stg_kurzbz
|
||||
|
||||
FROM (
|
||||
SELECT sp.*
|
||||
FROM lehre.vw_stundenplan sp
|
||||
WHERE
|
||||
sp.datum >= ?
|
||||
AND sp.datum <= ?
|
||||
) sp
|
||||
JOIN lehre.tbl_stunde ON lehre.tbl_stunde.stunde = sp.stunde
|
||||
JOIN public.tbl_mitarbeiter ON public.tbl_mitarbeiter.kurzbz = sp.mitarbeiter_kurzbz
|
||||
WHERE mitarbeiter_uid = ?
|
||||
|
||||
) as subquery
|
||||
|
||||
GROUP BY unr, datum, beginn, ende, ort_kurzbz, titel, lehrform, lehrfach, lehrfach_bez, organisationseinheit, farbe, lehrveranstaltung_id
|
||||
|
||||
ORDER BY datum, beginn", [$start_date, $end_date, $ma_uid]);
|
||||
}
|
||||
|
||||
/**
|
||||
* NO STANDALONE FUNCTION - Generates a SQL query string to fetch 'stundenplan' events for a specific student within the current semester.
|
||||
* @param string $uid the user id that is used to fetch the stundenplan rows from the lehre.vw_stundenplan table
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
|
||||
@@ -33,41 +33,84 @@ class Gehaltsbestandteil_model extends DB_Model implements IEncryption
|
||||
$datestring = $date->format("Y-m-d");
|
||||
|
||||
$qry = "
|
||||
SELECT
|
||||
gehaltsbestandteil_id,
|
||||
gbt.von,
|
||||
gbt.bis,
|
||||
gbt.anmerkung,
|
||||
gbt.dienstverhaeltnis_id,
|
||||
gehaltstyp_kurzbz,
|
||||
valorisierungssperre,
|
||||
gbt.valorisierung,
|
||||
grundbetrag as grund_betrag_decrypted,
|
||||
betrag_valorisiert as betrag_val_decrypted,
|
||||
gt.bezeichnung as gehaltstyp_bezeichnung,
|
||||
vb.vertragsbestandteiltyp_kurzbz,
|
||||
bf.funktion_kurzbz,
|
||||
bf.oe_kurzbz,
|
||||
fkt.beschreibung as fkt_beschreibung,
|
||||
fb.bezeichnung as fb_bezeichnung,
|
||||
org.bezeichnung as org_bezeichnung,
|
||||
freitext.freitexttyp_kurzbz,
|
||||
freitext.titel as freitext_titel
|
||||
FROM hr.tbl_gehaltsbestandteil gbt LEFT JOIN hr.tbl_gehaltstyp gt using(gehaltstyp_kurzbz)
|
||||
LEFT JOIN hr.tbl_vertragsbestandteil vb using(vertragsbestandteil_id)
|
||||
LEFT JOIN hr.tbl_vertragsbestandteil_funktion vbf using(vertragsbestandteil_id)
|
||||
LEFT JOIN public.tbl_benutzerfunktion bf using(benutzerfunktion_id)
|
||||
LEFT JOIN public.tbl_funktion fkt using(funktion_kurzbz)
|
||||
LEFT JOIN public.tbl_fachbereich fb using(fachbereich_kurzbz)
|
||||
LEFT JOIN public.tbl_organisationseinheit org on (bf.oe_kurzbz=org.oe_kurzbz)
|
||||
LEFT JOIN hr.tbl_vertragsbestandteil_freitext freitext on(vb.vertragsbestandteil_id=freitext.vertragsbestandteil_id)
|
||||
WHERE gbt.dienstverhaeltnis_id=? AND
|
||||
(gbt.von<=? and (gbt.bis is null OR gbt.bis>=?))
|
||||
ORDER BY gt.sort
|
||||
with gbt as (
|
||||
select
|
||||
gb.gehaltsbestandteil_id,
|
||||
gb.von,
|
||||
gb.bis,
|
||||
gb.anmerkung,
|
||||
gb.dienstverhaeltnis_id,
|
||||
gb.gehaltstyp_kurzbz,
|
||||
gb.valorisierungssperre,
|
||||
gb.valorisierung,
|
||||
gb.grundbetrag as grund_betrag_decrypted,
|
||||
coalesce(vh.betrag_valorisiert, gb.grundbetrag) as betrag_val_decrypted,
|
||||
gb.vertragsbestandteil_id
|
||||
from
|
||||
hr.tbl_gehaltsbestandteil gb
|
||||
LEFT JOIN
|
||||
hr.tbl_valorisierung_historie vh ON vh.gehaltsbestandteil_id = gb.gehaltsbestandteil_id AND vh.valorisierungsdatum = (
|
||||
SELECT
|
||||
vi.valorisierungsdatum
|
||||
FROM
|
||||
hr.tbl_valorisierung_instanz vi
|
||||
JOIN
|
||||
hr.tbl_dienstverhaeltnis d ON d.dienstverhaeltnis_id = ?
|
||||
AND d.oe_kurzbz = vi.oe_kurzbz
|
||||
WHERE
|
||||
? >= valorisierungsdatum
|
||||
ORDER BY
|
||||
valorisierungsdatum DESC
|
||||
LIMIT 1
|
||||
)
|
||||
where
|
||||
dienstverhaeltnis_id = ?
|
||||
and (
|
||||
? BETWEEN COALESCE(von, '1970-01-01'::date) AND COALESCE(bis, '2170-01-01'::date)
|
||||
)
|
||||
)
|
||||
select
|
||||
gbt.gehaltsbestandteil_id,
|
||||
gbt.von,
|
||||
gbt.bis,
|
||||
gbt.anmerkung,
|
||||
gbt.dienstverhaeltnis_id,
|
||||
gbt.gehaltstyp_kurzbz,
|
||||
gbt.valorisierungssperre,
|
||||
gbt.valorisierung,
|
||||
gbt.grund_betrag_decrypted,
|
||||
gbt.betrag_val_decrypted,
|
||||
gt.bezeichnung as gehaltstyp_bezeichnung,
|
||||
vb.vertragsbestandteiltyp_kurzbz,
|
||||
bf.funktion_kurzbz,
|
||||
bf.oe_kurzbz,
|
||||
fkt.beschreibung as fkt_beschreibung,
|
||||
fb.bezeichnung as fb_bezeichnung,
|
||||
org.bezeichnung as org_bezeichnung,
|
||||
freitext.freitexttyp_kurzbz,
|
||||
freitext.titel as freitext_titel
|
||||
from
|
||||
gbt
|
||||
LEFT JOIN
|
||||
hr.tbl_gehaltstyp gt using(gehaltstyp_kurzbz)
|
||||
LEFT JOIN
|
||||
hr.tbl_vertragsbestandteil vb using(vertragsbestandteil_id)
|
||||
LEFT JOIN
|
||||
hr.tbl_vertragsbestandteil_funktion vbf using(vertragsbestandteil_id)
|
||||
LEFT JOIN
|
||||
public.tbl_benutzerfunktion bf using(benutzerfunktion_id)
|
||||
LEFT JOIN
|
||||
public.tbl_funktion fkt using(funktion_kurzbz)
|
||||
LEFT JOIN
|
||||
public.tbl_fachbereich fb using(fachbereich_kurzbz)
|
||||
LEFT JOIN
|
||||
public.tbl_organisationseinheit org on (bf.oe_kurzbz=org.oe_kurzbz)
|
||||
LEFT JOIN
|
||||
hr.tbl_vertragsbestandteil_freitext freitext on(vb.vertragsbestandteil_id=freitext.vertragsbestandteil_id)
|
||||
";
|
||||
|
||||
return $this->execQuery($qry,
|
||||
array($dienstverhaeltnis_id, $datestring, $datestring),
|
||||
array($dienstverhaeltnis_id, $datestring, $dienstverhaeltnis_id, $datestring),
|
||||
$this->getEncryptedColumns());
|
||||
}
|
||||
|
||||
@@ -86,9 +129,38 @@ class Gehaltsbestandteil_model extends DB_Model implements IEncryption
|
||||
array($dienstverhaeltnis_id),
|
||||
$this->getEncryptedColumns());
|
||||
}
|
||||
|
||||
|
||||
public function getGehaltsbestandteile($dienstverhaeltnis_id, $stichtag=null, $includefuture=false)
|
||||
public function getGehaltsbestandteile($dienstverhaeltnis_id, $stichtag=null,
|
||||
$includefuture=false, $withvalorisationhistory=true)
|
||||
{
|
||||
if( !is_null($stichtag) && (time() > strtotime($stichtag))
|
||||
&& $withvalorisationhistory !== false )
|
||||
{
|
||||
$query = $this->getGehaltsbestandteileMitValorisierungsHistorie(
|
||||
$dienstverhaeltnis_id, $stichtag, $includefuture
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query = $this->getGehaltsbestandteileOhneValorisierungsHistorie(
|
||||
$dienstverhaeltnis_id, $stichtag, $includefuture
|
||||
);
|
||||
}
|
||||
|
||||
$gehaltsbestandteile = array();
|
||||
if( null !== ($rows = getData($query)) )
|
||||
{
|
||||
foreach( $rows as $row ) {
|
||||
$tmpgb = new Gehaltsbestandteil();
|
||||
$tmpgb->hydrateByStdClass($row, true);
|
||||
$gehaltsbestandteile[] = $tmpgb;
|
||||
}
|
||||
}
|
||||
|
||||
return $gehaltsbestandteile;
|
||||
}
|
||||
|
||||
protected function getGehaltsbestandteileOhneValorisierungsHistorie($dienstverhaeltnis_id, $stichtag=null, $includefuture=false)
|
||||
{
|
||||
$stichtagclause = '';
|
||||
if( !is_null($stichtag) )
|
||||
@@ -111,25 +183,145 @@ class Gehaltsbestandteil_model extends DB_Model implements IEncryption
|
||||
{$stichtagclause}
|
||||
EOSQL;
|
||||
|
||||
$query = $this->loadWhere(
|
||||
$result = $this->loadWhere(
|
||||
$where,
|
||||
$this->getEncryptedColumns()
|
||||
);
|
||||
return $result;
|
||||
}
|
||||
|
||||
protected function getGehaltsbestandteileMitValorisierungsHistorie($dienstverhaeltnis_id, $stichtag, $includefuture=false)
|
||||
{
|
||||
$date = strftime('%Y-%m-%d', strtotime($stichtag));
|
||||
$includefuture_clause = ($includefuture)
|
||||
? ' OR COALESCE(von, \'1970-01-01\'::date) > ' . $this->escape($date)
|
||||
: '';
|
||||
$sql = <<<EOSQL
|
||||
SELECT
|
||||
g.gehaltsbestandteil_id,
|
||||
g.dienstverhaeltnis_id,
|
||||
g.vertragsbestandteil_id,
|
||||
g.gehaltstyp_kurzbz,
|
||||
g.von,
|
||||
g.bis,
|
||||
g.anmerkung,
|
||||
g.grundbetrag AS grundbetrag,
|
||||
COALESCE(vh.betrag_valorisiert, g.grundbetrag) AS betrag_valorisiert,
|
||||
g.valorisierungssperre,
|
||||
g.insertamum,
|
||||
g.insertvon,
|
||||
g.updateamum,
|
||||
g.updatevon,
|
||||
g.valorisierung,
|
||||
g.auszahlungen
|
||||
FROM
|
||||
hr.tbl_gehaltsbestandteil g
|
||||
LEFT JOIN
|
||||
hr.tbl_valorisierung_historie vh ON vh.gehaltsbestandteil_id = g.gehaltsbestandteil_id AND vh.valorisierungsdatum = (
|
||||
SELECT
|
||||
vi.valorisierungsdatum
|
||||
FROM
|
||||
hr.tbl_valorisierung_instanz vi
|
||||
JOIN
|
||||
hr.tbl_dienstverhaeltnis d ON d.dienstverhaeltnis_id = {$this->escape($dienstverhaeltnis_id)}
|
||||
AND d.oe_kurzbz = vi.oe_kurzbz
|
||||
WHERE
|
||||
{$this->escape($date)} >= valorisierungsdatum
|
||||
ORDER BY
|
||||
valorisierungsdatum DESC
|
||||
LIMIT 1
|
||||
)
|
||||
WHERE
|
||||
g.dienstverhaeltnis_id = {$this->escape($dienstverhaeltnis_id)}
|
||||
AND (
|
||||
{$this->escape($date)} BETWEEN COALESCE(von, '1970-01-01'::date) AND COALESCE(bis, '2170-01-01'::date)
|
||||
{$includefuture_clause}
|
||||
)
|
||||
EOSQL;
|
||||
|
||||
$result = $this->execReadOnlyQuery($sql, array(), $this->getEncryptedColumns());
|
||||
return $result;
|
||||
}
|
||||
|
||||
$gehaltsbestandteile = array();
|
||||
public function getGehaltsbestandteileValorisiertForChart($dienstverhaeltnis_id, $stichtag=null, $includefuture=false)
|
||||
{
|
||||
$stichtagclause = '';
|
||||
if( !is_null($stichtag) )
|
||||
{
|
||||
$date = strftime('%Y-%m-%d', strtotime($stichtag));
|
||||
$stichtagclause = 'AND (' . $this->escape($date)
|
||||
. ' BETWEEN COALESCE(von, \'1970-01-01\'::date)'
|
||||
. ' AND COALESCE(bis, \'2170-01-01\'::date)';
|
||||
if( $includefuture )
|
||||
{
|
||||
$stichtagclause .= ' OR COALESCE(von, \'1970-01-01\'::date) > '
|
||||
. $this->escape($date);
|
||||
}
|
||||
$stichtagclause .= ')';
|
||||
}
|
||||
|
||||
// Note: replaced gb.betrag_valorisiert with vh.betrag_valorisiert!
|
||||
$qry = "
|
||||
SELECT
|
||||
gb.gehaltsbestandteil_id,gb.dienstverhaeltnis_id,gb.vertragsbestandteil_id,gb.gehaltstyp_kurzbz,
|
||||
gb.von,gb.bis,gb.anmerkung,gb.grundbetrag as grundbetrag,gb.valorisierungssperre,gb.insertamum,
|
||||
gb.insertvon,gb.updateamum,gb.updatevon,gb.valorisierung,gb.auszahlungen,
|
||||
vh.valorisierungsdatum, vh.betrag_valorisiert as betrag_valorisiert
|
||||
FROM hr.tbl_gehaltsbestandteil gb LEFT JOIN hr.tbl_valorisierung_historie vh using (gehaltsbestandteil_id)
|
||||
WHERE dienstverhaeltnis_id=?
|
||||
$stichtagclause
|
||||
ORDER BY gb.von,vh.valorisierungsdatum, gb.gehaltsbestandteil_id;
|
||||
";
|
||||
|
||||
$query = $this->execQuery($qry,
|
||||
array($dienstverhaeltnis_id),
|
||||
$this->getEncryptedColumns());
|
||||
|
||||
$gehaltsbestandteile = array();
|
||||
if( null !== ($rows = getData($query)) )
|
||||
{
|
||||
// store for preserving the last records of every gehaltsbestandteil_id
|
||||
$lastRecords = array();
|
||||
|
||||
foreach( $rows as $row ) {
|
||||
$tmpgb = new Gehaltsbestandteil();
|
||||
$tmpgb->hydrateByStdClass($row, true);
|
||||
$gehaltsbestandteile[] = $tmpgb;
|
||||
|
||||
// prevent duplication (caused by the join with historic values)
|
||||
if (!isset($lastRecords[(string)$row->gehaltsbestandteil_id])) {
|
||||
$gehaltsbestandteile[] = $tmpgb;
|
||||
$lastRecords[(string)$row->gehaltsbestandteil_id] = $tmpgb;
|
||||
}
|
||||
|
||||
if ($row->betrag_valorisiert != null && $row->valorisierungsdatum != null
|
||||
&& $row->valorisierungsdatum != $row->von && $row->valorisierungsdatum != $row->bis) {
|
||||
|
||||
// create additional row
|
||||
$tmpgbv = new Gehaltsbestandteil();
|
||||
$tmpgbv->hydrateByStdClass($row, true);
|
||||
$tmpgbv->setVon($row->valorisierungsdatum);
|
||||
$tmpgbv->setBis($lastRecords[(string)$row->gehaltsbestandteil_id]->getBis());
|
||||
// overwrite Grundbetrag with the current valorized loan
|
||||
// (otherwise the chart would show the wrong value)
|
||||
$tmpgbv->setGrundbetrag($row->betrag_valorisiert);
|
||||
$gehaltsbestandteile[] = $tmpgbv;
|
||||
|
||||
// finish previous
|
||||
$daybefore = new DateTimeImmutable($row->valorisierungsdatum);
|
||||
$daybefore = $daybefore->sub(new \DateInterval('P1D'));
|
||||
$lastRecords[(string)$row->gehaltsbestandteil_id]->setBis($daybefore->format('Y-m-d'));
|
||||
|
||||
// preserve as last row, because there might be another valorization
|
||||
$lastRecords[(string)$row->gehaltsbestandteil_id] = $tmpgbv;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return $gehaltsbestandteile;
|
||||
}
|
||||
|
||||
|
||||
public function getGehaltsbestandteil($id)
|
||||
{
|
||||
$this->addSelect('*');
|
||||
|
||||
@@ -19,12 +19,17 @@ class Vertragsbestandteil_model extends DB_Model
|
||||
|
||||
protected function getVertragsbestandteilSQL()
|
||||
{
|
||||
$sapInstalled = $this->_checkIfSAPSyncTableExists();
|
||||
|
||||
$oe_kurzbz_sap = $sapInstalled ? 'sap.oe_kurzbz_sap' : 'NULL AS oe_kurzbz_sap';
|
||||
$sap_join = $sapInstalled ? 'LEFT JOIN sync.tbl_sap_organisationsstruktur sap USING(oe_kurzbz)' : '';
|
||||
|
||||
$sql = <<<EOSQL
|
||||
SELECT
|
||||
v.*,
|
||||
bf.funktion_kurzbz, bf.uid AS mitarbeiter_uid,
|
||||
funktion.beschreibung AS funktion_bezeichnung,
|
||||
oe.oe_kurzbz, oe.bezeichnung AS oe_bezeichnung, sap.oe_kurzbz_sap,
|
||||
bf.funktion_kurzbz, bf.uid AS mitarbeiter_uid,
|
||||
funktion.beschreibung AS funktion_bezeichnung,
|
||||
oe.oe_kurzbz, oe.bezeichnung AS oe_bezeichnung, {$oe_kurzbz_sap},
|
||||
oet.organisationseinheittyp_kurzbz AS oe_typ_kurzbz, oet.bezeichnung AS oe_typ_bezeichnung,
|
||||
ft.freitexttyp_kurzbz, ft.titel, ft.anmerkung,
|
||||
f.benutzerfunktion_id,
|
||||
@@ -39,7 +44,7 @@ class Vertragsbestandteil_model extends DB_Model
|
||||
hr.tbl_vertragsbestandteil_freitext ft USING(vertragsbestandteil_id)
|
||||
LEFT JOIN
|
||||
hr.tbl_vertragsbestandteil_funktion f USING(vertragsbestandteil_id)
|
||||
LEFT JOIN
|
||||
LEFT JOIN
|
||||
public.tbl_benutzerfunktion bf USING(benutzerfunktion_id)
|
||||
LEFT JOIN
|
||||
public.tbl_funktion funktion USING(funktion_kurzbz)
|
||||
@@ -47,8 +52,7 @@ class Vertragsbestandteil_model extends DB_Model
|
||||
public.tbl_organisationseinheit oe USING(oe_kurzbz)
|
||||
LEFT JOIN
|
||||
public.tbl_organisationseinheittyp oet USING(organisationseinheittyp_kurzbz)
|
||||
LEFT JOIN
|
||||
sync.tbl_sap_organisationsstruktur sap USING(oe_kurzbz)
|
||||
{$sap_join}
|
||||
LEFT JOIN
|
||||
hr.tbl_vertragsbestandteil_karenz k USING(vertragsbestandteil_id)
|
||||
LEFT JOIN
|
||||
@@ -178,4 +182,30 @@ EOSQL;
|
||||
|
||||
return $vbcount[0]->overlappingvbs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if sap sync table exists.
|
||||
* @return bool
|
||||
*/
|
||||
private function _checkIfSAPSyncTableExists()
|
||||
{
|
||||
$params = array(
|
||||
DB_NAME,
|
||||
'sync',
|
||||
'tbl_sap_organisationsstruktur'
|
||||
);
|
||||
|
||||
$sql = "SELECT
|
||||
1 AS exists
|
||||
FROM
|
||||
information_schema.tables
|
||||
WHERE
|
||||
table_catalog = ? AND
|
||||
table_schema = ? AND
|
||||
table_name = ?";
|
||||
|
||||
$res = $this->execReadOnlyQuery($sql, $params);
|
||||
|
||||
return hasData($res);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
$includesArray =array(
|
||||
'title' => 'Infoterminal',
|
||||
'tabulator5' => true,
|
||||
'primevue3' => true,
|
||||
);
|
||||
$this->load->view(
|
||||
'templates/CISVUE-Header',
|
||||
$includesArray
|
||||
);
|
||||
?>
|
||||
|
||||
<iframe style="width:100%; height:90vh;" id="Infoterminal" src="<?php echo base_url() . 'cis/infoterminal/?forcelogin=true'; ?>" name="Infoterminal" frameborder="0" >
|
||||
No iFrames
|
||||
</iframe>
|
||||
<?php $this->load->view('templates/CISVUE-Footer', $includesArray); ?>
|
||||
@@ -1,15 +0,0 @@
|
||||
<?php
|
||||
$includesArray = array(
|
||||
'title' => 'MyLv',
|
||||
'customJSModules' => ['public/js/apps/Cis/MyLv/Student.js'],
|
||||
'customCSSs' => ['public/css/components/MyLv.css']
|
||||
);
|
||||
|
||||
$this->load->view('templates/CISVUE-Header', $includesArray);
|
||||
?>
|
||||
|
||||
<div id="content">
|
||||
<mylv-student></mylv-student>
|
||||
</div>
|
||||
|
||||
<?php $this->load->view('templates/CISVUE-Footer', $includesArray); ?>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
$includesArray = array(
|
||||
'title' => 'Stundenplan',
|
||||
'title' => 'Profil',
|
||||
'customJSModules' => ['public/js/apps/Cis/Profil.js'],
|
||||
'tabulator5' => true,
|
||||
'primevue3' => true,
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
<?php
|
||||
$includesArray = array(
|
||||
'title' => 'Stundenplan',
|
||||
'customJSModules' => ['public/js/apps/Cis/Stundenplan.js'],
|
||||
'customCSSs' => ['public/css/components/calendar.css']
|
||||
);
|
||||
|
||||
$this->load->view('templates/CISVUE-Header', $includesArray);
|
||||
?>
|
||||
|
||||
<div id="content">
|
||||
|
||||
</div>
|
||||
|
||||
<?php $this->load->view('templates/CISVUE-Footer', $includesArray); ?>
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
$includesArray = array(
|
||||
'title' => 'Cis4',
|
||||
'axios027' => true,
|
||||
'bootstrap5' => true,
|
||||
'fontawesome6' => true,
|
||||
'tabulator5' => true,
|
||||
'vue3' => true,
|
||||
'primevue3' => true,
|
||||
'customCSSs' => array(
|
||||
'public/css/components/verticalsplit.css',
|
||||
'public/css/components/searchbar/searchbar.css',
|
||||
'public/css/Fhc.css',
|
||||
'public/css/components/dashboard.css',
|
||||
'public/css/components/calendar.css',
|
||||
'public/css/components/Sprachen.css',
|
||||
'public/css/components/MyLv.css',
|
||||
'public/css/components/FilterComponent.css',
|
||||
'public/css/components/Profil.css',
|
||||
'public/css/components/FormUnderline.css',
|
||||
'public/css/Cis4/Cms.css',
|
||||
),
|
||||
'customJSs' => array(
|
||||
'vendor/npm-asset/primevue/accordion/accordion.js',
|
||||
'vendor/npm-asset/primevue/accordiontab/accordiontab.js'
|
||||
),
|
||||
'customJSModules' => array(
|
||||
'public/js/apps/Dashboard/Fhc.js'
|
||||
),
|
||||
|
||||
);
|
||||
|
||||
$this->load->view('templates/CISVUE-Header', $includesArray);
|
||||
?>
|
||||
<div id="fhccontent" route=<?php echo $route ?>>
|
||||
<router-view
|
||||
:view-data='<?php echo json_encode($viewData) ?>'
|
||||
></router-view>
|
||||
</div>
|
||||
<?php $this->load->view('templates/CISVUE-Footer', $includesArray); ?>
|
||||
@@ -1,32 +0,0 @@
|
||||
<?php
|
||||
$includesArray = array(
|
||||
'customJSModules' => ['public/js/apps/Cis/Cms.js'],
|
||||
'primevue3'=>true,
|
||||
'customCSSs' => [
|
||||
'public/css/Cis4/Cms.css',
|
||||
#'skin/style.css.php'
|
||||
]
|
||||
);
|
||||
|
||||
// adds the tabulator5 dependency for all templates to replace the tablesorter
|
||||
$includesArray['tabulator5'] = true;
|
||||
|
||||
if(defined('CIS4')){
|
||||
$this->load->view('templates/CISVUE-Header', $includesArray);
|
||||
}else{
|
||||
$this->load->view('templates/FHC-Header', $includesArray);
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="cms">
|
||||
<?php echo (isset($content_id) ? '<cms-content :content_id="'.$content_id.'" :version="'.$version.'" :sprache="'.$sprache.'" :sichtbar="'.$sichtbar.'" />' : '<cms-news/>'); ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if (defined('CIS4')) {
|
||||
$this->load->view('templates/CISVUE-Footer', $includesArray);
|
||||
} else {
|
||||
$this->load->view('templates/FHC-Footer', $includesArray);
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
<?php
|
||||
$includesArray = array(
|
||||
'title' => 'RoomInformation',
|
||||
'customJSModules' => ['public/js/apps/Cis/RoomInformation.js'],
|
||||
'customCSSs' => ['public/css/components/calendar.css']
|
||||
);
|
||||
|
||||
$this->load->view('templates/CISVUE-Header', $includesArray);
|
||||
?>
|
||||
|
||||
<div >
|
||||
<h2>Room Information: <?php echo $ort_kurzbz ?></h2>
|
||||
<hr>
|
||||
<div id="content">
|
||||
<room-information ort_kurzbz="<?php echo $ort_kurzbz ?>"></room-information>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php $this->load->view('templates/CISVUE-Footer', $includesArray); ?>
|
||||
@@ -1,20 +0,0 @@
|
||||
<?php
|
||||
$includesArray = array(
|
||||
'title' => 'Dashboard',
|
||||
'tabulator5'=>true,
|
||||
'primevue3' => true,
|
||||
'customJSModules' => ['public/js/apps/Dashboard/Fhc.js'],
|
||||
'customCSSs' => [
|
||||
'public/css/components/dashboard.css'
|
||||
],
|
||||
);
|
||||
|
||||
$this->load->view('templates/CISVUE-Header', $includesArray);
|
||||
?>
|
||||
|
||||
<div id="content">
|
||||
<fhc-dashboard dashboard="CIS" view-data-string='<?php echo json_encode($viewData) ?>' />
|
||||
</div>
|
||||
|
||||
<?php $this->load->view('templates/CISVUE-Footer', $includesArray); ?>
|
||||
|
||||
@@ -34,8 +34,10 @@
|
||||
<?php
|
||||
$configArray = [
|
||||
'generateAlias' => !defined('GENERATE_ALIAS_STUDENT') ? true : GENERATE_ALIAS_STUDENT,
|
||||
'showZgvDoktor' => !defined('ZGV_DOKTOR_ANZEIGEN') ? false : ZGV_DOKTOR_ANZEIGEN,
|
||||
'showZgvErfuellt' => !defined('ZGV_ERFUELLT_ANZEIGEN') ? false : ZGV_ERFUELLT_ANZEIGEN
|
||||
//replaced by possibility to hide each formular field via config stv.php
|
||||
#'showZgvDoktor' => !defined('ZGV_DOKTOR_ANZEIGEN') ? false : ZGV_DOKTOR_ANZEIGEN,
|
||||
#'showZgvErfuellt' => !defined('ZGV_ERFUELLT_ANZEIGEN') ? false : ZGV_ERFUELLT_ANZEIGEN
|
||||
'showHintKommPrfg' => !defined('FAS_STUDSTATUS_SHOW_KOMM_PRFG_HINT') ? false : FAS_STUDSTATUS_SHOW_KOMM_PRFG_HINT
|
||||
];
|
||||
?>
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ else
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="page-wrapper">
|
||||
<div cis4Reload="true" id="page-wrapper">
|
||||
<div class="container-fluid">
|
||||
<!-- header -->
|
||||
<div class="row">
|
||||
|
||||
@@ -1,71 +1,83 @@
|
||||
<div class="accordion" id="requestAnrechnungImportant">
|
||||
<!-- Beantragung: Fristen panel -->
|
||||
<?php if (isset($this->config->item('display_infobox')['fristen']) && $this->config->item('display_infobox')['fristen'] === true): ?>
|
||||
<div class="accordion-item">
|
||||
<h2 class="accordion-header">
|
||||
<div class="bg-info-subtle accordion-button" type="button" data-bs-toggle="collapse"
|
||||
data-bs-target="#Beantragung" aria-expanded="true" aria-controls="Beantragung">
|
||||
<div class="d-flex">
|
||||
|
||||
<i class="me-2 fa fa-lg fa-info-circle" aria-hidden="true"></i> 
|
||||
<?php echo $this->p->t('anrechnung', 'requestAnrechnungInfoFristenTitle'); ?>
|
||||
|
||||
<div class="accordion" id="requestAnrechnungImportant">
|
||||
<!-- Beantragung: Fristen panel -->
|
||||
<div class="accordion-item">
|
||||
<h2 class="accordion-header">
|
||||
<div class="bg-info-subtle accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#Beantragung" aria-expanded="true" aria-controls="Beantragung">
|
||||
<div class="d-flex">
|
||||
|
||||
<i class="me-2 fa fa-lg fa-info-circle" aria-hidden="true"></i> 
|
||||
<?php echo $this->p->t('anrechnung', 'requestAnrechnungInfoFristenTitle'); ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</h2>
|
||||
<div id="Beantragung" class="accordion-collapse collapse show" data-bs-parent="#requestAnrechnungImportant">
|
||||
<div class="accordion-body">
|
||||
<?php echo $this->p->t('anrechnung', 'requestAnrechnungInfoFristenBody'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<!-- Referenzbeispiele ECTS Berechnung panel -->
|
||||
<?php if (isset($this->config->item('display_infobox')['referenzbeispiele_ects']) && $this->config->item('display_infobox')['referenzbeispiele_ects'] === true): ?>
|
||||
<div class="accordion-item">
|
||||
<h2 class="accordion-header">
|
||||
<div class="bg-info-subtle accordion-button collapsed" type="button" data-bs-toggle="collapse"
|
||||
data-bs-target="#Referenzbeispiele" aria-expanded="false" aria-controls="Referenzbeispiele">
|
||||
<div class="d-flex">
|
||||
<i class="me-2 fa fa-lg fa-info-circle" aria-hidden="true"></i> 
|
||||
<?php echo $this->p->t('anrechnung', 'requestAnrechnungInfoEctsBerechnungTitle'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</h2>
|
||||
<div id="Referenzbeispiele" class="accordion-collapse collapse"
|
||||
data-bs-parent="#requestAnrechnungImportant">
|
||||
<div class="accordion-body">
|
||||
<?php echo $this->p->t('anrechnung', 'requestAnrechnungInfoEctsBerechnungBody'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</h2>
|
||||
<div id="Beantragung" class="accordion-collapse collapse show" data-bs-parent="#requestAnrechnungImportant">
|
||||
<div class="accordion-body">
|
||||
<?php echo $this->p->t('anrechnung', 'requestAnrechnungInfoFristenBody'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Referenzbeispiele ECTS Berechnung panel -->
|
||||
<div class="accordion-item">
|
||||
<h2 class="accordion-header">
|
||||
<div class="bg-info-subtle accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#Referenzbeispiele" aria-expanded="false" aria-controls="Referenzbeispiele">
|
||||
<div class="d-flex">
|
||||
<i class="me-2 fa fa-lg fa-info-circle" aria-hidden="true"></i> 
|
||||
<?php echo $this->p->t('anrechnung', 'requestAnrechnungInfoEctsBerechnungTitle'); ?>
|
||||
<?php endif; ?>
|
||||
<!-- Nachweisdokumente: Voraussetzung panel -->
|
||||
<?php if (isset($this->config->item('display_infobox')['voraussetzungen']) && $this->config->item('display_infobox')['voraussetzungen'] === true): ?>
|
||||
<div class="accordion-item">
|
||||
<h2 class="accordion-header">
|
||||
<div class="d-flex">
|
||||
<div class="bg-info-subtle accordion-button collapsed" type="button" data-bs-toggle="collapse"
|
||||
data-bs-target="#Nachweisdokumente" aria-expanded="false" aria-controls="Nachweisdokumente">
|
||||
<i class="me-2 fa fa-lg fa-info-circle" aria-hidden="true"></i> 
|
||||
<?php echo $this->p->t('anrechnung', 'requestAnrechnungInfoNachweisdokumenteTitle'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</h2>
|
||||
<div id="Nachweisdokumente" class="accordion-collapse collapse"
|
||||
data-bs-parent="#requestAnrechnungImportant">
|
||||
<div class="accordion-body">
|
||||
<?php echo $this->p->t('anrechnung', 'requestAnrechnungInfoNachweisdokumenteBody'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</h2>
|
||||
<div id="Referenzbeispiele" class="accordion-collapse collapse" data-bs-parent="#requestAnrechnungImportant">
|
||||
<div class="accordion-body">
|
||||
<?php echo $this->p->t('anrechnung', 'requestAnrechnungInfoEctsBerechnungBody'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Nachweisdokumente: Voraussetzung panel -->
|
||||
<div class="accordion-item">
|
||||
<h2 class="accordion-header">
|
||||
<div class="d-flex">
|
||||
<div class="bg-info-subtle accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#Nachweisdokumente" aria-expanded="false" aria-controls="Nachweisdokumente">
|
||||
<i class="me-2 fa fa-lg fa-info-circle" aria-hidden="true"></i> 
|
||||
<?php echo $this->p->t('anrechnung', 'requestAnrechnungInfoNachweisdokumenteTitle'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</h2>
|
||||
<div id="Nachweisdokumente" class="accordion-collapse collapse" data-bs-parent="#requestAnrechnungImportant">
|
||||
<div class="accordion-body">
|
||||
<?php echo $this->p->t('anrechnung', 'requestAnrechnungInfoNachweisdokumenteBody'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<!-- Herkunft der Kenntnisse: Angaben panel -->
|
||||
<div class="accordion-item">
|
||||
<h2 class="accordion-header">
|
||||
<div class="bg-info-subtle accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#HerkunftKenntnisse" aria-expanded="false" aria-controls="HerkunftKenntnisse">
|
||||
<div class="d-flex">
|
||||
<i class="me-2 fa fa-lg fa-info-circle" aria-hidden="true"></i> 
|
||||
<?php echo $this->p->t('anrechnung', 'requestAnrechnungInfoHerkunftKenntnisseTitle'); ?>
|
||||
<?php if (isset($this->config->item('display_infobox')['herkunft_kenntnisse']) && $this->config->item('display_infobox')['herkunft_kenntnisse'] === true): ?>
|
||||
<div class="accordion-item">
|
||||
<h2 class="accordion-header">
|
||||
<div class="bg-info-subtle accordion-button collapsed" type="button" data-bs-toggle="collapse"
|
||||
data-bs-target="#HerkunftKenntnisse" aria-expanded="false" aria-controls="HerkunftKenntnisse">
|
||||
<div class="d-flex">
|
||||
<i class="me-2 fa fa-lg fa-info-circle" aria-hidden="true"></i> 
|
||||
<?php echo $this->p->t('anrechnung', 'requestAnrechnungInfoHerkunftKenntnisseTitle'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</h2>
|
||||
<div id="HerkunftKenntnisse" class="accordion-collapse collapse"
|
||||
data-bs-parent="#requestAnrechnungImportant">
|
||||
<div class="accordion-body">
|
||||
<?php echo $this->p->t('anrechnung', 'requestAnrechnungInfoHerkunftKenntnisseBody'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</h2>
|
||||
<div id="HerkunftKenntnisse" class="accordion-collapse collapse" data-bs-parent="#requestAnrechnungImportant">
|
||||
<div class="accordion-body">
|
||||
<?php echo $this->p->t('anrechnung', 'requestAnrechnungInfoHerkunftKenntnisseBody'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
@@ -2,7 +2,6 @@
|
||||
$this->load->config('anrechnung');
|
||||
|
||||
$includesArray = array(
|
||||
array(
|
||||
'title' => $this->p->t('anrechnung', 'anrechnungenPruefen'),
|
||||
'jquery3' => true,
|
||||
'jqueryui1' => true,
|
||||
@@ -50,7 +49,6 @@ $includesArray = array(
|
||||
'public/js/bootstrapper.js',
|
||||
'public/js/lehre/anrechnung/reviewAnrechnungDetail.js'
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
if (defined("CIS4")) {
|
||||
|
||||
@@ -1,86 +1,102 @@
|
||||
|
||||
<div class="accordion" id="requestAnrechnungImportant">
|
||||
<!-- Beantragung: Fristen panel -->
|
||||
<div class="accordion-item">
|
||||
<h2 class="accordion-header">
|
||||
<div class="bg-info-subtle accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#Beantragung" aria-expanded="true" aria-controls="Beantragung">
|
||||
<div class="d-flex">
|
||||
|
||||
<i class="fa fa-lg fa-info-circle" aria-hidden="true"></i> 
|
||||
<?php echo $this->p->t('anrechnung', 'reviewAnrechnungInfoFristenTitle'); ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</h2>
|
||||
<div id="Beantragung" class="accordion-collapse collapse show" data-bs-parent="#requestAnrechnungImportant">
|
||||
<div class="accordion-body">
|
||||
<?php echo $this->p->t('anrechnung', 'reviewAnrechnungInfoFristenBody'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Referenzbeispiele ECTS Berechnung panel -->
|
||||
<div class="accordion-item">
|
||||
<h2 class="accordion-header">
|
||||
<div class="bg-info-subtle accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#Referenzbeispiele" aria-expanded="false" aria-controls="Referenzbeispiele">
|
||||
<div class="d-flex">
|
||||
<i class="fa fa-lg fa-info-circle" aria-hidden="true"></i> 
|
||||
<?php echo $this->p->t('anrechnung', 'requestAnrechnungInfoEctsBerechnungTitle'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</h2>
|
||||
<div id="Referenzbeispiele" class="accordion-collapse collapse" data-bs-parent="#requestAnrechnungImportant">
|
||||
<div class="accordion-body">
|
||||
<?php echo $this->p->t('anrechnung', 'requestAnrechnungInfoEctsBerechnungBody'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Antrag: Voraussetzungen panel -->
|
||||
<div class="accordion-item">
|
||||
<h2 class="accordion-header">
|
||||
<div class="d-flex">
|
||||
<div class="bg-info-subtle accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#Antrag" aria-expanded="false" aria-controls="Antrag">
|
||||
<i class="fa fa-lg fa-info-circle" aria-hidden="true"></i> 
|
||||
<?php echo $this->p->t('anrechnung', 'reviewAnrechnungInfoAntragVoraussetungenTitle'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</h2>
|
||||
<div id="Antrag" class="accordion-collapse collapse" data-bs-parent="#requestAnrechnungImportant">
|
||||
<div class="accordion-body">
|
||||
<?php echo $this->p->t('anrechnung', 'reviewAnrechnungInfoAntragVoraussetungenBody'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Nachweisdokumente: Voraussetzung panel -->
|
||||
<div class="accordion-item">
|
||||
<h2 class="accordion-header">
|
||||
<div class="bg-info-subtle accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#Nachweisdokumente" aria-expanded="false" aria-controls="Nachweisdokumente">
|
||||
<div class="d-flex">
|
||||
<i class="fa fa-lg fa-info-circle" aria-hidden="true"></i> 
|
||||
<?php echo $this->p->t('anrechnung', 'reviewAnrechnungInfoNachweisdokumenteTitle'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</h2>
|
||||
<div id="Nachweisdokumente" class="accordion-collapse collapse" data-bs-parent="#requestAnrechnungImportant">
|
||||
<div class="accordion-body">
|
||||
<?php echo $this->p->t('anrechnung', 'reviewAnrechnungInfoNachweisdokumenteBody'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Herkunft der Kenntnisse: Angaben panel -->
|
||||
<div class="accordion-item">
|
||||
<h2 class="accordion-header">
|
||||
<div class="bg-info-subtle accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#HerkunftKenntnisse" aria-expanded="false" aria-controls="HerkunftKenntnisse">
|
||||
<div class="d-flex">
|
||||
<i class="fa fa-lg fa-info-circle" aria-hidden="true"></i> 
|
||||
<?php echo $this->p->t('anrechnung', 'reviewAnrechnungInfoHerkunftKenntnisseTitle'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</h2>
|
||||
<div id="HerkunftKenntnisse" class="accordion-collapse collapse" data-bs-parent="#requestAnrechnungImportant">
|
||||
<div class="accordion-body">
|
||||
<?php echo $this->p->t('anrechnung', 'reviewAnrechnungInfoHerkunftKenntnisseBody'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Beantragung: Fristen panel -->
|
||||
<?php if (isset($this->config->item('display_infobox')['fristen']) && $this->config->item('display_infobox')['fristen'] === true): ?>
|
||||
<div class="accordion-item">
|
||||
<h2 class="accordion-header">
|
||||
<div class="bg-info-subtle accordion-button" type="button" data-bs-toggle="collapse"
|
||||
data-bs-target="#Beantragung" aria-expanded="true" aria-controls="Beantragung">
|
||||
<div class="d-flex">
|
||||
|
||||
<i class="fa fa-lg fa-info-circle" aria-hidden="true"></i> 
|
||||
<?php echo $this->p->t('anrechnung', 'reviewAnrechnungInfoFristenTitle'); ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</h2>
|
||||
<div id="Beantragung" class="accordion-collapse collapse show" data-bs-parent="#requestAnrechnungImportant">
|
||||
<div class="accordion-body">
|
||||
<?php echo $this->p->t('anrechnung', 'reviewAnrechnungInfoFristenBody'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<!-- Referenzbeispiele ECTS Berechnung panel -->
|
||||
<?php if (isset($this->config->item('display_infobox')['referenzbeispiele_ects']) && $this->config->item('display_infobox')['referenzbeispiele_ects'] === true): ?>
|
||||
<div class="accordion-item">
|
||||
<h2 class="accordion-header">
|
||||
<div class="bg-info-subtle accordion-button collapsed" type="button" data-bs-toggle="collapse"
|
||||
data-bs-target="#Referenzbeispiele" aria-expanded="false" aria-controls="Referenzbeispiele">
|
||||
<div class="d-flex">
|
||||
<i class="fa fa-lg fa-info-circle" aria-hidden="true"></i> 
|
||||
<?php echo $this->p->t('anrechnung', 'requestAnrechnungInfoEctsBerechnungTitle'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</h2>
|
||||
<div id="Referenzbeispiele" class="accordion-collapse collapse"
|
||||
data-bs-parent="#requestAnrechnungImportant">
|
||||
<div class="accordion-body">
|
||||
<?php echo $this->p->t('anrechnung', 'requestAnrechnungInfoEctsBerechnungBody'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<!-- Antrag: Voraussetzungen panel -->
|
||||
<?php if (isset($this->config->item('display_infobox')['voraussetzungen']) && $this->config->item('display_infobox')['voraussetzungen'] === true): ?>
|
||||
<div class="accordion-item">
|
||||
<h2 class="accordion-header">
|
||||
<div class="d-flex">
|
||||
<div class="bg-info-subtle accordion-button collapsed" type="button" data-bs-toggle="collapse"
|
||||
data-bs-target="#Antrag" aria-expanded="false" aria-controls="Antrag">
|
||||
<i class="fa fa-lg fa-info-circle" aria-hidden="true"></i> 
|
||||
<?php echo $this->p->t('anrechnung', 'reviewAnrechnungInfoAntragVoraussetungenTitle'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</h2>
|
||||
<div id="Antrag" class="accordion-collapse collapse" data-bs-parent="#requestAnrechnungImportant">
|
||||
<div class="accordion-body">
|
||||
<?php echo $this->p->t('anrechnung', 'reviewAnrechnungInfoAntragVoraussetungenBody'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<!-- Nachweisdokumente: Voraussetzung panel -->
|
||||
<?php if (isset($this->config->item('display_infobox')['nachweisdokumente']) && $this->config->item('display_infobox')['nachweisdokumente'] === true): ?>
|
||||
<div class="accordion-item">
|
||||
<h2 class="accordion-header">
|
||||
<div class="bg-info-subtle accordion-button collapsed" type="button" data-bs-toggle="collapse"
|
||||
data-bs-target="#Nachweisdokumente" aria-expanded="false" aria-controls="Nachweisdokumente">
|
||||
<div class="d-flex">
|
||||
<i class="fa fa-lg fa-info-circle" aria-hidden="true"></i> 
|
||||
<?php echo $this->p->t('anrechnung', 'reviewAnrechnungInfoNachweisdokumenteTitle'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</h2>
|
||||
<div id="Nachweisdokumente" class="accordion-collapse collapse"
|
||||
data-bs-parent="#requestAnrechnungImportant">
|
||||
<div class="accordion-body">
|
||||
<?php echo $this->p->t('anrechnung', 'reviewAnrechnungInfoNachweisdokumenteBody'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<!-- Herkunft der Kenntnisse: Angaben panel -->
|
||||
<?php if (isset($this->config->item('display_infobox')['herkunft_kenntnisse']) && $this->config->item('display_infobox')['herkunft_kenntnisse'] === true): ?>
|
||||
<div class="accordion-item">
|
||||
<h2 class="accordion-header">
|
||||
<div class="bg-info-subtle accordion-button collapsed" type="button" data-bs-toggle="collapse"
|
||||
data-bs-target="#HerkunftKenntnisse" aria-expanded="false" aria-controls="HerkunftKenntnisse">
|
||||
<div class="d-flex">
|
||||
<i class="fa fa-lg fa-info-circle" aria-hidden="true"></i> 
|
||||
<?php echo $this->p->t('anrechnung', 'reviewAnrechnungInfoHerkunftKenntnisseTitle'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</h2>
|
||||
<div id="HerkunftKenntnisse" class="accordion-collapse collapse"
|
||||
data-bs-parent="#requestAnrechnungImportant">
|
||||
<div class="accordion-body">
|
||||
<?php echo $this->p->t('anrechnung', 'reviewAnrechnungInfoHerkunftKenntnisseBody'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
$STUDIENSEMESTER = '\''.$this->variablelib->getVar('infocenter_studiensemester').'\'';
|
||||
$LOGDATA_NAME = '\'Message sent\'';
|
||||
$LOGDATA_VON = '\'online\'';
|
||||
$STUDIENGEBUEHR_ANZAHLUNG = '\'StudiengebuehrAnzahlung\'';
|
||||
$KAUTION_DRITT_STAAT = '\'KautionDrittStaat\'';
|
||||
|
||||
$query = '
|
||||
SELECT
|
||||
@@ -62,7 +62,7 @@ $query = '
|
||||
FROM public.tbl_konto konto
|
||||
WHERE konto.person_id = p.person_id
|
||||
AND konto.studiensemester_kurzbz = '. $STUDIENSEMESTER .'
|
||||
AND konto.buchungstyp_kurzbz = '. $STUDIENGEBUEHR_ANZAHLUNG .'
|
||||
AND konto.buchungstyp_kurzbz = '. $KAUTION_DRITT_STAAT .'
|
||||
) AS "Kaution"
|
||||
FROM
|
||||
public.tbl_prestudentstatus pss
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
$ADDITIONAL_STG = $this->config->item('infocenter_studiengang_kz');
|
||||
$AKTE_TYP = '\'identity\', \'zgv_bakk\'';
|
||||
$STUDIENSEMESTER = '\''.$this->variablelib->getVar('infocenter_studiensemester').'\'';
|
||||
$STUDIENGEBUEHR_ANZAHLUNG = '\'StudiengebuehrAnzahlung\'';
|
||||
$KAUTION_DRITT_STAAT = '\'KautionDrittStaat\'';
|
||||
$ORG_NAME = '\'InfoCenter\'';
|
||||
$ONLINE = '\'online\'';
|
||||
|
||||
@@ -302,7 +302,7 @@
|
||||
FROM public.tbl_konto konto
|
||||
WHERE konto.person_id = p.person_id
|
||||
AND konto.studiensemester_kurzbz = '. $STUDIENSEMESTER .'
|
||||
AND konto.buchungstyp_kurzbz = '. $STUDIENGEBUEHR_ANZAHLUNG .'
|
||||
AND konto.buchungstyp_kurzbz = '. $KAUTION_DRITT_STAAT .'
|
||||
) AS "Kaution"
|
||||
FROM public.tbl_person p
|
||||
LEFT JOIN (
|
||||
|
||||
@@ -13,7 +13,8 @@
|
||||
$ORG_NAME = '\'InfoCenter\'';
|
||||
$IDENTITY = '\'identity\'';
|
||||
$ONLINE = '\'online\'';
|
||||
$STUDIENGEBUEHR_ANZAHLUNG = '\'StudiengebuehrAnzahlung\'';
|
||||
$KAUTION_DRITT_STAAT = '\'KautionDrittStaat\'';
|
||||
|
||||
|
||||
$query = '
|
||||
SELECT
|
||||
@@ -275,7 +276,7 @@ $query = '
|
||||
FROM public.tbl_konto konto
|
||||
WHERE konto.person_id = p.person_id
|
||||
AND konto.studiensemester_kurzbz = '. $STUDIENSEMESTER .'
|
||||
AND konto.buchungstyp_kurzbz = '. $STUDIENGEBUEHR_ANZAHLUNG .'
|
||||
AND konto.buchungstyp_kurzbz = '. $KAUTION_DRITT_STAAT .'
|
||||
) AS "Kaution"
|
||||
FROM public.tbl_person p
|
||||
LEFT JOIN (
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
$ADDITIONAL_STG = $this->config->item('infocenter_studiengang_kz');
|
||||
$STUDIENSEMESTER = '\''.$this->variablelib->getVar('infocenter_studiensemester').'\'';
|
||||
$ORG_NAME = '\'InfoCenter\'';
|
||||
$STUDIENGEBUEHR_ANZAHLUNG = '\'StudiengebuehrAnzahlung\'';
|
||||
$KAUTION_DRITT_STAAT = '\'KautionDrittStaat\'';
|
||||
|
||||
|
||||
$query = '
|
||||
SELECT
|
||||
@@ -206,7 +207,7 @@ $query = '
|
||||
FROM public.tbl_konto konto
|
||||
WHERE konto.person_id = p.person_id
|
||||
AND konto.studiensemester_kurzbz = '. $STUDIENSEMESTER .'
|
||||
AND konto.buchungstyp_kurzbz = '. $STUDIENGEBUEHR_ANZAHLUNG .'
|
||||
AND konto.buchungstyp_kurzbz = '. $KAUTION_DRITT_STAAT .'
|
||||
) AS "Kaution"
|
||||
FROM public.tbl_person p
|
||||
LEFT JOIN (
|
||||
|
||||
@@ -8,11 +8,12 @@
|
||||
'filtercomponent' => true,
|
||||
'navigationcomponent' => true,
|
||||
'tabulator5' => true,
|
||||
'primevue3' => true,
|
||||
'phrases' => array(
|
||||
'global' => array('mailAnXversandt'),
|
||||
'ui' => array('bitteEintragWaehlen')
|
||||
),
|
||||
'customJSModules' => array('public/js/apps/LogsViewer/LogsViewer.js')
|
||||
'customJSModules' => array('public/js/apps/LogsViewer/LogsViewer.js'),
|
||||
);
|
||||
|
||||
$this->load->view('templates/FHC-Header', $includesArray);
|
||||
|
||||
@@ -5,6 +5,7 @@ $includesArray = array(
|
||||
'bootstrap5' => true,
|
||||
'fontawesome6' => true,
|
||||
'axios027' => true,
|
||||
'primevue3' => true,
|
||||
'customJSModules' => array_merge([
|
||||
'public/js/apps/Cis.js'
|
||||
], $customJSModules ?? []),
|
||||
@@ -15,15 +16,6 @@ $includesArray = array(
|
||||
|
||||
$this->load->view('templates/FHC-Header', $includesArray);
|
||||
|
||||
|
||||
if (!isset($menu)) {
|
||||
$ci =& get_instance(); // get CI instance
|
||||
$ci->load->model('content/Content_model', 'ContentModel');
|
||||
$ci->load->config('cis');
|
||||
$cis4_content_id = $ci->config->item('cis_menu_root_content_id');
|
||||
$result = $ci->ContentModel->getMenu($cis4_content_id, getAuthUID());
|
||||
$menu = getData($result)->childs ?? [];
|
||||
}
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
@@ -39,8 +31,7 @@ if (!isset($menu)) {
|
||||
logout-url="<?= site_url('Cis/Auth/logout'); ?>"
|
||||
:searchbaroptions="searchbaroptions"
|
||||
:searchfunction="searchfunction"
|
||||
:menu="<?= htmlspecialchars(json_encode(array_values($menu)), ENT_QUOTES, 'UTF-8') ?>"
|
||||
></cis-menu>
|
||||
</header>
|
||||
|
||||
<main id="cis-main" class="flex-grow-1 p-4">
|
||||
<main id="cis-main" class="flex-grow-1 p-4 pt-2">
|
||||
@@ -23,6 +23,7 @@
|
||||
$tablesorter2 = isset($tablesorter2) ? $tablesorter2 : false;
|
||||
$tabulator4 = isset($tabulator4) ? $tabulator4 : false;
|
||||
$tabulator5 = isset($tabulator5) ? $tabulator5 : false;
|
||||
$tabulator6 = isset($tabulator6) ? $tabulator6 : false;
|
||||
$tabulator5JQuery = isset($tabulator5JQuery) ? $tabulator5JQuery : false;
|
||||
$tinymce3 = isset($tinymce3) ? $tinymce3 : false;
|
||||
$tinymce5 = isset($tinymce5) ? $tinymce5 : false;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
// Generates the global object to pass phrases to javascripts
|
||||
// NOTE: must be called before including the PhrasesLib.js
|
||||
if ($phrases != null) generateJSPhrasesStorageObject($phrases);
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------
|
||||
// From vendor folder
|
||||
|
||||
@@ -104,6 +104,8 @@
|
||||
if ($tabulator5 === true) generateJSsInclude('vendor/olifolkerd/tabulator5/dist/js/tabulator.min.js');
|
||||
// Tabulator 5 JQuery
|
||||
if ($tabulator5JQuery === true) generateJSsInclude('public/js/tabulator/jquery_wrapper.js');
|
||||
// Tabulator 6 JS
|
||||
if ($tabulator6 === true) generateJSsInclude('vendor/olifolkerd/tabulator6/dist/js/tabulator.min.js');
|
||||
// Tinymce 3 JS
|
||||
if ($tinymce3 === true) generateJSsInclude('include/tiny_mce/tiny_mce.js');
|
||||
|
||||
@@ -123,6 +125,13 @@
|
||||
}
|
||||
generateJSsInclude('vendor/vuejs/vuerouter4/vue-router.global.js');
|
||||
}
|
||||
|
||||
// Highcharts
|
||||
if (isset($highcharts) && $highcharts === true)
|
||||
{
|
||||
generateJSsInclude('vendor/highcharts/highcharts-dist/highcharts.js');
|
||||
generateJSsInclude('vendor/highcharts/highcharts-dist/modules/current-date-indicator.js');
|
||||
}
|
||||
|
||||
// PrimeVue
|
||||
if ($primevue3)
|
||||
|
||||
@@ -79,6 +79,9 @@
|
||||
|
||||
// Tabulator 5 CSS
|
||||
if ($tabulator5 === true) generateCSSsInclude('public/css/Tabulator5.css');
|
||||
|
||||
// Tabulator 6 CSS
|
||||
if ($tabulator6 === true) generateCSSsInclude('public/css/Tabulator6.css');
|
||||
|
||||
// Tinymce 5 CSS
|
||||
if ($tinymce5 === true) generateCSSsInclude('public/css/TinyMCE5.css');
|
||||
|
||||
@@ -95,10 +95,8 @@ class TableWidget extends Widget
|
||||
*/
|
||||
public function display($widgetData)
|
||||
{
|
||||
|
||||
$this->view(self::WIDGET_URL_TABLE, array(
|
||||
'tableUniqueId' => $widgetData[TableWidgetLib::TABLE_UNIQUE_ID],
|
||||
'bootstrapVersion' => $widgetData[TableWidgetLib::TABLE_BOOTSTRAP_VERSION],
|
||||
'tableUniqueId' => $widgetData[TableWidgetLib::TABLE_UNIQUE_ID]
|
||||
)); // GUI starts here
|
||||
}
|
||||
|
||||
|
||||
@@ -38,6 +38,14 @@ require_once('../../include/authentication.class.php');
|
||||
require_once('../../include/addon.class.php');
|
||||
require_once('../../include/'.EXT_FKT_PATH.'/serviceterminal.inc.php');
|
||||
|
||||
// 2025-02-05 ma0080 add query parameter to force login e.g. when used in iframe in CIS4.0 begin
|
||||
if( isset($_GET['forcelogin']) && !isset($_SERVER['PHP_AUTH_USER']) ) {
|
||||
header('WWW-Authenticate: Basic Realm="' . AUTH_NAME . '"');
|
||||
http_response_code(401);
|
||||
die();
|
||||
}
|
||||
// 2025-02-05 ma0080 add query parameter to force login e.g. when used in iframe in CIS4.0 end
|
||||
|
||||
if (!$db = new basis_db())
|
||||
$db=false;
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ $projekttyp_kurzbz = $projektarbeit_obj->projekttyp_kurzbz;
|
||||
// paarbeit sollte nur ab bestimmten Zeitpunkt online bewertet werden
|
||||
$paIsCurrent = $projektarbeit_obj->projektarbeitIsCurrent($projektarbeit_id);
|
||||
|
||||
if(!is_numeric($paIsCurrent) || $paIsCurrent < 0)
|
||||
if(!is_bool($paIsCurrent))
|
||||
{
|
||||
echo "<font color=\"#FF0000\">".$p->t('abgabetool/fehlerAktualitaetProjektarbeit')."</font><br> ";
|
||||
}
|
||||
@@ -166,7 +166,7 @@ if(in_array($betreuerart, array('Erstbegutachter', 'Senatsvorsitz')))
|
||||
}
|
||||
|
||||
// Mail mit Token an Zweitbegutachter senden
|
||||
if (count($zweitbetreuerArr) > 0 && $paIsCurrent >= 1 && isset($_GET['zweitbegutachtertoken']) && isset($_GET['zweitbetreuer_person_id']))
|
||||
if (count($zweitbetreuerArr) > 0 && $paIsCurrent === true && isset($_GET['zweitbegutachtertoken']) && isset($_GET['zweitbetreuer_person_id']))
|
||||
{
|
||||
$qry_std="SELECT * FROM campus.vw_benutzer where uid=".$db->db_add_param($uid);
|
||||
if(!$result_std=$db->db_query($qry_std))
|
||||
@@ -482,7 +482,7 @@ $htmlstr .= "<table id='beurteilungheadertable' width=100%>\n";
|
||||
$htmlstr .= "<tr><td style='font-size:16px'>".$p->t('abgabetool/student').": <b>".$db->convert_html_chars($studentenname)."</b></td>";
|
||||
$htmlstr .= "<td width=10% align=center>";
|
||||
|
||||
$semester_benotbar = $paIsCurrent >= 1;
|
||||
$semester_benotbar = $paIsCurrent === true;
|
||||
$endupload_vorhanden = $num_rows_endupload >= 1;
|
||||
|
||||
if ($semester_benotbar && $endupload_vorhanden)
|
||||
@@ -495,7 +495,8 @@ if ($semester_benotbar && $endupload_vorhanden)
|
||||
}
|
||||
else
|
||||
{
|
||||
$quick_info = !$semester_benotbar ? $p->t('abgabetool/aeltereParbeitBenoten') : $p->t('abgabetool/keinEnduploadErfolgt');
|
||||
$quick_info = !$semester_benotbar ? $p->t('abgabetool/aeltereParbeitBenotenQuickInfo') : $p->t('abgabetool/keinEnduploadErfolgt');
|
||||
$info_text = !$semester_benotbar ? $p->t('abgabetool/aeltereParbeitBenoten') : $p->t('abgabetool/keinEnduploadErfolgt');
|
||||
$htmlstr .= "<form action='javascript:void(0);'>";
|
||||
$htmlstr .= "<input type='submit' value='".$p->t('abgabetool/benoten')."' title='".$quick_info."'
|
||||
alt='".$quick_info."' disabled>";
|
||||
@@ -516,7 +517,7 @@ else
|
||||
}
|
||||
$htmlstr .= "<tr>
|
||||
<td style='font-size:16px'>" . $p->t('abgabetool/titel') . ": <b>".$db->convert_html_chars($titel)."<b></td>
|
||||
<td align='center' class='warningtext'>".(isset($quick_info) ? $quick_info : '')."</td>
|
||||
<td align='center' class='warningtext'>".(isset($info_text) ? $info_text : '')."</td>
|
||||
<td valign=\"right\"><a href='abgabe_student_frameset.php?uid=$uid' target='_blank'>".$p->t('abgabetool/studentenansicht')."</a></td>";
|
||||
$htmlstr .= "</tr>\n";
|
||||
|
||||
@@ -544,7 +545,7 @@ if (isset($zweitbetreuerArr) && is_array($zweitbetreuerArr)) // wenn es Zweitbet
|
||||
$htmlstr .= " <img src='../../../skin/images/exclamation.png' title='" . $p->t('abgabetool/zweitBegutachterEmailFehlt') . "' alt='" . $p->t('abgabetool/zweitBegutachterEmailFehlt') . "'/>";
|
||||
|
||||
// Token senden button wenn Zweitbegutachter extern ist und Projektarbeit nicht für altes Semester ist
|
||||
if (isset($zweitbetreuer->email) && !isset($zweitbetreuer->uid) && $paIsCurrent >= 1)
|
||||
if (isset($zweitbetreuer->email) && !isset($zweitbetreuer->uid) && $paIsCurrent === true)
|
||||
{
|
||||
$htmlstr .= "<form action='" . htmlspecialchars($_SERVER['PHP_SELF']) . "' method='GET' style='display: inline'>\n";
|
||||
$htmlstr .= "<input type='hidden' name='uid' value='" . $student_uid . "'>";
|
||||
|
||||
@@ -195,13 +195,13 @@ else
|
||||
$htmlstr .= "<td>";
|
||||
|
||||
if (!is_null($row->babgeschickt))
|
||||
$htmlstr .= "<a href='../pdfExport.php?xml=projektarbeitsbeurteilung.xml.php&xsl=Projektbeurteilung&betreuerart_kurzbz=" . $row->betreuerart_kurzbz . "&projektarbeit_id=" . $row->projektarbeit_id . "&person_id=" . $row->betreuer_person_id ."' title='".$p->t('abgabetool/projektbeurteilungDownload')."'>".$p->t('abgabetool/projektbeurteilungErstDownload')."</a>";
|
||||
$htmlstr .= "<a href='./projektbeurteilungDocumentExport.php?betreuerart_kurzbz=" . $row->betreuerart_kurzbz . "&projektarbeit_id=" . $row->projektarbeit_id . "&person_id=" . $row->betreuer_person_id ."' title='".$p->t('abgabetool/projektbeurteilungDownload')."'>".$p->t('abgabetool/projektbeurteilungErstDownload')."</a>";
|
||||
|
||||
if (!is_null($row->babgeschickt) && !is_null($row->zweitbetreuer_abgeschickt))
|
||||
$htmlstr .= "/";
|
||||
|
||||
if (!is_null($row->zweitbetreuer_abgeschickt))
|
||||
$htmlstr .= "<a href='../pdfExport.php?xml=projektarbeitsbeurteilung.xml.php&xsl=Projektbeurteilung&betreuerart_kurzbz=" . $row->zweitbetreuer_betreuerart_kurzbz . "&projektarbeit_id=" . $row->projektarbeit_id . "&person_id=" . $row->zweitbetreuer_person_id."' title='".$p->t('abgabetool/projektbeurteilungDownload')."'>".$p->t('abgabetool/projektbeurteilungZweitDownload')."</a>";
|
||||
$htmlstr .= "<a href='./projektbeurteilungDocumentExport.php?betreuerart_kurzbz=" . $row->zweitbetreuer_betreuerart_kurzbz . "&projektarbeit_id=" . $row->projektarbeit_id . "&person_id=" . $row->zweitbetreuer_person_id."' title='".$p->t('abgabetool/projektbeurteilungDownload')."'>".$p->t('abgabetool/projektbeurteilungZweitDownload')."</a>";
|
||||
|
||||
$htmlstr .= "</td>";
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user