Compare commits

..

1 Commits

320 changed files with 64371 additions and 78719 deletions
+1 -12
View File
@@ -29,7 +29,7 @@ $config['ALLOWED_NOTEN_ABGABETOOL'] = [10, 14]; // tbl_note pk
// benotete projektarbeiten sperren weitere terminanlage & bearbeitung, diese noten sind ausnahmen dieser Regel
// wie zB "Nicht beurteilt" & "Noch nicht eingetragen"
$config['NONFINAL_NOTEN_ABGABETOOL'] = [9];
$config['beurteilung_link_fallback'] = 'cis/private/lehre/projektbeurteilungDocumentExport.php?projektarbeit_id=?&betreuerart_kurzbz=?&person_id=?';
$config['beurteilung_link_fallback'] = 'addons/fhtw/content/projektbeurteilung/projektbeurteilungDocumentExport.php?projektarbeit_id=?&betreuerart_kurzbz=?&person_id=?';
$config['PROJEKTARBEITSBEURTEILUNG_MAIL_BASELINK_ERSTBEGUTACHTER'] = 'index.ci.php/extensions/FHC-Core-Projektarbeitsbeurteilung/ProjektarbeitsbeurteilungErstbegutachter';
$config['PROJEKTARBEITSBEURTEILUNG_MAIL_BASELINK_ZWEITBEGUTACHTER'] = 'index.ci.php/extensions/FHC-Core-Projektarbeitsbeurteilung/ProjektarbeitsbeurteilungErstbegutachter';
@@ -38,19 +38,8 @@ $config['SIGNATUR_CHECK_PAABGABETYPEN'] = ['end'];
// to be used as "https://moodle.technikum-wien.at/course/view.php?idnumber=dl{$stg_kz}" for stg specific moodle routing
$config['STG_MOODLE_LINK'] = 'https://moodle.technikum-wien.at/course/view.php?idnumber=dl';
// TODO: check if these links change if the file changes and how to better retrieve the link?
$config['SIGNATUR_INFO_LINK_GERMAN'] = 'https://cis.technikum-wien.at/cms/dms.php?id=214779';
$config['SIGNATUR_INFO_LINK_ENGLISH'] = 'https://cis.technikum-wien.at/cms/dms.php?id=264256';
$config['ASSISTENZ_SAMMELMAIL_BUTTON_STUDENT'] = true;
$config['ASSISTENZ_SAMMELMAIL_BUTTON_BETREUER'] = true;
$config['BETREUER_SAMMELMAIL_BUTTON_STUDENT'] = true;
$config['MULTIEDIT_TABLE'] = true;
$config['STUDENT_EDIT_PROJEKTARBEIT_TITLE'] = true;
$config['CONFETTI_ON_ENDUPLOAD'] = true;
+2 -9
View File
@@ -186,7 +186,7 @@ $config['navigation_header'] = array(
'description' => 'Extensions Manager',
'expand' => true,
'sort' => 10,
'requiredPermissions' => 'system/extensions:r'
'requiredPermissions' => 'admin:r'
),
'logsviewer' => array(
'link' => site_url('system/LogsViewer'),
@@ -199,14 +199,7 @@ $config['navigation_header'] = array(
'link' => site_url('system/jq/JobsQueueViewer'),
'description' => 'Jobs Queue Viewer',
'expand' => true,
'sort' => 30,
'requiredPermissions' => 'system/developer:r'
),
'phrasesviewer' => array(
'link' => site_url('system/phrases/PhrasesViewer'),
'description' => 'Phrases viewer',
'expand' => true,
'sort' => 40,
'sort' => 20,
'requiredPermissions' => 'system/developer:r'
),
'anrechnungen' => array(
+2 -2
View File
@@ -64,9 +64,9 @@ $route['api/v1/system/[S|s]prache/(:any)'] = 'api/v1/system/sprache2/$1';
$route['Cis/LvPlan/.*'] = 'Cis/LvPlan/index/$1';
$route['Cis/MyLvPlan/.*'] = 'Cis/MyLvPlan/index/$1';
$route['Cis/MyLv/.*'] = 'Cis/MyLv/index/$1';
$route['Cis/OtherLvPlan/.*'] = 'Cis/OtherLvPlan/index/$1';
//Route for LV Plan Stg/Semester/Verband/Gruppe
//Routes for Lvplan Verband and page for dropdown Stg/Semester/Verband/Gruppe
$route['Cis/StgOrgLvPlan/.*'] = 'Cis/StgOrgLvPlan/index/$1';
$route['Cis/OverviewLvPlan/.*'] = 'Cis/OverviewLvPlan/index/$1';
$route['Abgabetool/Assistenz'] = 'Cis/Abgabetool/Assistenz';
$route['Abgabetool/Assistenz/(:any)'] = 'Cis/Abgabetool/Assistenz/$1';
+1 -2
View File
@@ -22,9 +22,8 @@ unset($config['student']['searchfields']['email']);
unset($config['student']['searchfields']['tel']);
$config['student']['resultfields'] = [
"s.student_uid AS uid",
"s.matrikelnr AS personenkennzeichen",
"s.matrikelnr",
"p.person_id",
"p.matr_nr AS matrikelnummer",
"(p.vorname || ' ' || p.nachname) AS name",
"ARRAY[s.student_uid || '@' || '" . DOMAIN . "'] AS email",
"CASE
-29
View File
@@ -168,32 +168,3 @@ $config['stgkz_blacklist_wiederholung'] = [];
* @var array An array of noten ids
*/
$config['note_blacklist_wiederholung'] = [];
/**
* Enable/disable the Abmeldung StG process
*
* @var bool
*/
$config['abmeldung_stg_enabled'] = true;
/**
* Enable/disable the Abmeldung process
*
* @var bool
*/
$config['abmeldung_enabled'] = true;
/**
* Enable/disable the Unterbrecher process
*
* @var bool
*/
$config['unterbrechung_enabled'] = true;
/**
* Enable/disable the Wiederholer process
*
* @var bool
*/
$config['wiederholung_enabled'] = true;
+26 -5
View File
@@ -31,8 +31,12 @@ class Abgabetool extends Auth_Controller
{
// TODO: routing from index based on berechtigung?
$viewData = array(
'uid'=>getAuthUID(),
);
if(defined('CIS4') && CIS4) {
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'Abgabetool']);
$this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData, 'route' => 'Abgabetool']);
} else {
$this->load->view('Cis/Abgabetool.php', ['uid' => getAuthUID(), 'route' => 'Abgabetool']);
}
@@ -40,8 +44,12 @@ class Abgabetool extends Auth_Controller
public function Student($student_uid_prop = '')
{
$viewData = array(
'uid'=>getAuthUID(),
);
if(defined('CIS4') && CIS4) {
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'AbgabetoolStudent']);
$this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData, 'route' => 'AbgabetoolStudent']);
} else {
$this->load->view('Cis/Abgabetool.php', ['uid' => getAuthUID(), 'route' => 'AbgabetoolStudent', 'student_uid_prop' => $student_uid_prop]);
}
@@ -49,8 +57,12 @@ class Abgabetool extends Auth_Controller
public function Mitarbeiter()
{
$viewData = array(
'uid'=>getAuthUID(),
);
if(defined('CIS4') && CIS4) {
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'AbgabetoolMitarbeiter']);
$this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData, 'route' => 'AbgabetoolMitarbeiter']);
} else {
$this->load->view('Cis/Abgabetool.php', ['uid' => getAuthUID(), 'route' => 'AbgabetoolMitarbeiter']);
}
@@ -58,8 +70,13 @@ class Abgabetool extends Auth_Controller
public function Assistenz($stg_kz_prop = '')
{
$viewData = array(
'uid'=>getAuthUID(),
);
if(defined('CIS4') && CIS4) {
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'AbgabetoolAssistenz']);
$this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData, 'route' => 'AbgabetoolAssistenz']);
} else {
$this->load->view('Cis/Abgabetool.php', ['uid' => getAuthUID(), 'route' => 'AbgabetoolAssistenz', 'stg_kz_prop' => $stg_kz_prop]);
}
@@ -67,8 +84,12 @@ class Abgabetool extends Auth_Controller
public function Deadlines()
{
$viewData = array(
'uid'=>getAuthUID(),
);
if(defined('CIS4') && CIS4) {
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'DeadlinesOverview']);
$this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData, 'route' => 'DeadlinesOverview']);
} else {
$this->load->view('Cis/Abgabetool.php', ['uid' => getAuthUID(), 'route' => 'DeadlinesOverview']);
}
+1 -1
View File
@@ -40,7 +40,7 @@ class Auth extends FHC_Controller
if ($this->form_validation->run())
{
redirect($this->authlib->getLandingPage('/Cis4'));
redirect($this->authlib->getLandingPage('/CisVue/Dashboard'));
}
else
{
+7 -1
View File
@@ -28,6 +28,12 @@ class LvPlan extends Auth_Controller
*/
public function index()
{
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'LvPlan']);
$viewData = array(
'uid'=>getAuthUID(),
'timezone' => $this->config->item('timezone')
);
$this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData, 'route' => 'LvPlan']);
}
}
+6 -1
View File
@@ -26,6 +26,11 @@ class MyLv extends Auth_Controller
*/
public function index()
{
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'MyLv']);
$viewData = array(
);
$this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData, 'route' => 'MyLv']);
}
}
+8 -2
View File
@@ -27,7 +27,13 @@ class MyLvPlan extends Auth_Controller
* @return void
*/
public function index()
{
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'MyLvPlan']);
{
$viewData = array(
'uid'=>getAuthUID(),
'timezone' => $this->config->item('timezone')
);
$this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData, 'route' => 'MyLvPlan']);
}
}
@@ -1,34 +0,0 @@
<?php
if (!defined('BASEPATH'))
exit('No direct script access allowed');
/**
*
*/
class OtherLvPlan extends Auth_Controller
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct([
'index' => ['basis/other_lv_plan:r']
]);
// Load Config
$this->load->config('calendar');
}
// -----------------------------------------------------------------------------------------------------------------
// Public methods
/**
* @return void
*/
public function index()
{
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'OtherLvPlan']);
}
}
@@ -0,0 +1,39 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
*
*/
class OverviewLvPlan extends Auth_Controller
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct([
'index' => ['basis/cis:r']
]);
// Load Config
$this->load->config('calendar');
}
// -----------------------------------------------------------------------------------------------------------------
// Public methods
/**
* @return void
*/
public function index()
{
$viewData = array(
'uid'=>getAuthUID(),
'timezone' => $this->config->item('timezone')
);
$this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData, 'route' => 'OverviewLvPlan']);
}
}
+39 -19
View File
@@ -55,7 +55,15 @@ class Profil extends Auth_Controller
*/
public function index()
{
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'profilIndex']);
$this->load->library('ProfilLib');
$profil_data = $this->profillib->getView(getAuthUID());
$profil_data = hasData($profil_data) ? getData($profil_data) : null;
$viewData = array(
'editable'=>true,
'profil_data' => $profil_data,
);
$this->load->view('CisRouterView/CisRouterView.php',['viewData' => $viewData, 'route' => 'profilIndex']);
}
/**
@@ -65,13 +73,23 @@ class Profil extends Auth_Controller
*/
public function View($uid)
{
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'profilViewUid']);
$this->load->library('ProfilLib');
$profil_data = $this->profillib->getView($uid);
$profil_data = hasData($profil_data) ? getData($profil_data) : null;
$viewData = array (
'uid' => $uid,
'profil_data'=>$profil_data,
);
if($uid == getAuthUID()){
$viewData['editable'] = true;
}
$this->load->view('CisRouterView/CisRouterView.php',['viewData' => $viewData, 'route' => 'profilViewUid']);
}
/**
* checks whether a specific userID is a student or not (foreword declaration of the function isStudent in Student_model.php)
* checks whether a specific userID is a mitarbeiter or not (foreword declaration of the function isMitarbeiter in Mitarbeiter_model.php)
* @access public
* @param $uid the userID used to check if it is a student
* @param $uid the userID used to check if it is a mitarbeiter
* @return boolean
*/
public function isStudent($uid)
@@ -101,7 +119,7 @@ class Profil extends Auth_Controller
}
/**
* gets the adressen that are marked as zustell from the currently logged in user
* gets the adressen that are marked as zustell from the currenlty logged in user
* @access public
* @return array a list of adresse_id's
*/
@@ -244,23 +262,23 @@ class Profil extends Auth_Controller
$this->GemeindeModel->addDistinct();
$this->GemeindeModel->addSelect(["name"]);
if ($nation == "A") {
if (isset($zip) && $zip > 999 && $zip < 32000) {
if (isset($zip) && $zip > 999 && $zip < 32000) {
$gemeinde_res = $this->GemeindeModel->loadWhere(['plz' => $zip]);
if (isError($gemeinde_res)) {
show_error("error while trying to query bis.tbl_gemeinde");
$gemeinde_res = $this->GemeindeModel->loadWhere(['plz' => $zip]);
if (isError($gemeinde_res)) {
show_error("error while trying to query bis.tbl_gemeinde");
}
$gemeinde_res = hasData($gemeinde_res) ? getData($gemeinde_res) : null;
$gemeinde_res = array_map(function ($obj) {
return $obj->name;
}, $gemeinde_res);
echo json_encode($gemeinde_res);
} else {
echo json_encode(error("ortschaftskennziffer code was not valid"));
}
$gemeinde_res = hasData($gemeinde_res) ? getData($gemeinde_res) : null;
$gemeinde_res = array_map(function ($obj) {
return $obj->name;
}, $gemeinde_res);
echo json_encode($gemeinde_res);
} else {
echo json_encode(error("ortschaftskennziffer code was not valid"));
}
} else {
echo json_encode(error("Nation was not 'A' (Austria)"));
echo json_encode(error("Nation was not 'A' (Austria)"));
}
}
@@ -732,4 +750,6 @@ class Profil extends Auth_Controller
$zutrittskarte_ausgegebenam = str_replace("-", ".", $zutrittskarte_ausgegebenam);
return $zutrittskarte_ausgegebenam;
}
}
+6 -1
View File
@@ -25,6 +25,11 @@ class Raumsuche extends Auth_Controller
*/
public function index()
{
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'Raumsuche']);
$viewData = array(
'uid'=>getAuthUID(),
);
$this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData, 'route' => 'Raumsuche']);
}
}
+7 -1
View File
@@ -28,6 +28,12 @@ class StgOrgLvPlan extends Auth_Controller
*/
public function index()
{
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'StgOrgLvPlan']);
$viewData = array(
'uid'=>getAuthUID(),
'timezone' => $this->config->item('timezone')
);
$this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData, 'route' => 'StgOrgLvPlan']);
}
}
+4 -1
View File
@@ -29,7 +29,10 @@ class Studium extends Auth_Controller
*/
public function index()
{
$this->load->view('CisRouterView/CisRouterView.php',['route' => 'studium']);
$viewData = array(
);
$this->load->view('CisRouterView/CisRouterView.php',['viewData' => $viewData, 'route' => 'studium']);
}
+15 -6
View File
@@ -1,7 +1,6 @@
<?php
if (!defined('BASEPATH'))
exit('No direct script access allowed');
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
*
@@ -14,9 +13,9 @@ class Cis4 extends Auth_Controller
public function __construct()
{
parent::__construct(
array(
'index' => 'basis/cis:r'
)
array(
'index' => 'basis/cis:r'
)
);
// Load Config
@@ -31,6 +30,16 @@ class Cis4 extends Auth_Controller
*/
public function index()
{
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'FhcDashboard']);
$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,
'timezone' => $this->config->item('timezone')
);
$this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData, 'route' => 'FhcDashboard']);
}
}
@@ -0,0 +1,43 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
*
*/
class Dashboard extends Auth_Controller
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct(
array(
'index' => 'dashboard/benutzer:r'
)
);
}
// -----------------------------------------------------------------------------------------------------------------
// Public methods
/**
* @return void
*/
public function index()
{
$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->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData]);
}
}
File diff suppressed because it is too large Load Diff
@@ -18,8 +18,6 @@
if (! defined('BASEPATH')) exit('No direct script access allowed');
use \DateTime as DateTime;
class Bookmark extends FHCAPI_Controller
{
@@ -30,162 +28,111 @@ class Bookmark extends FHCAPI_Controller
{
parent::__construct([
'getBookmarks' => self::PERM_LOGGED,
'delete' => self::PERM_LOGGED,
'insert' => self::PERM_LOGGED,
'delete' => self::PERM_LOGGED,
'insert' => self::PERM_LOGGED,
'update' => self::PERM_LOGGED,
'changeOrder' => self::PERM_LOGGED
]);
]);
$this->load->model('dashboard/Bookmark_model', 'BookmarkModel');
$this->uid = getAuthUID();
$this->pid = getAuthPersonID();
}
//------------------------------------------------------------------------------------------------------------------
// Public methods
/**
* gets the bookmarks associated to a user
/**
* gets the bookmarks associated to a user
* @access public
* @return void
*/
public function getBookmarks()
{
$this->BookmarkModel->addOrder("sort");
$this->BookmarkModel->addOrder("bookmark_id");
$bookmarks = $this->BookmarkModel->loadWhere(["uid"=>$this->uid]);
$bookmarks = $this->getDataOrTerminateWithError($bookmarks);
$bookmarks = $this->getDataOrTerminateWithError($bookmarks);
$this->terminateWithSuccess($bookmarks);
}
$this->terminateWithSuccess($bookmarks);
}
/**
* deletes bookmark from associated user
/**
* deletes bookmark from associated user
* @access public
* @return void
*/
public function delete($bookmark_id)
public function delete($bookmark_id)
{
$bookmark = $this->BookmarkModel->load($bookmark_id);
$bookmark = $this->BookmarkModel->load($bookmark_id);
$bookmark = current($this->getDataOrTerminateWithError($bookmark));
$bookmark = current($this->getDataOrTerminateWithError($bookmark));
// only delete bookmark if the user is the owner of the bookmark
if ($bookmark->uid == $this->uid || $this->permissionlib->isBerechtigt('admin')) {
$delete_result = $this->BookmarkModel->delete($bookmark_id);
// only delete bookmark if the user is the owner of the bookmark
if($bookmark->uid == $this->uid || $this->permissionlib->isBerechtigt('admin')){
$delete_result = $this->getDataOrTerminateWithError($delete_result);
$delete_result = $this->BookmarkModel->delete($bookmark_id);
$this->terminateWithSuccess($delete_result);
} else {
$this->_outputAuthError(['delete' => ['admin:rw']]);
}
}
$delete_result = $this->getDataOrTerminateWithError($delete_result);
/**
* inserts new bookmark into the bookmark table
$this->terminateWithSuccess($delete_result);
}else{
$this->_outputAuthError(['delete' => ['admin:rw']]);
}
}
/**
* inserts new bookmark into the bookmark table
* @access public
* @return void
*/
public function insert()
public function insert()
{
// 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())
$this->terminateWithValidationErrors($this->form_validation->error_array());
// 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);
$tag = $this->input->post('tag', true);
if (is_array($tag)) {
$tag = json_encode($tag); // convert PHP array to JSON string
}
$sort = $this->input->post('sort', true);
$url = $this->input->post('url',true);
$title = $this->input->post('title',true);
$tag = $this->input->post('tag', true);
$insert_into_result = $this->BookmarkModel->insert([
'uid' => $this->uid,
'url' => $url,
'title' => $title,
'tag' => $tag,
'insertvon' => $this->uid,
'updateamum' => null,
'updatevon' => null,
'sort' => $sort
]);
$insert_into_result = $this->BookmarkModel->insert(['uid'=>$this->uid, 'url'=>$url, 'title'=>$title,'tag'=>$tag, 'insertvon'=>$this->uid, 'updateamum'=>NULL, 'updatevon'=>NULL]);
$insert_into_result = $this->getDataOrTerminateWithError($insert_into_result);
$insert_into_result = $this->getDataOrTerminateWithError($insert_into_result);
$this->terminateWithSuccess($insert_into_result);
}
$this->terminateWithSuccess($insert_into_result);
}
/**
* updates bookmark in the bookmark table
* updates bookmark in the bookmark table
* @access public
* @return void
*/
public function update($bookmark_id)
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())
$this->terminateWithValidationErrors($this->form_validation->error_array());
// 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);
$tag = $this->input->post('tag', true);
if (is_array($tag)) {
$tag = json_encode($tag);
}
$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,
'tag' => $tag,
'updateamum' => $now
]);
$update_result = $this->BookmarkModel->update($bookmark_id,['url'=>$url, 'title'=>$title,'updateamum'=>$now]);
$update_result = $this->getDataOrTerminateWithError($update_result);
$update_result = $this->getDataOrTerminateWithError($update_result);
$this->terminateWithSuccess($update_result);
}
$this->terminateWithSuccess($update_result);
/**
* changes sort of two bookmarks in the bookmark table
* @access public
* @return void
*/
public function changeOrder($bookmark_id1, $bookmark_id2)
{
$update_result = [];
$result1 = $this->BookmarkModel->load($bookmark_id1);
$data1 = $this->getDataOrTerminateWithError($result1);
$sort1 = current($data1)->sort;
$result2 = $this->BookmarkModel->load(["bookmark_id"=>$bookmark_id2]);
$data2 = $this->getDataOrTerminateWithError($result2);
$sort2 = current($data2)->sort;
$update_result1 = $this->BookmarkModel->update($bookmark_id1, [
'sort' => $sort2
]);
$update_result[] = $this->getDataOrTerminateWithError($update_result1);
$update_result2 = $this->BookmarkModel->update($bookmark_id2, [
'sort' => $sort1
]);
$update_result[] = $this->getDataOrTerminateWithError($update_result2);
$this->terminateWithSuccess($update_result);
}
}
}
@@ -27,7 +27,7 @@ class Cis4FhcApi extends FHCAPI_Controller
public function __construct()
{
parent::__construct([
'dashboardViewData' => self::PERM_LOGGED,
'getViewData' => self::PERM_LOGGED,
]);
}
@@ -36,22 +36,17 @@ class Cis4FhcApi extends FHCAPI_Controller
// Public methods
/**
* retrieves view data for dashboard view
* @access public
* @param $uid the userID for which profile is being viewed, null or missing value implies one's own profile
*/
public function dashboardViewData()
* fetches ViewData
*/
public function getViewData()
{
$this->load->model('person/Person_model','PersonModel');
$personData = getData($this->PersonModel->getByUid(getAuthUID()))[0];
$this->load->config('calendar');
$viewData = array(
'uid' => getAuthUID(),
'name' => $personData->vorname,
'person_id' => $personData->person_id,
'timezone' => $this->config->item('timezone'),
'person_id' => $personData->person_id
);
$this->terminateWithSuccess($viewData);
@@ -16,13 +16,12 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
if (!defined('BASEPATH'))
exit('No direct script access allowed');
if (! defined('BASEPATH')) exit('No direct script access allowed');
class CisMenu extends FHCAPI_Controller
{
/**
* Object initialization
*/
@@ -32,95 +31,28 @@ class CisMenu extends FHCAPI_Controller
'getMenu' => self::PERM_LOGGED,
]);
}
//------------------------------------------------------------------------------------------------------------------
// Public methods
/**
/**
* fetches the menu for CIS from the database based on the userLanguage
*/
public function getMenu()
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());
$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 ?? [];
$menu = $this->generateUrlsForMenuItems($menu);
$this->terminateWithSuccess($menu);
}
private function generateUrlsForMenuItems($menuItems)
{
return array_map(
function ($menuItem) {
return $this->generateUrlForMenuItem($menuItem);
},
$menuItems
);
}
private function generateUrlForMenuItem($menuItem)
{
$menuItem->url = $this->menuItemUrlHelper($menuItem);
unset($menuItem->content);
if ($menuItem->childs && count($menuItem->childs)) {
$menuItem->childs = $this->generateUrlsForMenuItems($menuItem->childs);
}
return $menuItem;
}
private function menuItemUrlHelper($menuItem)
{
if ($menuItem->template_kurzbz !== 'redirect') {
return site_url("/CisVue/Cms/content/" . $menuItem->content_id);
}
if (!$menuItem->content || !mb_strlen($menuItem->content)) {
return '';
}
$doc = new DOMDocument();
$doc->loadXML($menuItem->content);
$urlElem = $doc->getElementsByTagName('url')->item(0);
if (!$urlElem) {
return '';
}
$url = $urlElem->textContent;
if (strpos($url, '../cms/news.php') !== false) {
$newsRegex = '/^\.\.\/cms\/news\.php/';
$url = preg_replace($newsRegex, site_url("/CisVue/Cms/news"), $url);
}
if (strpos($url, '../cms/content.php?') !== false) {
$contentRegex = '/^\.\.\/cms\/content\.php\?content_id=([0-9]+)/';
$matches = [];
preg_match($contentRegex, $url, $matches);
$url = site_url('/CisVue/Cms/content/' . $matches[1]);
}
if (strpos($url, '../index.ci.php') !== false) {
$indexRegex = '/^\.\.\/index\.ci\.php/';
$url = preg_replace($indexRegex, site_url(), $url);
}
if (strpos($url, '../') !== false) {
$relativeRegex = '/^\.\.\//';
$url = preg_replace($relativeRegex, base_url(), $url);
}
return $url;
}
}
}
@@ -38,8 +38,7 @@ class Lehre extends FHCAPI_Controller
parent::__construct([
'lvStudentenMail' => self::PERM_LOGGED,
'LV' => self::PERM_LOGGED,
'Pruefungen' => self::PERM_LOGGED,
'semesterAverageGrade' => self::PERM_LOGGED,
'Pruefungen' => self::PERM_LOGGED
]);
}
@@ -101,49 +100,5 @@ class Lehre extends FHCAPI_Controller
$this->terminateWithSuccess($result);
}
/**
* calculates and returns the grade average and weighted average for a specific semester
* @param string $studiensemester_kurzbz
* @return void
*/
public function semesterAverageGrade($studiensemester_kurzbz)
{
$this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel');
$semesterLvs = $this->LehrveranstaltungModel->getLvsByStudentWithGrades(getAuthUID(), $studiensemester_kurzbz, getUserLanguage());
if (isError($semesterLvs))
return $this->outputJsonError(getError($semesterLvs));
$semesterLvsData = getData($semesterLvs);
$doGradesExist = false;
$sum = 0;
$count = 0;
$sumWeighted = 0;
$sumEcts = 0;
foreach ($semesterLvsData as $lv) {
if (!$lv->znote || $lv->znote < 1 || $lv->znote > 5)
continue;
$doGradesExist = true;
$sum += $lv->znote;
$count++;
$sumWeighted += $lv->znote * floatval($lv->ects);
$sumEcts += floatval($lv->ects);
}
$averageGrade = null;
$weightedAverageGrade = null;
if ($doGradesExist) {
$averageGrade = $sum/$count;
$weightedAverageGrade = $sumWeighted/$sumEcts;
}
$this->terminateWithSuccess(['average_grade' => $averageGrade, 'weighted_average_grade' => $weightedAverageGrade]);
}
}
@@ -16,8 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
if (!defined('BASEPATH'))
exit('No direct script access allowed');
if (! defined('BASEPATH')) exit('No direct script access allowed');
use CI3_Events as Events;
use \DateTime as DateTime;
@@ -34,8 +33,8 @@ class LvPlan extends FHCAPI_Controller
parent::__construct([
'getRoomplan' => self::PERM_LOGGED,
'Stunden' => self::PERM_LOGGED,
'getReservierungen' => self::PERM_LOGGED,
'Stunden' => self::PERM_LOGGED,
'getReservierungen' => self::PERM_LOGGED,
'LvPlanEvents' => self::PERM_LOGGED,
'eventsPersonal' => self::PERM_LOGGED,
'eventsLv' => self::PERM_LOGGED,
@@ -47,12 +46,11 @@ class LvPlan extends FHCAPI_Controller
'fetchFerienEvents' => self::PERM_LOGGED,
'getStudiengaenge' => self::PERM_LOGGED,
'getLehrverband' => self::PERM_LOGGED,
'permissionOtherLvPlan' => self::PERM_LOGGED,
'compactibleEventTypes' => self::PERM_LOGGED,
]);
$this->load->library('LogLib');
$this->loglib->setConfigs(array(
$this->load->library('LogLib');
$this->loglib->setConfigs(array(
'classIndex' => 5,
'functionIndex' => 5,
'lineIndex' => 4,
@@ -60,17 +58,17 @@ class LvPlan extends FHCAPI_Controller
'dbExecuteUser' => 'RESTful API'
));
$this->load->library('form_validation');
$this->load->library('form_validation');
}
//------------------------------------------------------------------------------------------------------------------
// Public methods
/**
* fetches LvPlan and Moodle events together
* @access public
*
*/
* fetches LvPlan and Moodle events together
* @access public
*
*/
public function LvPlanEvents()
{
$hasLv = $this->input->post('lv_id');
@@ -97,22 +95,16 @@ class LvPlan extends FHCAPI_Controller
// storing the post parameter in local variables
$start_date = $this->input->post('start_date', true);
$end_date = $this->input->post('end_date', true);
$uid = $this->input->post('uid', true);
// disallow accessing other user's events if missing permission
if ($uid && $uid !== getAuthUID() && !$this->permissionlib->isBerechtigt('basis/other_lv_plan')) {
$this->terminateWithError("Missing permission to view other users' timetables!");
}
// fetching lvplan events
$result = $this->stundenplanlib->getEventsUser($start_date, $end_date, $uid);
$result = $this->stundenplanlib->getEventsUser($start_date, $end_date);
$lvplanEvents = $this->getDataOrTerminateWithError($result);
// fetching moodle events
$moodleEvents = $this->fetchMoodleEvents($start_date, $end_date, $uid);
$moodleEvents = $this->fetchMoodleEvents($start_date, $end_date);
// fetching ferien events
$ferienEvents = $this->fetchFerienEvents($start_date, $end_date, $uid);
$ferienEvents = $this->fetchFerienEvents($start_date, $end_date);
$this->terminateWithSuccess(array_merge(
@@ -136,11 +128,15 @@ class LvPlan extends FHCAPI_Controller
$this->form_validation->set_rules('end_date', "end_date", "required");
//$this->form_validation->set_rules('stg_kz', "stg_kz", "required"); //no validation show empty calendar
if (!$this->form_validation->run()) {
if (!$this->form_validation->run())
{
$this->terminateWithValidationErrors($this->form_validation->error_array());
$stgOrgEvents = [];
$ferienEvents = [];
} else {
}
else
{
$start_date = $this->input->post('start_date', true);
$end_date = $this->input->post('end_date', true);
$stg_kz = $this->input->post('stg_kz', true);
@@ -174,7 +170,7 @@ class LvPlan extends FHCAPI_Controller
$this->form_validation->set_rules('start_date', "start_date", "required");
$this->form_validation->set_rules('end_date', "end_date", "required");
$this->form_validation->set_rules('lv_id', "lv_id", "required|integer");
if (!$this->form_validation->run())
$this->terminateWithValidationErrors($this->form_validation->error_array());
@@ -197,42 +193,40 @@ class LvPlan extends FHCAPI_Controller
}
//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));
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);
}
public function getLvPlanForStudiensemester($studiensemester, $lvid)
{
public function getLvPlanForStudiensemester($studiensemester,$lvid){
$this->load->library('StundenplanLib');
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
$studiensemester_result = $this->StudiensemesterModel->loadWhere(["studiensemester_kurzbz" => $studiensemester]);
$this->load->model('organisation/Studiensemester_model','StudiensemesterModel');
$studiensemester_result = $this->StudiensemesterModel->loadWhere(["studiensemester_kurzbz"=>$studiensemester]);
$studiensemester_result = current($this->getDataOrTerminateWithError($studiensemester_result));
$timespan_start = new DateTime($studiensemester_result->start);
$timespan_ende = new DateTime($studiensemester_result->ende);
$lvplan = $this->stundenplanlib->getStundenplan(date_format($timespan_start, 'Y-m-d'), date_format($timespan_ende, 'Y-m-d'), $lvid);
$lvplan = $this->stundenplanlib->getStundenplan(date_format($timespan_start, 'Y-m-d'),date_format($timespan_ende, 'Y-m-d'), $lvid);
$this->terminateWithSuccess($lvplan);
}
/**
* fetches Stunden layout from database
* @access public
*
*/
public function Stunden()
/**
* fetches Stunden layout from database
* @access public
*
*/
public function Stunden()
{
$this->load->model('ressource/Stunde_model', 'StundeModel');
$this->StundeModel->addOrder('stunde', 'ASC');
$stunden = $this->StundeModel->load();
$stunden = $this->getDataOrTerminateWithError($stunden);
$stunden = $this->getDataOrTerminateWithError($stunden);
$this->terminateWithSuccess($stunden);
}
@@ -263,10 +257,10 @@ class LvPlan extends FHCAPI_Controller
$roomplan_data = $this->stundenplanlib->getRoomplan($ort_kurzbz, $start_date, $end_date);
$roomplan_data = $this->getDataOrTerminateWithError($roomplan_data);
$this->terminateWithSuccess($roomplan_data);
}
/**
* gets the reservierungen of a room if the ort_kurzbz parameter is
* supplied otherwise gets the reservierungen of the lvplan of a student
@@ -279,32 +273,25 @@ class LvPlan extends FHCAPI_Controller
{
$this->form_validation->set_rules('start_date', "StartDate", "required");
$this->form_validation->set_rules('end_date', "EndDate", "required");
if (!$this->form_validation->run())
$this->terminateWithValidationErrors($this->form_validation->error_array());
// storing the post parameter in local variables
$start_date = $this->input->post('start_date', true);
$end_date = $this->input->post('end_date', true);
$uid = $this->input->post('uid', true);
// disallow accessing other user's reservierungen if missing permission
if ($uid && $uid !== getAuthUID() && !$this->permissionlib->isBerechtigt('basis/other_lv_plan')) {
$this->terminateWithError("Missing permission to view other users' timetables!");
}
// get data
$this->load->library('StundenplanLib');
$result = $this->stundenplanlib->getReservierungen($start_date, $end_date, $ort_kurzbz, $uid);
$result = $this->stundenplanlib->getReservierungen($start_date, $end_date, $ort_kurzbz);
$result = $this->getDataOrTerminateWithError($result);
$this->terminateWithSuccess($result);
}
public function getLehreinheitStudiensemester($lehreinheit_id)
{
public function getLehreinheitStudiensemester($lehreinheit_id){
$this->load->model('education/Lehreinheit_model', 'LehreinheitModel');
$this->LehreinheitModel->addSelect(["studiensemester_kurzbz"]);
$result = $this->LehreinheitModel->load($lehreinheit_id);
@@ -349,7 +336,7 @@ class LvPlan extends FHCAPI_Controller
public function getStudiengaenge()
{
$this->load->model('organisation/Studiengang_model', 'StudiengangModel');
$this->load->model('organisation/Studiengang_model','StudiengangModel');
$this->StudiengangModel->addOrder('typ');
$this->StudiengangModel->addOrder('kurzbz');
@@ -362,19 +349,19 @@ class LvPlan extends FHCAPI_Controller
return $this->terminateWithSuccess($data);
}
public function getLehrverband($studiengang_kz, $semester = null, $verband = null)
public function getLehrverband($studiengang_kz, $semester=null, $verband=null)
{
$this->load->model('organisation/Lehrverband_model', 'LehrverbandModel');
$this->load->model('organisation/Lehrverband_model','LehrverbandModel');
$where = [
'aktiv' => true,
'studiengang_kz' => $studiengang_kz,
];
if ($semester !== null && $semester !== 'null' && $semester !== 'undefined') {
if ($semester !== null && $semester !== 'null' && $semester !== 'undefined') {
$where['semester'] = $semester;
}
if ($verband !== null && $verband !== 'null' && $verband !== 'undefined') {
if ($verband !== null && $verband !== 'null' && $verband !== 'undefined') {
$where['verband'] = $verband;
}
@@ -389,26 +376,6 @@ class LvPlan extends FHCAPI_Controller
return $this->terminateWithSuccess($data);
}
/**
* Checks if the current user has permission to view other users' timetables
*
* @return void
*/
public function permissionOtherLvPlan()
{
$this->terminateWithSuccess($this->permissionlib->isBerechtigt('basis/other_lv_plan'));
}
/**
* get event types which can be compacted in lv plan display
*
* @return void
*/
public function compactibleEventTypes()
{
$this->terminateWithSuccess(["lehreinheit", "reservierung", "ferien", "moodle"]);
}
/**
* fetch moodle events
*
@@ -416,34 +383,30 @@ class LvPlan extends FHCAPI_Controller
* @param string $end_date
* @return array
*/
private function fetchMoodleEvents($start_date, $end_date, $uid = null)
private function fetchMoodleEvents($start_date, $end_date)
{
if ($uid && $uid !== getAuthUID()) {
return [];
}
$this->load->config('calendar');
$tz = new DateTimeZone($this->config->item('timezone'));
$start = new DateTime($start_date);
$start->setTimezone($tz);
$end = new DateTime($end_date);
$end->setTimezone($tz);
$end->modify('+1 day -1 second');
$moodle_events = [];
Events::trigger(
'moodleCalendarEvents',
function &() use (&$moodle_events) {
function & () use (&$moodle_events) {
return $moodle_events;
},
[
'start_date' => $start->format('c'),
'end_date' => $end->format('c'),
'username' => $uid ?? getAuthUID()
'username' => getAuthUID()
]
);
@@ -457,7 +420,7 @@ class LvPlan extends FHCAPI_Controller
* @param string $end_date
* @return array
*/
private function fetchFerienEvents($start_date, $end_date, $uid = null)
private function fetchFerienEvents($start_date, $end_date)
{
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
$this->load->model('education/Studentlehrverband_model', 'StudentLehrverbandModel');
@@ -469,7 +432,7 @@ class LvPlan extends FHCAPI_Controller
$studentsemester_kurzbz = current($currentStudiensemester)->studiensemester_kurzbz;
$studiengang = $this->StudentLehrverbandModel->loadWhere([
"student_uid" => $uid ?? getAuthUID(),
"student_uid" => getAuthUID(),
"studiensemester_kurzbz" => $studentsemester_kurzbz
]);
$studiengang = $this->getDataOrTerminateWithError($studiengang);
@@ -1,76 +0,0 @@
<?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 OtherLvPlan extends FHCAPI_Controller
{
/**
* Object initialization
*/
public function __construct()
{
parent::__construct([
'otherLvPlanViewData' => ['basis/other_lv_plan:r'],
]);
$this->load->model('ressource/mitarbeiter_model', 'MitarbeiterModel');
$this->load->model('person/Benutzer_model', 'BenutzerModel');
}
//------------------------------------------------------------------------------------------------------------------
// Public methods
/**
* retrieves viewData for other lv plan view
* @access public
* @param $uid the userID for which the other lv plan is being viewed
*/
public function otherLvPlanViewData($uid)
{
$isMitarbeiterResult = $this->MitarbeiterModel->isMitarbeiter($uid);
$isMitarbeiter = getData($isMitarbeiterResult);
$isStudent = !$isMitarbeiter;
$this->BenutzerModel->addSelect(["foto", "vorname", "nachname"]);
$this->BenutzerModel->addJoin("tbl_person", "person_id");
$personResult = $this->BenutzerModel->load([$uid]);
$person = hasData($personResult) ? getData($personResult) : null;
$viewData = [
"user_data" => [
"username" => $uid,
"is_student" => $isStudent,
"is_mitarbeiter" => $isMitarbeiter,
"foto" => $person[0]->foto,
"vorname" => $person[0]->vorname,
"nachname" => $person[0]->nachname,
],
];
$this->terminateWithSuccess($viewData);
}
// -----------------------------------------------------------------------------------------------------------------
// Private methods
}
@@ -32,8 +32,6 @@ class Phrasen extends FHCAPI_Controller
'setLanguage' => self::PERM_ANONYMOUS,
'getLanguage' => self::PERM_ANONYMOUS,
'getAllLanguages' => self::PERM_ANONYMOUS,
'getPhrases' => self::PERM_ANONYMOUS,
'getTabulatorPhrases' => self::PERM_ANONYMOUS,
]);
$this->load->helper('hlp_language');
@@ -94,59 +92,4 @@ class Phrasen extends FHCAPI_Controller
$this->terminateWithSuccess($langs);
}
public function getPhrases()
{
$postParams = $this->getPostJSON();
$languages = $postParams->languages;
if (!$languages || !count($languages)) {
$this->load->model('system/Sprache_model', 'sprachenModel');
$activeLanguages = $this->sprachenModel->loadWhere(array('content' => true));
$activeLanguagesData = $this->getDataOrTerminateWithError($activeLanguages);
$languages = array_map(
function ($languageData) {
return $languageData->sprache;
},
$activeLanguagesData
);
}
$this->load->model('system/Phrase_model', 'phraseModel');
$phrasesGroupedByCategory = $postParams->phrasesGroupedByCategory;
$result = [];
foreach ($languages as $language) {
$phrases = $this->phraseModel->getPhrasesByCategoryAndPhrasesAndLanguage($phrasesGroupedByCategory, $language);
$result[$language] = $this->getDataOrTerminateWithError($phrases);
}
$this->terminateWithSuccess($result);
}
public function getTabulatorPhrases()
{
$languages = json_decode($this->input->get('languages'));
if (!$languages || !count($languages)) {
$this->load->model('system/Sprache_model', 'sprachenModel');
$activeLanguages = $this->sprachenModel->loadWhere(array('content' => true));
$activeLanguagesData = $this->getDataOrTerminateWithError($activeLanguages);
$languages = array_map(
function ($languageData) {
return $languageData->sprache;
},
$activeLanguagesData
);
}
$this->load->model('system/Phrase_model', 'phraseModel');
$result = [];
foreach ($languages as $language) {
$tabulatorPhrases = $this->phraseModel->getPhrasesByCategoryAndLanguage(['tabulator'], $language);
$result[$language] = $this->getDataOrTerminateWithError($tabulatorPhrases);
}
header('Pragma: private');
header('Cache-Control: private, max-age=' . (60 * 60 * 24 * 30));
$this->terminateWithSuccess($result);
}
}
@@ -16,8 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
if (!defined('BASEPATH'))
exit('No direct script access allowed');
if (! defined('BASEPATH')) exit('No direct script access allowed');
class Profil extends FHCAPI_Controller
{
@@ -28,13 +27,13 @@ class Profil extends FHCAPI_Controller
public function __construct()
{
parent::__construct([
'fotoSperre' => self::PERM_LOGGED,
'fotoSperre' => self::PERM_LOGGED,
'getGemeinden' => self::PERM_LOGGED,
'getAllNationen' => self::PERM_LOGGED,
'isMitarbeiter' => self::PERM_LOGGED,
'profilViewData' => self::PERM_LOGGED,
]);
$this->load->library('PermissionLib');
$this->load->model('ressource/mitarbeiter_model', 'MitarbeiterModel');
@@ -49,37 +48,28 @@ class Profil extends FHCAPI_Controller
//------------------------------------------------------------------------------------------------------------------
// Public methods
/**
* retrieves view data for profile view
* @access public
* @param $uid the userID for which profile is being viewed, null or missing value implies one's own profile
*/
public function profilViewData($uid = null)
{
$authUid = getAuthUID();
$isProfilOfAuthUser = !$uid || $uid === $authUid;
public function profilViewData($uid=null){
$this->load->library('ProfilLib');
$profileData = $this->profillib->getView($uid ?? $authUid);
$profileData = hasData($profileData) ? getData($profileData) : null;
$viewData = [
'editable' => $isProfilOfAuthUser,
'profil_data' => $profileData,
'permissions' => [
'basis/other_lv_plan' => $this->permissionlib->isBerechtigt(('basis/other_lv_plan'))
]
];
if ($isProfilOfAuthUser) {
$viewData['calendar_sync_urls'] = $this->getCalendarSyncUrlData();
$editable = false;
if(isset($uid) && $uid != null){
$profil_data = $this->profillib->getView($uid);
if($uid == getAuthUID()){
$editable = true;
}
}else{
$editable = true;
$profil_data = $this->profillib->getView(getAuthUID());
}
$profil_data = hasData($profil_data) ? getData($profil_data) : null;
$viewData = array(
'editable'=>$editable,
'profil_data' => $profil_data,
);
$this->terminateWithSuccess($viewData);
}
/**
/**
* update column foto_sperre in public.tbl_person
* @access public
* @param boolean $value new value for the column
@@ -87,9 +77,9 @@ class Profil extends FHCAPI_Controller
*/
public function fotoSperre($value)
{
if (!isset($value)) {
$this->terminateWithError("Missing parameter", self::ERROR_TYPE_GENERAL);
}
if(!isset($value)){
$this->terminateWithError("Missing parameter", self::ERROR_TYPE_GENERAL);
}
$res = $this->PersonModel->update($this->pid, ["foto_sperre" => $value]);
if (isError($res)) {
@@ -97,10 +87,10 @@ class Profil extends FHCAPI_Controller
}
$this->PersonModel->addSelect("foto_sperre");
$res = $this->PersonModel->load($this->pid);
$res = $this->getDataOrTerminateWithError($res);
$this->terminateWithSuccess(current($res));
$res = $this->getDataOrTerminateWithError($res);
$this->terminateWithSuccess(current($res));
}
/**
@@ -119,7 +109,7 @@ class Profil extends FHCAPI_Controller
if (isError($nation_res)) {
$this->terminateWithError("error while trying to query table codex.tbl_nation", self::ERROR_TYPE_GENERAL);
}
$nation_res = $this->getDataOrTerminateWithError($nation_res);
$this->terminateWithSuccess($nation_res);
@@ -127,30 +117,30 @@ class Profil extends FHCAPI_Controller
public function getGemeinden($nation, $zip)
{
if (!isset($nation) || !isset($zip)) {
if(!isset($nation) || !isset($zip)){
echo json_encode(error("Missing parameters"));
return;
}
$this->load->model('codex/Gemeinde_model', "GemeindeModel");
$gemeinde_res = $this->GemeindeModel->getGemeindeByPlz($zip);
if (isError($gemeinde_res)) {
$this->terminateWithError(getError($gemeinde_res), self::ERROR_TYPE_GENERAL);
$this->terminateWithError(getError($gemeinde_res),self::ERROR_TYPE_GENERAL);
}
$gemeinde_res = $this->getDataOrTerminateWithError($gemeinde_res);
/* $gemeinde_res = array_map(function ($obj) {
return $obj->ortschaftsname;
}, $gemeinde_res); */
$this->terminateWithSuccess($gemeinde_res);
$this->terminateWithSuccess($gemeinde_res);
}
/**
* checks whether a specific userID is a mitarbeiter or not (foreword declaration of the function isMitarbeiter in Mitarbeiter_model.php)
* @access public
@@ -160,48 +150,23 @@ class Profil extends FHCAPI_Controller
public function isMitarbeiter($uid)
{
if (!$uid)
$this->terminateWithError("No uid provided", self::ERROR_TYPE_GENERAL);
if(!$uid) $this->terminateWithError("No uid provided", self::ERROR_TYPE_GENERAL);
$result = $this->MitarbeiterModel->isMitarbeiter($uid);
if (isError($result)) {
$this->terminateWithError("error when calling Mitarbeiter_model function isMitarbeiter with uid " . $uid, self::ERROR_TYPE_GENERAL);
}
$result = $this->getDataOrTerminateWithError($result);
$this->terminateWithSuccess($result);
}
// -----------------------------------------------------------------------------------------------------------------
// Private methods
/**
* gets the identifier, phrase, and url for each calendar sync option
* @access private
* @return array array of arrays, where each child array is a sync option
*/
private function getCalendarSyncUrlData()
{
return [
[
"identifier" => "cal_dav",
"labelPhrase" => "profil/calendar_sync_cal_dav",
"url" => APP_ROOT . "webdav/lvplan.php/calendars/" . $this->uid . "/LVPlan-" . $this->uid,
],
[
"identifier" => "cal_dav_principal",
"labelPhrase" => "profil/calendar_sync_cal_dav_principal",
"url" => APP_ROOT . "webdav/lvplan.php/principals/" . $this->uid,
],
[
"identifier" => "i_cal",
"labelPhrase" => "profil/calendar_sync_i_cal",
"url" => APP_ROOT . "webdav/google.php?cal=" . encryptData($this->uid, LVPLAN_CYPHER_KEY) . "&" . microtime(true),
],
];
}
}
@@ -1,64 +0,0 @@
<?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 StgOrgLvPlan extends FHCAPI_Controller
{
/**
* Object initialization
*/
public function __construct()
{
parent::__construct([
'stgOrgLvPlanViewData' => self::PERM_LOGGED,
]);
}
//------------------------------------------------------------------------------------------------------------------
// Public methods
/**
* fetches view data for stg org lv plan
* @access public
*/
public function stgOrgLvPlanViewData()
{
$this->load->model('organisation/Studiengang_model', 'StudiengangModel');
$this->StudiengangModel->addOrder('typ');
$this->StudiengangModel->addOrder('kurzbz');
$result = $this->StudiengangModel->loadWhere([
'aktiv' => true
]);
$studiengaenge = $this->getDataOrTerminateWithError($result);
$viewData = array(
'studiengaenge' => $studiengaenge,
);
$this->terminateWithSuccess($viewData);
}
// -----------------------------------------------------------------------------------------------------------------
// Private methods
}
@@ -62,36 +62,21 @@ class Studium extends FHCAPI_Controller
if($this->getDataOrTerminateWithError($this->StudentModel->isStudent(getAuthUID()))){
$studentLehrverband =$this->StudentlehrverbandModel->loadWhere(["student_uid" => getAuthUID(), "studiensemester_kurzbz" => $aktuelles_studiensemester->studiensemester_kurzbz]);
//TODO(Manu) check if use Fallback or just comment out all paramschecks?
//add Fallback: if no LehrverbandData of actual semester, get Data of previous one
if(!hasData($studentLehrverband))
{
$result= $this->StudiensemesterModel->getPreviousFrom($aktuelles_studiensemester->studiensemester_kurzbz);
$data = $this->getDataOrTerminateWithError($result);
$vorheriges_studiensemester = current($data)->studiensemester_kurzbz;
$studentLehrverband =$this->StudentlehrverbandModel->loadWhere(["student_uid" => getAuthUID(), "studiensemester_kurzbz" => $vorheriges_studiensemester]);
}
$studentLehrverband = current(getData($studentLehrverband));
$studentLehrverband = current($this->getDataOrTerminateWithError($studentLehrverband));
$student_studiensemester = $studentLehrverband->studiensemester_kurzbz;
$student_studiengang = $studentLehrverband->studiengang_kz;
$student_semester = $studentLehrverband->semester;
$student_studienplan = $this->getStudienPlanFromPrestudentStatus(getAuthPersonId())->studienplan_id;
if(!isset($parameter_studiensemester)) {
$student_studiensemester = $studentLehrverband->studiensemester_kurzbz;
$parameter_studiensemester = $student_studiensemester;
}
if(!isset($parameter_studiengang)) {
$student_studiengang = $studentLehrverband->studiengang_kz;
$parameter_studiengang = $student_studiengang;
}
if(!isset($parameter_semester)) {
$student_semester = $studentLehrverband->semester;
$parameter_semester = $student_semester;
}
if(!isset($parameter_studiensemester))
$parameter_studiensemester = $student_studiensemester;
if(!isset($parameter_studiengang))
$parameter_studiengang = $student_studiengang;
if(!isset($parameter_semester))
$parameter_semester = $student_semester;
if(!isset($parameter_studienplan))
$parameter_studienplan = $student_studienplan;
$parameter_studienplan = $student_studienplan;
}
if(isset($parameter_studiensemester)){
@@ -111,7 +96,8 @@ class Studium extends FHCAPI_Controller
// fetch studiensemester
$allStudienSemester = $this->getDataOrTerminateWithError($this->StudiensemesterModel->load());
if(isset($parameter_studiensemester) && !empty(array_filter($allStudienSemester, function($studiensemester) use($parameter_studiensemester){
return $studiensemester->studiensemester_kurzbz == $parameter_studiensemester->studiensemester_kurzbz;
}))){
@@ -230,8 +216,6 @@ class Studium extends FHCAPI_Controller
$studienplaene = array_map(function($studienplan){
$orgform = current($this->getDataOrTerminateWithError($this->OrgformModel->loadWhere(["orgform_kurzbz" => $studienplan->orgform_kurzbz])));
$studienplan->orgform_bezeichnung = $orgform->bezeichnung;
// bezeichnung_mehrsprachig
$studienplan->orgform_bezeichnung_english = $orgform->bezeichnung_mehrsprachig[1];
return $studienplan;
},$studienplaene);
return $studienplaene;
@@ -40,32 +40,11 @@ class Board extends FHCAPI_Controller
public function list()
{
$this->DashboardModel->addSelect('dashboard_id');
$this->DashboardModel->addSelect('dashboard_kurzbz');
$this->DashboardModel->addSelect('tbl_dashboard.beschreibung');
$this->DashboardModel->addSelect("(
SELECT json_agg(w.*)
FROM dashboard.tbl_widget w
JOIN dashboard.tbl_dashboard_widget dw
USING(widget_id)
WHERE dw.dashboard_id=tbl_dashboard.dashboard_id
) AS \"widgetSetup\"");
$result = $this->DashboardModel->load();
$data = $this->getDataOrTerminateWithError($result);
$data = array_map(function ($dashboard) {
$tmpSetups = json_decode($dashboard->widgetSetup);
$tmpSetups = array_map(function ($widget) {
$widget->setup->file = absoluteJsImportUrl($widget->setup->file);
return $widget;
}, $tmpSetups);
$dashboard->widgetSetup = $tmpSetups;
return $dashboard;
}, $data);
$this->terminateWithSuccess($data);
$this->terminateWithSuccess($result);
}
public function create()
@@ -103,7 +82,7 @@ class Board extends FHCAPI_Controller
$data = $this->getDataOrTerminateWithError($result);
$this->terminateWithSuccess($data);
$this->terminateWithSuccess($result);
}
public function delete()
@@ -137,6 +116,6 @@ class Board extends FHCAPI_Controller
$data = $this->getDataOrTerminateWithError($result);
$this->terminateWithSuccess($data);
$this->terminateWithSuccess($result);
}
}
@@ -120,7 +120,10 @@ class Preset extends FHCAPI_Controller
$conf = $this->dashboardlib->getPreset($db, $funktion);
if ($conf) {
$preset = json_decode($conf->preset, true);
$result[$funktion] = $preset;
if (!isset($preset[$funktion]) || !isset($preset[$funktion]['widgets']))
$result[$funktion] = [];
else
$result[$funktion] = $preset[$funktion]['widgets'];
} else {
$result[$funktion] = [];
}
@@ -151,7 +154,7 @@ class Preset extends FHCAPI_Controller
$preset_decoded = json_decode($preset->preset, true);
$preset_decoded[$widget['widgetid']] = $widget;
$this->dashboardlib->addWidgetsToWidgets($preset_decoded, $dashboard_kurzbz, $funktion_kurzbz, [$widget]);
$preset->preset = json_encode($preset_decoded);
@@ -183,10 +186,8 @@ class Preset extends FHCAPI_Controller
$preset_decoded = json_decode($preset->preset, true);
if (!isset($preset_decoded[$widgetid]))
if (!$this->dashboardlib->removeWidgetFromWidgets($preset_decoded, $funktion_kurzbz, $widgetid))
show_404();
unset($preset_decoded[$widgetid]);
$preset->preset = json_encode($preset_decoded);
@@ -48,9 +48,25 @@ class User extends FHCAPI_Controller
$uid = $this->authlib->getAuthObj()->username;
$mergedconfig = $this->dashboardlib->getMergedUserConfig($dashboard->dashboard_id, $uid);
/*$mergedconfig = $this->dashboardlib->getMergedConfig($dashboard->dashboard_id, $uid);
$this->terminateWithSuccess($mergedconfig);
$this->terminateWithSuccess([
'general' => call_user_func_array(
'array_merge_recursive',
$mergedconfig
)
]);*/
$defaultconfig = $this->dashboardlib->getDefaultConfig($dashboard->dashboard_id);
$userconfig = $this->dashboardlib->getUserConfig($dashboard->dashboard_id, $uid);
$defaultconfig_squashed = $defaultconfig ? call_user_func_array('array_replace_recursive', $defaultconfig) : [];
$userconfig_squashed = $userconfig ? call_user_func_array('array_replace_recursive', $userconfig) : [];
$mergedconfig = array_replace_recursive($defaultconfig_squashed, $userconfig_squashed);
$this->terminateWithSuccess([
DashboardLib::SECTION_IF_FUNKTION_KURZBZ_IS_NULL => $mergedconfig
]);
}
public function addWidget()
@@ -70,15 +86,26 @@ class User extends FHCAPI_Controller
if (!isset($widget['widgetid']))
$widget['widgetid'] = $this->dashboardlib->generateWidgetId($dashboard_kurzbz);
if (isset($widget['source']))
unset($widget['source']);
$override = $this->dashboardlib->getOverrideOrCreateEmptyOverride($dashboard_kurzbz, $uid);
$override_decoded = json_decode($override->override, true);
$override_decoded[$widget['widgetid']] = $widget;
if (!isset($override_decoded['general']) || !is_array($override_decoded['general']))
$override_decoded['general'] = [];
if (!isset($override_decoded['general']['widgets']))
$override_decoded['general']['widgets'] = [];
$override_decoded['general']['widgets'][$widget['widgetid']] = $widget;
// NOTE(chris): remove doubles in other funktionen
foreach ($override_decoded as $funktion => $array) {
if ($funktion == 'general')
continue;
if (isset($array['widgets']) && isset($array['widgets'][$widget['widgetid']]))
unset($override_decoded[$funktion]['widgets'][$widget['widgetid']]);
}
$override->override = json_encode($override_decoded);
$result = $this->dashboardlib->insertOrUpdateOverride($override);
@@ -108,10 +135,18 @@ class User extends FHCAPI_Controller
$override_decoded = json_decode($override->override, true);
if (!isset($override_decoded[$widget_id]))
show_404();
unset($override_decoded[$widget_id]);
foreach (array_keys($override_decoded) as $k) {
if (!isset($override_decoded[$k]["widgets"])) {
unset($override_decoded[$k]);
continue;
}
if (isset($override_decoded[$k]["widgets"][$widget_id])) {
unset($override_decoded[$k]["widgets"][$widget_id]);
}
if (!$override_decoded[$k]["widgets"]) {
unset($override_decoded[$k]);
}
}
$override->override = json_encode($override_decoded);
@@ -42,22 +42,14 @@ class Messages extends FHCAPI_Controller
]);
}
public function getMessages($id, $type_id, $size=null, $page=null)
public function getMessages($id, $type_id, $size, $page)
{
if($type_id != 'person_id'){
$id = $this->_getPersonId($id, $type_id);
}
if(!(is_null($size) && is_null($page)))
{
$offset = $size * ($page - 1);
$limit = $size;
}
else
{
$offset = null;
$limit = null;
}
$offset = $size * ($page - 1);
$limit = $size;
$result = $this->MessageModel->getMessagesForTable($id, $offset, $limit);
@@ -78,32 +78,52 @@ class Dokumente extends FHCAPI_Controller
$this->terminateWithError($this->p->t('ui', 'errorMissingValue', ['value' => 'Studiengang_kz']), self::ERROR_TYPE_GENERAL);
$resultPreDoc = $this->_getPrestudentDokumente($prestudent_id);
$arrayAccepted = [];
$person_id = $this->_getPersonId($prestudent_id);
$mergedArray = [];
$docNames = array_map(function ($item) {
return $item->dokument_kurzbz;
}, $resultPreDoc);
foreach ($resultPreDoc as $pre)
foreach($docNames as $doc)
{
$result = $this->AkteModel->getAktenFAS($person_id, $pre->dokument_kurzbz, $studiengang_kz, $prestudent_id, true);
$result = $this->AkteModel->getAktenFAS($person_id, $doc, $studiengang_kz, $prestudent_id, true);
if (isError($result))
{
return $this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
}
if (hasData($result))
{
foreach (getData($result) as $doc)
$data = getData($result);
foreach ($data as $value)
{
$merged = clone $doc;
$merged->docdatum = $pre->docdatum;
$merged->insertvonma = $pre->insertvonma;
$merged->bezeichnung = $pre->bezeichnung;
$mergedArray[] = $merged;
array_push($arrayAccepted, $value);
}
}
else
{
$mergedArray[] = $pre;
}
//Mapping with document_kurzbz
$preDocMap = [];
foreach ($resultPreDoc as $pre) {
$preDocMap[$pre->dokument_kurzbz] = $pre;
}
$mergedArray = [];
foreach ($arrayAccepted as $doc) {
$merged = clone $doc;
if (isset($preDocMap[$doc->dokument_kurzbz])) {
$merged->docdatum = $preDocMap[$doc->dokument_kurzbz]->docdatum;
$merged->insertvonma = $preDocMap[$doc->dokument_kurzbz]->insertvonma;
$merged->bezeichnung = $preDocMap[$doc->dokument_kurzbz]->bezeichnung;
} else {
$merged->akzeptiertdatum = null;
$merged->akzeptiertvon = null;
}
$mergedArray[] = $merged;
}
$this->terminateWithSuccess($mergedArray);
@@ -48,8 +48,7 @@ class Konto extends FHCAPI_Controller
// Load language phrases
$this->loadPhrases([
'konto',
'lehre'
'konto'
]);
}
@@ -113,7 +112,7 @@ class Konto extends FHCAPI_Controller
*
* @return void
*/
public function getBuchungstypen($studiensemester_kurzbz = null)
public function getBuchungstypen()
{
$this->load->model('crm/Buchungstyp_model', 'BuchungstypModel');
@@ -123,7 +122,6 @@ class Konto extends FHCAPI_Controller
$data = $this->getDataOrTerminateWithError($result);
$this->_getOEHBeitrag($data, $studiensemester_kurzbz);
$this->terminateWithSuccess($data);
}
@@ -496,43 +494,4 @@ class Konto extends FHCAPI_Controller
$this->terminateWithSuccess();
}
private function _getOEHBeitrag(&$data, $studiensemester_kurzbz = null)
{
if (is_null($studiensemester_kurzbz))
{
$this->load->library('VariableLib', ['uid' => getAuthUID()]);
$studiensemester_akt = $this->variablelib->getVar('semester_aktuell');
}
else
{
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
if ($this->StudiensemesterModel->isValidStudiensemester($studiensemester_kurzbz))
$studiensemester_akt = $studiensemester_kurzbz;
else
$this->terminateWithError($this->p->t('lehre', 'error_noStudiensemester'));
}
$this->load->model('codex/Oehbeitrag_model', 'OehbeitragModel');
$oehBeitrag = $this->OehbeitragModel->getByStudiensemester($studiensemester_akt);
$oehStandardbetrag = null;
if (hasData($oehBeitrag))
{
$oeh = getData($oehBeitrag)[0];
$summe = ($oeh->studierendenbeitrag + $oeh->versicherung) * -1;
$oehStandardbetrag = number_format((float)$summe, 2, '.', '');
}
if ($oehStandardbetrag !== null)
{
$data = array_map(function ($buchungstyp) use ($oehStandardbetrag) {
if (isset($buchungstyp->buchungstyp_kurzbz) && (strtolower($buchungstyp->buchungstyp_kurzbz) === 'oeh'))
{
$buchungstyp->standardbetrag = $oehStandardbetrag;
}
return $buchungstyp;
}, $data);
}
}
}
@@ -90,15 +90,6 @@ class Projektarbeit extends FHCAPI_Controller
if (!isset($projektarbeit_id) || !is_numeric($projektarbeit_id)) return $this->terminateWithError('Projektarbeit Id missing', self::ERROR_TYPE_GENERAL);
$result = $this->fetchProjektarbeitByID($projektarbeit_id);
$data = $this->getDataOrTerminateWithError($result);
$this->terminateWithSuccess(current($data));
}
private function fetchProjektarbeitById($projektarbeit_id) {
$this->ProjektarbeitModel->resetQuery();
$this->ProjektarbeitModel->addSelect(
'lehre.tbl_projektarbeit.projektarbeit_id, titel, titel_english, themenbereich, projekttyp_kurzbz, lehrveranstaltung_id, lehreinheit_id,
firma_id, beginn, ende, gesperrtbis, note, final, freigegeben, tbl_projektarbeit.anmerkung, fa.name AS firma_name'
@@ -106,10 +97,13 @@ class Projektarbeit extends FHCAPI_Controller
$this->ProjektarbeitModel->addJoin('lehre.tbl_lehreinheit le', 'lehreinheit_id');
$this->ProjektarbeitModel->addJoin('lehre.tbl_lehrveranstaltung lv', 'lehrveranstaltung_id');
$this->ProjektarbeitModel->addJoin('public.tbl_firma fa', 'firma_id', 'LEFT');
return $this->ProjektarbeitModel->loadWhere(
$result = $this->ProjektarbeitModel->loadWhere(
array('projektarbeit_id' => $projektarbeit_id)
);
$data = $this->getDataOrTerminateWithError($result);
$this->terminateWithSuccess(current($data));
}
/**
@@ -138,8 +132,7 @@ class Projektarbeit extends FHCAPI_Controller
);
$data = $this->getDataOrTerminateWithError($result);
$data = $this->getDataOrTerminateWithError($this->fetchProjektarbeitById($data));
$this->terminateWithSuccess($data);
}
@@ -287,7 +280,10 @@ class Projektarbeit extends FHCAPI_Controller
*/
public function getNoten()
{
$result = $this->NoteModel->getAllActive();
$this->NoteModel->addOrder('notenwert', 'ASC');
$this->NoteModel->addOrder('bezeichnung', 'ASC');
$result = $this->NoteModel->load();
if (isError($result)) return $this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
@@ -25,6 +25,9 @@ if (! defined('BASEPATH')) exit('No direct script access allowed');
*/
class Students extends FHCAPI_Controller
{
private $allowedStgs = [];
public function __construct()
{
$permissions = [];
@@ -32,17 +35,16 @@ class Students extends FHCAPI_Controller
$permissions[$router->method] = ['admin:r', 'assistenz:r'];
parent::__construct($permissions);
$allowedStgs = $this->permissionlib->getSTG_isEntitledFor('admin') ?: [];
$allowedStgs = array_merge($allowedStgs, $this->permissionlib->getSTG_isEntitledFor('assistenz') ?: []);
$this->allowedStgs = $this->permissionlib->getSTG_isEntitledFor('admin') ?: [];
$this->allowedStgs = array_merge($this->allowedStgs, $this->permissionlib->getSTG_isEntitledFor('assistenz') ?: []);
if (!$allowedStgs) {
if (!$this->allowedStgs) {
$this->_outputAuthError([$router->method => ['admin:r', 'assistenz:r']]);
exit;
}
// Load Libraries
$this->load->library('PhrasesLib');
$this->load->library('stv/StudentListLib', ['allowedStgs' => $allowedStgs]);
$this->loadPhrases(
array(
'lehre'
@@ -109,19 +111,23 @@ class Students extends FHCAPI_Controller
]);
$this->studentlistlib->addJoin(
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
$this->PrestudentModel->addJoin(
"(
SELECT prestudent_id
FROM public.tbl_prestudentstatus
WHERE status_kurzbz = 'Incoming'
AND studiensemester_kurzbz = " . $this->PrestudentModel->escape($studiensemester_kurzbz) . "
) test",
"prestudent_id",
"",
"start"
"prestudent_id"
);
$this->studentlistlib->addSelect("COALESCE(
$this->prepareQuery($studiensemester_kurzbz);
$this->PrestudentModel->addSelect("COALESCE(
v.semester::text,
CASE
WHEN pls.status_kurzbz IN ('Aufgenommener', 'Bewerber', 'Wartender', 'interessent')
@@ -129,13 +135,16 @@ class Students extends FHCAPI_Controller
ELSE ''::text
END
) AS semester", false);
$this->studentlistlib->addSelect("COALESCE(v.verband::text, ''::text) AS verband");
$this->studentlistlib->addSelect("COALESCE(v.gruppe::text, ''::text) AS gruppe");
$this->PrestudentModel->addSelect("COALESCE(v.verband::text, ''::text)");
$this->PrestudentModel->addSelect("COALESCE(v.gruppe::text, ''::text)");
$this->addSelectPrioRel();
$this->addFilter($studiensemester_kurzbz);
$result = $this->studentlistlib->execute($studiensemester_kurzbz);
$result = $this->PrestudentModel->load();
$data = $this->getDataOrTerminateWithError($result);
@@ -155,7 +164,10 @@ class Students extends FHCAPI_Controller
]);
$this->studentlistlib->addJoin(
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
$this->PrestudentModel->addJoin(
"(
SELECT prestudent_id
FROM bis.tbl_bisio bis
@@ -175,12 +187,14 @@ class Students extends FHCAPI_Controller
) AND stdsem.studiensemester_kurzbz = " . $this->PrestudentModel->escape($studiensemester_kurzbz) . "
GROUP BY prestudent_id
) test",
"prestudent_id",
"",
"start"
"prestudent_id"
);
$this->studentlistlib->addSelect("COALESCE(
$this->prepareQuery($studiensemester_kurzbz);
$this->PrestudentModel->addSelect("COALESCE(
v.semester::text,
CASE
WHEN pls.status_kurzbz IN ('Aufgenommener', 'Bewerber', 'Wartender', 'interessent')
@@ -188,13 +202,16 @@ class Students extends FHCAPI_Controller
ELSE ''::text
END
) AS semester", false);
$this->studentlistlib->addSelect("COALESCE(v.verband::text, ''::text) AS verband");
$this->studentlistlib->addSelect("COALESCE(v.gruppe::text, ''::text) AS gruppe");
$this->PrestudentModel->addSelect("COALESCE(v.verband::text, ''::text)");
$this->PrestudentModel->addSelect("COALESCE(v.gruppe::text, ''::text)");
$this->addSelectPrioRel();
$this->addFilter($studiensemester_kurzbz);
$result = $this->studentlistlib->execute($studiensemester_kurzbz);
$result = $this->PrestudentModel->load();
$data = $this->getDataOrTerminateWithError($result);
@@ -214,18 +231,23 @@ class Students extends FHCAPI_Controller
]);
$this->studentlistlib->addJoin(
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
$this->PrestudentModel->addJoin(
"(
SELECT prestudent_id
FROM bis.tbl_mobilitaet
WHERE studiensemester_kurzbz = " . $this->PrestudentModel->escape($studiensemester_kurzbz) . "
) bis",
"prestudent_id",
"",
"start"
"prestudent_id"
);
$this->studentlistlib->addSelect("COALESCE(
$this->prepareQuery($studiensemester_kurzbz);
$this->PrestudentModel->addSelect("COALESCE(
v.semester::text,
CASE
WHEN pls.status_kurzbz IN ('Aufgenommener', 'Bewerber', 'Wartender', 'interessent')
@@ -233,13 +255,16 @@ class Students extends FHCAPI_Controller
ELSE ''::text
END
) AS semester", false);
$this->studentlistlib->addSelect("COALESCE(v.verband::text, ''::text) AS verband");
$this->studentlistlib->addSelect("COALESCE(v.gruppe::text, ''::text) AS gruppe");
$this->PrestudentModel->addSelect("COALESCE(v.verband::text, ''::text)");
$this->PrestudentModel->addSelect("COALESCE(v.gruppe::text, ''::text)");
$this->addSelectPrioRel();
$this->addFilter($studiensemester_kurzbz);
$result = $this->studentlistlib->execute($studiensemester_kurzbz);
$result = $this->PrestudentModel->load();
$data = $this->getDataOrTerminateWithError($result);
@@ -288,6 +313,8 @@ class Students extends FHCAPI_Controller
*/
protected function fetchPrestudents($studiengang_kz, $studiensemester_kurzbz = null, $filter = null, $orgform_kurzbz = null)
{
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
$stdsemEsc = $studiensemester_kurzbz ? $this->PrestudentModel->escape($studiensemester_kurzbz) : 'NULL';
$selectRT = "
@@ -304,38 +331,38 @@ class Students extends FHCAPI_Controller
AND r.studiensemester_kurzbz=" . $stdsemEsc;
$this->studentlistlib->addWhere('tbl_prestudent.studiengang_kz', $studiengang_kz);
$where = ['tbl_prestudent.studiengang_kz' => $studiengang_kz];
if ($orgform_kurzbz) {
$this->studentlistlib->addWhere('ps.orgform_kurzbz', $orgform_kurzbz);
$where['ps.orgform_kurzbz'] = $orgform_kurzbz;
}
switch ($filter) {
case "interessenten":
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Interessent');
$where['ps.status_kurzbz'] = 'Interessent';
break;
case "bewerbungnichtabgeschickt":
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Interessent');
$this->studentlistlib->addWhere('ps.bewerbung_abgeschicktamum IS NULL');
$where['ps.status_kurzbz'] = 'Interessent';
$where['ps.bewerbung_abgeschicktamum'] = null;
break;
case "bewerbungabgeschickt":
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Interessent');
$this->studentlistlib->addWhere('ps.bewerbung_abgeschicktamum IS NOT NULL');
$this->studentlistlib->addWhere('ps.bestaetigtam IS NULL');
$where['ps.status_kurzbz'] = 'Interessent';
$where['ps.bewerbung_abgeschicktamum IS NOT NULL'] = null;
$where['ps.bestaetigtam'] = null;
break;
case "statusbestaetigt":
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Interessent');
$this->studentlistlib->addWhere('ps.bestaetigtam IS NOT NULL');
$where['ps.status_kurzbz'] = 'Interessent';
$where['ps.bestaetigtam IS NOT NULL'] = null;
break;
case "statusbestaetigtrtnichtangemeldet":
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Interessent');
$this->studentlistlib->addWhere('ps.bestaetigtam IS NOT NULL');
$this->studentlistlib->addWhere('NOT EXISTS(' . $selectRT . ')', null, false);
$where['ps.status_kurzbz'] = 'Interessent';
$where['ps.bestaetigtam IS NOT NULL'] = null;
$this->PrestudentModel->db->where('NOT EXISTS(' . $selectRT . ')', null, false);
break;
case "statusbestaetigtrtangemeldet":
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Interessent');
$this->studentlistlib->addWhere('ps.bestaetigtam IS NOT NULL');
$this->studentlistlib->addWhere('EXISTS(' . $selectRT . ')', null, false);
$where['ps.status_kurzbz'] = 'Interessent';
$where['ps.bestaetigtam IS NOT NULL'] = null;
$this->PrestudentModel->db->where('EXISTS(' . $selectRT . ')', null, false);
break;
case "zgv":
$this->load->model('organisation/Studiengang_model', 'StudiengangModel');
@@ -347,69 +374,69 @@ class Students extends FHCAPI_Controller
$this->terminateWithSuccess([]);
$stg = current($stg);
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Interessent');
$where['ps.status_kurzbz'] = 'Interessent';
if ($stg->typ == 'm') {
$this->studentlistlib->addWhere('zgvmas_code IS NOT NULL');
$where['zgvmas_code IS NOT NULL'] = null;
if (defined('ZGV_ERFUELLT_ANZEIGEN') && ZGV_ERFUELLT_ANZEIGEN)
$this->studentlistlib->addWhere('zgvmas_erfuellt', true);
$where['zgvmas_erfuellt'] = true;
} elseif ($stg->typ == 'p') {
$this->studentlistlib->addWhere('zgvdoktor_code IS NOT NULL');
$where['zgvdoktor_code IS NOT NULL'] = null;
if (defined('ZGV_DOKTOR_ANZEIGEN') && ZGV_DOKTOR_ANZEIGEN)
$this->studentlistlib->addWhere('zgvdoktor_erfuellt', true);
$where['zgvdoktor_erfuellt'] = true;
} else {
$this->studentlistlib->addWhere('zgv_code IS NOT NULL');
$where['zgv_code IS NOT NULL'] = null;
if (defined('ZGV_ERFUELLT_ANZEIGEN') && ZGV_ERFUELLT_ANZEIGEN)
$this->studentlistlib->addWhere('zgv_erfuellt', true);
$where['zgv_erfuellt'] = true;
}
break;
case "reihungstestangemeldet":
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Interessent');
$this->studentlistlib->addWhere('EXISTS(' . $selectRT . ')', null, false);
$where['ps.status_kurzbz'] = 'Interessent';
$this->PrestudentModel->db->where('EXISTS(' . $selectRT . ')', null, false);
break;
case "reihungstestnichtangemeldet":
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Interessent');
$this->studentlistlib->addWhere('NOT EXISTS(' . $selectRT . ')', null, false);
$where['ps.status_kurzbz'] = 'Interessent';
$this->PrestudentModel->db->where('NOT EXISTS(' . $selectRT . ')', null, false);
break;
case "bewerber":
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Bewerber');
$where['ps.status_kurzbz'] = 'Bewerber';
break;
case "bewerberrtnichtangemeldet":
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Bewerber');
$this->studentlistlib->addWhere('NOT EXISTS(' . $selectRT . ')', null, false);
$where['ps.status_kurzbz'] = 'Bewerber';
$this->PrestudentModel->db->where('NOT EXISTS(' . $selectRT . ')', null, false);
break;
case "bewerberrtangemeldet":
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Bewerber');
$this->studentlistlib->addWhere('EXISTS(' . $selectRT . ')', null, false);
$where['ps.status_kurzbz'] = 'Bewerber';
$this->PrestudentModel->db->where('EXISTS(' . $selectRT . ')', null, false);
break;
case "bewerberrtangemeldetteilgenommen":
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Bewerber');
$this->studentlistlib->addWhere('EXISTS(' . $selectRT . ')', null, false);
$this->studentlistlib->addWhere('reihungstestangetreten', true);
$where['ps.status_kurzbz'] = 'Bewerber';
$this->PrestudentModel->db->where('EXISTS(' . $selectRT . ')', null, false);
$where['reihungstestangetreten'] = true;
break;
case "bewerberrtangemeldetnichtteilgenommen":
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Bewerber');
$this->studentlistlib->addWhere('EXISTS(' . $selectRT . ')', null, false);
$this->studentlistlib->addWhere('reihungstestangetreten', false);
$where['ps.status_kurzbz'] = 'Bewerber';
$this->PrestudentModel->db->where('EXISTS(' . $selectRT . ')', null, false);
$where['reihungstestangetreten'] = false;
break;
case "aufgenommen":
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Aufgenommener');
$where['ps.status_kurzbz'] = 'Aufgenommener';
break;
case "warteliste":
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Wartender');
$where['ps.status_kurzbz'] = 'Wartender';
break;
case "absage":
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Abgewiesener');
$where['ps.status_kurzbz'] = 'Abgewiesener';
break;
case "incoming":
// NOTE(chris): in FAS it was not filtered for studiengang_kz
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Incoming');
$where['ps.status_kurzbz'] = 'Incoming';
break;
case "absolvent":
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Absolvent');
$where['ps.status_kurzbz'] = 'Absolvent';
break;
case "diplomand":
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Diplomand');
$where['ps.status_kurzbz'] = 'Diplomand';
break;
default:
if (!$studiensemester_kurzbz) {
@@ -417,9 +444,9 @@ class Students extends FHCAPI_Controller
* show all prestudents in this stg who don't have a status
* $orgform_kurzbz does not change the results since orgform is stored in the status table
*/
$this->studentlistlib->addWhere('ps.status_kurzbz IS NULL');
$where['ps.status_kurzbz'] = null;
} else {
$this->studentlistlib->addWhere('ps.status_kurzbz', [
$this->PrestudentModel->db->where_in('ps.status_kurzbz', [
'Interessent',
'Bewerber',
'Aufgenommener',
@@ -430,19 +457,21 @@ class Students extends FHCAPI_Controller
break;
}
$this->studentlistlib->addSelect("
$this->prepareQuery($studiensemester_kurzbz);
$this->PrestudentModel->addSelect("
CASE
WHEN pls.status_kurzbz IN ('Aufgenommener', 'Bewerber', 'Wartender', 'interessent')
THEN ps.ausbildungssemester::text
ELSE ''::text
END AS semester", false);
$this->studentlistlib->addSelect("'' AS verband");
$this->studentlistlib->addSelect("'' AS gruppe");
$this->PrestudentModel->addSelect("'' AS verband");
$this->PrestudentModel->addSelect("'' AS gruppe");
$this->addSelectPrioRel();
$this->addFilter($studiensemester_kurzbz);
$result = $this->studentlistlib->execute($studiensemester_kurzbz);
$result = $this->PrestudentModel->loadWhere($where);
$data = $this->getDataOrTerminateWithError($result);
@@ -545,6 +574,7 @@ class Students extends FHCAPI_Controller
$gruppe_kurzbz = null,
$orgform_kurzbz = null
) {
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
if (!$this->StudiensemesterModel->isValidStudiensemester($studiensemester_kurzbz))
@@ -552,29 +582,34 @@ class Students extends FHCAPI_Controller
$this->terminateWithError($studiensemester_kurzbz . ' - ' . $this->p->t('lehre', 'error_noStudiensemester'));
}
// NOTE(chris): overwrite 'LEFT JOIN' with 'JOIN'
$this->studentlistlib->addJoin("public.tbl_student s", "prestudent_id");
$this->prepareQuery($studiensemester_kurzbz, '');
$this->studentlistlib->addSelect("'' AS priorisierung_relativ");
$this->PrestudentModel->addSelect('v.semester');
$this->PrestudentModel->addSelect('v.verband');
$this->PrestudentModel->addSelect('v.gruppe');
$this->PrestudentModel->addSelect("'' AS priorisierung_relativ");
$where = [];
if ($gruppe_kurzbz !== null) {
$this->studentlistlib->addJoin('public.tbl_benutzergruppe g', 'uid', '', 'after_b');
$this->studentlistlib->addWhere('g.gruppe_kurzbz', $gruppe_kurzbz);
$this->studentlistlib->addWhere('g.studiensemester_kurzbz', $studiensemester_kurzbz);
$this->PrestudentModel->addJoin('public.tbl_benutzergruppe g', 'uid');
$where['g.gruppe_kurzbz'] = $gruppe_kurzbz;
$where['g.studiensemester_kurzbz'] = $studiensemester_kurzbz;
} else {
$this->studentlistlib->addWhere('v.studiengang_kz', $studiengang_kz);
$where['v.studiengang_kz'] = $studiengang_kz;
if ($semester !== null)
$this->studentlistlib->addWhere('v.semester', $semester);
$where['v.semester'] = $semester;
if ($verband !== null)
$this->studentlistlib->addWhere('v.verband', $verband);
$where['v.verband'] = $verband;
if ($gruppe !== null)
$this->studentlistlib->addWhere('v.gruppe', $gruppe);
$where['v.gruppe'] = $gruppe;
if (!$verband && !$gruppe && $orgform_kurzbz !== null) {
$this->studentlistlib->addWhere(
$this->PrestudentModel->db->where(
"(
SELECT orgform_kurzbz
FROM public.tbl_prestudentstatus
@@ -588,10 +623,9 @@ class Students extends FHCAPI_Controller
}
}
$this->addFilter($studiensemester_kurzbz);
$result = $this->studentlistlib->execute($studiensemester_kurzbz);
$result = $this->PrestudentModel->loadWhere($where);
$data = $this->getDataOrTerminateWithError($result);
@@ -618,8 +652,11 @@ class Students extends FHCAPI_Controller
$this->terminateWithError($studiensemester_kurzbz . ' - ' . $this->p->t('lehre', 'error_noStudiensemester'));
}
$this->studentlistlib->addSelect("COALESCE(
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
$this->prepareQuery($studiensemester_kurzbz);
$this->PrestudentModel->addSelect("COALESCE(
v.semester::text,
CASE
WHEN pls.status_kurzbz IN ('Aufgenommener', 'Bewerber', 'Wartender', 'interessent')
@@ -627,15 +664,16 @@ class Students extends FHCAPI_Controller
ELSE ''::text
END
) AS semester", false);
$this->studentlistlib->addSelect("COALESCE(v.verband::text, ''::text) AS verband");
$this->studentlistlib->addSelect("COALESCE(v.gruppe::text, ''::text) AS gruppe");
$this->studentlistlib->addWhere('tbl_prestudent.prestudent_id', $prestudent_id);
$this->PrestudentModel->addSelect("COALESCE(v.verband::text, ''::text)");
$this->PrestudentModel->addSelect("COALESCE(v.gruppe::text, ''::text)");
$this->addSelectPrioRel();
$this->addFilter($studiensemester_kurzbz);
$result = $this->studentlistlib->execute($studiensemester_kurzbz);
$result = $this->PrestudentModel->loadWhere([
'tbl_prestudent.prestudent_id' => $prestudent_id
]);
$data = $this->getDataOrTerminateWithError($result);
@@ -662,13 +700,23 @@ class Students extends FHCAPI_Controller
$this->terminateWithError($studiensemester_kurzbz . ' - ' . $this->p->t('lehre', 'error_noStudiensemester'));
}
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
$this->prepareQuery($studiensemester_kurzbz);
$this->PrestudentModel->addSelect('v.semester');
$this->PrestudentModel->addSelect('v.verband');
$this->PrestudentModel->addSelect('v.gruppe');
$this->addSelectPrioRel();
$this->studentlistlib->addWhere('s.student_uid', $student_uid);
$this->addFilter($studiensemester_kurzbz);
$result = $this->studentlistlib->execute($studiensemester_kurzbz);
$result = $this->PrestudentModel->loadWhere([
's.student_uid' => $student_uid
]);
$data = $this->getDataOrTerminateWithError($result);
@@ -696,13 +744,21 @@ class Students extends FHCAPI_Controller
$this->terminateWithError($studiensemester_kurzbz . ' - ' . $this->p->t('lehre', 'error_noStudiensemester'));
}
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
$this->studentlistlib->addWhere('p.person_id', $person_id);
$this->prepareQuery($studiensemester_kurzbz);
$this->PrestudentModel->addSelect('v.semester');
$this->PrestudentModel->addSelect('v.verband');
$this->PrestudentModel->addSelect('v.gruppe');
$this->addSelectPrioRel();
$this->addFilter($studiensemester_kurzbz);
$result = $this->studentlistlib->execute($studiensemester_kurzbz);
$result = $this->PrestudentModel->loadWhere([
'p.person_id' => $person_id
]);
$data = $this->getDataOrTerminateWithError($result);
@@ -734,8 +790,29 @@ class Students extends FHCAPI_Controller
$data = $this->getDataOrTerminateWithError($result);
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
$this->prepareQuery($studiensemester_kurzbz);
$this->PrestudentModel->addSelect("COALESCE(v.semester::text, CASE WHEN public.get_rolle_prestudent(tbl_prestudent.prestudent_id, NULL) IN ('Aufgenommener', 'Bewerber', 'Wartender', 'interessent') THEN public.get_absem_prestudent(tbl_prestudent.prestudent_id, NULL)::text ELSE ''::text END) AS semester", false);
$this->PrestudentModel->addSelect('v.verband');
$this->PrestudentModel->addSelect('v.gruppe');
//add status per semester
$this->PrestudentModel->addSelect(
"public.get_rolle_prestudent(public.tbl_prestudent.prestudent_id, "
. $this->PrestudentModel->escape($studiensemester_kurzbz)
. ") AS statusofsemester"
);
$this->addSelectPrioRel();
$this->addFilter($studiensemester_kurzbz);
$prestudent_ids = [];
$student_uids = [];
$this->addMeta('data', $data);
foreach ($data as $row) {
$dataset = json_decode($row->data);
if ($row->type == 'prestudent') {
@@ -745,38 +822,197 @@ class Students extends FHCAPI_Controller
}
}
$this->studentlistlib->addSelect("COALESCE(
v.semester::text,
CASE
WHEN public.get_rolle_prestudent(tbl_prestudent.prestudent_id, NULL) IN ('Aufgenommener', 'Bewerber', 'Wartender', 'interessent')
THEN public.get_absem_prestudent(tbl_prestudent.prestudent_id, NULL)::text
ELSE ''::text
END
) AS semester", false);
if ($prestudent_ids && $student_uids) {
$this->studentlistlib->addWhere('tbl_prestudent.prestudent_id', $prestudent_ids);
$this->studentlistlib->addOrWhere('s.student_uid', $student_uids);
$this->PrestudentModel->db->where_in('tbl_prestudent.prestudent_id', $prestudent_ids);
$this->PrestudentModel->db->or_where_in('s.student_uid', $student_uids);
} elseif ($prestudent_ids) {
$this->studentlistlib->addWhere('tbl_prestudent.prestudent_id', $prestudent_ids);
$this->PrestudentModel->db->where_in('tbl_prestudent.prestudent_id', $prestudent_ids);
} elseif ($student_uids) {
$this->studentlistlib->addWhere('s.student_uid', $student_uids);
$this->PrestudentModel->db->where_in('s.student_uid', $student_uids);
} else {
$this->terminateWithSuccess([]);
}
$this->addFilter($studiensemester_kurzbz);
$result = $this->studentlistlib->execute($studiensemester_kurzbz);
$result = $this->PrestudentModel->load();
$data = $this->getDataOrTerminateWithError($result);
$this->terminateWithSuccess($data);
}
/**
* @param string|null $studiensemester_kurzbz
* @param string $type
*
* @return void
*/
protected function prepareQuery($studiensemester_kurzbz, $type = 'LEFT')
{
$stdsemEsc = $studiensemester_kurzbz ? $this->PrestudentModel->escape($studiensemester_kurzbz) : 'NULL';
$this->load->config('stv');
if(defined('STV_TAGS_ENABLED') && STV_TAGS_ENABLED)
{
$tags = $this->config->item('stv_prestudent_tags');
$whereTags = '';
if (is_array($tags) && !isEmptyArray($tags)) {
$tags = array_keys($tags);
foreach ($tags as $key => $tag) {
$tags[$key] = $this->db->escape($tag);
}
$whereTags = " AND nt.typ_kurzbz IN (" . implode(",", $tags) . ")";
}
$subQueryTag = "
(
SELECT
tag.prestudent_id,
COALESCE(json_agg(tag ORDER BY tag.done), '[]'::json) AS tags
FROM (
SELECT DISTINCT ON (n.notiz_id)
n.notiz_id AS id,
nt.typ_kurzbz,
array_to_json(nt.bezeichnung_mehrsprachig)->>0 AS beschreibung,
n.text AS notiz,
nt.style,
n.erledigt AS done,
nz.prestudent_id
FROM public.tbl_notizzuordnung AS nz
JOIN public.tbl_notiz AS n ON nz.notiz_id = n.notiz_id
JOIN public.tbl_notiz_typ AS nt ON n.typ = nt.typ_kurzbz "
. $whereTags .
"
) AS tag
GROUP BY tag.prestudent_id
) AS tag_data_agg
";
}
$this->PrestudentModel->addJoin('public.tbl_studiengang stg', 'studiengang_kz', 'LEFT');
$this->PrestudentModel->addJoin('public.tbl_person p', 'person_id');
$this->PrestudentModel->addJoin('public.tbl_student s', 'prestudent_id', $type);
$this->PrestudentModel->addJoin('public.tbl_prestudentstatus pls', '
pls.status_kurzbz=public.get_rolle_prestudent(tbl_prestudent.prestudent_id, NULL)
AND pls.prestudent_id=tbl_prestudent.prestudent_id
AND pls.studiensemester_kurzbz=public.get_stdsem_prestudent(tbl_prestudent.prestudent_id, NULL)
AND pls.ausbildungssemester=public.get_absem_prestudent(tbl_prestudent.prestudent_id, NULL)', 'LEFT');
$this->PrestudentModel->addJoin('lehre.tbl_studienplan sp', 'studienplan_id', 'LEFT');
$this->PrestudentModel->addJoin('public.tbl_benutzer b', 's.student_uid=b.uid', 'LEFT');
$this->PrestudentModel->addJoin(
'public.tbl_studentlehrverband v',
'v.student_uid=s.student_uid AND v.studiensemester_kurzbz' . ($studiensemester_kurzbz ? '=' . $stdsemEsc : ' IS NULL'),
$type
);
$this->PrestudentModel->addJoin('public.tbl_prestudentstatus ps', '
ps.status_kurzbz=public.get_rolle_prestudent(tbl_prestudent.prestudent_id, ' . $stdsemEsc . ')
AND ps.prestudent_id=tbl_prestudent.prestudent_id
AND ps.studiensemester_kurzbz=public.get_stdsem_prestudent(tbl_prestudent.prestudent_id, ' . $stdsemEsc . ')
AND ps.ausbildungssemester=public.get_absem_prestudent(tbl_prestudent.prestudent_id, ' . $stdsemEsc . ')', 'LEFT');
if(defined('STV_TAGS_ENABLED') && STV_TAGS_ENABLED)
{
$this->PrestudentModel->addJoin($subQueryTag, 'tag_data_agg.prestudent_id = tbl_prestudent.prestudent_id', 'LEFT');
}
$this->PrestudentModel->addSelect("b.uid");
if(defined('STV_TAGS_ENABLED') && STV_TAGS_ENABLED)
{
$this->PrestudentModel->addSelect('tag_data_agg.tags');
}
$this->PrestudentModel->addSelect('titelpre');
$this->PrestudentModel->addSelect('nachname');
$this->PrestudentModel->addSelect('vorname');
$this->PrestudentModel->addSelect('wahlname');
$this->PrestudentModel->addSelect('vornamen');
$this->PrestudentModel->addSelect('titelpost');
$this->PrestudentModel->addSelect('ersatzkennzeichen');
$this->PrestudentModel->addSelect('gebdatum');
$this->PrestudentModel->addSelect('geschlecht');
$this->PrestudentModel->addSelect('foto');
$this->PrestudentModel->addSelect('foto_sperre');
// semester
// verband
// gruppe
//add status per semester
$this->PrestudentModel->addSelect(
"public.get_rolle_prestudent(public.tbl_prestudent.prestudent_id, "
. $this->PrestudentModel->escape($studiensemester_kurzbz)
. ") AS statusofsemester"
);
$this->PrestudentModel->addSelect('UPPER(stg.typ || stg.kurzbz) AS studiengang');
$this->PrestudentModel->addSelect('tbl_prestudent.studiengang_kz');
$this->PrestudentModel->addSelect('stg.bezeichnung AS stg_bezeichnung');
$this->PrestudentModel->addSelect("s.matrikelnr");
$this->PrestudentModel->addSelect('p.person_id');
$this->PrestudentModel->addSelect('pls.status_kurzbz AS status');
$this->PrestudentModel->addSelect('pls.datum AS status_datum');
$this->PrestudentModel->addSelect('pls.bestaetigtam AS status_bestaetigung');
$this->PrestudentModel->addSelect(
"(SELECT kontakt FROM public.tbl_kontakt WHERE kontakttyp='email' AND person_id=p.person_id AND zustellung LIMIT 1) AS mail_privat",
false
);
$this->PrestudentModel->addSelect("
CASE WHEN b.uid IS NOT NULL AND b.uid<>''
THEN CONCAT(b.uid, '@', " . $this->PrestudentModel->escape(DOMAIN) . ")
ELSE '' END AS mail_intern", false);
$this->PrestudentModel->addSelect('p.anmerkung AS anmerkungen');
$this->PrestudentModel->addSelect('tbl_prestudent.anmerkung');
$this->PrestudentModel->addSelect('pls.orgform_kurzbz');
$this->PrestudentModel->addSelect('aufmerksamdurch_kurzbz');
$this->PrestudentModel->addSelect(
"(SELECT rt_gesamtpunkte AS punkte FROM public.tbl_prestudent WHERE prestudent_id=ps.prestudent_id) AS punkte",
false
);
$this->PrestudentModel->addSelect('tbl_prestudent.aufnahmegruppe_kurzbz');
$this->PrestudentModel->addSelect('tbl_prestudent.dual');
$this->PrestudentModel->addSelect('p.matr_nr');
$this->PrestudentModel->addSelect('sp.bezeichnung AS studienplan_bezeichnung');
$this->PrestudentModel->addSelect('tbl_prestudent.prestudent_id');
// priorisierung_relativ
$this->PrestudentModel->addSelect('mentor');
$this->PrestudentModel->addSelect('b.aktiv AS bnaktiv');
$this->PrestudentModel->addSelect('unruly');
$this->PrestudentModel->db->where_in('tbl_prestudent.studiengang_kz', $this->allowedStgs);
$this->PrestudentModel->addOrder('nachname');
$this->PrestudentModel->addOrder('vorname');
}
/**
* @return void
*/
protected function addSelectPrioRel()
{
$this->PrestudentModel->addSelect("(
SELECT count(*)
FROM (
SELECT *, public.get_rolle_prestudent(pss.prestudent_id, NULL) AS laststatus
FROM public.tbl_prestudent pss
JOIN public.tbl_prestudentstatus USING (prestudent_id)
WHERE person_id = p.person_id
AND studiensemester_kurzbz = (
SELECT studiensemester_kurzbz
FROM public.tbl_prestudentstatus
WHERE prestudent_id = tbl_prestudent.prestudent_id
AND status_kurzbz = 'Interessent'
LIMIT 1
)
AND status_kurzbz = 'Interessent'
) prest
WHERE laststatus NOT IN ('Abbrecher', 'Abgewiesener', 'Absolvent')
AND priorisierung <= tbl_prestudent.priorisierung
) || ' (' || COALESCE(tbl_prestudent.priorisierung::text, ' '::text) || ')' AS priorisierung_relativ", false);
}
/**
* Adds additional filters to the query
*
@@ -358,8 +358,7 @@ class AbgabetoolJob extends JOB_Controller
foreach($assistenzMap as $assistenz_person_id => $tupelArr) {
$abgabenString = '<div style="font-family: Arial, sans-serif; color: #333;">';
$hasContent = false;
foreach($tupelArr as $tupel) {
$projektarbeit_id = $tupel[0];
$assistenzRow = $tupel[1];
@@ -378,7 +377,6 @@ class AbgabetoolJob extends JOB_Controller
if(count($relevantAbgaben) == 0) {
continue;
}
$hasContent = true;
// Format the Student Name
$s = $relevantAbgaben[0];
@@ -449,12 +447,7 @@ class AbgabetoolJob extends JOB_Controller
}
$abgabenString .= '</div>';
// skip send entirely
if (!$hasContent) {
continue;
}
// done with building the change list, now send it
$assistenzRow = $tupelArr[0][1];
$anrede = $assistenzRow->anrede;
+16 -61
View File
@@ -40,13 +40,6 @@ class AntragJob extends JOB_Controller
*/
public function sendStglSammelmail()
{
if ($this->config->item('abmeldung_enabled') !== true &&
$this->config->item('abmeldung_stg_enabled') !== true &&
$this->config->item('unterbrechung_enabled') !== true &&
$this->config->item('wiederholung_enabled') !== true)
return $this->logError('Konnte Job nicht starten: Keine der Configs "abmeldung_stg_enabled", "abmeldung_enabled", "unterbrechung_enabled", "wiederholung_enabled" auf true gesetzt');
$this->load->model('person/Person_model', 'PersonModel');
$this->logInfo('Start Job sendStglSammelmail');
@@ -54,38 +47,25 @@ class AntragJob extends JOB_Controller
$this->load->model('organisation/Studiengang_model', 'StudiengangModel');
$this->StudierendenantragModel->addJoin('public.tbl_prestudent', 'prestudent_id');
$this->db->group_start();
$this->db->where('typ', Studierendenantrag_model::TYP_ABMELDUNG);
$this->db->where('campus.get_status_studierendenantrag(studierendenantrag_id)', Studierendenantragstatus_model::STATUS_CREATED);
$this->db->group_end();
if ($this->config->item('abmeldung_enabled') === true)
{
$this->db->group_start();
$this->db->where('typ', Studierendenantrag_model::TYP_ABMELDUNG);
$this->db->where('campus.get_status_studierendenantrag(studierendenantrag_id)', Studierendenantragstatus_model::STATUS_CREATED);
$this->db->group_end();
}
$this->db->or_group_start();
$this->db->where('typ', Studierendenantrag_model::TYP_ABMELDUNG_STGL);
$this->db->where('campus.get_status_studierendenantrag(studierendenantrag_id)', Studierendenantragstatus_model::STATUS_CREATED);
$this->db->group_end();
if ($this->config->item('abmeldung_stg_enabled') === true)
{
$this->db->or_group_start();
$this->db->where('typ', Studierendenantrag_model::TYP_ABMELDUNG_STGL);
$this->db->where('campus.get_status_studierendenantrag(studierendenantrag_id)', Studierendenantragstatus_model::STATUS_CREATED);
$this->db->group_end();
}
$this->db->or_group_start();
$this->db->where('typ', Studierendenantrag_model::TYP_UNTERBRECHUNG);
$this->db->where('campus.get_status_studierendenantrag(studierendenantrag_id)', Studierendenantragstatus_model::STATUS_CREATED);
$this->db->group_end();
if ($this->config->item('unterbrechung_enabled') === true)
{
$this->db->or_group_start();
$this->db->where('typ', Studierendenantrag_model::TYP_UNTERBRECHUNG);
$this->db->where('campus.get_status_studierendenantrag(studierendenantrag_id)', Studierendenantragstatus_model::STATUS_CREATED);
$this->db->group_end();
}
if ($this->config->item('wiederholung_enabled') === true)
{
$this->db->or_group_start();
$this->db->where('typ', Studierendenantrag_model::TYP_WIEDERHOLUNG);
$this->db->where('campus.get_status_studierendenantrag(studierendenantrag_id)', Studierendenantragstatus_model::STATUS_LVSASSIGNED);
$this->db->group_end();
}
$this->db->or_group_start();
$this->db->where('typ', Studierendenantrag_model::TYP_WIEDERHOLUNG);
$this->db->where('campus.get_status_studierendenantrag(studierendenantrag_id)', Studierendenantragstatus_model::STATUS_LVSASSIGNED);
$this->db->group_end();
$result = $this->StudierendenantragModel->load();
if(isError($result))
@@ -226,10 +206,6 @@ class AntragJob extends JOB_Controller
public function sendReminderWiedereinstieg()
{
$now = new DateTime();
if ($this->config->item('unterbrechung_enabled') !== true)
return $this->logError('Konnte Job nicht starten: Config "unterbrechung_enabled" nicht auf true gesetzt');
$modifier = $this->config->item('unterbrechung_job_remind_wiedereinstieg_date_modifier');
if (!$modifier)
@@ -387,13 +363,6 @@ class AntragJob extends JOB_Controller
{
$this->logInfo('Start Job handleWiederholerDeadline');
if ($this->config->item('wiederholung_enabled') !== true)
{
$this->logError('Config "wiederholung_enabled" nicht auf true gesetzt');
$this->logInfo('Ende Job handleWiederholerDeadline');
return;
}
$this->load->library('PrestudentLib');
$insertvon = $this->config->item('antrag_job_systemuser');
@@ -512,13 +481,6 @@ class AntragJob extends JOB_Controller
{
$this->logInfo('Start Job handleAbmeldungenStglDeadline');
if ($this->config->item('abmeldung_stg_enabled') !== true)
{
$this->logError('Config "abmeldung_stg_enabled" nicht auf true gesetzt');
$this->logInfo('Ende Job handleAbmeldungenStglDeadline');
return;
}
$insertvon = $this->config->item('antrag_job_systemuser');
if (!$insertvon) {
$this->logError('Config "antrag_job_systemuser" nicht gesetzt');
@@ -652,13 +614,6 @@ class AntragJob extends JOB_Controller
{
$this->logInfo('Start Job sendAufforderungWiederholer');
if ($this->config->item('wiederholung_enabled') !== true)
{
$this->logError('Config "wiederholung_enabled" nicht auf true gesetzt');
$this->logInfo('Ende Job sendAufforderungWiederholer');
return;
}
$modifier_request_1 = $this->config->item('wiederholung_job_request_1_date_modifier');
$modifier_request_2 = $this->config->item('wiederholung_job_request_2_date_modifier');
$modifier_deadline = $this->config->item('wiederholung_job_deadline_date_modifier');
@@ -28,9 +28,7 @@ class Studierendenantrag extends FHC_Controller
'studierendenantrag'
]);
$this->load->config('studierendenantrag');
if (strtolower($this->router->method) === 'leitung')
if (strtolower($this->router->method) === 'leitung')
$this->_isAllowed([
'leitung' => ['student/studierendenantrag:r', 'student/antragfreigabe:r']
]);
@@ -56,27 +54,18 @@ class Studierendenantrag extends FHC_Controller
'bezeichnungStg' => $antrag->bezeichnung,
'bezeichnungOrgform' => $antrag->orgform
);
$result = $this->antraglib->getPrestudentWiederholungsBerechtigt($antrag->prestudent_id);
if (getData($result) == 1)
$prestudentenArr[$antrag->prestudent_id]['allowedNewTypes'][] = 'Wiederholung';
if ($this->config->item('wiederholung_enabled') === true)
{
$result = $this->antraglib->getPrestudentWiederholungsBerechtigt($antrag->prestudent_id);
if (getData($result) == 1)
$prestudentenArr[$antrag->prestudent_id]['allowedNewTypes'][] = 'Wiederholung';
}
$result = $this->antraglib->getPrestudentUnterbrechungsBerechtigt($antrag->prestudent_id);
if (getData($result) == 1)
$prestudentenArr[$antrag->prestudent_id]['allowedNewTypes'][] = 'Unterbrechung';
if ($this->config->item('unterbrechung_enabled') === true)
{
$result = $this->antraglib->getPrestudentUnterbrechungsBerechtigt($antrag->prestudent_id);
if (getData($result) == 1)
$prestudentenArr[$antrag->prestudent_id]['allowedNewTypes'][] = 'Unterbrechung';
}
if ($this->config->item('abmeldung_enabled') === true)
{
$result = $this->antraglib->getPrestudentAbmeldeBerechtigt($antrag->prestudent_id);
if (getData($result) == 1)
$prestudentenArr[$antrag->prestudent_id]['allowedNewTypes'][] = 'Abmeldung';
}
$result = $this->antraglib->getPrestudentAbmeldeBerechtigt($antrag->prestudent_id);
if (getData($result) == 1)
$prestudentenArr[$antrag->prestudent_id]['allowedNewTypes'][] = 'Abmeldung';
}
if ($antrag->studierendenantrag_id == null)
continue;
@@ -99,59 +88,45 @@ class Studierendenantrag extends FHC_Controller
$this->load->view('lehre/Antrag/Leitung/List', [
'stgA' => $stgA,
'stgL' => $stgL,
'abmeldung_enabled' => $this->config->item('abmeldung_stg_enabled')
'stgL' => $stgL
]);
}
public function abmeldung($prestudent_id, $studierendenantrag_id = null)
{
if ($this->config->item('abmeldung_enabled') === true)
{
$this->load->view('lehre/Antrag/Create', [
'prestudent_id' => $prestudent_id,
'studierendenantrag_id' => $studierendenantrag_id,
'antrag_type' => 'Abmeldung'
]);
}
$this->load->view('lehre/Antrag/Create', [
'prestudent_id' => $prestudent_id,
'studierendenantrag_id' => $studierendenantrag_id,
'antrag_type' => 'Abmeldung'
]);
}
public function abmeldungstgl($prestudent_id, $studierendenantrag_id = null)
{
if ($this->config->item('abmeldung_stg_enabled') === true)
{
$this->load->view('lehre/Antrag/Create', [
'prestudent_id' => $prestudent_id,
'studierendenantrag_id' => $studierendenantrag_id,
'antrag_type' => 'AbmeldungStgl'
]);
}
$this->load->view('lehre/Antrag/Create', [
'prestudent_id' => $prestudent_id,
'studierendenantrag_id' => $studierendenantrag_id,
'antrag_type' => 'AbmeldungStgl'
]);
}
public function unterbrechung($prestudent_id, $studierendenantrag_id = null)
{
if ($this->config->item('unterbrechung_enabled') === true)
{
$this->load->view('lehre/Antrag/Create', [
'prestudent_id' => $prestudent_id,
'studierendenantrag_id' => $studierendenantrag_id,
'antrag_type' => 'Unterbrechung'
]);
}
$this->load->view('lehre/Antrag/Create', [
'prestudent_id' => $prestudent_id,
'studierendenantrag_id' => $studierendenantrag_id,
'antrag_type' => 'Unterbrechung'
]);
}
public function wiederholung($prestudent_id, $studierendenantrag_id = null)
{
if ($this->config->item('wiederholung_enabled') === true)
{
$this->load->view('lehre/Antrag/Create', [
'prestudent_id' => $prestudent_id,
'studierendenantrag_id' => $studierendenantrag_id,
'antrag_type' => 'Wiederholung'
]);
}
$this->load->view('lehre/Antrag/Create', [
'prestudent_id' => $prestudent_id,
'studierendenantrag_id' => $studierendenantrag_id,
'antrag_type' => 'Wiederholung'
]);
}
/**
+212
View File
@@ -0,0 +1,212 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
class Phrases extends Auth_Controller
{
/**
*
*/
public function __construct()
{
parent::__construct(
array(
'index' => 'system/phrase:r',
'table' => 'system/phrase:r',
'view' => 'system/phrase:r',
'deltext' => 'system/phrase:rw',
'edit' => 'system/phrase:rw',
'save' => 'system/phrase:rw',
'newText' => 'system/phrase:rw',
'editText' => 'system/phrase:rw',
'saveText' => 'system/phrase:rw'
)
);
// Loads the phrases library
$this->load->library('PhrasesLib');
// Loads the widget library
$this->load->library('WidgetLib');
}
/**
*
*/
public function index()
{
$this->load->view('system/phrases/phrases.php');
}
/**
*
*/
public function table()
{
$phrases = $this->phraseslib->getPhraseByApp('aufnahme');
if ($phrases->error)
show_error(getError($phrases));
$data = array(
'app' => 'aufnahme',
'phrases' => $phrases->retval
);
$this->load->view('system/phrases/phrasesList.php', $data);
}
/**
*
*/
public function view($phrase_id)
{
if (!is_numeric($phrase_id))
show_error('Invalid phrase_id parameter');
$phrase = $this->phraseslib->getPhrase($phrase_id);
$phrase_inhalt = $this->phraseslib->getPhraseInhalt($phrase_id);
if ($phrase_inhalt->error)
show_error(getError($phrase_inhalt));
$data = array(
'phrase_id' => $phrase_id,
'phrase' => $phrase->retval[0]->phrase,
'phrase_inhalt' => $phrase_inhalt->retval
);
$this->load->view('system/phrases/phrasesinhaltList.php', $data);
}
/**
*
*/
public function deltext($phrasentext_id, $phrase_id)
{
if (!is_numeric($phrasentext_id) || !is_numeric($phrase_id))
show_error('Invalid phrasentext_id or phrase_id parameter');
$phrase_inhalt = $this->phraseslib->delPhrasentext($phrasentext_id);
if ($phrase_inhalt->error)
show_error(getError($phrase_inhalt));
redirect('/system/Phrases/view/'.$phrase_id);
}
/**
*
*/
public function edit($phrase_id = null)
{
if (!is_numeric($phrase_id)) return;
$phrase = $this->phraseslib->getPhrase($phrase_id);
if ($phrase->error)
show_error(getError($phrase));
if (count($phrase->retval) != 1)
show_error('Phrase nicht vorhanden! ID: '.$phrase_id);
$data = array(
'phrase' => $phrase->retval[0]
);
$this->load->view('system/phrases/phrasesEdit', $data);
}
/**
*
*/
public function save()
{
$phrase_id = $this->input->post('phrase_id');
$data = array('phrase' => $this->input->post('phrase'));
$phrase = $this->phraseslib->savePhrase($phrase_id, $data);
if ($phrase->error)
show_error(getError($phrase));
$phrase_id = $phrase->retval;
redirect('/system/Phrases/edit/'.$phrase_id);
}
/**
*
*/
public function newText()
{
$phrase_id = $this->input->post('phrase_id');
$this->load->model('organisation/Organisationseinheit_model', 'OrganisationseinheitModel');
$this->OrganisationseinheitModel->addLimit(1);
$this->OrganisationseinheitModel->addOrder('oe_kurzbz');
$resultOE = $this->OrganisationseinheitModel->loadWhere(array('aktiv' => true, 'oe_parent_kurzbz' => null));
if ($resultOE->error)
show_error(getError($resultOE));
if (hasData($resultOE))
{
$orgeinheit_kurzbz = $resultOE->retval[0]->oe_kurzbz;
$data = array(
'phrase_id' => $phrase_id,
'sprache' => 'German',
'text' => '',
'description' => '',
'orgeinheit_kurzbz' => $orgeinheit_kurzbz
);
$phrase_inhalt = $this->phraseslib->insertPhraseinhalt($data);
if ($phrase_inhalt->error)
show_error(getError($phrase_inhalt));
$phrase_inhalt_id = $phrase_inhalt->retval;
redirect('/system/Phrases/editText/'.$phrase_inhalt_id);
}
else
{
show_error('No valid organisation unit found');
}
}
/**
*
*/
public function editText($phrasentext_id)
{
$phrase_inhalt = $this->phraseslib->getPhrasentextById($phrasentext_id);
if ($phrase_inhalt->error)
show_error(getError($phrase_inhalt));
$data = $phrase_inhalt->retval[0];
$this->load->view('system/phrases/phraseinhaltEdit', $data);
}
/**
*
*/
public function saveText()
{
$phrase_inhalt_id = $this->input->post('phrase_inhalt_id');
$data = array(
'orgeinheit_kurzbz' => $this->input->post('oe_kurzbz'),
'orgform_kurzbz' => $this->input->post('orgform_kurzbz'),
'text' => $this->input->post('text'),
'description' => $this->input->post('description'),
'sprache' => $this->input->post('sprache')
);
$phrase_inhalt = $this->phraseslib->updatePhraseInhalt($phrase_inhalt_id, $data);
if ($phrase_inhalt->error)
show_error(getError($phrase_inhalt));
redirect('/system/Phrases/editText/'.$phrase_inhalt_id);
}
}
@@ -11,8 +11,8 @@ class CLI_Manager extends CLI_Controller
*
*/
public function __construct()
{
parent::__construct();
{
parent::__construct();
// Load helpers to upload files
$this->load->helper('form');
@@ -28,19 +28,9 @@ class CLI_Manager extends CLI_Controller
* die Commandline ohne Upload durchzufuehren.
* @param $extensioName string Name der Extension
* @param $filename Url Encoded Pfad zum tgz File der Extension
* @param $perform_sql boolean ob die SQL Befehle ausgeführt werden
*/
public function installExtension($extensionName, $filename)
public function uploadExtension($extensionName = null, $filename = null)
{
$this->extensionslib->installExtension($extensionName, urldecode($filename), true);
}
/**
* Install an extension, same as installExtension but without running the SQL statements
*/
public function installExtensionNoSQL($extensionName, $filename)
{
$this->extensionslib->installExtension($extensionName, urldecode($filename), false);
$this->extensionslib->installExtension($extensionName, urldecode($filename));
}
}
@@ -11,8 +11,8 @@ class Manager extends Auth_Controller
*
*/
public function __construct()
{
parent::__construct(
{
parent::__construct(
array(
'index' => 'system/extensions:r',
'toggleExtension' => 'system/extensions:rw',
@@ -21,22 +21,11 @@ class Manager extends Auth_Controller
)
);
// Loads the form helper
// Load helpers to upload files
$this->load->helper('form');
// Loads WidgetLib
$this->load->library('WidgetLib');
// Loads the extensions library
$this->load->library('ExtensionsLib');
$this->loadPhrases(
array(
'extensions',
'table',
'ui'
)
);
}
/**
@@ -44,7 +33,11 @@ class Manager extends Auth_Controller
*/
public function index()
{
$this->load->view('system/extensions/manager.php');
$viewData = array(
'extensions' => $this->extensionslib->getInstalledExtensions()
);
$this->load->view('system/extensions/manager.php', $viewData);
}
/**
@@ -52,16 +45,23 @@ class Manager extends Auth_Controller
*/
public function toggleExtension()
{
$toggleExtension = false;
$extension_id = $this->input->post('extension_id');
$enabled = $this->input->post('enabled');
// Clean the parameter
$enabled = $enabled == 'true' ? true : false;
if ($enabled === 'true')
{
$toggleExtension = $this->extensionslib->enableExtension($extension_id);
}
else
{
$toggleExtension = $this->extensionslib->disableExtension($extension_id);
}
// Output the enable/disable of the extension
$this->outputJsonSuccess(
$this->extensionslib->toggleExtension($extension_id, $enabled)
);
$this->output
->set_content_type('application/json')
->set_output(json_encode($toggleExtension));
}
/**
@@ -69,11 +69,15 @@ class Manager extends Auth_Controller
*/
public function delExtension()
{
$delExtension = false;
$extension_id = $this->input->post('extension_id');
$delExtension = $this->extensionslib->delExtension($extension_id);
$this->outputJsonSuccess($delExtension);
$this->output
->set_content_type('application/json')
->set_output(json_encode($delExtension));
}
/**
@@ -83,16 +87,9 @@ class Manager extends Auth_Controller
* die Commandline ohne Upload durchzufuehren.
* @param $extensioName string Name der Extension
* @param $filename Url Encoded Pfad zum tgz File der Extension
* @param $perform_sql boolean ob die SQL Befehle ausgeführt werden
*/
public function uploadExtension()
public function uploadExtension($extensionName = null, $filename = null)
{
$notPerformSql = $this->input->post('notPerformSql');
// It converts the notPerformSql parameter from the checkbox value to a boolean one
if ($notPerformSql == 'on') $notPerformSql = true;
if ($notPerformSql !== true) $notPerformSql = false;
$this->extensionslib->installExtension(null, null, !$notPerformSql);
$this->extensionslib->installExtension($extensionName, urldecode($filename));
}
}
@@ -1,50 +0,0 @@
<?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 CLI_Manager extends CLI_Controller
{
/**
*
*/
public function __construct()
{
parent::__construct();
// Loads PhrasesLib
$this->load->library('PhrasesLib');
}
/**
*
*/
public function installFrom($phrasesDirectoryPath)
{
$this->phraseslib->installFrom(urldecode($phrasesDirectoryPath));
}
/**
* Calls the PhrasesLib->syncFiles to create/update the phrases files under the directory application/phrases/
*/
public function syncFiles()
{
$this->phraseslib->syncFiles();
}
}
@@ -1,30 +0,0 @@
<?php
if (!defined("BASEPATH")) exit("No direct script access allowed");
class Manager extends Auth_Controller
{
/**
*
*/
public function __construct()
{
parent::__construct(
array(
'installFromCore' => 'admin:rw'
)
);
// Loads PhrasesLib
$this->load->library('PhrasesLib');
}
/**
*
*/
public function installFromCore()
{
$this->phraseslib->installFromCore();
}
}
@@ -1,45 +0,0 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Overview on cronjob logs
*/
class PhrasesViewer extends Auth_Controller
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct(
array(
'index' => 'system/developer:r'
)
);
// Loads WidgetLib
$this->load->library('WidgetLib');
// Loads phrases system
$this->loadPhrases(
array(
'global',
'ui',
'filter'
)
);
}
// -----------------------------------------------------------------------------------------------------------------
// Public methods
/**
* Everything has a beginning
*/
public function index()
{
$this->load->view('system/phrases/phrasesViewer.php');
}
}
-1
View File
@@ -417,7 +417,6 @@ abstract class Notiz_Controller extends FHCAPI_Controller
$notiz_id = $this->input->post('notiz_id');
$this->NotizModel->addSelect('campus.tbl_dms_version.*');
$this->NotizModel->addSelect($this->NotizModel->escape(base_url('content/notizdokdownload.php?id=')) . ' || public.tbl_notiz_dokument.dms_id AS preview');
$this->NotizModel->addJoin('public.tbl_notiz_dokument', 'ON (public.tbl_notiz_dokument.notiz_id = public.tbl_notiz.notiz_id)');
$this->NotizModel->addJoin('campus.tbl_dms_version', 'ON (public.tbl_notiz_dokument.dms_id = campus.tbl_dms_version.dms_id)');
+14 -18
View File
@@ -1,20 +1,20 @@
<?php
/**
* Copyright (C) 2025 FH Technikum-Wien
* FH-Complete
*
* 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 2 of the
* License, or (at your option) any later version.
* @package FHC-Helper
* @author FHC-Team
* @copyright Copyright (c) 2016 fhcomplete.org
* @license GPLv3
* @since Version 1.0.0
*/
/**
* FHC Helper
*
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
* @subpackage Helpers
* @category Helpers
*/
if (! defined('BASEPATH')) exit('No direct script access allowed');
@@ -136,7 +136,7 @@ function generateJSPhrasesStorageObject($phrases)
$toPrint = "\n";
$toPrint .= '<script type="text/javascript">';
$toPrint .= "\n";
$toPrint .= ' var FHC_JS_PHRASES_STORAGE_OBJECT = '.$ci->pj->toJSON().';';
$toPrint .= ' var FHC_JS_PHRASES_STORAGE_OBJECT = '.$ci->pj->getJSON().';';
$toPrint .= "\n";
$toPrint .= '</script>';
$toPrint .= "\n\n";
@@ -255,9 +255,6 @@ function generateSkipLink($skipID)
echo $toPrint;
}
/**
*
*/
function absoluteJsImportUrl($relurl)
{
$ci =& get_instance();
@@ -468,4 +465,3 @@ class ExtendableAppsHelper
array_push($this->extCustomJSs, 'public/js/FhcApps.js');
}
}
+2 -3
View File
@@ -128,7 +128,7 @@ class AntragLib
return $this->_ci->StudierendenantragstatusModel->resumeAntraegeForAbmeldungStgl($antrag_id);
}
// NOTE(chris): get last status that is not pause
$this->_ci->StudierendenantragstatusModel->addOrder('insertamum', 'DESC');
$this->_ci->StudierendenantragstatusModel->addOrder('insertamum');
$this->_ci->StudierendenantragstatusModel->addLimit(1);
$result = $this->_ci->StudierendenantragstatusModel->loadWhere([
'studierendenantrag_id' => $antrag_id,
@@ -1657,7 +1657,7 @@ class AntragLib
$result = $this->_ci->StudierendenantragModel->loadWithStatusWhere($where);
if (isError($result))
return $result;
return $result;
if (!hasData($result))
return error($this->_ci->p->t('studierendenantrag', "error_no_antrag_found", ['id' => $studierendenantrag_id]));
@@ -1709,7 +1709,6 @@ class AntragLib
$result->statustyp = $antrag->statustyp;
$result->status_insertvon = $antrag->status_insertvon;
$result->grund = $antrag->grund;
$result->status_grund = $antrag->status_grund;
$result->studierendenantrag_id = $antrag->studierendenantrag_id;
$result->typ = $antrag->typ;
$result->datum = $antrag->datum;
+168 -256
View File
@@ -1,6 +1,6 @@
<?php
/**
* Copyright (C) 2025 fhcomplete.org
* Copyright (C) 2022 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
@@ -19,7 +19,6 @@
if (! defined('BASEPATH')) exit('No direct script access allowed');
use \stdClass as stdClass;
use \PharData as PharData;
/**
* Library to manage core extensions
@@ -34,20 +33,11 @@ class ExtensionsLib
const EXTENSION_JSON_NAME = 'extension.json'; // file that contains extension data
const EXTENSIONS_DIR_NAME = 'extensions'; // name of the directories where will be created the symlinks
const PHRASES_DIRECTORY = 'phrases/'; // directory name where phrases files are
private $_ci;
const UPLOAD_PATH = 'tmp/';
private $_ci; // Code igniter instance
private $_errorOccurred; // boolean, true if an error occurred while installing an extension
private $_currentInstalledExtensionVersion; // contains the version of the current installation of an extension
// NOTE: the following have been declared as properties to maintain compatibility with previous PHP versions
// where arrays cannot be declared as constants
// Accepted file extensions for an uploaded extension
private $ARCHIVE_EXTENSIONS = array('.tgz', '.tbz2');
private $ARCHIVE_EXTENSIONS = array('.tgz', '.tbz2'); // accepted file extensions for an uploaded extension
private $UPLOAD_PATH; // temporary directory to store the upload file and checks the archive
private $EXTENSIONS_PATH; // directory where all the extensions are
// Directories that are part of the extension archive
private $SOFTLINK_TARGET_DIRECTORIES = array(
@@ -55,11 +45,16 @@ class ExtensionsLib
DOC_ROOT => array('public')
);
private $_errorOccurred; // boolean, true if an error occurred while installing an extension
private $_currentInstalledExtensionVersion; // contains the version of the current installation of an extension
/**
* Class constructor
*/
public function __construct()
{
$this->UPLOAD_PATH = APPPATH.'tmp/';
$this->EXTENSIONS_PATH = APPPATH.'extensions/';
// Get code igniter instance
$this->_ci =& get_instance();
@@ -68,8 +63,6 @@ class ExtensionsLib
// Loads EPrintfLib
$this->_ci->load->library('EPrintfLib');
// Loads PhrasesLib
$this->_ci->load->library('PhrasesLib');
// Loading models
$this->_ci->load->model('system/Extensions_model', 'ExtensionsModel');
@@ -77,13 +70,6 @@ class ExtensionsLib
// Set default values fot class properties
$this->_errorOccurred = false;
$this->_currentInstalledExtensionVersion = 0;
// If SERVER_NAME is _not_ declared or it is an empty string
if (!defined('SERVER_NAME') || (defined('SERVER_NAME') && isEmptyString(SERVER_NAME)))
{
$this->_printError('Global constant SERVER_NAME is not declared or it is not valid');
exit();
}
}
// -------------------------------------------------------------------------------------------------
@@ -96,44 +82,32 @@ class ExtensionsLib
* @param $extensionName string Name of Extension (optional)
* @param $filename Path to tgz Extension File (optional)
*/
public function installExtension($extensionName, $filename, $perform_sql)
public function installExtension($extensionName = null, $filename = null)
{
$extensionDB = null; // contains data from DB about an extension
$extensionJson = null; // contains the extension.json data
$this->_printInfo('WARNING!!! Please do not change page or stop this procedure before it is finished');
// Create an object with the given paramenters
$uploadData = new stdClass();
$uploadData->fullPath = $filename;
$uploadData->extensionName = $extensionName;
// If no extension name or file name are provided
if (is_null($extensionName) || is_null($filename))
if (!is_null($extensionName) && !is_null($filename))
{
$uploadData = new stdClass();
$uploadData->fullPath = $filename;
$uploadData->extensionName = $extensionName;
}
else
{
$this->_loadUploadLibrary(); // loads CI upload library
$uploadData = $this->_uploadExtension(); // perform the upload of the file and returns info about it
}
// If a file has been uploaded
if (isset($uploadData))
{
// If the given filename is the upper directory or the current one
if (trim($uploadData->fullPath) == '..' || trim($uploadData->fullPath) == '.')
{
$this->_printFailure('wrong file name: / has to be escaped with %2F');
$uploadData = null; // then it is a wrong one!
}
}
// If the no error occurred
if ($uploadData != null)
if ($uploadData != null) // if no error occurred
{
$this->_extractExtension($uploadData->fullPath); // extract the archive of the uploaded extension
if (!$this->_errorOccurred) // if no error occurred
{
// Retrieves data about any previous installation of this extension on this server
// Retives data about any previous installation of this extension
$extensionDB = $this->_loadPreviousInstallation($uploadData->extensionName);
}
@@ -154,17 +128,15 @@ class ExtensionsLib
$this->_printStart('Proceding with the installation of the extension: '.$extensionJson->name);
$this->_printEnd();
// Remove any previous installation from file system and database
$this->_cleanPreviousInstallation($extensionJson);
$this->_cleanPreviousInstallation($extensionJson); // cleans any previous installation
// Records extension data in DB
$this->_installExtension($extensionJson);
$this->_installExtension($extensionJson); // records extension data in DB
if (!$this->_errorOccurred && $perform_sql === true) // if no error occurred
if (!$this->_errorOccurred) // if no error occurred
{
// Loads and executes the needed SQL scripts
// Loads and executes neede SQL scripts
$this->_loadSQLs(
$this->_getUploadPath().$extensionJson->name.DIRECTORY_SEPARATOR.ExtensionsLib::SQL_DIRECTORY,
$this->UPLOAD_PATH.$extensionJson->name.'/'.ExtensionsLib::SQL_DIRECTORY,
$extensionJson
);
}
@@ -180,19 +152,20 @@ class ExtensionsLib
// Create the symlinks to the installed extension
$this->_createSymLinks($extensionJson->name);
}
if (!$this->_errorOccurred) // if no error occurred
{
// Create the symlinks to the installed extension
$this->_installPhrases($extensionJson->name);
}
}
else
{
$this->_errorOccurred = true;
}
}
else
{
$this->_errorOccurred = true;
}
if ($this->_errorOccurred === false) // if no errors occurred
{
// If a file has been uploaded then remove them
if (isset($uploadData) && !$this->_rrm($uploadData->fullPath))
if (!$this->_rrm($uploadData->fullPath)) // removes uploaded file
{
$this->_printInfo('Error while cleaning upload directory. Not a blocking error');
}
@@ -218,26 +191,19 @@ class ExtensionsLib
$result = $this->_ci->ExtensionsModel->load($extensionId);
if (hasData($result)) // if something was found
{
// If this server is _not_ the same where the extension was installed then exit with a failure
if (getData($result)[0]->server_kurzbz != SERVER_NAME) return false;
$extensionName = getData($result)[0]->name; // extension name
// Not to be checked, could fail if the extension is disabled
$this->_delSoftLinks($extensionName);
// Remove the extension from the extensions installation directory
$delExtension = $this->_rrm($this->_getExtensionsPath().$extensionName);
$extensionName = $result->retval[0]->name; // extension name
$this->_delSoftLinks($extensionName); // not to be checked, could fail if the extension is disabled
// remove the extension from the extensions installation directory
$delExtension = $this->_rrm($this->EXTENSIONS_PATH.$extensionName);
// Select all the version of this extension
$this->_ci->ExtensionsModel->addSelect('extension_id');
$result = $this->_ci->ExtensionsModel->loadWhere(array('name' => $extensionName, 'server_kurzbz' => SERVER_NAME));
$result = $this->_ci->ExtensionsModel->loadWhere(array('name' => $extensionName));
// If something was found
if (hasData($result))
{
foreach (getData($result) as $extension) // loops on them
// Loops on them
foreach ($result->retval as $extension)
{
// Remove them all
$result = $this->_ci->ExtensionsModel->delete($extension->extension_id);
@@ -254,57 +220,23 @@ class ExtensionsLib
*/
public function getInstalledExtensions()
{
$this->_ci->ExtensionsModel->addOrder('name', 'ASC');
$this->_ci->ExtensionsModel->addOrder('server_kurzbz', 'ASC');
$this->_ci->ExtensionsModel->addOrder('version', 'ASC');
return $this->_ci->ExtensionsModel->loadWhere(array('server_kurzbz' => SERVER_NAME));
return $this->_ci->ExtensionsModel->getInstalledExtensions();
}
/**
* To enable/disable an extension
* To enable an extension
*/
public function toggleExtension($extensionId, $enabled)
public function enableExtension($extensionId)
{
$_toggleExtension = false;
return $this->_toggleExtension($extensionId, true);
}
// Loads data from DB about the given extension
$result = $this->_ci->ExtensionsModel->load($extensionId);
if (hasData($result))
{
// If this server is _not_ the same where the extension was installed then exit with a failure
if (getData($result)[0]->server_kurzbz != SERVER_NAME) return false;
$extensionName = getData($result)[0]->name; // extension name
// If to be enabled
if ($enabled === true)
{
// Add the symlinks
$_toggleExtension = $this->_addSoftLinks($extensionName);
}
else // If to be disabled
{
// Remove all the symlinks
$_toggleExtension = $this->_delSoftLinks($extensionName);
}
if ($_toggleExtension) // if is a success
{
// Updates DB
$result = $this->_ci->ExtensionsModel->update($extensionId, array('enabled' => $enabled));
if (isSuccess($result))
{
$_toggleExtension = true;
}
else // if DB update fails remove symlinks from file system
{
$this->_delSoftLinks($extensionName);
}
}
}
return $_toggleExtension;
/**
* To disable an extension
*/
public function disableExtension($extensionId)
{
return $this->_toggleExtension($extensionId, false);
}
// -------------------------------------------------------------------------------------------------
@@ -318,7 +250,7 @@ class ExtensionsLib
$this->_ci->load->library(
'upload',
array(
'upload_path' => $this->_getUploadPath(),
'upload_path' => $this->UPLOAD_PATH,
'allowed_types' => '*',
'overwrite' => true
)
@@ -382,7 +314,7 @@ class ExtensionsLib
// Extracts the uploaded file
$pd = new PharData($uploadPath);
$pd->extractTo($this->_getUploadPath(), null, true);
$pd->extractTo($this->UPLOAD_PATH, null, true);
}
catch (UnexpectedValueException $uva)
{
@@ -390,16 +322,6 @@ class ExtensionsLib
$this->_printFailure('provided an invalid archive');
}
catch (PharException $pe)
{
$this->_errorOccurred = true;
$this->_printFailure('phar error occurred');
}
catch (InvalidArgumentException $iae)
{
$this->_errorOccurred = true;
$this->_printFailure('wrong file name');
}
catch (Exception $e)
{
$this->_errorOccurred = true;
$this->_printFailure('generic error occurred, check logs');
@@ -422,29 +344,24 @@ class ExtensionsLib
// Loads the last version of the previous installation of this extension
$this->_ci->ExtensionsModel->addOrder('version', 'DESC');
$this->_ci->ExtensionsModel->addLimit(1);
// Loads extensions installed on this server
$result = $this->_ci->ExtensionsModel->loadWhere(
array(
'name' => $extensionName,
'server_kurzbz' => SERVER_NAME
)
);
// In an error occurred
$result = $this->_ci->ExtensionsModel->loadWhere(array('name' => $extensionName));
if (isError($result))
{
$this->_errorOccurred = true;
$this->_printFailure('data base error: '.getData($result));
$this->_printFailure('data base error: '.$result->retval);
}
elseif (hasData($result))
else
{
$extensionDB = getData($result)[0];
if (hasData($result)) // if found
{
$extensionDB = $result->retval[0]; // return it!
}
else
{
$this->_printMessage('not found');
}
}
// If no data have been found
if ($extensionDB == null) $this->_printMessage('not found');
$this->_printSuccess(!$this->_errorOccurred);
$this->_printEnd();
@@ -460,10 +377,10 @@ class ExtensionsLib
$this->_printStart('Checking extension file system structure');
// Checks if the root directory of this archive has the same name of the extension
if (is_dir($this->_getUploadPath().$extensionName))
if (is_dir($this->UPLOAD_PATH.$extensionName))
{
// Checks if file extension.json exists inside the uploaded archive
if (!file_exists($this->_getUploadPath().$extensionName.DIRECTORY_SEPARATOR.ExtensionsLib::EXTENSION_JSON_NAME))
if (!file_exists($this->UPLOAD_PATH.$extensionName.'/'.ExtensionsLib::EXTENSION_JSON_NAME))
{
$this->_errorOccurred = true;
$this->_printFailure('missing extension.json');
@@ -485,14 +402,11 @@ class ExtensionsLib
*/
private function _chkExtensionJson($extensionName, $extensionDB)
{
// Set a default FHComplete version
$fhcomplete_version = 0;
$this->_printStart('Parsing and checking extension.json');
// Decodes extension.json
$extensionJson = json_decode(
file_get_contents($this->_getUploadPath().$extensionName.DIRECTORY_SEPARATOR.ExtensionsLib::EXTENSION_JSON_NAME)
file_get_contents($this->UPLOAD_PATH.$extensionName.'/'.ExtensionsLib::EXTENSION_JSON_NAME)
);
// Checks if the parameter name of the extension.json has the same value of the extension name
@@ -502,41 +416,36 @@ class ExtensionsLib
if (isset($extensionJson->version))
{
$extensionJson->currentInstalledVersion = 0; // default current installed version of this extension
// If a previous installation was found in DB
if ($extensionDB != null)
if ($extensionDB != null) // if no previous installation was found in DB
{
// Then get the data from database
$extensionJson->extension_id = $extensionDB->extension_id; // get the extension_id from DB
$extensionJson->currentInstalledVersion = $extensionDB->version; // get the current installed version from DB
// Prompt a summary
$this->_printMessage('Extension already installed!');
$this->_printMessage('Current version: '.$extensionDB->version);
$this->_printMessage('Version of the uploaded extension: '.$extensionJson->version);
// Check if the version of the uploaded extension is the same
// as the one from the dataabase
if ($extensionJson->version == $extensionDB->version)
{
$this->_printMessage('Updating the same version!');
}
elseif ($extensionJson->version > $extensionDB->version) // or it is higher
elseif ($extensionJson->version > $extensionDB->version)
{
$this->_printMessage('Updating to a new version!');
}
else // otherwise is lower, then the downgrade is not possible
else // downgrade is not possible
{
$extensionJson = null;
$this->_printFailure('downgrade must be performed manually');
}
}
else // otherwise if it is not installed on this server
else
{
$this->_printMessage('Version of the uploaded extension: '.$extensionJson->version);
}
// If no errors occurred then check the JSON file content within the uploaded extension
// If no errors occurred
if ($extensionJson != null)
{
// Default value
@@ -545,7 +454,7 @@ class ExtensionsLib
require_once('version.php'); // get the core version
// Checks if the required core version of the extension is the same of this system
if (isset($extensionJson->core_version) && version_compare($extensionJson->core_version, $fhcomplete_version, '<='))
if (isset($extensionJson->core_version) && version_compare($extensionJson->core_version, $fhcomplete_version,'<='))
{
$this->_printMessage('Required core version: '.$extensionJson->core_version);
$this->_printMessage('Current core version: '.$fhcomplete_version);
@@ -558,7 +467,7 @@ class ExtensionsLib
// Gets the required dependencies
$result = $this->_ci->ExtensionsModel->getDependencies($extensionJson->dependencies);
// If they are matcheds
if (hasData($result) && count(getData($result)) == count($extensionJson->dependencies))
if (hasData($result) && count($result->retval) == count($extensionJson->dependencies))
{
if (isset($extensionJson->dependencies))
{
@@ -653,7 +562,6 @@ class ExtensionsLib
{
$this->_printStart('Adding new entry in the DB');
// Insert into database the extension information
$result = $this->_ci->ExtensionsModel->insert(
array(
'name' => $extensionJson->name,
@@ -662,8 +570,7 @@ class ExtensionsLib
'license' => isset($extensionJson->license) ? $extensionJson->license : null,
'url' => isset($extensionJson->url) ? $extensionJson->url : null,
'core_version' => $extensionJson->core_version,
'dependencies' => isset($extensionJson->dependencies) ? $extensionJson->dependencies : null,
'server_kurzbz' => SERVER_NAME
'dependencies' => isset($extensionJson->dependencies) ? $extensionJson->dependencies : null
)
);
if (isSuccess($result))
@@ -699,16 +606,14 @@ class ExtensionsLib
// Loops through the versions
for ($sqlDir = $startVersion; $sqlDir <= $extensionJson->version; $sqlDir++)
{
// Gets all the SQL files in the directory having the same name of the version
$files = glob($pkgSQLsPath.DIRECTORY_SEPARATOR.$sqlDir.'/*'.ExtensionsLib::SQL_FILE_EXTENSION);
// If a directory with the same value of the version is present in the sql scripts directory
$files = glob($pkgSQLsPath.'/'.$sqlDir.'/*'.ExtensionsLib::SQL_FILE_EXTENSION);
if ($files != false)
{
{
// Loads every sql files
foreach ($files as $file)
{
$sql = file_get_contents($file); // gets the entire content of the file
$sql = file_get_contents($file); // gets the entire content of the file
$this->_printMessage('Executing query:');
$this->_printMessage($sql);
@@ -746,20 +651,17 @@ class ExtensionsLib
{
$this->_printStart('Moving the upload extension from upload folder to extension folder');
$this->_printMessage('Current extension directory: '.$this->_getUploadPath().$extensionName);
$this->_printMessage('Directory where it will be moved: '.$this->_getExtensionsPath().$extensionName);
$this->_printMessage('Current extension directory: '.$this->UPLOAD_PATH.$extensionName);
$this->_printMessage('Directory where it will be moved: '.$this->EXTENSIONS_PATH.$extensionName);
if (!file_exists($this->_getExtensionsPath().$extensionName))
if (rename($this->UPLOAD_PATH.$extensionName.'/', $this->EXTENSIONS_PATH.$extensionName))
{
if (rename($this->_getUploadPath().$extensionName.DIRECTORY_SEPARATOR, $this->_getExtensionsPath().$extensionName))
{
$this->_printSuccess(true);
}
else
{
$this->_errorOccurred = true;
$this->_printFailure('error while moving');
}
$this->_printSuccess(true);
}
else
{
$this->_errorOccurred = true;
$this->_printFailure('error while moving');
}
$this->_printEnd();
@@ -793,21 +695,13 @@ class ExtensionsLib
{
$_delSoftLinks = false;
// For every set of target directories where:
// rootPath: is the prefix of the absolute path for the target directory
// targetDirectories: is an array of target directories
foreach ($this->SOFTLINK_TARGET_DIRECTORIES as $rootPath => $targetDirectories)
{
// For every target directory in the current set
foreach ($targetDirectories as $targetDirectory)
{
// If the symlink exists
if (file_exists($rootPath.$targetDirectory.DIRECTORY_SEPARATOR.ExtensionsLib::EXTENSIONS_DIR_NAME.DIRECTORY_SEPARATOR.$extensionName))
if (file_exists($rootPath.$targetDirectory.'/'.ExtensionsLib::EXTENSIONS_DIR_NAME.'/'.$extensionName))
{
// Try to delete it
$_delSoftLinks = unlink(
$rootPath.$targetDirectory.DIRECTORY_SEPARATOR.ExtensionsLib::EXTENSIONS_DIR_NAME.DIRECTORY_SEPARATOR.$extensionName
);
$_delSoftLinks = unlink($rootPath.$targetDirectory.'/'.ExtensionsLib::EXTENSIONS_DIR_NAME.'/'.$extensionName);
}
}
}
@@ -820,23 +714,29 @@ class ExtensionsLib
*/
private function _rrm($dir)
{
// If the directory does not exist return success
if (!file_exists($dir)) return true;
// If it is not a directory then delete it and return the result
if (!is_dir($dir)) return unlink($dir);
// For each subdirectory
foreach (scandir($dir) as $subdir)
if (!file_exists($dir))
{
// If it is the same directory or the parent directory skip to the next one
if ($subdir == '.' || $subdir == '..') continue;
// Try to remove a subdirectory, if it fails then return a failure
if (!$this->_rrm($dir.DIRECTORY_SEPARATOR.$subdir)) return false;
return true;
}
if (!is_dir($dir))
{
return unlink($dir);
}
foreach (scandir($dir) as $item)
{
if ($item == '.' || $item == '..')
{
continue;
}
if (!$this->_rrm($dir.DIRECTORY_SEPARATOR.$item))
{
return false;
}
}
// Delete the directory and return the result
return rmdir($dir);
}
@@ -846,36 +746,27 @@ class ExtensionsLib
private function _addSoftLinks($extensionName)
{
$_addSoftLinks = false;
$extensionPath = $this->_getExtensionsPath().$extensionName.DIRECTORY_SEPARATOR;
$extensionPath = $this->EXTENSIONS_PATH.$extensionName.'/';
// For every set of target directories where:
// rootPath: is the prefix of the absolute path for the target directory
// targetDirectories: is an array of target directories
// For every target directory
foreach ($this->SOFTLINK_TARGET_DIRECTORIES as $rootPath => $targetDirectories)
{
// For every target directory in the current set
foreach ($targetDirectories as $targetDirectory)
{
// Checks if the link already exists
$_addSoftLinks = file_exists(
$rootPath.$targetDirectory.DIRECTORY_SEPARATOR.ExtensionsLib::EXTENSIONS_DIR_NAME.DIRECTORY_SEPARATOR.$extensionName
);
// If the symlink does not exist
if (!$_addSoftLinks)
// If destination of the symlink does not exist
if (!file_exists($rootPath.$targetDirectory.'/'.ExtensionsLib::EXTENSIONS_DIR_NAME.'/'.$extensionName))
{
// If the target directory does not exist than creates it
if (!is_dir($extensionPath.$targetDirectory)) mkdir($extensionPath.$targetDirectory);
// If the target directory does not exist than creates that
if (!is_dir($extensionPath.$targetDirectory))
{
mkdir($extensionPath.$targetDirectory);
}
// Create the symlink
$_addSoftLinks = @symlink(
// Target
$_addSoftLinks = symlink(
$extensionPath.$targetDirectory,
// Link
$rootPath.$targetDirectory.DIRECTORY_SEPARATOR.ExtensionsLib::EXTENSIONS_DIR_NAME.DIRECTORY_SEPARATOR.$extensionName
$rootPath.$targetDirectory.'/'.ExtensionsLib::EXTENSIONS_DIR_NAME.'/'.$extensionName
);
// On failure
if (!$_addSoftLinks)
{
log_message('error', 'Failed to create Symlink to '.$extensionPath.$targetDirectory);
@@ -905,9 +796,9 @@ class ExtensionsLib
$this->_printMessage('Removing the extracted data from the upload directory');
if ($uploadData != null
&& isset($uploadData->extensionName)
&& file_exists($this->_getUploadPath().$uploadData->extensionName))
&& file_exists($this->UPLOAD_PATH.$uploadData->extensionName))
{
$this->_rrm($this->_getUploadPath().$uploadData->extensionName);
$this->_rrm($this->UPLOAD_PATH.$uploadData->extensionName);
}
// If the upload of the file is a success and the extension name is present and no previous installation were found
@@ -921,13 +812,16 @@ class ExtensionsLib
{
// Remove them all from file system and DB
$this->_printMessage('Removing entries in the DB related to this extension and from extensions directory');
$this->delExtension(getData($result)[0]->extension_id);
$this->delExtension($result->retval[0]->extension_id);
}
}
// Otherwise remove them all only from DB
elseif ($extensionJson != null && isset($extensionJson->extension_id))
else // otherwise
{
$this->_ci->ExtensionsModel->delete($extensionJson->extension_id);
// Remove them all only from DB
if ($extensionJson != null && isset($extensionJson->extension_id))
{
$this->_ci->ExtensionsModel->delete($extensionJson->extension_id);
}
}
$this->_printMessage('Rollback finished');
@@ -936,19 +830,46 @@ class ExtensionsLib
}
/**
* Returns the absolute upload path
* To enable/disable an extension
*/
private function _getUploadPath()
private function _toggleExtension($extensionId, $enabled)
{
return APPPATH.self::UPLOAD_PATH;
}
$_toggleExtension = false;
/**
* Returns the absolute extensions path
*/
private function _getExtensionsPath()
{
return APPPATH.self::EXTENSIONS_DIR_NAME.DIRECTORY_SEPARATOR;
// Loads data from DB about the given extension
$result = $this->_ci->ExtensionsModel->load($extensionId);
if (hasData($result))
{
$extensionName = $result->retval[0]->name; // extension name
// If to be enabled
if ($enabled === true)
{
// Add the symlinks
$_toggleExtension = $this->_addSoftLinks($extensionName);
}
else // If to be disabled
{
// Remove all the symlinks
$_toggleExtension = $this->_delSoftLinks($extensionName);
}
if ($_toggleExtension) // if is a success
{
// Updates DB
$result = $this->_ci->ExtensionsModel->update($extensionId, array('enabled' => $enabled));
if (isSuccess($result))
{
$_toggleExtension = true;
}
else // if DB update fails remove symlinks from file system
{
$this->_delSoftLinks($extensionName);
}
}
}
return $_toggleExtension;
}
/**
@@ -1010,13 +931,4 @@ class ExtensionsLib
{
$this->_printInfo('------------------------------------------------------------------------------------------');
}
/**
* Install the phrases from the given extension
*/
private function _installPhrases($extensionName)
{
$this->_ci->phraseslib->installFrom($this->_getExtensionsPath().$extensionName.'/'.self::PHRASES_DIRECTORY);
}
}
+118 -458
View File
@@ -1,96 +1,98 @@
<?php
/**
* Copyright (C) 2025 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');
use \Netcarver\Textile\Parser as NTParser;
class PhrasesLib
{
// Directory name where all the category files are
const CORE_PHRASES_DIRECTORY = 'phrases/';
// Old config file used for the phrases
const CORE_PHRASES_LEGACY_CFG_FILE = 'system/phrasesupdate.php';
// Who adds phrases into the database
const INSERT_BY = 'PhrasesManager';
// Array elements names
const APP = 'app';
const CATEGORY = 'category';
const PHRASE = 'phrase';
const SPRACHE = 'sprache';
const TEXT = 'text';
const DESCRIPTION = 'description';
private $_ci; // Code igniter instance
private $_phrases; // Contains the retrieved phrases
/**
* Loads parser library
*/
public function __construct()
{
public function __construct()
{
$this->_ci =& get_instance();
$this->_phrases = null; // set the property _phrases as null by default
// CI parser
$this->_ci->load->library('parser');
// Loads EPrintfLib
$this->_ci->load->library('EPrintfLib');
// Loads the PhraseModel
$this->_ci->load->model('system/Phrase_model', 'PhraseModel');
// Loads the PhrasentextModel
$this->_ci->load->model('system/Phrasentext_model', 'PhrasentextModel');
// Workaround to use more parameters in the construct since PHP doesn't support many constructors
$this->_extendConstruct(func_get_args());
}
$this->_extend_construct(func_get_args());
}
// -----------------------------------------------------------------------------------------------------------------
// Public methods
/**
* getPhrase() - loads a specific Phrase
*/
public function getPhrase($phrase_id)
{
if (isEmptyString($phrase_id)) return error(MSG_ERR_INVALID_MSG_ID);
return $this->_ci->PhraseModel->load($phrase_id);
}
/**
* getSubMessages() - will return all Messages subordinated from a specified message.
*/
public function getPhraseByApp($app = null)
{
return $this->_ci->PhraseModel->loadWhere(array('app' => $app));
}
/**
* getPhraseInhalt
*/
public function getPhraseInhalt($phrase_id)
{
if (isEmptyString($phrase_id)) return error(MSG_ERR_INVALID_MSG_ID);
return $this->_ci->PhrasentextModel->loadWhere(array('phrase_id' => $phrase_id));
}
/**
* delPhrasentext
*/
public function delPhrasentext($phrasentext_id)
{
if (isEmptyString($phrasentext_id)) return error(MSG_ERR_INVALID_MSG_ID);
return $this->_ci->PhrasentextModel->delete(array('phrasentext_id' => $phrasentext_id));
}
/**
* Return the phrases in JSON format
*/
public function toJSON()
* savePhrase() - will save a spezific Phrase.
*/
public function savePhrase($phrase_id, $data)
{
if (isEmptyString($data)) return error(MSG_ERR_INVALID_MSG_ID);
return $this->_ci->PhraseModel->update($phrase_id, $data);
}
/**
* getVorlagetextByVorlage() - will load tbl_vorlagestudiengang for a spezific Template.
*/
public function getPhrasentextById($phrasentext_id)
{
return json_encode($this->_phrases);
}
if (isEmptyString($phrasentext_id)) return error('Not a valid phrasentext_id');
return $this->_ci->PhrasentextModel->load($phrasentext_id);
}
/**
* getPhrase() - loads a specific Phrase
*/
public function getPhrase($phrase_id)
{
if (isEmptyString($phrase_id)) return error(MSG_ERR_INVALID_MSG_ID);
return $this->_ci->PhraseModel->load($phrase_id);
}
/**
* getPhrases() - Retrieves phrases from the DB
* getPhrases() - Retrieves phrases from the DB
* The given parameter are the same needed to read from the table system.tb_phrase
*/
public function getPhrases($app, $sprache, $phrase = null, $orgeinheit_kurzbz = null, $orgform_kurzbz = null, $blockTags = null)
{
*/
public function getPhrases($app, $sprache, $phrase = null, $orgeinheit_kurzbz = null, $orgform_kurzbz = null, $blockTags = null)
{
if (isset($app) && isset($sprache))
{
$result = $this->_ci->PhraseModel->getPhrases($app, $sprache, $phrase, $orgeinheit_kurzbz, $orgform_kurzbz);
@@ -98,7 +100,7 @@ class PhrasesLib
if (hasData($result))
{
// Textile parser
$textileParser = new NTParser();
$textileParser = new \Netcarver\Textile\Parser();
for ($i = 0; $i < count($result->retval); $i++)
{
@@ -137,7 +139,31 @@ class PhrasesLib
}
return $result;
}
}
/**
* insertPhraseinhalt() - will load tbl_vorlagestudiengang for a spezific Template.
*/
public function insertPhraseinhalt($data)
{
return $this->_ci->PhrasentextModel->insert($data);
}
/**
* getVorlagetextById() - will load tbl_vorlagestudiengang for a spezific Template.
*/
public function getVorlagetextById($vorlagestudiengang_id)
{
return $this->_ci->VorlageStudiengangModel->load($vorlagestudiengang_id);
}
/**
* saveVorlagetext() - will load tbl_vorlagestudiengang for a spezific Template.
*/
public function updatePhraseInhalt($phrasentext_id, $data)
{
return $this->_ci->PhrasentextModel->update($phrasentext_id, $data);
}
/**
* Retrieves a phrases from the the property _phrases with the given parameters
@@ -150,7 +176,7 @@ class PhrasesLib
public function t($category, $phrase, $parameters = array(), $orgeinheit_kurzbz = null, $orgform_kurzbz = null)
{
// If the property _phrases is populated
if (!isEmptyArray($this->_phrases))
if (is_array($this->_phrases))
{
// Loops through the _phrases property
for ($i = 0; $i < count($this->_phrases); $i++)
@@ -176,107 +202,6 @@ class PhrasesLib
}
/**
* Install phrases from the core
*/
public function installFromCore()
{
$this->_installPhrases(APPPATH.self::CORE_PHRASES_DIRECTORY);
}
/**
* Install phrases from the given path
*/
public function installFrom($phrasesDirectory)
{
$this->_installPhrases($phrasesDirectory);
}
/**
* Creates/updates the phrases files under the directory application/phrases/
*/
public function syncFiles()
{
// Legacy phrases file absolute path
$legacyPhrasesFile = FHCPATH.self::CORE_PHRASES_LEGACY_CFG_FILE;
// Try to include the legacy file used to store the phrases
// It is using the @ to suppress errors in case the file is not readable or does not exist
// In case is not readable or does not exists it stops the execution and prompts a message
if ((@include_once $legacyPhrasesFile) === false)
{
$this->_ci->eprintflib->printError($legacyPhrasesFile.' not found or not readable!'."\n");
exit;
}
// If the phrases array exists and it is not empty, otherwise it stops the executions and prompts a message
if (!isset($phrases) || isEmptyArray($phrases))
{
$this->_ci->eprintflib->printError($legacyPhrasesFile.' does not contain a populated array called "$phrases"');
exit;
}
// For each phrases contained in the array
foreach ($phrases as $phrase)
{
// If it contains the element category
if (isset($phrase[self::CATEGORY]) && isset($phrase[self::PHRASE]))
{
//
$toAppend = false;
// Path and name of the phrases category file
$phrasesCategoryFile = APPPATH.self::CORE_PHRASES_DIRECTORY.$phrase[self::CATEGORY].'.php';
// Checks if a phrases file already exists for this category
if (file_exists($phrasesCategoryFile))
{
// Get the phrases file category content
$phrasesCategoryFileContent = file_get_contents($phrasesCategoryFile);
// If an error occurred
if ($phrasesCategoryFileContent === false)
{
$this->_ci->eprintflib->printError('Was not possible to get the content of: '.$phrasesCategoryFile);
exit;
}
// Check if the phrase already exists inside this file
if (stristr($phrasesCategoryFileContent, $phrase[self::PHRASE]) === false) $toAppend = true;
}
else // if not then
{
// Create the new phrases category file
if (!$this->_createPhraseToCategoryFile($phrasesCategoryFile))
{
$this->_ci->eprintflib->printError('Was not possible to create the phrases category file: '.$phrasesCategoryFile);
exit;
}
$this->_ci->eprintflib->printMessage('Created new phrases category file: '.$phrasesCategoryFile);
$toAppend = true;
}
// If the phrase is to be appended to the phrases category file
if ($toAppend)
{
// And then append the phrase to it
if (!$this->_appendPhraseToCategoryFile($phrase, $phrasesCategoryFile))
{
$this->_ci->eprintflib->printError('Was not possible to append to the phrases category file: '.$phrasesCategoryFile);
exit;
}
}
}
else // otherwise prompt an error message and continue
{
$this->_ci->eprintflib->printInfo('Missing "'.self::CATEGORY.'" or "'.self::PHRASE.'" for the following element:');
var_dump($phrase);
$this->_ci->eprintflib->printInfo('-------------------------------------------');
}
}
}
/*
* Workaround to reload the phrases array on an already constructed library.
* @parameters -> look for _setPhrases docs
*/
@@ -290,68 +215,6 @@ class PhrasesLib
// -----------------------------------------------------------------------------------------------------------------
// Private methods
/**
* Append a new phrases to the related phrases category file
*/
private function _appendPhraseToCategoryFile($phrase, $phrasesCategoryFile)
{
// Open the category phrases file and a temporary one
$srcFileHandle = @fopen($phrasesCategoryFile, 'r');
// In case exists then it is truncated
$dstFileHandle = @fopen($phrasesCategoryFile.'.tmp', 'w');
// If an error occurred then return false
if (!$srcFileHandle || !$dstFileHandle) return false;
$line = '';
// Read the file line by line
while (!feof($srcFileHandle))
{
// Read a single line from the source file
$line = fgets($srcFileHandle, 4096);
// If an error occurred then exit
if ($line === false && !feof($srcFileHandle)) return false;
// If the first phrase or the end of the array
if ($line == '$phrases = array();' || stristr($line, ');'))
{
$first_coma = ',';
if ($line == '$phrases = array();') $first_coma = '';
// If found then append the new phrase to the current line
// and replace the end of the array
$line = str_replace(');', $first_coma."\n".var_export($phrase, true)."\n".');', $line);
}
// In any case copy the line to the temp file
if (@fwrite($dstFileHandle, $line) === false) return false;
}
// Close the file handles
fclose($srcFileHandle);
fclose($dstFileHandle);
// Delete the old file
if (@unlink($phrasesCategoryFile) === false) return false;
// Rename the temp file as the old one
if (@rename($phrasesCategoryFile.'.tmp', $phrasesCategoryFile) === false) return false;
return true; // if everything was fine
}
/**
* Creates a new phrases category file with the given name
* and having an empy array called $phrases as content
*/
private function _createPhraseToCategoryFile($phrasesCategoryFile)
{
return !(file_put_contents(
$phrasesCategoryFile,
'<?php'."\n\n".'$phrases = array();'
) === false);
}
/**
* Extends the functionalities of the constructor of this class
* This is a workaround to use more parameters in the construct since PHP doesn't support many constructors
@@ -361,19 +224,22 @@ class PhrasesLib
* - could be an array of categories, and for each category there is an array of phrases
* language: optional parameter must be a string. It's used to load phrases
*/
private function _extendConstruct($params)
private function _extend_construct($params)
{
// Checks if the $params is an array with at least one element
if (!isEmptyArray($params))
if (is_array($params) && count($params) > 0)
{
$parameters = $params[0]; // temporary variable
$isIndexArray = false; //flag for indexed array
// If there are parameters
if (!isEmptyArray($parameters))
if (is_array($parameters) && count($parameters) > 0)
{
$categories = $parameters[0]; // categories is always the first parameter
// If it is not an array, then convert into one
if (!is_array($categories)) $categories = array($categories);
if (!is_array($categories)) // if it is not an array, then convert into one
{
$categories = array($categories);
}
// Retrieves the language of the logged user
$language = getUserLanguage(count($parameters) == 2 ? $parameters[1] : null);
@@ -413,7 +279,7 @@ class PhrasesLib
// If language is not default language and phrasentext is null -> fallback to default language
if ($language != DEFAULT_LANGUAGE)
{
// Get array with phrasentexte in the default language
// get array with phrasentexte in the default language
$defaultPhrases = null;
if ($isIndexArray)
{
@@ -424,19 +290,19 @@ class PhrasesLib
$defaultPhrases = $this->_ci->PhraseModel->getPhrasesByCategoryAndPhrasesAndLanguage($categories, DEFAULT_LANGUAGE);
}
// Combine array with phrasentexte in users language and in default language
// combine array with phrasentexte in users language and in default language
// (default used if phrasentext in users language is null or not set)
if (hasData($phrases) && hasData($defaultPhrases))
{
// Loop through phrases in default language
// loop through phrases in default language
foreach ($defaultPhrases->retval as $defaultPhrase)
{
$found = false; // flag for found phrase
// Loop through phrases in users language
// loop through phrases in users language
foreach ($phrases->retval as $phrase)
{
// If same phrase and category found and text is not null
// if same phrase and category found and text is not null
// use phrase in users language
if ($phrase->phrase == $defaultPhrase->phrase
&& $phrase->category == $defaultPhrase->category
@@ -447,11 +313,13 @@ class PhrasesLib
}
}
// Otherwise use phrase in default language
if (!$found) array_push($phrases->retval, $defaultPhrase);
// otherwise use phrase in default language
if (!$found)
{
array_push($phrases->retval, $defaultPhrase);
}
}
}
// Otherwise if only defaultPhrases have data
elseif (hasData($defaultPhrases))
{
$phrases = $defaultPhrases;
@@ -459,227 +327,19 @@ class PhrasesLib
}
// If there are phrases loaded then store them in the property _phrases
if (hasData($phrases)) $this->_phrases = $phrases->retval;
if (hasData($phrases))
{
$this->_phrases = $phrases->retval;
}
}
/**
* Install phrases from the given directory
* Returns the property _phrases JSON encoded
* @return json encoded property _phrases
*/
private function _installPhrases($phrasesDirectory)
public function getJSON()
{
$this->_ci->eprintflib->printInfo('------------------------------------------------------------------------------------------');
$this->_ci->eprintflib->printInfo('Phrases installation started from: '.$phrasesDirectory);
// If the given directory name does not exist
if (!is_dir($phrasesDirectory))
{
$this->_ci->eprintflib->printError('The directory '.$phrasesDirectory.' does not exist');
}
else // otherwise install the phrases from the given directory
{
// Get the list of category files from the given directory
$phrasesCategoryFiles = scandir($phrasesDirectory);
if ($phrasesCategoryFiles == false)
{
$this->_ci->eprintflib->printError('An error occurred while trying to access to the given directory: '.$phrasesDirectory);
}
else
{
// If no files are inside the given directory
if (count($phrasesCategoryFiles) == 2)
{
$this->_ci->eprintflib->printInfo('No phrases files are inside the given directory: '.$phrasesDirectory);
}
// For each file in this directory that represents a phrases category
foreach ($phrasesCategoryFiles as $phrasesCategoryFile)
{
// Gets the infos about the file
$pathInfo = pathinfo($phrasesDirectory.$phrasesCategoryFile);
// Skip the upper directory, the same directory and files that are not a php file
if ($phrasesCategoryFile != '.'
&& $phrasesCategoryFile != '..'
&& $pathInfo['extension'] == 'php')
{
$phrases = null; // define the variable
// Include the php file that contains phrases for that category
require_once($phrasesDirectory.$phrasesCategoryFile);
// If this file contains an array called phrases
if (isset($phrases) && is_array($phrases))
{
$addPhrases = $this->_addPhrases($phrases); // add them to the database
// If a blocking error occurred then print an error and stop the execution
if (isError($addPhrases))
{
$this->_ci->eprintflib->printError(getError($addPhrases));
break;
}
}
else // otherwise print an error and continue with the next file
{
$this->_ci->eprintflib->printInfo(
'The file '.$phrasesDirectory.$phrasesCategoryFile.' does not contain an array called "phrases"'
);
}
// Clean for the next file
unset($phrases);
}
}
}
}
$this->_ci->eprintflib->printInfo('Phrases installation ended');
$this->_ci->eprintflib->printInfo('------------------------------------------------------------------------------------------');
return json_encode($this->_phrases);
}
/**
* Add new phrases to the database
*/
private function _addPhrases($phrases)
{
// For eache given phrase
foreach ($phrases as $phrase)
{
$phrase_id = null; // The id of the new/existing phrase
// Checks the mandatory fields, if one of them is not valid continue with the next phrase
if (!$this->_isValidElement($phrase, self::APP)) continue;
if (!$this->_isValidElement($phrase, self::CATEGORY)) continue;
if (!$this->_isValidElement($phrase, self::PHRASE)) continue;
// Checks if the phrase already exists in the database
$phraseResult = $this->_ci->PhraseModel->loadWhere(
array(
'app' => $phrase[self::APP],
'category' => $phrase[self::CATEGORY],
'phrase' => $phrase[self::PHRASE]
)
);
// If an error occurred then return the error itself
if (isError($phraseResult)) return $phraseResult;
// If no phrase has been found
if (!hasData($phraseResult))
{
// Then add the phrase to the database
$phraseInsertResult = $this->_ci->PhraseModel->insert(
array(
'app' => $phrase[self::APP],
'category' => $phrase[self::CATEGORY],
'phrase' => $phrase[self::PHRASE],
'insertamum' => 'NOW()',
'insertvon' => self::INSERT_BY
)
);
// If an error occurred then return the error itself
if (isError($phraseInsertResult)) return $phraseInsertResult;
$phrase_id = getData($phraseInsertResult); // the phrase_id of the new added phrase
// Prints info about the new added phrase
$this->_ci->eprintflib->printMessage(
sprintf(
'A new phrase has been added into the database: '.
'phrase_id => %s | app => %s | category => %s | phrase => %s',
$phrase_id,
$phrase[self::APP],
$phrase[self::CATEGORY],
$phrase[self::PHRASE]
)
);
}
else // otherwise if the phrase already exists in the database
{
$phrase_id = getData($phraseResult)[0]->phrase_id; // gets the phrase_id
}
// If not a valid phrase_id
if ($phrase_id == null) return error('Not a valid phrase id');
// For each phrase text, one text for each language
foreach ($phrase['phrases'] as $phraseText)
{
// Checks the mandatory fields, if one of them is not valid continue with the next phrase text
if (!$this->_isValidElement($phraseText, self::SPRACHE)) continue;
if (!$this->_isValidElement($phraseText, self::TEXT)) continue;
// Set the not optional fields if they have not been set
if (!isset($phraseText[self::DESCRIPTION])) $phraseText[self::DESCRIPTION] = null;
// Checks if the phrase already exists in the database
$phraseTextResult = $this->_ci->PhrasentextModel->loadWhere(
array(
'phrase_id' => $phrase_id,
'sprache' => $phraseText[self::SPRACHE]
)
);
// If an error occurred then return the error itself
if (isError($phraseTextResult)) return $phraseTextResult;
// If no text for the phrase was found
if (!hasData($phraseTextResult))
{
// Then add the text phrase to the database
$phraseTextInsertResult = $this->_ci->PhrasentextModel->insert(
array(
'phrase_id' => $phrase_id,
'sprache' => $phraseText[self::SPRACHE],
'text' => $phraseText[self::TEXT],
'description' => $phraseText[self::DESCRIPTION],
'insertvon' => self::INSERT_BY,
'insertamum' => 'NOW()',
'orgeinheit_kurzbz' => null,
'orgform_kurzbz' => null
)
);
// If an error occurred then return the error itself
if (isError($phraseTextInsertResult)) return $phraseTextInsertResult;
// Prints info about the new added text phrase
$this->_ci->eprintflib->printMessage(
sprintf(
'A new text has been added into the database: '.
'phrase_id => %s | sprache => %s | text => %s | description => %s',
$phrase_id,
$phraseText[self::SPRACHE],
substr($phraseText[self::TEXT], 0, 42).'...',
substr($phraseText[self::DESCRIPTION], 0, 42).'...'
)
);
}
}
}
// If here then no blocking errors occurred
return success();
}
/**
* Checks if the given array element exists in the given array and if it is a valid string and then returns true
* Otherwise prints an info and then returns false
*/
private function _isValidElement($array, $elementName)
{
// If a not valid text is set
if ((isset($array[$elementName]) && isEmptyString($array[$elementName])) || !isset($array[$elementName]))
{
$this->_ci->eprintflib->printInfo('Not a valid element "'.$elementName.'":');
var_dump($array); // KEEP IT!!!
$this->_ci->eprintflib->printEOL();
return false;
}
return true;
}
}
}
-53
View File
@@ -263,59 +263,6 @@ class ProfilLib{
$element->mailto = "mailto:" . $element->gruppe_kurzbz . "@" . DOMAIN;
return $element;
}, $mailverteiler_res);
$this->ci->load->model("crm/Student_model", "StudentModel");
$this->ci->StudentModel->addJoin("tbl_benutzer", "tbl_benutzer.uid = tbl_student.student_uid");
$this->ci->StudentModel->addJoin("tbl_person", "tbl_benutzer.person_id = tbl_person.person_id");
$this->ci->StudentModel->addJoin("tbl_studiengang", "tbl_student.studiengang_kz = tbl_studiengang.studiengang_kz");
$this->ci->StudentModel->addSelect("matr_nr, semester, verband, gruppe, kurzbzlang");
$studentResult = $this->ci->StudentModel->loadWhere(["student_uid" => $uid]);
if (isError($studentResult)) {
return error(getData($studentResult));
}
$studentResultData = getData($studentResult);
$studentData = null;
if (is_array($studentResultData) && count($studentResultData)) {
$studentData = $studentResultData[0];
}
if ($studentData && $studentData->matr_nr) {
$this->ci->load->library("phrasesLib", ["profil"], "phrases");
$standardCourseVerteiler = trim($studentData->kurzbzlang) . "_STD";
$mailverteiler_res[] = [
"beschreibung" => $this->ci->phrases->t('profil', 'alleStudentenVon') . " " . $standardCourseVerteiler,
"gruppe_kurzbz" => $standardCourseVerteiler,
"mailto" => "mailto:" . strtolower($standardCourseVerteiler) . "@" . DOMAIN,
];
$semesterVerteiler = trim($studentData->kurzbzlang) . trim($studentData->semester);
$mailverteiler_res[] = [
"beschreibung" => $this->ci->phrases->t('profil', 'alleStudentenVon') . " " . $semesterVerteiler,
"gruppe_kurzbz" => $semesterVerteiler,
"mailto" => "mailto:" . strtolower($semesterVerteiler) . "@" . DOMAIN,
];
if ($studentData->verband && strlen(trim($studentData->verband))) {
$verbandVerteiler = $semesterVerteiler . trim($studentData->verband);
$mailverteiler_res[] = [
"beschreibung" => $this->ci->phrases->t('profil', 'alleStudentenVon') . " " . $verbandVerteiler,
"gruppe_kurzbz" => $verbandVerteiler,
"mailto" => "mailto:" . strtolower($verbandVerteiler) . "@" . DOMAIN,
];
if ($studentData->gruppe && strlen(trim($studentData->gruppe))) {
$gruppeVerteiler = $verbandVerteiler . trim($studentData->gruppe);
$mailverteiler_res[] = [
"beschreibung" => $this->ci->phrases->t('profil', 'alleStudentenVon') . " " . $gruppeVerteiler,
"gruppe_kurzbz" => $gruppeVerteiler,
"mailto" => "mailto:" . strtolower($gruppeVerteiler) . "@" . DOMAIN,
];
}
}
}
return $mailverteiler_res;
}
+7 -13
View File
@@ -40,16 +40,13 @@ class StundenplanLib
* @return stdClass
* @access public
*/
public function getEventsUser($start, $end, $uid = null)
public function getEventsUser($start, $end)
{
$this->_ci =& get_instance();
$this->_ci->load->model('ressource/Mitarbeiter_model', 'MitarbeiterModel');
if (!$uid) {
$uid = getAuthUID();
}
$uid = getAuthUID();
if (is_null($uid))
return error("No UID");
@@ -220,7 +217,7 @@ class StundenplanLib
* @param string $ort_kurzbz
* @return stdClass
*/
public function getReservierungen($start_date, $end_date, $ort_kurzbz = '', $uid = null)
public function getReservierungen($start_date, $end_date, $ort_kurzbz = '')
{
$this->_ci =& get_instance();
@@ -231,14 +228,14 @@ class StundenplanLib
$this->_ci->load->model('ressource/Reservierung_model', 'ReservierungModel');
$this->_ci->load->model('ressource/Stundenplan_model', 'StundenplanModel');
$is_mitarbeiter = getData($this->_ci->MitarbeiterModel->isMitarbeiter($uid ?? getAuthUID()));
$is_mitarbeiter = getData($this->_ci->MitarbeiterModel->isMitarbeiter(getAuthUID()));
if ($is_mitarbeiter && empty($ort_kurzbz)) {
// request for personal lvplan show only reservations of logged in user
$reservierungen = $this->_ci->ReservierungModel->getReservierungenMitarbeiter($start_date, $end_date, $uid);
$reservierungen = $this->_ci->ReservierungModel->getReservierungenMitarbeiter($start_date, $end_date);
} else {
// querying the reservierungen
$reservierungen = $this->_ci->ReservierungModel->getReservierungen($start_date, $end_date, $ort_kurzbz, $uid);
$reservierungen = $this->_ci->ReservierungModel->getReservierungen($start_date, $end_date, $ort_kurzbz);
}
if (isError($reservierungen))
@@ -360,10 +357,7 @@ class StundenplanLib
if (isError($ort_content_object)) {
return error(getData($ort_content_object));
}
$ort_content_object_data = getData($ort_content_object);
$ort_content_object = (is_array($ort_content_object_data) && count($ort_content_object_data) > 0)
? $ort_content_object_data[0]
: null;
$ort_content_object = getData($ort_content_object)[0];
if($ort_content_object) {
$item->ort_content_id = $ort_content_object->content_id;
}
@@ -37,9 +37,7 @@ class DashboardLib
public function getDashboardByKurzbz($dashboard_kurzbz)
{
$result = $this->_ci->DashboardModel->loadWhere([
'dashboard_kurzbz' => $dashboard_kurzbz
]);
$result = $this->_ci->DashboardModel->getDashboardByKurzbz($dashboard_kurzbz);
if (hasData($result))
{
@@ -49,21 +47,17 @@ class DashboardLib
return null;
}
public function getMergedUserConfig($dashboard_id, $uid)
public function getMergedConfig($dashboard_id, $uid)
{
$defaultconfig = $this->getUserBaseConfig($dashboard_id);
$userconfig = $this->getUserOverrideConfig($dashboard_id, $uid);
$defaultconfig = $this->getDefaultConfig($dashboard_id);
$userconfig = $this->getUserConfig($dashboard_id, $uid);
$sourceconfig = array_map(function ($value) {
return ['source' => $value['source']];
}, $defaultconfig);
$mergedconfig = array_replace_recursive($defaultconfig, $userconfig, $sourceconfig);
$mergedconfig = array_replace_recursive($defaultconfig, $userconfig);
return $mergedconfig;
}
protected function getUserBaseConfig($dashboard_id)
public function getDefaultConfig($dashboard_id)
{
$funktion_kurzbzs = [];
$rights = $this->_ci->permissionlib->getAccessRights();
@@ -93,11 +87,7 @@ class DashboardLib
$preset = json_decode($presetobj->preset, true);
if (null !== $preset)
{
$preset = array_map(function ($value) use ($presetobj) {
$value['source'] = $presetobj->funktion_kurzbz ?: self::SECTION_IF_FUNKTION_KURZBZ_IS_NULL;
return $value;
}, $preset);
$defaultconfig = array_merge_recursive($defaultconfig, $preset);
$defaultconfig = array_replace_recursive($defaultconfig, $preset);
}
}
}
@@ -105,7 +95,7 @@ class DashboardLib
return $defaultconfig;
}
protected function getUserOverrideConfig($dashboard_id, $uid)
public function getUserConfig($dashboard_id, $uid)
{
$res_userconfig = $this->_ci->DashboardOverrideModel->getOverride($dashboard_id, $uid);
@@ -134,7 +124,7 @@ class DashboardLib
$emptyoverride = new stdClass();
$emptyoverride->dashboard_id = $dashboard->dashboard_id;
$emptyoverride->uid = $uid;
$emptyoverride->override = '[]';
$emptyoverride->override = '{"' . self::USEROVERRIDE_SECTION . '": {"widgets":{}}, "custom": { "widgets" : {}}}';
return $emptyoverride;
}
@@ -153,7 +143,8 @@ class DashboardLib
$emptypreset = new stdClass();
$emptypreset->dashboard_id = $dashboard->dashboard_id;
$emptypreset->funktion_kurzbz = $funktion_kurzbz;
$emptypreset->preset = '[]';
$section = ($funktion_kurzbz !== null) ? $funktion_kurzbz : self::SECTION_IF_FUNKTION_KURZBZ_IS_NULL;
$emptypreset->preset = '{"' . $section . '": { "widgets" : {}},"custom": { "widgets" : {}}}';
return $emptypreset;
}
@@ -218,4 +209,44 @@ class DashboardLib
return $result;
}
public function addWidgetsToWidgets(&$widgets, $dashboard_kurzbz, $section, $addwigets)
{
foreach ($addwigets as $widget)
{
if(!isset($widget['widgetid']))
{
$widget['widgetid'] = $this->generateWidgetId($dashboard_kurzbz);
}
$this->addWidgetToWidgets($widgets, $section, $widget, $widget['widgetid']);
}
}
public function addWidgetToWidgets(&$widgets, $section, $widget, $widgetid)
{
$section = ($section !== null) ? $section : self::SECTION_IF_FUNKTION_KURZBZ_IS_NULL;
if (!isset($widgets[$section]) || !isset($widgets[$section]["widgets"]) || !is_array($widgets[$section]))
{
$widgets[$section] = array();
$widgets[$section]["widgets"] = array();
}
$widgets[$section]["widgets"][$widgetid] = $widget;
}
public function removeWidgetFromWidgets(&$widgets, $section, $widgetid)
{
$section = ($section !== null) ? $section : self::SECTION_IF_FUNKTION_KURZBZ_IS_NULL;
if (isset($widgets[$section]) && isset($widgets[$section]["widgets"][$widgetid]))
{
unset($widgets[$section]["widgets"][$widgetid]);
if(empty($widgets[$section]["widgets"]) && $section !== self::USEROVERRIDE_SECTION) {
unset($widgets[$section]);
}
return true;
}
else {
return false;
}
}
}
@@ -1,363 +0,0 @@
<?php
/**
* Copyright (C) 2025 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 generates a list of students and or prestudents used for Studierendenverwaltung
*/
class StudentListLib
{
private $_ci; // Code igniter instance
private $_allowedStgs = [];
private $_selects = [];
private $_joins = [];
/**
* Gets the CI instance, loads model and prepares default values
*
* @param array $params
*
* @return void
*/
public function __construct($params = null)
{
$this->_ci =& get_instance(); // get code igniter instance
$this->_ci->load->model('crm/Prestudent_model', 'PrestudentModel');
if (isset($params['allowedStgs']))
$this->_allowedStgs = $params['allowedStgs'];
// Add default SELECTs
$this->addSelect("b.uid");
if (defined('STV_TAGS_ENABLED') && STV_TAGS_ENABLED)
$this->addSelect('tag_data_agg.tags');
$this->addSelect('titelpre');
$this->addSelect('nachname');
$this->addSelect('vorname');
$this->addSelect('wahlname');
$this->addSelect('vornamen');
$this->addSelect('titelpost');
$this->addSelect('ersatzkennzeichen');
$this->addSelect('gebdatum');
$this->addSelect('geschlecht');
$this->addSelect('foto');
$this->addSelect('foto_sperre');
$this->addSelect('v.semester');
$this->addSelect('v.verband');
$this->addSelect('v.gruppe');
$this->addSelect("statusofsemester"); // Will be replaced later
$this->addSelect('UPPER(stg.typ || stg.kurzbz) AS studiengang');
$this->addSelect('tbl_prestudent.studiengang_kz');
$this->addSelect('stg.bezeichnung AS stg_bezeichnung');
$this->addSelect("s.matrikelnr");
$this->addSelect('p.person_id');
$this->addSelect('pls.status_kurzbz AS status');
$this->addSelect('pls.datum AS status_datum');
$this->addSelect('pls.bestaetigtam AS status_bestaetigung');
$this->addSelect(
"(SELECT kontakt FROM public.tbl_kontakt WHERE kontakttyp='email' AND person_id=p.person_id AND zustellung LIMIT 1) AS mail_privat",
false
);
$this->addSelect("
CASE WHEN b.uid IS NOT NULL AND b.uid<>''
THEN CONCAT(b.uid, '@', " . $this->_ci->PrestudentModel->escape(DOMAIN) . ")
ELSE '' END AS mail_intern", false);
$this->addSelect('p.anmerkung AS anmerkungen');
$this->addSelect('tbl_prestudent.anmerkung');
$this->addSelect('pls.orgform_kurzbz');
$this->addSelect('aufmerksamdurch_kurzbz');
$this->addSelect(
"(SELECT rt_gesamtpunkte AS punkte FROM public.tbl_prestudent WHERE prestudent_id=ps.prestudent_id) AS punkte",
false
);
$this->addSelect('tbl_prestudent.aufnahmegruppe_kurzbz');
$this->addSelect('tbl_prestudent.dual');
$this->addSelect('p.matr_nr');
$this->addSelect('sp.bezeichnung AS studienplan_bezeichnung');
$this->addSelect('tbl_prestudent.prestudent_id');
$this->addSelect("(
SELECT count(*)
FROM (
SELECT *, public.get_rolle_prestudent(pss.prestudent_id, NULL) AS laststatus
FROM public.tbl_prestudent pss
JOIN public.tbl_prestudentstatus USING (prestudent_id)
WHERE person_id = p.person_id
AND studiensemester_kurzbz = (
SELECT studiensemester_kurzbz
FROM public.tbl_prestudentstatus
WHERE prestudent_id = tbl_prestudent.prestudent_id
AND status_kurzbz = 'Interessent'
LIMIT 1
)
AND status_kurzbz = 'Interessent'
) prest
WHERE laststatus NOT IN ('Abbrecher', 'Abgewiesener', 'Absolvent')
AND priorisierung <= tbl_prestudent.priorisierung
) || ' (' || COALESCE(tbl_prestudent.priorisierung::text, ' '::text) || ')' AS priorisierung_relativ", false); // TODO(chris): overwrite in fetchStudents
$this->addSelect('mentor');
$this->addSelect('b.aktiv AS bnaktiv');
$this->addSelect('unruly');
// Add default JOINs
$this->addJoin('public.tbl_studiengang stg', 'studiengang_kz', 'LEFT');
$this->addJoin('public.tbl_person p', 'person_id');
$this->addJoin('public.tbl_student s', 'prestudent_id', 'LEFT'); // TODO(chris): overwrite in fetchStudents
$this->addJoin('public.tbl_prestudentstatus pls', '
pls.status_kurzbz=public.get_rolle_prestudent(tbl_prestudent.prestudent_id, NULL)
AND pls.prestudent_id=tbl_prestudent.prestudent_id
AND pls.studiensemester_kurzbz=public.get_stdsem_prestudent(tbl_prestudent.prestudent_id, NULL)
AND pls.ausbildungssemester=public.get_absem_prestudent(tbl_prestudent.prestudent_id, NULL)', 'LEFT');
$this->addJoin('lehre.tbl_studienplan sp', 'studienplan_id', 'LEFT');
$this->addJoin('public.tbl_benutzer b', 's.student_uid=b.uid', 'LEFT');
$this->addJoin("v", "", ""); // Will be replaced later
$this->addJoin("ps", "", ""); // Will be replaced later
if (defined('STV_TAGS_ENABLED') && STV_TAGS_ENABLED) {
$this->_ci->load->config('stv');
$tags = $this->_ci->config->item('stv_prestudent_tags');
$whereTags = '';
if (is_array($tags) && !isEmptyArray($tags)) {
$tags = array_keys($tags);
foreach ($tags as $key => $tag) {
$tags[$key] = $this->_ci->PrestudentModel->escape($tag);
}
$whereTags = " AND nt.typ_kurzbz IN (" . implode(",", $tags) . ")";
}
$subQueryTag = "(
SELECT
tag.prestudent_id,
COALESCE(json_agg(tag ORDER BY tag.done), '[]'::json) AS tags
FROM (
SELECT DISTINCT ON (n.notiz_id)
n.notiz_id AS id,
nt.typ_kurzbz,
array_to_json(nt.bezeichnung_mehrsprachig)->>0 AS beschreibung,
n.text AS notiz,
nt.style,
n.erledigt AS done,
nz.prestudent_id
FROM public.tbl_notizzuordnung AS nz
JOIN public.tbl_notiz AS n ON nz.notiz_id = n.notiz_id
JOIN public.tbl_notiz_typ AS nt ON n.typ = nt.typ_kurzbz " . $whereTags . "
) AS tag
GROUP BY tag.prestudent_id
) AS tag_data_agg";
$this->addJoin($subQueryTag, 'tag_data_agg.prestudent_id = tbl_prestudent.prestudent_id', 'LEFT');
}
}
//------------------------------------------------------------------------------------------------------------------
// Public methods
/**
* Adds a SELECT statement to the query.
*
* @param string|array $select
* @param boolean $escape (optional)
*
* @return void
*/
public function addSelect($select, $escape = true)
{
if (is_array($select)) {
foreach ($select as $s)
$this->addSelect($s, $escape);
return;
}
$alias = $this->getAliasFromSelect($select);
$this->_selects[$alias] = [$select, $escape];
}
/**
* Joins a table to the query.
*
* @param string $table
* @param string $cond
* @param string $type (optional)
* @param string $position (optional)
*
* @return void
*/
public function addJoin($table, $cond, $type = '', $position = 'end')
{
$alias = $this->getAliasFromTable($table);
if ($position == 'end') {
return $this->_joins[$alias] = [$table, $cond, $type];
}
if ($position == 'start') {
return $this->_joins = [$alias => [$table, $cond, $type]] + $this->_joins;
}
if (substr($position, 0, 7) == 'before_') {
$ref = substr($position, 7);
$index = 0;
} elseif (substr($position, 0, 6) == 'after_') {
$ref = substr($position, 6);
$index = 1;
} else {
return $this->addJoin($table, $cond, $type);
}
if (!isset($this->_joins[$ref]))
return $this->addJoin($table, $cond, $type);
$key_indeces = array_flip(array_keys($this->_joins));
$index += $key_indeces[$ref];
if (!$index)
return $this->addJoin($table, $cond, $type, 'start');
$front_part = array_slice($this->_joins, 0, $index, true);
$back_part = array_slice($this->_joins, $index, null, true);
if (isset($front_part[$alias])) {
unset($front_part[$alias]);
}
$this->_joins = $front_part + [$alias => [$table, $cond, $type]] + $back_part;
}
/**
* Adds a WHERE clause to the query.
*
* @param string|array $key
* @param string|array $value
* @param boolean $escape
*
* @return void
*/
public function addWhere($key, $value = null, $escape = true)
{
if (!is_array($key) && is_array($value)) {
$this->_ci->PrestudentModel->db->where_in($key, $value, $escape);
} else {
$this->_ci->PrestudentModel->db->where($key, $value, $escape);
}
}
/**
* Adds a OR WHERE clause to the query.
*
* @param string|array $key
* @param string|array $value
* @param boolean $escape
*
* @return void
*/
public function addOrWhere($key, $value = null, $escape = true)
{
if (!is_array($key) && is_array($value)) {
$this->_ci->PrestudentModel->db->or_where_in($key, $value, $escape);
} else {
$this->_ci->PrestudentModel->db->or_where($key, $value, $escape);
}
}
/**
* Generates the query and executes it.
*
* @param string|null $studiensemester_kurzbz
*
* @return stdClass result of the query
*/
public function execute($studiensemester_kurzbz)
{
$stdsemEsc = $studiensemester_kurzbz ? $this->_ci->PrestudentModel->escape($studiensemester_kurzbz) : 'NULL';
$this->addSelect(
"public.get_rolle_prestudent(
public.tbl_prestudent.prestudent_id,
" . $this->_ci->PrestudentModel->escape($studiensemester_kurzbz) . "
) AS statusofsemester"
);
$this->addJoin(
'public.tbl_studentlehrverband v',
'v.student_uid=s.student_uid AND v.studiensemester_kurzbz' . ($studiensemester_kurzbz ? '=' . $stdsemEsc : ' IS NULL'),
'LEFT'
);
$this->addJoin(
'public.tbl_prestudentstatus ps',
'ps.status_kurzbz=public.get_rolle_prestudent(tbl_prestudent.prestudent_id, ' . $stdsemEsc . ')
AND ps.prestudent_id=tbl_prestudent.prestudent_id
AND ps.studiensemester_kurzbz=public.get_stdsem_prestudent(tbl_prestudent.prestudent_id, ' . $stdsemEsc . ')
AND ps.ausbildungssemester=public.get_absem_prestudent(tbl_prestudent.prestudent_id, ' . $stdsemEsc . ')
',
'LEFT'
);
$this->addWhere('tbl_prestudent.studiengang_kz', $this->_allowedStgs);
foreach ($this->_joins as $join)
$this->_ci->PrestudentModel->addJoin($join[0], $join[1], $join[2]);
foreach ($this->_selects as $select)
$this->_ci->PrestudentModel->addSelect($select[0], $select[1]);
$this->_ci->PrestudentModel->addOrder('nachname');
$this->_ci->PrestudentModel->addOrder('vorname');
return $this->_ci->PrestudentModel->load();
}
//------------------------------------------------------------------------------------------------------------------
// Protected methods
/**
* Get alias of a table or select statement
*
* @param string $select
*
* @return string
*/
final protected function getAliasFromSelect($select)
{
if (strpos($select, ' ') !== false) {
return trim(strrchr($select, ' '));
}
if (strpos($select, '.') !== false) {
return substr(strrchr($select, '.'), 1);
}
return $select;
}
/**
* Get alias of a table or select statement
*
* @param string|array $table
*
* @return string|array
*/
final protected function getAliasFromTable($table)
{
if (strpos($table, ' ') !== false) {
return trim(strrchr($table, ' '));
}
return $table;
}
}
@@ -40,9 +40,7 @@ abstract class AbstractBestandteil implements IValidation
if( is_bool($new_value) && ($old_value !== $new_value) ) {
$this->modifiedcolumns[$columnname] = $columnname;
} else if(is_null($old_value) xor is_null($new_value)) {
$this->modifiedcolumns[$columnname] = $columnname;
} else if($old_value != $new_value) {
} else if($old_value != $new_value) {
$this->modifiedcolumns[$columnname] = $columnname;
}
}
@@ -3,7 +3,6 @@ namespace vertragsbestandteil;
use Exception;
use vertragsbestandteil\VertragsbestandteilStunden;
use vertragsbestandteil\VertragsbestandteilLohnguide;
/**
* Description of VertragsbestandteilFactory
@@ -23,7 +22,6 @@ class VertragsbestandteilFactory
const VERTRAGSBESTANDTEIL_URLAUBSANSPRUCH = 'urlaubsanspruch';
const VERTRAGSBESTANDTEIL_ZEITAUFZEICHNUNG = 'zeitaufzeichnung';
const VERTRAGSBESTANDTEIL_LEHRE = 'lehre';
const VERTRAGSBESTANDTEIL_LOHNGUIDE = 'lohnguide';
public static function getVertragsbestandteil($data, $fromdb=false)
{
@@ -71,11 +69,6 @@ class VertragsbestandteilFactory
$vertragsbestandteil = new VertragsbestandteilZeitaufzeichnung();
$vertragsbestandteil->hydrateByStdClass($data, $fromdb);
break;
case self::VERTRAGSBESTANDTEIL_LOHNGUIDE:
$vertragsbestandteil = new VertragsbestandteilLohnguide();
$vertragsbestandteil->hydrateByStdClass($data, $fromdb);
break;
default:
throw new Exception('Unknown vertragsbestandteiltyp_kurzbz '
@@ -134,12 +127,6 @@ class VertragsbestandteilFactory
$vertragsbestandteildbmodel = $CI->VertragsbestandteilZeitaufzeichnung_model;
break;
case self::VERTRAGSBESTANDTEIL_LOHNGUIDE:
$CI->load->model('vertragsbestandteil/VertragsbestandteilLohnguide_model',
'VertragsbestandteilLohnguide_model');
$vertragsbestandteildbmodel = $CI->VertragsbestandteilLohnguide_model;
break;
default:
throw new Exception('Unknown vertragsbestandteil_kurzbz '
. $vertragsbestandteil_kurzbz);
@@ -10,7 +10,6 @@ require_once __DIR__ . '/VertragsbestandteilKuendigungsfrist.php';
require_once __DIR__ . '/VertragsbestandteilUrlaubsanspruch.php';
require_once __DIR__ . '/VertragsbestandteilFreitext.php';
require_once __DIR__ . '/VertragsbestandteilKarenz.php';
require_once __DIR__ . '/VertragsbestandteilLohnguide.php';
require_once __DIR__ . '/VertragsbestandteilFactory.php';
require_once __DIR__ . '/OverlapChecker.php';
@@ -1,161 +0,0 @@
<?php
namespace vertragsbestandteil;
use vertragsbestandteil\Vertragsbestandteil;
use vertragsbestandteil\VertragsbestandteilFactory;
class VertragsbestandteilLohnguide extends Vertragsbestandteil
{
protected $stellenbezeichnung;
protected $vordienstzeit;
protected $fachrichtung_kurzbz;
protected $modellstelle_kurzbz;
protected $kommentar_person;
protected $kommentar_modellstelle;
public function __construct()
{
parent::__construct();
$this->setVertragsbestandteiltyp_kurzbz(
VertragsbestandteilFactory::VERTRAGSBESTANDTEIL_LOHNGUIDE);
}
public function getStellenbezeichnung()
{
return $this->stellenbezeichnung;
}
public function setStellenbezeichnung($stellenbezeichnung): self
{
$this->markDirty('stellenbezeichnung', $this->stellenbezeichnung, $stellenbezeichnung);
$this->stellenbezeichnung = $stellenbezeichnung;
return $this;
}
public function getVordienstzeit()
{
return $this->vordienstzeit;
}
public function setVordienstzeit($vordienstzeit): self
{
$this->markDirty('vordienstzeit', $this->vordienstzeit, $vordienstzeit);
$this->vordienstzeit = $vordienstzeit;
return $this;
}
public function getFachrichtung_kurzbz()
{
return $this->fachrichtung_kurzbz;
}
public function setFachrichtung_kurzbz($fachrichtung_kurzbz): self
{
$this->markDirty('fachrichtung_kurzbz', $this->fachrichtung_kurzbz, $fachrichtung_kurzbz);
$this->fachrichtung_kurzbz = $fachrichtung_kurzbz;
return $this;
}
public function getModellstelle_kurzbz()
{
return $this->modellstelle_kurzbz;
}
public function setModellstelle_kurzbz($modellstelle_kurzbz): self
{
$this->markDirty('modellstelle_kurzbz', $this->modellstelle_kurzbz, $modellstelle_kurzbz);
$this->modellstelle_kurzbz = $modellstelle_kurzbz;
return $this;
}
public function getKommentar_person()
{
return $this->kommentar_person;
}
public function setKommentar_person($kommentar_person): self
{
$this->markDirty('kommentar_person', $this->kommentar_person, $kommentar_person);
$this->kommentar_person = $kommentar_person;
return $this;
}
public function getKommentar_modellstelle()
{
return $this->kommentar_modellstelle;
}
public function setKommentar_modellstelle($kommentar_modellstelle): self
{
$this->markDirty('kommentar_modellstelle', $this->kommentar_modellstelle, $kommentar_modellstelle);
$this->kommentar_modellstelle = $kommentar_modellstelle;
return $this;
}
public function hydrateByStdClass($data, $fromdb=false)
{
parent::hydrateByStdClass($data, $fromdb);
$this->fromdb = $fromdb;
isset($data->fachrichtung_kurzbz) && $this->setFachrichtung_kurzbz($data->fachrichtung_kurzbz);
isset($data->stellenbezeichnung) && $this->setStellenbezeichnung($data->stellenbezeichnung);
isset($data->vordienstzeit) && $this->setVordienstzeit($data->vordienstzeit);
isset($data->modellstelle_kurzbz) && $this->setModellstelle_kurzbz($data->modellstelle_kurzbz);
isset($data->kommentar_person) && $this->setKommentar_person($data->kommentar_person);
isset($data->kommentar_modellstelle) && $this->setKommentar_modellstelle($data->kommentar_modellstelle);
$this->fromdb = false;
}
public function toStdClass(): \stdClass
{
$tmp = array(
'vertragsbestandteil_id' => $this->getVertragsbestandteil_id(),
'stellenbezeichnung' => $this->getStellenbezeichnung(),
'vordienstzeit' => $this->getVordienstzeit(),
'fachrichtung_kurzbz' => $this->getFachrichtung_kurzbz(),
'modellstelle_kurzbz' => $this->getModellstelle_kurzbz(),
'kommentar_person' => $this->getKommentar_person(),
'kommentar_modellstelle' => $this->getKommentar_modellstelle(),
);
$tmp = array_filter($tmp, function($k) {
return in_array($k, $this->modifiedcolumns);
}, ARRAY_FILTER_USE_KEY);
return (object) $tmp;
}
public function __toString()
{
$txt = <<<EOTXT
modellstelle_kurzbz: {$this->getModellstelle_kurzbz()}
EOTXT;
return parent::__toString() . $txt;
}
public function validate()
{
$value = $this->vordienstzeit;
if ($value === null || $value === '') {
$result = null; // allow null value
} else {
$result = filter_var($value, FILTER_VALIDATE_INT, [
'options' => [
'min_range' => 0,
'max_range' => 100
]
]);
if ($result === false) {
$this->validationerrors[] = 'Vordienstjahre muss eine ganze Zahl (0 bis 100) enthalten oder leer sein.';
}
}
return parent::validate();
}
}
+3 -3
View File
@@ -234,9 +234,9 @@ class Content_model extends DB_Model
FROM
campus.tbl_content c1
LEFT JOIN
campus.tbl_contentsprache s1 ON c1.content_id=s1.content_id AND s1.sprache=? AND sichtbar=true
campus.tbl_contentsprache s1 ON c1.content_id=s1.content_id AND s1.sprache=?
WHERE
c1.aktiv = true
sichtbar=true
) s2
LEFT JOIN
campus.tbl_contentsprache s3 USING(content_id, sprache)
@@ -277,7 +277,7 @@ class Content_model extends DB_Model
JOIN
campus.tbl_contentsprache s USING(contentsprache_id)
LEFT JOIN
campus.tbl_contentchild k ON(m.content_id=k.content_id) and c.aktiv = true
campus.tbl_contentchild k ON(m.content_id=k.content_id)
WHERE EXISTS (
SELECT 1
FROM campus.tbl_contentgruppe
@@ -11,4 +11,8 @@ class Bookmark_model extends DB_Model
$this->dbTable = 'dashboard.tbl_bookmark';
$this->pk = 'bookmark_id';
}
}
@@ -11,4 +11,15 @@ class Dashboard_model extends DB_Model
$this->dbTable = 'dashboard.tbl_dashboard';
$this->pk = 'dashboard_id';
}
/**
* Get Dashboard by kurzbz.
* @param string dashboard_kurzbz
* @return array
*/
public function getDashboardByKurzbz($dashboard_kurzbz)
{
return $this->loadWhere(array('dashboard_kurzbz' => $dashboard_kurzbz));
}
}
@@ -402,17 +402,14 @@ class Lehrveranstaltung_model extends DB_Model
SELECT
vorname, nachname, mitarbeiter_uid, lehrfunktion_kurzbz
FROM
lehre.tbl_lehreinheit le
lehre.tbl_lehreinheit
JOIN lehre.tbl_lehreinheitmitarbeiter lema USING (lehreinheit_id)
JOIN public.tbl_benutzer b ON b.uid = lema.mitarbeiter_uid
JOIN public.tbl_person p using (person_id)
WHERE
le.lehrveranstaltung_id= ?
AND le.studiensemester_kurzbz = ?
tbl_lehreinheit.lehrveranstaltung_id= ?
AND tbl_lehreinheit.studiensemester_kurzbz = ?
AND lehrfunktion_kurzbz = 'LV-Leitung'
AND lema.mitarbeiter_uid NOT like '_Dummy%'
AND b.aktiv = TRUE
AND p.aktiv = TRUE
ORDER BY
lema.insertamum DESC
LIMIT 1
@@ -79,10 +79,10 @@ class Paabgabe_model extends DB_Model
JOIN public.tbl_benutzer ON (public.tbl_benutzer.uid = student_uid)
JOIN public.tbl_person USING (person_id)
WHERE (campus.tbl_paabgabe.insertamum::date = CURRENT_DATE - INTERVAL ?
OR campus.tbl_paabgabe.updateamum::date = CURRENT_DATE - INTERVAL ?)
AND campus.tbl_paabgabe.paabgabetyp_kurzbz IN ?";
WHERE (campus.tbl_paabgabe.insertamum >= NOW() - INTERVAL ?
OR campus.tbl_paabgabe.updateamum >= NOW() - INTERVAL ?)
AND campus.tbl_paabgabe.paabgabetyp_kurzbz IN ?";
return $this->execQuery($query, [$interval, $interval, $relevantTypes]);
}
@@ -108,7 +108,7 @@ class Paabgabe_model extends DB_Model
JOIN public.tbl_person ON (public.tbl_benutzer.person_id = public.tbl_person.person_id)
WHERE campus.tbl_paabgabe.abgabedatum IS NOT NULL
AND campus.tbl_paabgabe.abgabedatum = CURRENT_DATE - INTERVAL ?";
AND campus.tbl_paabgabe.abgabedatum >= NOW() - INTERVAL ?";
if($relevantTypes !== null) {
$query .= " AND campus.tbl_paabgabe.paabgabetyp_kurzbz IN ?";
@@ -187,10 +187,7 @@ class Projektarbeit_model extends DB_Model
campus.tbl_paabgabetyp.bezeichnung,
campus.tbl_paabgabetyp.benotbar,
campus.tbl_paabgabe.abgabedatum,
campus.tbl_paabgabe.insertvon,
campus.tbl_paabgabe.insertamum,
campus.tbl_paabgabe.updatevon,
campus.tbl_paabgabe.updateamum
campus.tbl_paabgabe.insertvon
FROM campus.tbl_paabgabe JOIN campus.tbl_paabgabetyp USING(paabgabetyp_kurzbz)
WHERE campus.tbl_paabgabe.projektarbeit_id = ?
ORDER BY campus.tbl_paabgabe.datum";
@@ -210,18 +207,7 @@ class Projektarbeit_model extends DB_Model
campus.tbl_paabgabetyp.paabgabetyp_kurzbz,
campus.tbl_paabgabetyp.bezeichnung,
campus.tbl_paabgabe.abgabedatum,
campus.tbl_paabgabe.insertvon,
campus.tbl_paabgabe.updatevon,
campus.tbl_paabgabe.insertamum,
campus.tbl_paabgabe.updateamum,
(SELECT p.vorname || ' ' || p.nachname
FROM public.tbl_benutzer b
JOIN public.tbl_person p USING(person_id)
WHERE b.uid = campus.tbl_paabgabe.insertvon) AS insertvon_fullname,
(SELECT p.vorname || ' ' || p.nachname
FROM public.tbl_benutzer b
JOIN public.tbl_person p USING(person_id)
WHERE b.uid = campus.tbl_paabgabe.updatevon) AS updatevon_fullname
campus.tbl_paabgabe.insertvon
FROM campus.tbl_paabgabe JOIN campus.tbl_paabgabetyp USING(paabgabetyp_kurzbz)
WHERE campus.tbl_paabgabe.projektarbeit_id IN ?
ORDER BY campus.tbl_paabgabe.datum";
@@ -254,8 +240,7 @@ class Projektarbeit_model extends DB_Model
LEFT JOIN public.tbl_benutzer ben USING (person_id)
LEFT JOIN public.tbl_mitarbeiter ma ON ben.uid = ma.mitarbeiter_uid
WHERE (ben.aktiv OR ben.aktiv IS NULL)
AND projektarbeit_id = ?
AND lehre.tbl_projektbetreuer.betreuerart_kurzbz = ANY('{Begutachter, Betreuer, Erstbetreuer,Erstbegutachter,Senatsvorsitz}')";
AND projektarbeit_id = ?";
return $this->execReadOnlyQuery($qry, [$projektarbeit_id]);
}
@@ -309,142 +294,34 @@ class Projektarbeit_model extends DB_Model
* Get a List of Projektarbeiten of a mitarbeiter with zuordnung
* used by the mitarbeiter cis4 abgabetool.
*/
public function getMitarbeiterProjektarbeiten($person_id, $showAll){
$qry = "WITH secondary_betreuer AS (
SELECT DISTINCT ON (pb.projektarbeit_id)
pb.projektarbeit_id,
pb.person_id AS zweitbetreuer_person_id,
b.uid AS zweitbetreuer_benutzer_uid,
pb.betreuerart_kurzbz AS zweitbetreuer_betreuerart_kurzbz,
ba.beschreibung AS zweitbetreuer_betreuerart_beschreibung,
p.titelpre AS zweitbetreuer_titelpre,
p.vorname AS zweitbetreuer_vorname,
p.nachname AS zweitbetreuer_nachname,
p.titelpost AS zweitbetreuer_titelpost,
trim(
COALESCE(p.titelpre, '') || ' ' ||
COALESCE(p.vorname, '') || ' ' ||
COALESCE(p.nachname, '') || ' ' ||
COALESCE(p.titelpost, '')
) AS zweitbetreuer_full_name
FROM lehre.tbl_projektbetreuer pb
JOIN public.tbl_person p ON p.person_id = pb.person_id
LEFT JOIN public.tbl_benutzer b ON b.person_id = p.person_id
LEFT JOIN lehre.tbl_betreuerart ba ON ba.betreuerart_kurzbz = pb.betreuerart_kurzbz
WHERE pb.betreuerart_kurzbz = ANY('{Zweitbetreuer,Zweitbegutachter,Senatsmitglied}')
ORDER BY pb.projektarbeit_id
),
primary_betreuer AS (
SELECT DISTINCT ON (pb.projektarbeit_id)
pb.projektarbeit_id,
pb.person_id AS betreuer_person_id,
pb.betreuerart_kurzbz AS betreuer_betreuerart_kurzbz,
ba.beschreibung AS betreuer_betreuerart_beschreibung,
p.titelpre AS betreuer_titelpre,
p.vorname AS betreuer_vorname,
p.nachname AS betreuer_nachname,
p.titelpost AS betreuer_titelpost,
trim(
COALESCE(p.titelpre, '') || ' ' ||
COALESCE(p.vorname, '') || ' ' ||
COALESCE(p.nachname, '') || ' ' ||
COALESCE(p.titelpost, '')
) AS betreuer_full_name
FROM lehre.tbl_projektbetreuer pb
JOIN public.tbl_person p ON p.person_id = pb.person_id
LEFT JOIN public.tbl_benutzer b ON b.person_id = p.person_id
LEFT JOIN lehre.tbl_betreuerart ba ON ba.betreuerart_kurzbz = pb.betreuerart_kurzbz
WHERE pb.betreuerart_kurzbz = ANY('{Begutachter, Betreuer, Erstbetreuer,Erstbegutachter,Senatsvorsitz}')
ORDER BY pb.projektarbeit_id
)
SELECT
*
FROM
(SELECT DISTINCT ON (tbl_projektarbeit.projektarbeit_id)
student_person.vorname, student_person.nachname,
tbl_studiengang.typ, tbl_studiengang.kurzbz,
tbl_projektarbeit.projekttyp_kurzbz, tbl_projekttyp.bezeichnung,
tbl_projektarbeit.titel, tbl_projektarbeit.projektarbeit_id, tbl_projektarbeit.note,
student_benutzer.uid, tbl_student.matrikelnr, tbl_lehreinheit.studiensemester_kurzbz, public.tbl_student.student_uid,
lehre.tbl_projektarbeit.sprache,
lehre.tbl_projektarbeit.seitenanzahl,
lehre.tbl_projektarbeit.kontrollschlagwoerter,
lehre.tbl_projektarbeit.schlagwoerter,
lehre.tbl_projektarbeit.schlagwoerter_en,
lehre.tbl_projektarbeit.abstract,
lehre.tbl_projektarbeit.abstract_en,
lehre.tbl_projektarbeit.insertamum,
(
SELECT orgform_kurzbz
FROM public.tbl_prestudentstatus
WHERE prestudent_id = (
SELECT prestudent_id FROM public.tbl_student
WHERE student_uid = student_benutzer.uid LIMIT 1
)
ORDER BY datum DESC, insertamum DESC, ext_id DESC
LIMIT 1
) AS organisationsform,
(
SELECT COALESCE(tbl_studienplan.orgform_kurzbz,
tbl_prestudentstatus.orgform_kurzbz,
tbl_studiengang.orgform_kurzbz)
FROM public.tbl_prestudent
JOIN public.tbl_prestudentstatus USING (prestudent_id)
JOIN public.tbl_studiensemester USING (studiensemester_kurzbz)
JOIN public.tbl_studiengang USING (studiengang_kz)
LEFT JOIN lehre.tbl_studienplan USING (studienplan_id)
WHERE prestudent_id = public.tbl_student.prestudent_id
ORDER BY tbl_prestudentstatus.datum DESC
LIMIT 1
) AS orgform,
(
SELECT status_kurzbz
FROM public.tbl_prestudentstatus
WHERE prestudent_id = public.tbl_student.prestudent_id
ORDER BY datum DESC, insertamum DESC, ext_id DESC
LIMIT 1
) AS studienstatus,
pb.betreuer_person_id,
pb.betreuer_betreuerart_kurzbz,
pb.betreuer_betreuerart_beschreibung,
pb.betreuer_titelpre,
pb.betreuer_vorname,
pb.betreuer_nachname,
pb.betreuer_titelpost,
pb.betreuer_full_name,
sb.zweitbetreuer_person_id,
sb.zweitbetreuer_benutzer_uid,
sb.zweitbetreuer_betreuerart_kurzbz,
sb.zweitbetreuer_betreuerart_beschreibung,
sb.zweitbetreuer_titelpre,
sb.zweitbetreuer_vorname,
sb.zweitbetreuer_nachname,
sb.zweitbetreuer_titelpost,
sb.zweitbetreuer_full_name
FROM lehre.tbl_projektarbeit
LEFT JOIN public.tbl_benutzer student_benutzer ON student_benutzer.uid = lehre.tbl_projektarbeit.student_uid
LEFT JOIN public.tbl_person student_person ON student_benutzer.person_id = student_person.person_id
LEFT JOIN public.tbl_student ON student_benutzer.uid = public.tbl_student.student_uid
LEFT JOIN lehre.tbl_lehreinheit USING (lehreinheit_id)
LEFT JOIN lehre.tbl_lehrveranstaltung USING (lehrveranstaltung_id)
LEFT JOIN public.tbl_studiengang ON public.tbl_student.studiengang_kz = public.tbl_studiengang.studiengang_kz
LEFT JOIN lehre.tbl_projekttyp USING (projekttyp_kurzbz)
LEFT JOIN lehre.tbl_projektbetreuer USING (projektarbeit_id)
LEFT JOIN primary_betreuer pb ON pb.projektarbeit_id = tbl_projektarbeit.projektarbeit_id
LEFT JOIN secondary_betreuer sb ON sb.projektarbeit_id = tbl_projektarbeit.projektarbeit_id
WHERE (projekttyp_kurzbz='Bachelor' OR projekttyp_kurzbz='Diplom')
AND (pb.betreuer_person_id = ? OR sb.zweitbetreuer_person_id = ?)
".($showAll?'':' AND student_benutzer.aktiv AND lehre.tbl_projektarbeit.note IS NULL ')."
public function getMitarbeiterProjektarbeiten($uid, $showAll){
$qry = "SELECT
*
FROM
(SELECT tbl_person.vorname, tbl_person.nachname, tbl_studiengang.typ, tbl_studiengang.kurzbz,
tbl_projektarbeit.projekttyp_kurzbz, tbl_projekttyp.bezeichnung, tbl_projektarbeit.titel, tbl_projektarbeit.projektarbeit_id, tbl_projektarbeit.note,
tbl_projektbetreuer.person_id as betreuer_person_id, tbl_projektbetreuer.betreuerart_kurzbz, tbl_betreuerart.beschreibung AS betreuerart_beschreibung,
tbl_benutzer.uid, tbl_student.matrikelnr, tbl_lehreinheit.studiensemester_kurzbz, public.tbl_student.student_uid
FROM lehre.tbl_projektarbeit
LEFT JOIN lehre.tbl_projektbetreuer using(projektarbeit_id)
LEFT JOIN lehre.tbl_betreuerart using(betreuerart_kurzbz)
LEFT JOIN public.tbl_benutzer on(uid=student_uid)
LEFT JOIN public.tbl_student on(public.tbl_benutzer.uid=public.tbl_student.student_uid)
LEFT JOIN public.tbl_person on(tbl_benutzer.person_id=tbl_person.person_id)
LEFT JOIN lehre.tbl_lehreinheit using(lehreinheit_id)
LEFT JOIN lehre.tbl_lehrveranstaltung using(lehrveranstaltung_id)
LEFT JOIN public.tbl_studiengang on(lehre.tbl_lehrveranstaltung.studiengang_kz=public.tbl_studiengang.studiengang_kz)
LEFT JOIN lehre.tbl_projekttyp USING (projekttyp_kurzbz)
WHERE (projekttyp_kurzbz='Bachelor' OR projekttyp_kurzbz='Diplom')
AND tbl_projektbetreuer.person_id IN (SELECT person_id FROM public.tbl_benutzer
WHERE public.tbl_benutzer.person_id=lehre.tbl_projektbetreuer.person_id
AND public.tbl_benutzer.uid= ? )
".($showAll?'':' AND public.tbl_benutzer.aktiv AND lehre.tbl_projektarbeit.note IS NULL ')."
AND betreuerart_kurzbz IN ('Betreuer', 'Begutachter', 'Erstbegutachter', 'Zweitbegutachter', 'Erstbetreuer', 'Senatsvorsitz', 'Senatsmitglied')
ORDER BY tbl_projektarbeit.projektarbeit_id, betreuerart_kurzbz desc) as xy
ORDER BY tbl_projektarbeit.projektarbeit_id, betreuerart_kurzbz desc) as xy
ORDER BY nachname;";
return $this->execReadOnlyQuery($qry, array($person_id, $person_id));
return $this->execReadOnlyQuery($qry, array($uid));
}
/**
@@ -464,257 +341,176 @@ class Projektarbeit_model extends DB_Model
public function getProjektarbeitenForStudiengang($studiengang_kz, $benotet) {
$new_qry = "WITH secondary_betreuer AS (
SELECT DISTINCT ON (pb.projektarbeit_id)
pb.projektarbeit_id,
pb.person_id AS zweitbetreuer_person_id,
pb.betreuerart_kurzbz AS zweitbetreuer_betreuerart_kurzbz,
ba.beschreibung AS zweitbetreuer_betreuerart_beschreibung,
p.titelpre AS zweitbetreuer_titelpre,
p.vorname AS zweitbetreuer_vorname,
p.nachname AS zweitbetreuer_nachname,
p.titelpost AS zweitbetreuer_titelpost,
trim(
COALESCE(p.titelpre, '') || ' ' ||
COALESCE(p.vorname, '') || ' ' ||
COALESCE(p.nachname, '') || ' ' ||
COALESCE(p.titelpost, '')
) AS zweitbetreuer_full_name
FROM lehre.tbl_projektbetreuer pb
JOIN public.tbl_person p ON p.person_id = pb.person_id
LEFT JOIN public.tbl_benutzer b ON b.person_id = p.person_id
LEFT JOIN lehre.tbl_betreuerart ba ON ba.betreuerart_kurzbz = pb.betreuerart_kurzbz
WHERE pb.betreuerart_kurzbz = ANY('{Zweitbetreuer,Zweitbegutachter,Senatsmitglied}')
ORDER BY pb.projektarbeit_id -- DISTINCT ON needs this to be deterministic
)
$new_qry = "SELECT DISTINCT ON(tmp.projektarbeit_id) *, campus.get_betreuer_details(tmp.zweitbetreuer_person_id) as zweitbetreuer_full_name, campus.get_betreuer_details(tmp.betreuer_person_id) as erstbetreuer_full_name
FROM(
SELECT
DISTINCT ON(tbl_projektarbeit.projektarbeit_id)
tbl_projektarbeit.projekttyp_kurzbz,
tbl_projektarbeit.titel,
tbl_projektarbeit.projektarbeit_id,
tbl_studiengang.typ, tbl_studiengang.kurzbz,
student_benutzer.uid as student_uid,
student_person.vorname as student_vorname,
student_person.nachname as student_nachname,
tbl_student.matrikelnr, tbl_lehreinheit.studiensemester_kurzbz,
betreuer_benutzer.uid as betreuer_benutzer_uid,
betreuer_person.titelpre as betreuer_titelpre,
betreuer_person.vorname as betreuer_vorname,
betreuer_person.nachname as betreuer_nachname,
betreuer_person.titelpost as betreuer_titelpost,
lehre.tbl_projektbetreuer.betreuerart_kurzbz as betreuerart,
lehre.tbl_projektbetreuer.person_id as betreuer_person_id,
lehre.tbl_projektarbeit.sprache as sprache,
lehre.tbl_projektarbeit.seitenanzahl as seitenanzahl,
lehre.tbl_projektarbeit.kontrollschlagwoerter as kontrollschlagwoerter,
lehre.tbl_projektarbeit.schlagwoerter as schlagwoerter,
lehre.tbl_projektarbeit.schlagwoerter_en as schlagwoerter_en,
lehre.tbl_projektarbeit.abstract as abstract,
lehre.tbl_projektarbeit.abstract_en as abstract_en,
lehre.tbl_projektarbeit.insertamum as insertamum,
lehre.tbl_projektarbeit.note as note,
(
SELECT orgform_kurzbz
FROM tbl_prestudentstatus
WHERE prestudent_id = (SELECT prestudent_id
FROM tbl_student
WHERE student_uid = student_benutzer.uid
LIMIT 1)
ORDER BY datum DESC, insertamum DESC, ext_id DESC
LIMIT 1
)
as organisationsform,
(
SELECT person_id
FROM lehre.tbl_projektbetreuer
WHERE projektarbeit_id = tbl_projektarbeit.projektarbeit_id
AND betreuerart_kurzbz IN ('Zweitbetreuer', 'Zweitbegutachter', 'Senatsmitglied')
LIMIT 1
)
AS zweitbetreuer_person_id,
(
SELECT betreuerart_kurzbz
FROM lehre.tbl_projektbetreuer
WHERE projektarbeit_id = tbl_projektarbeit.projektarbeit_id
AND betreuerart_kurzbz IN ('Zweitbetreuer', 'Zweitbegutachter', 'Senatsmitglied')
LIMIT 1
)
AS zweitbetreuer_betreuerart_kurzbz,
(
SELECT tbl_betreuerart.beschreibung
FROM lehre.tbl_projektbetreuer
JOIN lehre.tbl_betreuerart USING (betreuerart_kurzbz)
WHERE projektarbeit_id = tbl_projektarbeit.projektarbeit_id
AND betreuerart_kurzbz IN ('Zweitbetreuer', 'Zweitbegutachter', 'Senatsmitglied')
LIMIT 1
)
AS zweitbetreuer_betreuerart_beschreibung,
(
SELECT trim(COALESCE(titelpre, '') || ' ' || COALESCE(vorname, '') || ' ' || COALESCE(nachname, '') || ' ' ||
COALESCE(titelpost, ''))
FROM public.tbl_person
JOIN lehre.tbl_projektbetreuer ON (lehre.tbl_projektbetreuer.person_id = public.tbl_person.person_id)
LEFT JOIN public.tbl_benutzer ON (public.tbl_benutzer.person_id = public.tbl_person.person_id)
LEFT JOIN public.tbl_mitarbeiter ON (public.tbl_benutzer.uid = public.tbl_mitarbeiter.mitarbeiter_uid)
WHERE projektarbeit_id = tbl_projektarbeit.projektarbeit_id
AND betreuerart_kurzbz IN ('Zweitbetreuer', 'Zweitbegutachter', 'Senatsmitglied')
LIMIT 1
)
as zweitbetreuer_full_name,
(
SELECT titelpre
FROM public.tbl_person
JOIN lehre.tbl_projektbetreuer ON (lehre.tbl_projektbetreuer.person_id = public.tbl_person.person_id)
LEFT JOIN public.tbl_benutzer ON (public.tbl_benutzer.person_id = public.tbl_person.person_id)
LEFT JOIN public.tbl_mitarbeiter ON (public.tbl_benutzer.uid = public.tbl_mitarbeiter.mitarbeiter_uid)
WHERE projektarbeit_id = tbl_projektarbeit.projektarbeit_id
AND betreuerart_kurzbz IN ('Zweitbetreuer', 'Zweitbegutachter', 'Senatsmitglied')
LIMIT 1
)
as zweitbetreuer_titelpre,
(
SELECT vorname
FROM public.tbl_person
JOIN lehre.tbl_projektbetreuer ON (lehre.tbl_projektbetreuer.person_id = public.tbl_person.person_id)
LEFT JOIN public.tbl_benutzer ON (public.tbl_benutzer.person_id = public.tbl_person.person_id)
LEFT JOIN public.tbl_mitarbeiter ON (public.tbl_benutzer.uid = public.tbl_mitarbeiter.mitarbeiter_uid)
WHERE projektarbeit_id = tbl_projektarbeit.projektarbeit_id
AND betreuerart_kurzbz IN ('Zweitbetreuer', 'Zweitbegutachter', 'Senatsmitglied')
LIMIT 1
)
as zweitbetreuer_vorname,
(
SELECT nachname
FROM public.tbl_person
JOIN lehre.tbl_projektbetreuer ON (lehre.tbl_projektbetreuer.person_id = public.tbl_person.person_id)
LEFT JOIN public.tbl_benutzer ON (public.tbl_benutzer.person_id = public.tbl_person.person_id)
LEFT JOIN public.tbl_mitarbeiter ON (public.tbl_benutzer.uid = public.tbl_mitarbeiter.mitarbeiter_uid)
WHERE projektarbeit_id = tbl_projektarbeit.projektarbeit_id
AND betreuerart_kurzbz IN ('Zweitbetreuer', 'Zweitbegutachter', 'Senatsmitglied')
LIMIT 1
)
as zweitbetreuer_nachname,
(
SELECT titelpost
FROM public.tbl_person
JOIN lehre.tbl_projektbetreuer ON (lehre.tbl_projektbetreuer.person_id = public.tbl_person.person_id)
LEFT JOIN public.tbl_benutzer ON (public.tbl_benutzer.person_id = public.tbl_person.person_id)
LEFT JOIN public.tbl_mitarbeiter ON (public.tbl_benutzer.uid = public.tbl_mitarbeiter.mitarbeiter_uid)
WHERE projektarbeit_id = tbl_projektarbeit.projektarbeit_id
AND betreuerart_kurzbz IN ('Zweitbetreuer', 'Zweitbegutachter', 'Senatsmitglied')
LIMIT 1
)
as zweitbetreuer_titelpost,
(
SELECT
COALESCE(tbl_studienplan.orgform_kurzbz,
tbl_prestudentstatus.orgform_kurzbz, tbl_studiengang.orgform_kurzbz) as
orgform
FROM
public.tbl_prestudent
JOIN public.tbl_prestudentstatus USING(prestudent_id)
JOIN public.tbl_studiensemester USING(studiensemester_kurzbz)
JOIN public.tbl_studiengang USING(studiengang_kz)
LEFT JOIN lehre.tbl_studienplan USING(studienplan_id)
WHERE
prestudent_id=tbl_student.prestudent_id
ORDER BY tbl_prestudentstatus.datum DESC LIMIT 1
) as orgform,
(SELECT status_kurzbz FROM public.tbl_prestudentstatus
WHERE prestudent_id=tbl_student.prestudent_id
ORDER BY datum DESC, insertamum DESC, ext_id DESC LIMIT 1) as studienstatus
FROM lehre.tbl_projektarbeit
LEFT JOIN public.tbl_benutzer student_benutzer ON (student_benutzer.uid = lehre.tbl_projektarbeit.student_uid)
LEFT JOIN public.tbl_person student_person ON (student_benutzer.person_id = student_person.person_id)
LEFT JOIN public.tbl_student on(student_benutzer.uid = public.tbl_student.student_uid)
LEFT JOIN lehre.tbl_lehreinheit USING (lehreinheit_id)
LEFT JOIN lehre.tbl_lehrveranstaltung USING (lehrveranstaltung_id)
LEFT JOIN public.tbl_studiengang ON (public.tbl_student.studiengang_kz = public.tbl_studiengang.studiengang_kz)
LEFT JOIN lehre.tbl_projekttyp USING (projekttyp_kurzbz)
LEFT JOIN lehre.tbl_projektbetreuer USING (projektarbeit_id)
LEFT JOIN public.tbl_person betreuer_person ON (betreuer_person.person_id = lehre.tbl_projektbetreuer.person_id)
LEFT JOIN public.tbl_benutzer betreuer_benutzer ON (betreuer_person.person_id = betreuer_benutzer.person_id)
WHERE (projekttyp_kurzbz = 'Bachelor' OR projekttyp_kurzbz = 'Diplom')
AND student_benutzer.aktiv AND (
lehre.tbl_projektbetreuer.betreuerart_kurzbz = 'Erstbegutachter'
OR lehre.tbl_projektbetreuer.betreuerart_kurzbz = 'Begutachter'
OR lehre.tbl_projektbetreuer.betreuerart_kurzbz = 'Betreuer'
OR lehre.tbl_projektbetreuer.betreuerart_kurzbz = 'Erstbetreuer'
OR lehre.tbl_projektbetreuer.betreuerart_kurzbz = 'Senatsvorsitz'
)
AND public.tbl_studiengang.studiengang_kz = ?";
SELECT DISTINCT ON (tmp.projektarbeit_id)
*,
campus.get_betreuer_details(tmp.zweitbetreuer_person_id) AS zweitbetreuer_full_name,
campus.get_betreuer_details(tmp.betreuer_person_id) AS erstbetreuer_full_name
FROM (
SELECT DISTINCT ON (tbl_projektarbeit.projektarbeit_id)
tbl_projektarbeit.projekttyp_kurzbz,
tbl_projektarbeit.titel,
tbl_projektarbeit.projektarbeit_id,
tbl_studiengang.typ,
tbl_studiengang.kurzbz,
student_benutzer.uid AS student_uid,
student_person.vorname AS student_vorname,
student_person.nachname AS student_nachname,
public.tbl_student.matrikelnr,
tbl_lehreinheit.studiensemester_kurzbz,
betreuer_benutzer.uid AS betreuer_benutzer_uid,
betreuer_person.titelpre AS betreuer_titelpre,
betreuer_person.vorname AS betreuer_vorname,
betreuer_person.nachname AS betreuer_nachname,
betreuer_person.titelpost AS betreuer_titelpost,
lehre.tbl_projektbetreuer.betreuerart_kurzbz AS betreuerart,
lehre.tbl_projektbetreuer.person_id AS betreuer_person_id,
lehre.tbl_projektarbeit.sprache,
lehre.tbl_projektarbeit.seitenanzahl,
lehre.tbl_projektarbeit.kontrollschlagwoerter,
lehre.tbl_projektarbeit.schlagwoerter,
lehre.tbl_projektarbeit.schlagwoerter_en,
lehre.tbl_projektarbeit.abstract,
lehre.tbl_projektarbeit.abstract_en,
lehre.tbl_projektarbeit.insertamum,
lehre.tbl_projektarbeit.note,
sb.zweitbetreuer_person_id,
sb.zweitbetreuer_betreuerart_kurzbz,
sb.zweitbetreuer_betreuerart_beschreibung,
sb.zweitbetreuer_full_name,
sb.zweitbetreuer_titelpre,
sb.zweitbetreuer_vorname,
sb.zweitbetreuer_nachname,
sb.zweitbetreuer_titelpost,
(
SELECT orgform_kurzbz
FROM public.tbl_prestudentstatus
WHERE prestudent_id = (
SELECT prestudent_id FROM public.tbl_student
WHERE student_uid = student_benutzer.uid LIMIT 1
)
ORDER BY datum DESC, insertamum DESC, ext_id DESC
LIMIT 1
) AS organisationsform,
(
SELECT COALESCE(tbl_studienplan.orgform_kurzbz,
tbl_prestudentstatus.orgform_kurzbz,
tbl_studiengang.orgform_kurzbz)
FROM public.tbl_prestudent
JOIN public.tbl_prestudentstatus USING (prestudent_id)
JOIN public.tbl_studiensemester USING (studiensemester_kurzbz)
JOIN public.tbl_studiengang USING (studiengang_kz)
LEFT JOIN lehre.tbl_studienplan USING (studienplan_id)
WHERE prestudent_id = public.tbl_student.prestudent_id
ORDER BY tbl_prestudentstatus.datum DESC
LIMIT 1
) AS orgform,
(
SELECT status_kurzbz
FROM public.tbl_prestudentstatus
WHERE prestudent_id = public.tbl_student.prestudent_id
ORDER BY datum DESC, insertamum DESC, ext_id DESC
LIMIT 1
) AS studienstatus
FROM lehre.tbl_projektarbeit
LEFT JOIN public.tbl_benutzer student_benutzer ON student_benutzer.uid = lehre.tbl_projektarbeit.student_uid
LEFT JOIN public.tbl_person student_person ON student_benutzer.person_id = student_person.person_id
LEFT JOIN public.tbl_student ON student_benutzer.uid = public.tbl_student.student_uid
LEFT JOIN lehre.tbl_lehreinheit USING (lehreinheit_id)
LEFT JOIN lehre.tbl_lehrveranstaltung USING (lehrveranstaltung_id)
LEFT JOIN public.tbl_studiengang ON public.tbl_student.studiengang_kz = public.tbl_studiengang.studiengang_kz
LEFT JOIN lehre.tbl_projekttyp USING (projekttyp_kurzbz)
LEFT JOIN lehre.tbl_projektbetreuer USING (projektarbeit_id)
LEFT JOIN public.tbl_person betreuer_person ON betreuer_person.person_id = lehre.tbl_projektbetreuer.person_id
LEFT JOIN public.tbl_benutzer betreuer_benutzer ON betreuer_person.person_id = betreuer_benutzer.person_id
LEFT JOIN secondary_betreuer sb ON sb.projektarbeit_id = tbl_projektarbeit.projektarbeit_id
WHERE (projekttyp_kurzbz = 'Bachelor' OR projekttyp_kurzbz = 'Diplom')
AND student_benutzer.aktiv
AND lehre.tbl_projektbetreuer.betreuerart_kurzbz IN (
'Erstbegutachter', 'Begutachter', 'Betreuer', 'Erstbetreuer', 'Senatsvorsitz'
)
AND public.tbl_studiengang.studiengang_kz = ?";
if($benotet == 0) {
$new_qry .= " AND lehre.tbl_projektarbeit.note IS NULL ";
} else if ($benotet == 1) {
$new_qry .= " AND lehre.tbl_projektarbeit.note IS NOT NULL ";
}
$new_qry .= " ORDER BY tbl_projektarbeit.projektarbeit_id DESC, student_person.nachname ASC
if($benotet == 0) {
$new_qry .= " AND lehre.tbl_projektarbeit.note IS NULL ";
} else if ($benotet == 1) {
$new_qry .= " AND lehre.tbl_projektarbeit.note IS NOT NULL ";
}
$new_qry .= " ORDER BY tbl_projektarbeit.projektarbeit_id DESC, student_person.nachname ASC
) as tmp";
return $this->execReadOnlyQuery($new_qry, array($studiengang_kz));
}
public function getProjektarbeitenForStudent($student_uid) {
$new_qry = "WITH secondary_betreuer AS (
SELECT DISTINCT ON (pb.projektarbeit_id)
pb.projektarbeit_id,
pb.person_id AS zweitbetreuer_person_id,
pb.betreuerart_kurzbz AS zweitbetreuer_betreuerart_kurzbz,
ba.beschreibung AS zweitbetreuer_betreuerart_beschreibung,
p.titelpre AS zweitbetreuer_titelpre,
p.vorname AS zweitbetreuer_vorname,
p.nachname AS zweitbetreuer_nachname,
p.titelpost AS zweitbetreuer_titelpost,
trim(
COALESCE(p.titelpre, '') || ' ' ||
COALESCE(p.vorname, '') || ' ' ||
COALESCE(p.nachname, '') || ' ' ||
COALESCE(p.titelpost, '')
) AS zweitbetreuer_full_name
FROM lehre.tbl_projektbetreuer pb
JOIN public.tbl_person p ON p.person_id = pb.person_id
LEFT JOIN public.tbl_benutzer b ON b.person_id = p.person_id
LEFT JOIN lehre.tbl_betreuerart ba ON ba.betreuerart_kurzbz = pb.betreuerart_kurzbz
WHERE pb.betreuerart_kurzbz = ANY('{Zweitbetreuer,Zweitbegutachter,Senatsmitglied}')
ORDER BY pb.projektarbeit_id -- DISTINCT ON needs this to be deterministic
)
SELECT DISTINCT ON (tmp.projektarbeit_id)
*,
campus.get_betreuer_details(tmp.zweitbetreuer_person_id) AS zweitbetreuer_full_name,
campus.get_betreuer_details(tmp.betreuer_person_id) AS erstbetreuer_full_name
FROM (
SELECT DISTINCT ON (tbl_projektarbeit.projektarbeit_id)
tbl_projektarbeit.projekttyp_kurzbz,
tbl_projektarbeit.titel,
tbl_projektarbeit.projektarbeit_id,
tbl_studiengang.typ,
tbl_studiengang.kurzbz,
student_benutzer.uid AS student_uid,
student_person.vorname AS student_vorname,
student_person.nachname AS student_nachname,
public.tbl_student.matrikelnr,
tbl_lehreinheit.studiensemester_kurzbz,
betreuer_benutzer.uid AS betreuer_benutzer_uid,
betreuer_person.titelpre AS betreuer_titelpre,
betreuer_person.vorname AS betreuer_vorname,
betreuer_person.nachname AS betreuer_nachname,
betreuer_person.titelpost AS betreuer_titelpost,
lehre.tbl_projektbetreuer.betreuerart_kurzbz AS betreuerart,
lehre.tbl_projektbetreuer.person_id AS betreuer_person_id,
lehre.tbl_projektarbeit.sprache,
lehre.tbl_projektarbeit.seitenanzahl,
lehre.tbl_projektarbeit.kontrollschlagwoerter,
lehre.tbl_projektarbeit.schlagwoerter,
lehre.tbl_projektarbeit.schlagwoerter_en,
lehre.tbl_projektarbeit.abstract,
lehre.tbl_projektarbeit.abstract_en,
lehre.tbl_projektarbeit.insertamum,
lehre.tbl_projektarbeit.note,
sb.zweitbetreuer_person_id,
sb.zweitbetreuer_betreuerart_kurzbz,
sb.zweitbetreuer_betreuerart_beschreibung,
sb.zweitbetreuer_full_name,
sb.zweitbetreuer_titelpre,
sb.zweitbetreuer_vorname,
sb.zweitbetreuer_nachname,
sb.zweitbetreuer_titelpost,
(
SELECT orgform_kurzbz
FROM public.tbl_prestudentstatus
WHERE prestudent_id = (
SELECT prestudent_id FROM public.tbl_student
WHERE student_uid = student_benutzer.uid LIMIT 1
)
ORDER BY datum DESC, insertamum DESC, ext_id DESC
LIMIT 1
) AS organisationsform,
(
SELECT COALESCE(tbl_studienplan.orgform_kurzbz,
tbl_prestudentstatus.orgform_kurzbz,
tbl_studiengang.orgform_kurzbz)
FROM public.tbl_prestudent
JOIN public.tbl_prestudentstatus USING (prestudent_id)
JOIN public.tbl_studiensemester USING (studiensemester_kurzbz)
JOIN public.tbl_studiengang USING (studiengang_kz)
LEFT JOIN lehre.tbl_studienplan USING (studienplan_id)
WHERE prestudent_id = public.tbl_student.prestudent_id
ORDER BY tbl_prestudentstatus.datum DESC
LIMIT 1
) AS orgform,
(
SELECT status_kurzbz
FROM public.tbl_prestudentstatus
WHERE prestudent_id = public.tbl_student.prestudent_id
ORDER BY datum DESC, insertamum DESC, ext_id DESC
LIMIT 1
) AS studienstatus
FROM lehre.tbl_projektarbeit
LEFT JOIN public.tbl_benutzer student_benutzer ON student_benutzer.uid = lehre.tbl_projektarbeit.student_uid
LEFT JOIN public.tbl_person student_person ON student_benutzer.person_id = student_person.person_id
LEFT JOIN public.tbl_student ON student_benutzer.uid = public.tbl_student.student_uid
LEFT JOIN lehre.tbl_lehreinheit USING (lehreinheit_id)
LEFT JOIN lehre.tbl_lehrveranstaltung USING (lehrveranstaltung_id)
LEFT JOIN public.tbl_studiengang ON public.tbl_student.studiengang_kz = public.tbl_studiengang.studiengang_kz
LEFT JOIN lehre.tbl_projekttyp USING (projekttyp_kurzbz)
LEFT JOIN lehre.tbl_projektbetreuer USING (projektarbeit_id)
LEFT JOIN public.tbl_person betreuer_person ON betreuer_person.person_id = lehre.tbl_projektbetreuer.person_id
LEFT JOIN public.tbl_benutzer betreuer_benutzer ON betreuer_person.person_id = betreuer_benutzer.person_id
LEFT JOIN secondary_betreuer sb ON sb.projektarbeit_id = tbl_projektarbeit.projektarbeit_id
WHERE (projekttyp_kurzbz = 'Bachelor' OR projekttyp_kurzbz = 'Diplom')
AND student_benutzer.aktiv
AND lehre.tbl_projektbetreuer.betreuerart_kurzbz IN (
'Erstbegutachter', 'Begutachter', 'Betreuer', 'Erstbetreuer', 'Senatsvorsitz'
)
AND public.tbl_student.student_uid = ?
ORDER BY tbl_projektarbeit.projektarbeit_id DESC, student_person.nachname ASC
) as tmp";
return $this->execReadOnlyQuery($new_qry, array($student_uid));
}
/**
*
@@ -149,7 +149,6 @@ class Studierendenantrag_model extends DB_Model
$this->addSelect($this->dbTable . '.grund AS grund');
$this->addSelect('s.studierendenantrag_statustyp_kurzbz status');
$this->addSelect('s.insertvon status_insertvon');
$this->addSelect('s.grund AS status_grund');
$this->addSelect('t.bezeichnung[(' . $lang . ')] statustyp');
$this->addSelect('p.unruly AS unruly');
$this->addSelect($this->dbTable . '.insertamum AS insertamum');
@@ -270,7 +269,6 @@ class Studierendenantrag_model extends DB_Model
$this->addSelect($this->dbTable . '.grund');
$this->addSelect($this->dbTable . '.dms_id');
$this->addSelect('s.insertvon AS status_insertvon');
$this->addSelect('s.grund AS status_grund');
$this->addSelect(
"(SELECT count(1) FROM campus.tbl_studierendenantrag_status WHERE studierendenantrag_id = " .
$this->dbTable .
@@ -50,7 +50,7 @@ class Studierendenantragstatus_model extends DB_Model
$this->addSelect('bezeichnung[(' . $lang . ')] AS typ');
$this->addJoin('campus.tbl_studierendenantrag_statustyp', 'studierendenantrag_statustyp_kurzbz');
$this->addOrder($this->dbTable. '.insertamum', 'DESC');
return $this->loadWhere($where);
}
@@ -594,10 +594,7 @@ class Studiengang_model extends DB_Model
$this->addSelect('p.prestudent_id');
$this->addSelect('pers.vorname');
$this->addSelect('pers.nachname');
$this->addSelect("CONCAT(UPPER(pers.nachname), ' ', pers.vorname, ' (', "
. $this->dbTable . ".bezeichnung, ', ', "
. "UPPER(" . $this->dbTable . ".typ), "
. "UPPER(" . $this->dbTable . ".kurzbz),')') AS name");
$this->addSelect("CONCAT(UPPER(pers.nachname), ' ', pers.vorname, ' (', " . $this->dbTable . ".bezeichnung, ')') AS name");
$this->addJoin('public.tbl_prestudent p', 'studiengang_kz');
$this->addJoin(
@@ -261,42 +261,6 @@ class Benutzerfunktion_model extends DB_Model
}
/**
* Get active Kompetenzfeldleitung bei UID.
*
* @param $uid
* @return array|stdClass|null
*/
public function getKFLByUID($uid)
{
$query = '
SELECT
bf.uid,
bf.oe_kurzbz,
oe.organisationseinheittyp_kurzbz
FROM
public.tbl_benutzerfunktion bf
JOIN public.tbl_organisationseinheit oe USING (oe_kurzbz)
JOIN public.tbl_benutzer b USING (uid)
WHERE
b.uid = ?
AND b.aktiv = TRUE
AND funktion_kurzbz = \'Leitung\'
AND organisationseinheittyp_kurzbz = \'Kompetenzfeld\'
AND (datum_von IS NULL OR datum_von <= now())
AND (datum_bis IS NULL OR datum_bis >= now())
';
$parameters_array = array();
if (is_string($uid))
{
$parameters_array[] = $uid;
}
return $this->execQuery($query, $parameters_array);
}
public function insertBenutzerfunktion($Json)
{
unset($Json['benutzerfunktion_id']);
@@ -18,10 +18,10 @@ class Reservierung_model extends DB_Model
*
* @return stdClass
*/
public function getReservierungen($start_date, $end_date, $ort_kurzbz = null, $uid = null)
public function getReservierungen($start_date, $end_date, $ort_kurzbz = null)
{
$lvplan_reservierungen_query = "SELECT r.* , stund.beginn, stund.ende,
$lvplan_reservierungen_query="SELECT r.* , stund.beginn, stund.ende,
CASE
WHEN r.gruppe_kurzbz IS NOT NULL THEN r.gruppe_kurzbz
ELSE CONCAT(UPPER(studg.typ),UPPER(studg.kurzbz),'-',COALESCE(CAST(r.semester AS varchar),'/'),COALESCE(CAST(r.verband AS varchar),'/'))
@@ -35,7 +35,7 @@ class Reservierung_model extends DB_Model
LEFT JOIN public.tbl_studiensemester ss2 ON slv.studiensemester_kurzbz = ss2.studiensemester_kurzbz AND ss2.start <=r.datum AND ss2.ende >= r.datum
WHERE datum >= ? AND datum <= ? AND (ss1.studiensemester_kurzbz IS NOT NULL
OR ss2.studiensemester_kurzbz IS NOT NULL)";
$raum_reservierungen_query = "SELECT res.*, beginn, ende,
CASE
WHEN res.gruppe_kurzbz IS NOT NULL THEN res.gruppe_kurzbz
@@ -46,9 +46,9 @@ class Reservierung_model extends DB_Model
JOIN lehre.tbl_stunde ON lehre.tbl_stunde.stunde = res.stunde
WHERE res.ort_kurzbz = ? AND datum >= ? AND datum <= ?";
$subquery = is_null($ort_kurzbz) ? $lvplan_reservierungen_query : $raum_reservierungen_query;
$query_result = $this->execReadOnlyQuery("
$subquery = is_null($ort_kurzbz)? $lvplan_reservierungen_query:$raum_reservierungen_query;
$query_result= $this->execReadOnlyQuery("
SELECT
'reservierung' as type, beginn, ende, datum,
COALESCE(titel, beschreibung) as topic,
@@ -59,15 +59,15 @@ class Reservierung_model extends DB_Model
FROM
(
" . $subquery . "
". $subquery ."
) AS subquery
GROUP BY datum, beginn, ende, ort_kurzbz, titel, beschreibung
ORDER BY datum, beginn
", is_null($ort_kurzbz) ? [$uid ?? getAuthUID(), $uid ?? getAuthUID(), $start_date, $end_date] : [$ort_kurzbz, $start_date, $end_date]);
", is_null($ort_kurzbz) ?[getAuthUID(), getAuthUID(),$start_date,$end_date]: [$ort_kurzbz, $start_date, $end_date]);
return $query_result;
}
@@ -76,7 +76,7 @@ class Reservierung_model extends DB_Model
*
* @return stdClass
*/
public function getReservierungenMitarbeiter($start_date, $end_date, $uid = null)
public function getReservierungenMitarbeiter($start_date, $end_date)
{
$raum_reservierungen_query = "SELECT res.*, beginn, ende,
@@ -91,8 +91,8 @@ class Reservierung_model extends DB_Model
$subquery = $raum_reservierungen_query;
$query_result = $this->execReadOnlyQuery("
$query_result= $this->execReadOnlyQuery("
SELECT
'reservierung' as type, beginn, ende, datum,
COALESCE(titel, beschreibung) as topic,
@@ -103,13 +103,13 @@ class Reservierung_model extends DB_Model
FROM
(
" . $subquery . "
". $subquery ."
) AS subquery
GROUP BY datum, beginn, ende, ort_kurzbz, titel, beschreibung
ORDER BY datum, beginn
", [$uid ?? getAuthUID(), $start_date, $end_date]);
", [getAuthUID(), $start_date, $end_date]);
return $query_result;
@@ -129,9 +129,9 @@ class Reservierung_model extends DB_Model
$this->addJoin('public.tbl_studiensemester ss2', 'slv.studiensemester_kurzbz=ss2.studiensemester_kurzbz AND ss2.start<=r.datum AND ss2.ende>=r.datum', 'LEFT');
$this->db->or_where('ss1.studiensemester_kurzbz IS NOT NULL', null, false);
$this->db->or_where('ss2.studiensemester_kurzbz IS NOT NULL', null, false);
$query = $this->db->get_compiled_select('campus.vw_reservierung r');
return $this->execQuery($query, [$uid, $uid]);
}
+16 -1
View File
@@ -26,6 +26,22 @@ class Extensions_model extends DB_Model
);
}
/**
*
*/
public function getInstalledExtensions()
{
$query = 'SELECT extension_id, e1.name, e1.version, description, license, url, core_version, dependencies, enabled
FROM system.tbl_extensions e1
INNER JOIN (
SELECT name, MAX(version) AS version
FROM system.tbl_extensions
GROUP BY name) e2
ON (e1.name = e2.name AND e1.version = e2.version)';
return $this->execQuery($query);
}
/**
*
*/
@@ -34,4 +50,3 @@ class Extensions_model extends DB_Model
return $this->execQuery($sql);
}
}
+4 -6
View File
@@ -242,7 +242,6 @@ class Message_model extends DB_Model
*/
public function getMessagesForTable($person_id, $offset, $limit)
{
$limitoffset = (!is_null($offset) && !is_null($limit)) ? 'limit ? offset ?' : '';
$sql = <<<EOSQL
with filtered_messages as (
select
@@ -311,12 +310,11 @@ class Message_model extends DB_Model
public.tbl_person pr on pr.person_id = fm.recipient_id
order by
m.insertamum DESC
{$limitoffset}
limit ?
offset ?;
EOSQL;
$parametersArray = $limitoffset
? array($person_id, $person_id, $limit, $offset)
: array($person_id, $person_id);
$parametersArray = array($person_id, $person_id, $limit, $offset);
$count = 0;
$data = $this->execQuery($sql, $parametersArray);
@@ -327,7 +325,7 @@ EOSQL;
$data = getData($data);
if($data)
{
$count = is_null($limit) ? 1 : ceil($data[0]->total_msgs / $limit);
$count = ceil($data[0]->total_msgs / $limit);
}
return success(['data' => $data, 'count' => $count]);
@@ -1,11 +0,0 @@
<?php
class VertragsbestandteilLohnguide_model extends DB_Model
{
public function __construct()
{
parent::__construct();
$this->dbTable = 'hr.tbl_vertragsbestandteil_lohnguide';
$this->pk = 'vertragsbestandteil_id';
}
}
@@ -37,8 +37,7 @@ class Vertragsbestandteil_model extends DB_Model
kf.arbeitgeber_frist, kf.arbeitnehmer_frist,
s.wochenstunden, s.teilzeittyp_kurzbz,
u.tage,
z.zeitaufzeichnung, z.azgrelevant, z.homeoffice,
lg.stellenbezeichnung, lg.vordienstzeit, lg.fachrichtung_kurzbz, lg.modellstelle_kurzbz, lg.kommentar_person, lg.kommentar_modellstelle
z.zeitaufzeichnung, z.azgrelevant, z.homeoffice
FROM
hr.tbl_vertragsbestandteil v
LEFT JOIN
@@ -64,8 +63,6 @@ class Vertragsbestandteil_model extends DB_Model
hr.tbl_vertragsbestandteil_urlaubsanspruch u USING(vertragsbestandteil_id)
LEFT JOIN
hr.tbl_vertragsbestandteil_zeitaufzeichnung z USING(vertragsbestandteil_id)
LEFT JOIN
hr.tbl_vertragsbestandteil_lohnguide lg USING(vertragsbestandteil_id)
EOSQL;
return $sql;
}
-27
View File
@@ -1,27 +0,0 @@
<?php
$phrases = array(
array (
'app' => 'core',
'category' => 'DMS-Link',
'phrase' => 'lvplanSyncFAQ',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => '7188',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => '7188',
'description' => '',
'insertvon' => 'system',
),
),
)
);
-433
View File
@@ -1,433 +0,0 @@
<?php
$phrases = array(
array (
'app' => 'core',
'category' => 'LvPlan',
'phrase' => 'previousWeek',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Vorherige Woche',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Previous week',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'LvPlan',
'phrase' => 'previousYear',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Vorheriges Jahr',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Previous year',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'LvPlan',
'phrase' => 'previousMonth',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Vorheriges Monat',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Previous month',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'LvPlan',
'phrase' => 'previousDay',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Vorheriger Tag',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Previous day',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'LvPlan',
'phrase' => 'nextDay',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Nächster Tag',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Next day',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'LvPlan',
'phrase' => 'nextWeek',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Nächste Woche',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Next week',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'LvPlan',
'phrase' => 'nextMonth',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Nächster Monat',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Next month',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'LvPlan',
'phrase' => 'nextYear',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Nächstes Jahr',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Next year',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'LvPlan',
'phrase' => 'modeDay',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Tages Ansicht',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Daily view',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'LvPlan',
'phrase' => 'modeWeek',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Wochen Ansicht',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Week view',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'LvPlan',
'phrase' => 'modeMonth',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Monats Ansicht',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Month view',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'LvPlan',
'phrase' => 'noStgProvided',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'kein Studiengang hinterlegt',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'no degree-program provided',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'core',
'category' => 'LvPlan',
'phrase' => 'headerLvPlanLvVerband',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Lv-Plan Lehrverband',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Course-Plan Teaching Association',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'core',
'category' => 'LvPlan',
'phrase' => 'chooseStg',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Studiengang auswählen...',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Select a degree-program...',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'core',
'category' => 'LvPlan',
'phrase' => 'loadLvPlan',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Lehrverband laden',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Load Course-Plan',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'core',
'category' => 'LvPlan',
'phrase' => 'backToDropdown',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Zurück zum Auswahl-Dropdown',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Back to Dropdown',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'core',
'category' => 'LvPlan',
'phrase' => 'error_SemMissing',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Semester wählen',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Select a semester',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'core',
'category' => 'LvPlan',
'phrase' => 'error_VerbandMissing',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Verband wählen',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Select a verband',
'description' => '',
'insertvon' => 'system',
),
),
)
);
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-141
View File
@@ -1,141 +0,0 @@
<?php
/* Copyright (C) 2013 FH Technikum-Wien
*
* 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 2 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
*/
$phrases = array(
array(
'app' => 'core',
'category' => 'account',
'phrase' => 'title',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Account Aktivierung',
'description' => '',
),
array(
'sprache' => 'English',
'text' => 'Account Activation',
'description' => '',
)
)
),
array(
'app' => 'core',
'category' => 'account',
'phrase' => 'usage',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Bitte wählen Sie ein Passwort für Ihren Account.<br>Das Passwort muss zumindest 8 Zeichen enthalten, davon mindestens 1 Großbuchstabe, 1 Kleinbuchstabe und eine Ziffer.<br>Das Passwort darf keine Leerzeichen und Umlaute enthalten.<br>Erlaubte Sonderzeichen sind: -$#[]{}!().,*:;_',
'description' => '',
),
array(
'sprache' => 'English',
'text' => 'Please choose a password for your account<br>The password must contain at least 8 characters, of which 1 must be upper case, 1 lower case and 1 a numeral.<br>The password may not include spaces or umlauts.<br>The following special characters are allowed: -$#[]{}!().,*:;_',
'description' => '',
)
)
),
array(
'app' => 'core',
'category' => 'account',
'phrase' => 'username',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Username',
'description' => '',
),
array(
'sprache' => 'English',
'text' => 'Username',
'description' => '',
)
)
),
array(
'app' => 'core',
'category' => 'account',
'phrase' => 'code',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Code',
'description' => '',
),
array(
'sprache' => 'English',
'text' => 'Code',
'description' => '',
)
)
),
array(
'app' => 'core',
'category' => 'account',
'phrase' => 'activate',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Abschicken',
'description' => '',
),
array(
'sprache' => 'English',
'text' => 'Activate',
'description' => '',
)
)
),
array(
'app' => 'core',
'category' => 'account',
'phrase' => 'missingParameters',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Bitte geben Sie Benutzername, Code und Passwort ein',
'description' => '',
),
array(
'sprache' => 'English',
'text' => 'Please enter username, code and password',
'description' => '',
)
)
),
array(
'app' => 'core',
'category' => 'account',
'phrase' => 'wrongActivationCode',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Der angegebene Aktivierungscode ist falsch',
'description' => '',
),
array(
'sprache' => 'English',
'text' => 'The provided activation code is wrong',
'description' => '',
)
)
)
);
-388
View File
@@ -1,388 +0,0 @@
<?php
$phrases = array(
array (
'app' => 'core',
'category' => 'admission',
'phrase' => 'admission_edit',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Aufnahmetermin bearbeiten',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Edit appointment for participation placement test',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'admission',
'phrase' => 'admission_delete',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Aufnahmetermin Löschen',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Delete Admission Date',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'admission',
'phrase' => 'admission_new',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Termin für Teilnahme am Reihungstest anlegen',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Create appointment for participation placement test',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'admission',
'phrase' => 'anmeldundRtAm',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Anmeldung zum Reihungstest am',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Registration for the ranking test on',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'admission',
'phrase' => 'rtAngetreten',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Zum Reihungstest angetreten',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Participated in the ranking test',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'admission',
'phrase' => 'rtAbsolviert',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Reihungstestverfahren absolviert',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Placement test procedure completed',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'admission',
'phrase' => 'gesamtpunkte',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Gesamtpunkte',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Total Points',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'admission',
'phrase' => 'gesamtpunkteBerechnen',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Gesamtpunkte berechnen',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Calculate total points',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'admission',
'phrase' => 'allgemein',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Allgemein',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Generally',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'admission',
'phrase' => 'headerRTVerwaltung',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Zur Reihungstestverwaltung',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Administration Placement Test',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'admission',
'phrase' => 'loadZukuenftigeRT',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Nur zukünftige Reihungstests laden',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Show future placement tests only',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'admission',
'phrase' => 'getRTErgebnis',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Reihungstestergebnis holen',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Get placement test result',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'admission',
'phrase' => 'stufe',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Stufe',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'level',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'admission',
'phrase' => 'anmeldedatum',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Anmeldedatum',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Registration Date',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'admission',
'phrase' => 'teilgenommen',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'teilgenommen',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'participated',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'admission',
'phrase' => 'stg_kurz',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Kürzel',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'shorthand',
'description' => '',
'insertvon' => 'system',
),
),
),
);
-76
View File
@@ -1,76 +0,0 @@
<?php
$phrases = array(
array (
'app' => 'core',
'category' => 'alert',
'phrase' => 'attention',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Achtung',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Attention',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'alert',
'phrase' => 'confirm_delete',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Möchten Sie wirklich löschen?',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Do you really want to delete?',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'alert',
'phrase' => 'systemerror',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Systemfehler',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'System Error',
'description' => '',
'insertvon' => 'system',
),
),
),
);
-220
View File
@@ -1,220 +0,0 @@
<?php
$phrases = array(
array (
'app' => 'core',
'category' => 'ampeln',
'phrase' => 'newestAmpeln',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Neueste Ampeln',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Newest Ampeln',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'ampeln',
'phrase' => 'allAmpeln',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Alle Ampeln',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'All Ampeln',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'ampeln',
'phrase' => 'overdue',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Überfällig: {count}',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Overdue: {count}',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'ampeln',
'phrase' => 'ampelnDeadline',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Stichtag: {value}',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Deadline: {value}',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'ampeln',
'phrase' => 'noOpenAmpeln',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Keine offenen Ampeln.',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'No open Ampeln.',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'ampeln',
'phrase' => 'allMyAmpeln',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Alle meine Ampeln',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'All my Ampeln',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'ampeln',
'phrase' => 'mandatory',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Pflicht',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Mandatory',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'ampeln',
'phrase' => 'ampelBestaetigt',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Ampel bestätigt',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Ampel confirmed',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'ampeln',
'phrase' => 'super',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Super!',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Super!',
'description' => '',
'insertvon' => 'system',
),
),
),
);
File diff suppressed because it is too large Load Diff
-76
View File
@@ -1,76 +0,0 @@
<?php
$phrases = array(
array (
'app' => 'core',
'category' => 'betriebsmittel',
'phrase' => 'btn_printUebernahmebestaetigung',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Übernahmebestätigung drucken',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Print acceptance confirmation',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'betriebsmittel',
'phrase' => 'btn_editBetriebsmittel',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Betriebsmittel bearbeiten',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Edit Resource',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'betriebsmittel',
'phrase' => 'btn_deleteBetriebsmittel',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Betriebsmittel löschen',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Delete Resource',
'description' => '',
'insertvon' => 'system',
),
),
),
);
-28
View File
@@ -1,28 +0,0 @@
<?php
$phrases = array(
array (
'app' => 'infocenter',
'category' => 'bewerbung',
'phrase' => 'erklaerungInvoices',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Ablauf und Zahlungsbedingungen',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Procedure and terms of payment',
'description' => '',
'insertvon' => 'system',
),
),
),
);
-148
View File
@@ -1,148 +0,0 @@
<?php
$phrases = array(
array (
'app' => 'core',
'category' => 'bismeldestichtag',
'phrase' => 'stichtagHinzufuegen',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Meldestichtag hinzufügen',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Add report target date',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'bismeldestichtag',
'phrase' => 'stichtageVerwalten',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'BIS-Meldestichtage verwalten',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Manage report target dates',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'bismeldestichtag',
'phrase' => 'stichtagLoeschen',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Meldestichtag löschen',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Delete report target date',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'bismeldestichtag',
'phrase' => 'meldestichtag_erreicht',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Meldestichtag erreicht - Bearbeiten nicht mehr möglich',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'report target date reached - editing no longer possible',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'bismeldestichtag',
'phrase' => 'info_MeldestichtagStatusgrund',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Meldestichtag erreicht - ausschließlich Bearbeiten Statusgrund möglich',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Reporting deadline reached - only editing status reason possible',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'bismeldestichtag',
'phrase' => 'info_MeldestichtagStatusgrundSemester',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Meldestichtag erreicht - Bearbeiten Ausbildungssemester und Statusgrund möglich',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Edit education semester and status reason possible',
'description' => '',
'insertvon' => 'system',
),
),
),
);
-507
View File
@@ -1,507 +0,0 @@
<?php
$phrases = array(
array (
'app' => 'core',
'category' => 'bookmark',
'phrase' => 'newLink',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Neuer Link',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'New Link',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'bookmark',
'phrase' => 'saveLink',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Link speichern',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Save link',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'bookmark',
'phrase' => 'editLink',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Link bearbeiten',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Edit link',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'bookmark',
'phrase' => 'bookmarkDeleted',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Link gelöscht',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Link deleted',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'bookmark',
'phrase' => 'bookmarkAdded',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Link hinzugefügt',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Link added',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'bookmark',
'phrase' => 'bookmarkUpdated',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Link geändert',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Link updated',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'bookmark',
'phrase' => 'myBookmarks',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Meine Urls',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'My Urls',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'bookmark',
'phrase' => 'emptyBookmarks',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Du hast noch keine Bookmarks gesetzt',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'You have not set any bookmarks yet',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'bookmark',
'phrase' => 'invalidUrl',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Ungültiger Link',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Invalid link',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'bookmark',
'phrase' => 'invalidTitel',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Ungültiger Titel',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Invalid title',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'bookmark',
'phrase' => 'editFilter',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Filter bearbeiten',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'edit Filter',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'core',
'category' => 'bookmark',
'phrase' => 'filterByTags',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Nach Tags Filtern',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'filter by Tags',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'core',
'category' => 'bookmark',
'phrase' => 'sortDownwards',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Nach unten verschieben',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'sort downwards',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'core',
'category' => 'bookmark',
'phrase' => 'sortToTop',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Nach oben verschieben',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'sort to top',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'core',
'category' => 'bookmark',
'phrase' => 'deleteBookmark',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Lesezeichen löschen',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'delete Bookmark',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'core',
'category' => 'bookmark',
'phrase' => 'editBookmark',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Lesezeichen bearbeiten',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'edit Bookmark',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'core',
'category' => 'bookmark',
'phrase' => 'filterUpdated',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Filteraktion erfolgreich durchgeführt',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'filter updated successfully',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'core',
'category' => 'bookmark',
'phrase' => 'errorInputNecessary',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Eingabe eines Zeichens erforderlich',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'One character must be entered',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'core',
'category' => 'bookmark',
'phrase' => 'noFilter',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Kein Filter für Lesezeichen ausgewählt',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'No bookmark filter entered',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'core',
'category' => 'bookmark',
'phrase' => 'headerFilterBookmark',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Lesezeichen filtern',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Filter Bookmarks',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'core',
'category' => 'bookmark',
'phrase' => 'adminMode',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Inhalt kann nicht im Administrator Modus angezeigt werden.',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Content can not be displayed in administrator mode.',
'description' => '',
'insertvon' => 'system',
),
),
)
);
-76
View File
@@ -1,76 +0,0 @@
<?php
$phrases = array(
array (
'app' => 'core',
'category' => 'calendar',
'phrase' => 'kw',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'W',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'W',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'calendar',
'phrase' => 'year_kw',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => '{year} KW {week}',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => '{year} W {week}',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'calendar',
'phrase' => 'today',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Heute',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'today',
'description' => '',
'insertvon' => 'system',
),
),
),
);
-56
View File
@@ -1,56 +0,0 @@
<?php
/* Copyright (C) 2013 FH Technikum-Wien
*
* 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 2 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
*/
$phrases = array(
array(
'app' => 'core',
'category' => 'captcha',
'phrase' => 'label',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Tippen Sie die angezeigten<br>Zeichen in das untere Feld.',
'description' => '',
),
array(
'sprache' => 'English',
'text' => 'Enter the characters in<br>the field below.',
'description' => '',
)
)
),
array(
'app' => 'core',
'category' => 'captcha',
'phrase' => 'reload',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Ich kann das Bild nicht lesen - neu laden',
'description' => '',
),
array(
'sprache' => 'English',
'text' => 'Reload picture',
'description' => '',
)
)
)
);
-28
View File
@@ -1,28 +0,0 @@
<?php
$phrases = array(
array (
'app' => 'personalverwaltung',
'category' => 'core',
'phrase' => 'unternehmen',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Unternehmen',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'company',
'description' => '',
'insertvon' => 'system',
),
),
),
);
-579
View File
@@ -1,579 +0,0 @@
<?php
$phrases = array(
array (
'app' => 'core',
'category' => 'dashboard',
'phrase' => 'general',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Allgemein',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'General',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'dashboard',
'phrase' => 'addLine',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Weitere Zeile hinzufügen',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Add another line',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'dashboard',
'phrase' => 'custom',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Benutzerdefiniert',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Custom',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'dashboard',
'phrase' => 'dashboardGeneralSectionDescription',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Hier befinden sich die vordefinierten Widgets',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Here are the predefined widgets',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'dashboard',
'phrase' => 'dashboardCustomSectionDescription',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Hier befinden sich die Widgets Ihrer persönlichen Anpassungen',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Here are the widgets of your personal cutomizations',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'dashboard',
'phrase' => 'dashboardSectionDescription',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Hier befinden sich die Widgets der {0} Funktion',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Here are the widgets of the {0} function',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'dashboard',
'phrase' => 'success_savePreset',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Voreinstellung erfolgreich aktualisiert',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Preset successfully updated',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'core',
'category' => 'dashboard',
'phrase' => 'alert_deleteWidget',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Sind Sie sicher, dass Sie dieses Widget löschen möchten?',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Are you sure you want to delete this widget?',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'core',
'category' => 'dashboard',
'phrase' => 'edit',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Dashboard bearbeiten',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Edit dashboard',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'core',
'category' => 'dashboard',
'phrase' => 'createWidget',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Neues Widget hinzufügen',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Create new widget',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'core',
'category' => 'dashboard',
'phrase' => 'noWidgetsAvailable',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Keine Widgets verfügbar',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'No Widgets available',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'core',
'category' => 'dashboard',
'phrase' => 'widgetFromGeneralSection',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Dieses Widget ist für das Dashboard vordefiniert',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'This is a predefined widget of this dashboard',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'core',
'category' => 'dashboard',
'phrase' => 'widgetFromCustomSection',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Dieses Widget wurde von Ihnen hinzugefügt',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'This widget has been added by you',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'core',
'category' => 'dashboard',
'phrase' => 'widgetFromFunktionSection',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Dieses Widget wurde hinzugefügt weil Sie der "{0}" Funktion zugewiesen wurden',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'This widget has been added because you have been assigned to the "{0}" function',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'core',
'category' => 'dashboard',
'phrase' => 'widget_pin',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Pin Widget',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Pin widget',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'core',
'category' => 'dashboard',
'phrase' => 'widget_unpin',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Unpin Widget',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Unpin widget',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'core',
'category' => 'dashboard',
'phrase' => 'widget_toggle_visiblity',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Sichtbarkeit des Widgets umschalten',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Toggle widget visibility',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'core',
'category' => 'dashboard',
'phrase' => 'widget_move',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Widget verschieben',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Move widget',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'core',
'category' => 'dashboard',
'phrase' => 'widget_resize',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Widgetgröße anpassen',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Resize widget',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'core',
'category' => 'dashboard',
'phrase' => 'widget_delete',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Widget löschen',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Delete widget',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'core',
'category' => 'dashboard',
'phrase' => 'widget_configure',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Widget konfigurieren',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Configure widget',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'core',
'category' => 'dashboard',
'phrase' => 'widget_config_title',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => '"{name}" konfigurieren',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Configure "{name}"',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'core',
'category' => 'dashboard',
'phrase' => 'widget_link',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Widget link',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Widget link',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'core',
'category' => 'dashboard',
'phrase' => 'kurzbz',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Name',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Identifier',
'description' => '',
'insertvon' => 'system',
),
),
)
);
-39
View File
@@ -1,39 +0,0 @@
<?php
/* Copyright (C) 2013 FH Technikum-Wien
*
* 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 2 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
*/
$phrases = array(
array(
'app' => 'core',
'category' => 'dms',
'phrase' => 'informationsblattExterneLehrende',
'phrases' => array(
array(
'sprache' => 'German',
'text' => '<a href="../../../cms/dms.php?id={DMS_ID_INFOBLATT_EXTERNE_LEHRENDE}" target="_blank">Informationsblatt für externe Lehrende</a>',
'description' => '',
),
array(
'sprache' => 'English',
'text' => '<a href="../../../cms/dms.php?id={DMS_ID_INFOBLATT_EXTERNE_LEHRENDE}" target="_blank">Information sheet for external lecturers</a>',
'description' => '',
)
)
)
);
-340
View File
@@ -1,340 +0,0 @@
<?php
$phrases = array(
array (
'app' => 'core',
'category' => 'document_export',
'phrase' => 'error_unoconv',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Unoconv nicht gefunden - Bitte installieren sie Unoconv',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Unoconv not found - Please install Unoconv',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'document_export',
'phrase' => 'error_unoconv_version',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Unoconv Version konnte nicht ermittelt werden',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Could not get Unoconv Version',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'document_export',
'phrase' => 'error_conv_timeout',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Dokumentenkonvertierung ist derzeit nicht möglich. Bitte versuchen Sie es in einer Minute erneut oder kontaktieren Sie einen Administrator',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Document conversion is currently not possible. Please try again in a minute or contact an administrator',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'document_export',
'phrase' => 'error_sign_timeout',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Signaturserver ist derzeit nicht erreichbar',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Signature server is currently unavailable',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'document_export',
'phrase' => 'error_sign_pdf',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Derzeit können nur PDFs signiert werden',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Currently only PDFs can be signed',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'document_export',
'phrase' => 'error_outputformat_missing',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Ausgabeformat fehlt',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Outputformat is not defined',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'document_export',
'phrase' => 'error_template_missing',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Keine Vorlage gefunden',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'No template found',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'document_export',
'phrase' => 'error_headers',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Header wurden bereits gesendet -> Abbruch',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Header already sent -> Abort',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'document_export',
'phrase' => 'error_file_copy',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Kopieren fehlgeschlagen',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Copy failed',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'document_export',
'phrase' => 'error_file_load',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Datei konnte nicht geladen werden',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Unable to load file',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'document_export',
'phrase' => 'error_xml_load',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'XML konnte nicht geladen werden: {url} XML: {xml} PARAMETER: {params}',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Unable to load xml: {url} XML: {xml} PARAMS: {params}',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'document_export',
'phrase' => 'error_xsl_load',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'XSL konnte nicht geladen werden',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Unable to load xsl',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'document_export',
'phrase' => 'error_styles_load',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Styles XSL konnte nicht geladen werden',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Unable to load styles xsl',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'document_export',
'phrase' => 'error_manifest',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Manifest ungültig',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Manifest file invalid',
'description' => '',
'insertvon' => 'system',
),
),
),
);
-603
View File
@@ -1,603 +0,0 @@
<?php
$phrases = array(
array (
'app' => 'core',
'category' => 'dokumente',
'phrase' => 'title',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Titel',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'title',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'dokumente',
'phrase' => 'dokTyp',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Dokumententyp',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Document type',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'dokumente',
'phrase' => 'nachreichungAm',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Nachreichung am',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Submission on',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'dokumente',
'phrase' => 'dokDetails',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Dokumentendetails',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Document Details',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'dokumente',
'phrase' => 'anmerkung_person',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Anmerkung der Person',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Notes of the Person',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'dokumente',
'phrase' => 'dokumentAccept',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Akzeptieren',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Accept',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'dokumente',
'phrase' => 'dokumentUnaccept',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Entakzeptieren',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Unaccept',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'dokumente',
'phrase' => 'accepted',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Akzeptiert',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Accepted',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'dokumente',
'phrase' => 'unaccepted',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Nicht Akzeptiert',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Not Accepted',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'dokumente',
'phrase' => 'err_deleteDokHere',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Dieses Dokument darf hier nicht gelöscht werden',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'This document may not be deleted here',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'dokumente',
'phrase' => 'err_updateNotAllowed',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Es können nur Eintraege geändert werden zu denen Dokumente hochgeladen wurden',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Only entries to which documents have been uploaded can be changed',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'dokumente',
'phrase' => 'successAccepted',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Akzeptieren erfolgreich',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Successfully set to accepted',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'dokumente',
'phrase' => 'successUnaccepted',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Entakzeptieren erfolgreich',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Successfully set to unaccepted',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'dokumente',
'phrase' => 'successCountUnaccepted',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Entakzeptieren von {count} Dokument(en) erfolgreich',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => '{count} Document(s) successfully set to unaccepted',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'dokumente',
'phrase' => 'successCountAccepted',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Akzeptieren von {count} Dokument(en) erfolgreich',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => '{count} Document(s) successfully set to accepted',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'dokumente',
'phrase' => 'errorUnaccepted',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Fehler beim Entakzeptieren von Dokument {dokument_kurzbz}',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Error unaccepting document {dokument_kurzbz}',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'dokumente',
'phrase' => 'errorAccepted',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Fehler beim Akzeptieren von Dokument {dokument_kurzbz}',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Error Accepting document {dokument_kurzbz}',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'dokumente',
'phrase' => 'nachgereicht',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Nachgereicht',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Submitted later',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'dokumente',
'phrase' => 'vorhanden',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Vorhanden',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Available',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'dokumente',
'phrase' => 'datumAkzeptiert',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Akzeptiertdatum',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Accepted on',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'dokumente',
'phrase' => 'akzeptiertVon',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Akzeptiert von',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Accepted by',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'dokumente',
'phrase' => 'error_fileMissing',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Bitte eine Datei anhängen',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Please attach a file',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'dokumente',
'phrase' => 'error_fileType',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Nur Dateitypen JPEG, PNG oder PDF sind erlaubt',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Only JPEG, PNG, or PDF files are allowed.',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'dokumente',
'phrase' => 'error_duplicateDokument_kurzbz',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Akzeptieren / Entakzeptieren von mehr als einem Dokument pro Dokumenttyp nicht zulässig',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Accepting / unaccepting more than one document per document type is not permitted',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'dokumente',
'phrase' => 'dokument_erstellen',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Dokument erstellen',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Create Document',
'description' => '',
'insertvon' => 'system',
),
),
)
);
-365
View File
@@ -1,365 +0,0 @@
<?php
/* Copyright (C) 2013 FH Technikum-Wien
*
* 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 2 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
*/
$phrases = array(
array(
'app' => 'core',
'category' => 'eucovidqr',
'phrase' => '3gNachweis',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Zertifikat hochladen",
'description' => '',
),
array(
'sprache' => 'English',
'text' => "upload certificate",
'description' => '',
)
)
),
array(
'app' => 'core',
'category' => 'eucovidqr',
'phrase' => 'QrViaWebcam',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "QR-Code via Webcam scannen",
'description' => '',
),
array(
'sprache' => 'English',
'text' => "scan qr code via webcam",
'description' => '',
)
)
),
array(
'app' => 'core',
'category' => 'eucovidqr',
'phrase' => 'oder',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "oder",
'description' => '',
),
array(
'sprache' => 'English',
'text' => "or",
'description' => '',
)
)
),
array(
'app' => 'core',
'category' => 'eucovidqr',
'phrase' => 'ZertifikatAlsPdfHochladen',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Zertifikat als PDF hochladen (nur mit QR-Code, kein gescanntes Zertifikat)",
'description' => '',
),
array(
'sprache' => 'English',
'text' => "upload certificate pdf (only with qrcode, no scanned certificate)",
'description' => '',
)
)
),
array(
'app' => 'core',
'category' => 'eucovidqr',
'phrase' => 'ValidierungsergebnisAktuellesGueltigkeitsdatum',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Validierungsergebnis / gespeichertes Gültigkeitsdatum",
'description' => '',
),
array(
'sprache' => 'English',
'text' => "validation result / stored valid date",
'description' => '',
)
)
),
array(
'app' => 'core',
'category' => 'eucovidqr',
'phrase' => 'DateiZiehenUndAblegen',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Datei hier hinziehen und ablegen",
'description' => '',
),
array(
'sprache' => 'English',
'text' => "drag & drop file here",
'description' => '',
)
)
),
array(
'app' => 'core',
'category' => 'eucovidqr',
'phrase' => 'KeinZugriffWebcam',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Zugriff auf die Webcam nicht möglich!",
'description' => '',
),
array(
'sprache' => 'English',
'text' => "webcam access denied",
'description' => '',
)
)
),
array(
'app' => 'core',
'category' => 'eucovidqr',
'phrase' => 'gueltigBis',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "gültig bis",
'description' => '',
),
array(
'sprache' => 'English',
'text' => "valid to",
'description' => '',
)
)
),
array(
'app' => 'core',
'category' => 'eucovidqr',
'phrase' => 'ZertifikatUngueltig',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Zertifikat ungültig",
'description' => '',
),
array(
'sprache' => 'English',
'text' => "certificate invalid",
'description' => '',
)
)
),
array(
'app' => 'core',
'category' => 'eucovidqr',
'phrase' => 'ZertifikatKonnteNichtGeprueftWerden',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Das Zertifikat konnte nicht verifiziert werden. Stellen Sie bitte sicher, dass ein QR-Code enthalten ist.",
'description' => '',
),
array(
'sprache' => 'English',
'text' => "certificate could not be verified. Please make sure it contains a qr-code.",
'description' => '',
)
)
),
array(
'app' => 'core',
'category' => 'eucovidqr',
'phrase' => 'Laedt',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Lädt",
'description' => '',
),
array(
'sprache' => 'English',
'text' => "loading",
'description' => '',
)
)
),
array(
'app' => 'core',
'category' => 'eucovidqr',
'phrase' => '3G',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Covid19 Gültigkeitsdatum",
'description' => '',
),
array(
'sprache' => 'English',
'text' => "covid19 valid date",
'description' => '',
)
)
),
array(
'app' => 'core',
'category' => 'eucovidqr',
'phrase' => 'FehlerBeimSpeichernDesGueltigkeitsdatums',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Fehler beim Speichern des Gültigkeitsdatum",
'description' => '',
),
array(
'sprache' => 'English',
'text' => "error saving valid date",
'description' => '',
)
)
),
array(
'app' => 'core',
'category' => 'eucovidqr',
'phrase' => 'PersondatenInFH-CompleteStimmenNichtMitDemZertifikatUeberein',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Personendaten aus dem Zertifikat stimmen nicht dem angemeldeten Benutzer überein",
'description' => '',
),
array(
'sprache' => 'English',
'text' => "person data from certificate does not match the logged in user",
'description' => '',
)
)
),
array(
'app' => 'core',
'category' => 'eucovidqr',
'phrase' => 'UploadSuccessful',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Das Gültigkeitsdatum wurde erfolgreich gespeichert.",
'description' => '',
),
array(
'sprache' => 'English',
'text' => "validity date has been successfully stored.",
'description' => '',
)
)
),
array(
'app' => 'core',
'category' => 'eucovidqr',
'phrase' => 'UploadFailed',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Es wurde kein Gültigkeitsdatum gespeichert.",
'description' => '',
),
array(
'sprache' => 'English',
'text' => "validity date has not been stored.",
'description' => '',
)
)
),
array(
'app' => 'core',
'category' => 'eucovidqr',
'phrase' => 'uploadbeschreibung',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Hier kann ein Digitales COVID-Zertifikat der EU mit QR-Code selbst erfasst werden.",
'description' => '',
),
array(
'sprache' => 'English',
'text' => "an EU Digital COVID Certificate with QR code can be self registered here.",
'description' => '',
)
)
),
array(
'app' => 'core',
'category' => 'eucovidqr',
'phrase' => 'manualbeschreibung',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Falls das Zertifikat keinen QR-Code enthält oder die Selbst-Erfassung fehlschlägt, kann das Zertifkat beim Empfang manuell erfasst werden.",
'description' => '',
),
array(
'sprache' => 'English',
'text' => "if the certificate does not contain a QR code or self registration fails, the certificate can be manually registered at the front desk.",
'description' => '',
)
)
),
array(
'app' => 'core',
'category' => 'eucovidqr',
'phrase' => 'supportbeschreibung',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Bei technischen Problemen kontaktieren Sie bitte: ",
'description' => '',
),
array(
'sprache' => 'English',
'text' => "in case of technical issues please contact: ",
'description' => '',
)
)
),
array(
'app' => 'core',
'category' => 'eucovidqr',
'phrase' => 'maxtagebeschreibung',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "ACHTUNG seit Februar 2022 werden Zutrittskarten für maximal 60 Tage freigeschalten.",
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => "ATTENTION since February 2022 a maximum of 60 days validity is granted for accesscards",
'description' => '',
'insertvon' => 'system'
)
)
)
);
-244
View File
@@ -1,244 +0,0 @@
<?php
$phrases = array(
array (
'app' => 'core',
'category' => 'exam',
'phrase' => 'add_pruefung',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Prüfung hinzufügen',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Add exam',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'exam',
'phrase' => 'edit_pruefung',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Prüfung bearbeiten',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Edit exam',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'exam',
'phrase' => 'delete_pruefung',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Prüfung löschen',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Delete exam',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'exam',
'phrase' => 'newFromOld_pruefung',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Prüfungskopie für neue Prüfung erstellen',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Copy exam',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'exam',
'phrase' => 'hinweis_kommPrfg',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Bitte bei Neuanlage einer kommissionellen Prüfung das Datum der Noteneintragung (i. d. R. heute) eintragen, um den korrekten Fristenablauf der Wiederholung zu ermöglichen.',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'When creating a new examination before a committee, please enter the date of the grade entry (usually today) to ensure that the deadline for repeating the exam is met correctly.',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'exam',
'phrase' => 'keineAuswahl',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'keine Auswahl',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'no selection',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'exam',
'phrase' => 'hinweis_changeAfterExamDate',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'ACHTUNG! Diese Prüfungsnote wurde nicht ins Zeugnis übernommen da die Zeugnisnote nach dem Prüfungsdatum verändert wurde',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'ATTENTION! This exam grade was not included in the certificate because the certificate grade was changed after the exam date',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'exam',
'phrase' => 'bitteLvteilWaehlen',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Bitte Lv_Teil wählen',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Please select teaching unit',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'exam',
'phrase' => 'punkte',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Punkte',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Points',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'core',
'category' => 'exam',
'phrase' => 'filter_currentSem',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Nur aktuelles Studiensemester anzeigen',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Display only current Semester',
'description' => '',
'insertvon' => 'system',
),
),
),
);
File diff suppressed because it is too large Load Diff
-155
View File
@@ -1,155 +0,0 @@
<?php
/* Copyright (C) 2013 FH Technikum-Wien
*
* 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 2 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
*/
$phrases = array(
array(
'app' => 'core',
'category' => 'filter',
'phrase' => 'filterEinstellungen',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Filter Einstellungen',
'description' => '',
),
array(
'sprache' => 'English',
'text' => 'filter settings',
'description' => '',
)
)
),
array(
'app' => 'core',
'category' => 'filter',
'phrase' => 'filterApply',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Filtern',
'description' => '',
),
array(
'sprache' => 'English',
'text' => 'Apply',
'description' => '',
)
)
),
array(
'app' => 'core',
'category' => 'filter',
'phrase' => 'filterHinzufuegen',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Filter hinzufügen',
'description' => '',
),
array(
'sprache' => 'English',
'text' => 'add filter',
'description' => '',
)
)
),
array(
'app' => 'core',
'category' => 'filter',
'phrase' => 'feldHinzufuegen',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Feld hinzufügen',
'description' => '',
),
array(
'sprache' => 'English',
'text' => 'add field',
'description' => '',
)
)
),
array(
'app' => 'core',
'category' => 'filter',
'phrase' => 'filterBeschreibung',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Filter Beschreibung',
'description' => '',
),
array(
'sprache' => 'English',
'text' => 'filter description',
'description' => '',
)
)
)
,
array (
'app' => 'core',
'category' => 'filter',
'phrase' => 'filterDelete',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Filter zurücksetzen',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'delete filter',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'core',
'category' => 'filter',
'phrase' => 'filterActive',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Filter aktiv',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'filter active',
'description' => '',
'insertvon' => 'system',
),
),
)
);
-531
View File
@@ -1,531 +0,0 @@
<?php
$phrases = array(
array (
'app' => 'lvevaluierung',
'category' => 'fragebogen',
'phrase' => 'loginTextCodeEingeben',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Bitte geben Sie Ihren Code ein, um die Evaluierung zu starten:',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Please enter your code to start the evaluation:',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'lvevaluierung',
'category' => 'fragebogen',
'phrase' => 'loginCodeEingeben',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Evaluierung-Code eingeben',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Enter your Evaluation-Code',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'lvevaluierung',
'category' => 'fragebogen',
'phrase' => 'loginTextLvevaluierung',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => '
<div class="text-start mb-3">
<p>Die folgende LV-Evaluierung umfasst</p>
</div>
<ul class="text-start small">
<li>zwei (geschlossene) Pflichtfragen</li>
<li>die Möglichkeit, optional zu einzelnen Bereichen konkreteres Feedback zu geben</li>
<li>zwei optionale Freitextfragen</li>
</ul>
',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => '
<div class="text-start mb-3">
<p>The following course evaluation includes</p>
</div>
<ul class="text-start small">
<li>two (closed) mandatory questions</li>
<li>the opportunity to optionally provide more specific feedback on individual areas</li>
<li>two optional free-text questions</li>
</ul>
',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'lvevaluierung',
'category' => 'fragebogen',
'phrase' => 'loginTextAntwortoptionen',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => '
<div class="text-start mb-3">
<p>Die Antwortoptionen umfassen 5 Stufen:</p>
</div>
<ul class="text-start small">
<li>Sehr gut</li>
<li>Gut</li>
<li>Mittel</li>
<li>Schlecht</li>
<li>Sehr schlecht</li>
</ul>
',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => '
<div class="text-start mb-3">
<p>The answer options comprise 5 levels:</p>
</div>
<ul class="text-start small">
<li>Excellent</li>
<li>Good</li>
<li>Satisfactory</li>
<li>Poor</li>
<li>Insufficient</li>
</ul>
',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'lvevaluierung',
'category' => 'fragebogen',
'phrase' => 'evaluierungPeriodeBeendet',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Der Evaluierungszeitraum endete am {date}',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Evaluation period was closed on {date}',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'lvevaluierung',
'category' => 'fragebogen',
'phrase' => 'evaluierungPeriodeStartetErst',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Der Evaluierungszeitraum startet erst am {date}',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Evaluation period starts on {date}',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'lvevaluierung',
'category' => 'fragebogen',
'phrase' => 'evaluierungEingereicht',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Die Evaluierung wurde am {date} eingereicht',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Evaluation was submitted on {date}',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'lvevaluierung',
'category' => 'fragebogen',
'phrase' => 'evaluierungNichtMehrVerfuegbar',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Diese Evaluierung ist nicht mehr verfügbar.',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'This evaluation is no longer available.',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'lvevaluierung',
'category' => 'fragebogen',
'phrase' => 'evaluierungNichtVerfuegbar',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Diese Evaluierung ist nicht verfügbar.',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'This evaluation is not available yet.',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'lvevaluierung',
'category' => 'fragebogen',
'phrase' => 'logoutTitle',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Danke!<br>Was passiert nun mit Ihrem Feedback?',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Thank you!<br>What happens to your feedback now?',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'lvevaluierung',
'category' => 'fragebogen',
'phrase' => 'logoutText',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => '
<p>Danke, dass Sie sich Zeit für das Feedback genommen haben! Ihre ehrliche und konstruktive Rückmeldung ist essenziell, damit Ihre Lehrenden und Ihre Studiengangsleitung die Lehrveranstaltung immer weiter verbessern und anpassen können!</p>
<p>Und was passiert jetzt mit Ihrem Feedback? Die Studiengangsleitung wird die Ergebnisse &amp; Maßnahmen zusammen mit Ihrer Jahrgangsvertretung besprechen. So tragen Sie aktiv dazu bei, die Lehrveranstaltung für zukünftige Semester noch spannender &amp; lehrreicher zu machen!</p>
<p>Gemeinsam für mehr Qualität in der Lehre!</p>
',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => '
<p>Thank you for taking the time to provide feedback! Your honest and constructive input is essential for your lecturers and degree program director to continuously improve and adapt the course.</p>
<p>What happens with your feedback? The degree program director will discuss the results and potential measures together with your academic year representatives. You have thus actively contributed to making the course even more engaging and educational for future semesters!</p>
<p>Working together for higher quality in teaching!</p>
',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'lvevaluierung',
'category' => 'fragebogen',
'phrase' => 'evaluierungZeitAbgelaufen',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Die Evaluierungszeit ist abgelaufen',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'The Evaluation time is over',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'lvevaluierung',
'category' => 'fragebogen',
'phrase' => 'evaluierungAntwortenNichtUebermittelt',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Ihre Antworten wurden nicht übermittelt.',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Your responses were not submitted.',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'lvevaluierung',
'category' => 'fragebogen',
'phrase' => 'evaluierungCodeExistiertNicht',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Dieser Evaluierungscode exisitiert nicht',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'This evaluation code does not exist',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'lvevaluierung',
'category' => 'fragebogen',
'phrase' => 'evaluierungNichtAktiv',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Die Evaluierung ist nicht aktiv',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Evaluation is not active',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'lvevaluierung',
'category' => 'fragebogen',
'phrase' => 'zeitLaeuftAb',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Zeit läuft bald ab zum Speichern bitte Abschicken klicken',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Time is running out — please click Submit to save your answers',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'lvevaluierung',
'category' => 'fragebogen',
'phrase' => 'spracheAuswaehlen',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Sprache auswählen',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Select language',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'lvevaluierung',
'category' => 'fragebogen',
'phrase' => 'fhtwLogo',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'FH Technikum Wien Logo',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'UAS Technikum Wien Logo',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'lvevaluierung',
'category' => 'fragebogen',
'phrase' => 'evaluierungscodeEingeben',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Evaluierungscode eingeben',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Enter Evaluation code',
'description' => '',
'insertvon' => 'system',
),
),
)
,
array (
'app' => 'lvevaluierung',
'category' => 'fragebogen',
'phrase' => 'pflichtantwortFehlt',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Pflichtantwort fehlt',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Mandatory answer missing',
'description' => '',
'insertvon' => 'system',
),
),
)
);
-220
View File
@@ -1,220 +0,0 @@
<?php
$phrases = array(
array (
'app' => 'personalverwaltung',
'category' => 'fristenmanagement',
'phrase' => 'frist',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Frist',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Deadline',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'personalverwaltung',
'category' => 'fristenmanagement',
'phrase' => 'todo',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'To Do',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'To Do',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'personalverwaltung',
'category' => 'fristenmanagement',
'phrase' => 'fristStatusGespeichert',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Status gespeichert.',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Status saved.',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'personalverwaltung',
'category' => 'fristenmanagement',
'phrase' => 'fristGespeichert',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Frist gespeichert.',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Deadline saved.',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'personalverwaltung',
'category' => 'fristenmanagement',
'phrase' => 'fristGeloescht',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Frist gelöscht.',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Deadline deleted.',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'personalverwaltung',
'category' => 'fristenmanagement',
'phrase' => 'fristenAktualisiert',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Fristen aktualisiert.',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Deadlines updated.',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'personalverwaltung',
'category' => 'fristenmanagement',
'phrase' => 'termin_frist',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Termin/Frist',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Date/Deadline',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'personalverwaltung',
'category' => 'fristenmanagement',
'phrase' => 'ereignis',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'Ereignis',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Event',
'description' => '',
'insertvon' => 'system',
),
),
),
array (
'app' => 'personalverwaltung',
'category' => 'fristenmanagement',
'phrase' => 'mitarbeiterin',
'insertvon' => 'system',
'phrases' =>
array (
0 =>
array (
'sprache' => 'German',
'text' => 'MitarbeiterIn',
'description' => '',
'insertvon' => 'system',
),
1 =>
array (
'sprache' => 'English',
'text' => 'Employee',
'description' => '',
'insertvon' => 'system',
),
),
),
);

Some files were not shown because too many files have changed in this diff Show More