mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
Compare commits
44 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8f73489073 | |||
| 94f742187e | |||
| 70ebe34f1f | |||
| 917a9ee707 | |||
| d577ac6d54 | |||
| 2aecc6e0f2 | |||
| 0ff29ba6af | |||
| ba543448ae | |||
| f121f9b5a2 | |||
| 88b22f5490 | |||
| 4b7ee9abe1 | |||
| d499619cf3 | |||
| f489153ff3 | |||
| 9b79a07fa2 | |||
| 354e1ccdf4 | |||
| 6ce14a25d7 | |||
| c701d92779 | |||
| 73e03ba901 | |||
| cdc279b5da | |||
| d003bfa7f1 | |||
| 95a7797ae9 | |||
| 343a82b89c | |||
| cc23fb0f39 | |||
| 7edddd0566 | |||
| ebafc4576f | |||
| 7daaf79fcc | |||
| f1c3c8296f | |||
| 843894405e | |||
| 8fddbc3a32 | |||
| f06e59b362 | |||
| 5c463c0866 | |||
| 423bbd95a6 | |||
| 627a52e3d1 | |||
| 059b13938e | |||
| 6b816def31 | |||
| 5fbcf588ed | |||
| 41b2a6d1d4 | |||
| e054f1222b | |||
| ed69bd74ed | |||
| f0641ddd6d | |||
| 6c2a2e4665 | |||
| 5e929df966 | |||
| 455e0533fe | |||
| a8c4fc7607 |
@@ -63,8 +63,10 @@ $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/Benotungstool/.*'] = 'Cis/Benotungstool/index/$1';
|
||||
$route['Cis/MyLv/.*'] = 'Cis/MyLv/index/$1';
|
||||
$route['Cis/OtherLvPlan/.*'] = 'Cis/OtherLvPlan/index/$1';
|
||||
//Route for LV Plan Stg/Semester/Verband/Gruppe
|
||||
$route['Cis/StgOrgLvPlan/.*'] = 'Cis/StgOrgLvPlan/index/$1';
|
||||
|
||||
$route['Abgabetool/Assistenz'] = 'Cis/Abgabetool/Assistenz';
|
||||
$route['Abgabetool/Assistenz/(:any)'] = 'Cis/Abgabetool/Assistenz/$1';
|
||||
|
||||
@@ -31,12 +31,8 @@ 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', ['viewData' => $viewData, 'route' => 'Abgabetool']);
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'Abgabetool']);
|
||||
} else {
|
||||
$this->load->view('Cis/Abgabetool.php', ['uid' => getAuthUID(), 'route' => 'Abgabetool']);
|
||||
}
|
||||
@@ -44,12 +40,8 @@ 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', ['viewData' => $viewData, 'route' => 'AbgabetoolStudent']);
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'AbgabetoolStudent']);
|
||||
} else {
|
||||
$this->load->view('Cis/Abgabetool.php', ['uid' => getAuthUID(), 'route' => 'AbgabetoolStudent', 'student_uid_prop' => $student_uid_prop]);
|
||||
}
|
||||
@@ -57,12 +49,8 @@ class Abgabetool extends Auth_Controller
|
||||
|
||||
public function Mitarbeiter()
|
||||
{
|
||||
$viewData = array(
|
||||
'uid'=>getAuthUID(),
|
||||
);
|
||||
|
||||
if(defined('CIS4') && CIS4) {
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData, 'route' => 'AbgabetoolMitarbeiter']);
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'AbgabetoolMitarbeiter']);
|
||||
} else {
|
||||
$this->load->view('Cis/Abgabetool.php', ['uid' => getAuthUID(), 'route' => 'AbgabetoolMitarbeiter']);
|
||||
}
|
||||
@@ -70,13 +58,8 @@ 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', ['viewData' => $viewData, 'route' => 'AbgabetoolAssistenz']);
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'AbgabetoolAssistenz']);
|
||||
} else {
|
||||
$this->load->view('Cis/Abgabetool.php', ['uid' => getAuthUID(), 'route' => 'AbgabetoolAssistenz', 'stg_kz_prop' => $stg_kz_prop]);
|
||||
}
|
||||
@@ -84,12 +67,8 @@ class Abgabetool extends Auth_Controller
|
||||
|
||||
public function Deadlines()
|
||||
{
|
||||
$viewData = array(
|
||||
'uid'=>getAuthUID(),
|
||||
);
|
||||
|
||||
if(defined('CIS4') && CIS4) {
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData, 'route' => 'DeadlinesOverview']);
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'DeadlinesOverview']);
|
||||
} else {
|
||||
$this->load->view('Cis/Abgabetool.php', ['uid' => getAuthUID(), 'route' => 'DeadlinesOverview']);
|
||||
}
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class Benotungstool extends Auth_Controller
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'index' => self::PERM_LOGGED
|
||||
]);
|
||||
|
||||
$this->_ci =& get_instance();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
|
||||
|
||||
// TODO: check if related CIS config is also loaded when being routed in Cis4 by vuerouter
|
||||
// TODO: check if new benotungstool should be configurable the exact same way?
|
||||
|
||||
|
||||
$viewData = array(
|
||||
'uid'=>getAuthUID(),
|
||||
'CIS_GESAMTNOTE_UEBERSCHREIBEN' => CIS_GESAMTNOTE_UEBERSCHREIBEN,
|
||||
'CIS_GESAMTNOTE_PRUEFUNG_KOMMPRUEF' => CIS_GESAMTNOTE_PRUEFUNG_KOMMPRUEF,
|
||||
'CIS_GESAMTNOTE_PRUEFUNG_TERMIN3' => CIS_GESAMTNOTE_PRUEFUNG_TERMIN3,
|
||||
'CIS_GESAMTNOTE_PRUEFUNG_TERMIN2' => CIS_GESAMTNOTE_PRUEFUNG_TERMIN2,
|
||||
'CIS_GESAMTNOTE_PRUEFUNG_MOODLE_LE_NOTE' => CIS_GESAMTNOTE_PRUEFUNG_MOODLE_LE_NOTE,
|
||||
'CIS_GESAMTNOTE_PUNKTE' => CIS_GESAMTNOTE_PUNKTE,
|
||||
'CIS_GESAMTNOTE_GEWICHTUNG' => CIS_GESAMTNOTE_GEWICHTUNG,
|
||||
'CIS_ANWESENHEITSLISTE_NOTENLISTE_ANZEIGEN' => CIS_ANWESENHEITSLISTE_NOTENLISTE_ANZEIGEN
|
||||
);
|
||||
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData, 'route' => 'Benotungstool']);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -28,12 +28,6 @@ class LvPlan extends Auth_Controller
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
|
||||
$viewData = array(
|
||||
'uid'=>getAuthUID(),
|
||||
'timezone' => $this->config->item('timezone')
|
||||
);
|
||||
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData, 'route' => 'LvPlan']);
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'LvPlan']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,11 +26,6 @@ class MyLv extends Auth_Controller
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
|
||||
$viewData = array(
|
||||
|
||||
);
|
||||
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData, 'route' => 'MyLv']);
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'MyLv']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,13 +27,7 @@ class MyLvPlan extends Auth_Controller
|
||||
* @return void
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
|
||||
$viewData = array(
|
||||
'uid'=>getAuthUID(),
|
||||
'timezone' => $this->config->item('timezone')
|
||||
);
|
||||
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData, 'route' => 'MyLvPlan']);
|
||||
{
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'MyLvPlan']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
<?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']);
|
||||
}
|
||||
}
|
||||
@@ -55,15 +55,7 @@ class Profil extends Auth_Controller
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
|
||||
$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']);
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'profilIndex']);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -73,23 +65,13 @@ class Profil extends Auth_Controller
|
||||
*/
|
||||
public function View($uid)
|
||||
{
|
||||
$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']);
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'profilViewUid']);
|
||||
}
|
||||
|
||||
/**
|
||||
* checks whether a specific userID is a mitarbeiter or not (foreword declaration of the function isMitarbeiter in Mitarbeiter_model.php)
|
||||
* checks whether a specific userID is a student or not (foreword declaration of the function isStudent in Student_model.php)
|
||||
* @access public
|
||||
* @param $uid the userID used to check if it is a mitarbeiter
|
||||
* @param $uid the userID used to check if it is a student
|
||||
* @return boolean
|
||||
*/
|
||||
public function isStudent($uid)
|
||||
@@ -119,7 +101,7 @@ class Profil extends Auth_Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* gets the adressen that are marked as zustell from the currenlty logged in user
|
||||
* gets the adressen that are marked as zustell from the currently logged in user
|
||||
* @access public
|
||||
* @return array a list of adresse_id's
|
||||
*/
|
||||
@@ -262,23 +244,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 = 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 = $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"));
|
||||
}
|
||||
} else {
|
||||
echo json_encode(error("Nation was not 'A' (Austria)"));
|
||||
echo json_encode(error("Nation was not 'A' (Austria)"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -750,6 +732,4 @@ class Profil extends Auth_Controller
|
||||
$zutrittskarte_ausgegebenam = str_replace("-", ".", $zutrittskarte_ausgegebenam);
|
||||
return $zutrittskarte_ausgegebenam;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -25,11 +25,6 @@ class Raumsuche extends Auth_Controller
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
|
||||
$viewData = array(
|
||||
'uid'=>getAuthUID(),
|
||||
);
|
||||
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData, 'route' => 'Raumsuche']);
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'Raumsuche']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class StgOrgLvPlan 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()
|
||||
{
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'StgOrgLvPlan']);
|
||||
}
|
||||
}
|
||||
@@ -29,10 +29,7 @@ class Studium extends Auth_Controller
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$viewData = array(
|
||||
|
||||
);
|
||||
$this->load->view('CisRouterView/CisRouterView.php',['viewData' => $viewData, 'route' => 'studium']);
|
||||
$this->load->view('CisRouterView/CisRouterView.php',['route' => 'studium']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
if (!defined('BASEPATH'))
|
||||
exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -13,9 +14,9 @@ class Cis4 extends Auth_Controller
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct(
|
||||
array(
|
||||
'index' => 'basis/cis:r'
|
||||
)
|
||||
array(
|
||||
'index' => 'basis/cis:r'
|
||||
)
|
||||
);
|
||||
|
||||
// Load Config
|
||||
@@ -30,16 +31,6 @@ class Cis4 extends Auth_Controller
|
||||
*/
|
||||
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,
|
||||
'timezone' => $this->config->item('timezone')
|
||||
);
|
||||
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData, 'route' => 'FhcDashboard']);
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'FhcDashboard']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ class Cis4FhcApi extends FHCAPI_Controller
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'getViewData' => self::PERM_LOGGED,
|
||||
'dashboardViewData' => self::PERM_LOGGED,
|
||||
]);
|
||||
|
||||
}
|
||||
@@ -36,17 +36,22 @@ class Cis4FhcApi extends FHCAPI_Controller
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* fetches ViewData
|
||||
*/
|
||||
public function getViewData()
|
||||
* 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()
|
||||
{
|
||||
$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
|
||||
'person_id' => $personData->person_id,
|
||||
'timezone' => $this->config->item('timezone'),
|
||||
);
|
||||
|
||||
$this->terminateWithSuccess($viewData);
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
* 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;
|
||||
@@ -33,8 +34,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,
|
||||
@@ -42,12 +43,15 @@ class LvPlan extends FHCAPI_Controller
|
||||
'studiensemesterDateInterval' => self::PERM_LOGGED,
|
||||
'getLvPlanForStudiensemester' => self::PERM_LOGGED,
|
||||
'getLv' => self::PERM_LOGGED,
|
||||
'getLeEvents' => self::PERM_LOGGED,
|
||||
'getLvEvents' => self::PERM_LOGGED,
|
||||
'eventsStgOrg' => self::PERM_LOGGED,
|
||||
'fetchFerienEvents' => self::PERM_LOGGED,
|
||||
'getStudiengaenge' => self::PERM_LOGGED,
|
||||
'getLehrverband' => self::PERM_LOGGED,
|
||||
'permissionOtherLvPlan' => 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,
|
||||
@@ -55,23 +59,17 @@ class LvPlan extends FHCAPI_Controller
|
||||
'dbExecuteUser' => 'RESTful API'
|
||||
));
|
||||
|
||||
$this->load->library('form_validation');
|
||||
$this->load->library('PhrasesLib');
|
||||
$this->loadPhrases(
|
||||
array(
|
||||
'ui'
|
||||
)
|
||||
);
|
||||
$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');
|
||||
@@ -91,24 +89,30 @@ class LvPlan extends FHCAPI_Controller
|
||||
// form validation
|
||||
$this->form_validation->set_rules('start_date', "start_date", "required");
|
||||
$this->form_validation->set_rules('end_date', "end_date", "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 lv plan 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);
|
||||
$result = $this->stundenplanlib->getEventsUser($start_date, $end_date, $uid);
|
||||
$lvplanEvents = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
// fetching moodle events
|
||||
$moodleEvents = $this->fetchMoodleEvents($start_date, $end_date);
|
||||
$moodleEvents = $uid ? [] : $this->fetchMoodleEvents($start_date, $end_date);
|
||||
|
||||
// fetching ferien events
|
||||
$ferienEvents = $this->fetchFerienEvents($start_date, $end_date);
|
||||
|
||||
$ferienEvents = $this->fetchFerienEvents($start_date, $end_date, $uid);
|
||||
|
||||
|
||||
$this->terminateWithSuccess(array_merge(
|
||||
$lvplanEvents,
|
||||
@@ -117,6 +121,45 @@ class LvPlan extends FHCAPI_Controller
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* fetches LvPlan for studiengang / semester / verband / gruppe
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
public function eventsStgOrg()
|
||||
{
|
||||
$this->load->library('StundenplanLib');
|
||||
|
||||
// form validation
|
||||
$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('stg_kz', "stg_kz", "required"); //no validation show empty calendar
|
||||
|
||||
if (!$this->form_validation->run()) {
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
$stgOrgEvents = [];
|
||||
$ferienEvents = [];
|
||||
} 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);
|
||||
$sem = $this->input->post('sem', true);
|
||||
$verband = $this->input->post('verband', true);
|
||||
$gruppe = $this->input->post('gruppe', true);
|
||||
|
||||
$result = $this->stundenplanlib->getEventsStgOrg($start_date, $end_date, $stg_kz, $sem, $verband, $gruppe);
|
||||
$stgOrgEvents = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$result = $this->stundenplanlib->fetchFerienTageEvents($start_date, $end_date, $stg_kz);
|
||||
$ferienEvents = $this->getDataOrTerminateWithError($result);
|
||||
}
|
||||
|
||||
$this->terminateWithSuccess(array_merge(
|
||||
$stgOrgEvents,
|
||||
$ferienEvents
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* fetches LvPlan and Ferien events together for the lv
|
||||
*
|
||||
@@ -130,7 +173,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());
|
||||
|
||||
@@ -145,7 +188,6 @@ class LvPlan extends FHCAPI_Controller
|
||||
|
||||
// fetching ferien events
|
||||
$ferienEvents = $this->fetchFerienEvents($start_date, $end_date);
|
||||
|
||||
|
||||
$this->terminateWithSuccess(array_merge(
|
||||
$lvplanEvents,
|
||||
@@ -153,73 +195,43 @@ class LvPlan extends FHCAPI_Controller
|
||||
));
|
||||
}
|
||||
|
||||
public function getLeEvents($le_id = null, $start_date = null, $end_date = null, $stundenplan = 'stundenplandev')
|
||||
{
|
||||
|
||||
if (is_null($le_id) || is_null($start_date) || is_null($end_date))
|
||||
$this->terminateWithError($this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL);
|
||||
|
||||
if ($stundenplan !== 'stundenplandev' && $stundenplan !== 'stundenplan')
|
||||
$this->terminateWithError($this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL);
|
||||
|
||||
$this->load->library('StundenplanLib');
|
||||
|
||||
$result = $this->stundenplanlib->getEventsByLE($le_id, $start_date, $end_date, $stundenplan);
|
||||
$lvplanEvents = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($lvplanEvents);
|
||||
}
|
||||
|
||||
public function getLvEvents($lv_id = null, $start_date = null, $end_date = null, $stundenplan = 'stundenplandev')
|
||||
{
|
||||
if (is_null($lv_id) || is_null($start_date) || is_null($end_date))
|
||||
$this->terminateWithError($this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL);
|
||||
|
||||
if ($stundenplan !== 'stundenplandev' && $stundenplan !== 'stundenplan')
|
||||
$this->terminateWithError($this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL);
|
||||
|
||||
$this->load->library('StundenplanLib');
|
||||
|
||||
$result = $this->stundenplanlib->getEventsByLV($lv_id, $start_date, $end_date, $stundenplan);
|
||||
|
||||
$this->terminateWithSuccess(hasData($result) ? getData($result) : []);
|
||||
}
|
||||
|
||||
//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);
|
||||
}
|
||||
@@ -250,10 +262,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
|
||||
@@ -266,25 +278,27 @@ 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);
|
||||
|
||||
// get data
|
||||
$this->load->library('StundenplanLib');
|
||||
|
||||
$result = $this->stundenplanlib->getReservierungen($start_date, $end_date, $ort_kurzbz);
|
||||
$result = $this->stundenplanlib->getReservierungen($start_date, $end_date, $ort_kurzbz, $uid);
|
||||
|
||||
$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);
|
||||
@@ -327,6 +341,58 @@ class LvPlan extends FHCAPI_Controller
|
||||
return $this->terminateWithSuccess(current($result));
|
||||
}
|
||||
|
||||
public function getStudiengaenge()
|
||||
{
|
||||
$this->load->model('organisation/Studiengang_model', 'StudiengangModel');
|
||||
|
||||
$this->StudiengangModel->addOrder('typ');
|
||||
$this->StudiengangModel->addOrder('kurzbz');
|
||||
$result = $this->StudiengangModel->loadWhere([
|
||||
'aktiv' => true
|
||||
]);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
return $this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getLehrverband($studiengang_kz, $semester = null, $verband = null)
|
||||
{
|
||||
$this->load->model('organisation/Lehrverband_model', 'LehrverbandModel');
|
||||
|
||||
$where = [
|
||||
'aktiv' => true,
|
||||
'studiengang_kz' => $studiengang_kz,
|
||||
];
|
||||
|
||||
if ($semester !== null && $semester !== 'null' && $semester !== 'undefined') {
|
||||
$where['semester'] = $semester;
|
||||
}
|
||||
if ($verband !== null && $verband !== 'null' && $verband !== 'undefined') {
|
||||
$where['verband'] = $verband;
|
||||
}
|
||||
|
||||
$this->LehrverbandModel->addOrder('studiengang_kz');
|
||||
$this->LehrverbandModel->addOrder('semester');
|
||||
$this->LehrverbandModel->addOrder('verband');
|
||||
$this->LehrverbandModel->addOrder('gruppe');
|
||||
$result = $this->LehrverbandModel->loadWhere($where);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
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'));
|
||||
}
|
||||
|
||||
/**
|
||||
* fetch moodle events
|
||||
*
|
||||
@@ -339,19 +405,19 @@ class LvPlan extends FHCAPI_Controller
|
||||
$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;
|
||||
},
|
||||
[
|
||||
@@ -371,23 +437,23 @@ class LvPlan extends FHCAPI_Controller
|
||||
* @param string $end_date
|
||||
* @return array
|
||||
*/
|
||||
private function fetchFerienEvents($start_date, $end_date)
|
||||
private function fetchFerienEvents($start_date, $end_date, $uid = null)
|
||||
{
|
||||
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
|
||||
$this->load->model('education/Studentlehrverband_model', 'StudentLehrverbandModel');
|
||||
|
||||
$currentStudiensemester = $this->StudiensemesterModel->getByDate($start_date);
|
||||
$currentStudiensemester = $this->getDataOrTerminateWithError($currentStudiensemester);
|
||||
|
||||
|
||||
if ($currentStudiensemester) {
|
||||
$studentsemester_kurzbz = current($currentStudiensemester)->studiensemester_kurzbz;
|
||||
|
||||
$studiengang = $this->StudentLehrverbandModel->loadWhere([
|
||||
"student_uid" => getAuthUID(),
|
||||
"student_uid" => $uid ?? getAuthUID(),
|
||||
"studiensemester_kurzbz" => $studentsemester_kurzbz
|
||||
]);
|
||||
$studiengang = $this->getDataOrTerminateWithError($studiengang);
|
||||
|
||||
|
||||
if ($studiengang)
|
||||
$studiengang_kz = current($studiengang)->studiengang_kz;
|
||||
else
|
||||
@@ -397,7 +463,7 @@ class LvPlan extends FHCAPI_Controller
|
||||
}
|
||||
|
||||
$ferienEvents = $this->stundenplanlib->fetchFerienTageEvents($start_date, $end_date, $studiengang_kz);
|
||||
|
||||
|
||||
return $this->getDataOrTerminateWithError($ferienEvents);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,929 +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');
|
||||
|
||||
use CI3_Events as Events;
|
||||
|
||||
class Noten extends FHCAPI_Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* Object initialization
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'getStudentenNoten' => array('lehre/benotungstool:rw'),
|
||||
'getNoten' => array('lehre/benotungstool:rw'),
|
||||
'saveStudentenNoten' => array('lehre/benotungstool:rw'),
|
||||
'getNotenvorschlagStudent' => array('lehre/benotungstool:rw'),
|
||||
'saveNotenvorschlag' => array('lehre/benotungstool:rw'),
|
||||
'saveStudentPruefung' => array('lehre/benotungstool:rw'),
|
||||
'createPruefungen' => array('lehre/benotungstool:rw'),
|
||||
'saveNotenvorschlagBulk' => array('lehre/benotungstool:rw'),
|
||||
'savePruefungenBulk' => array('lehre/benotungstool:rw')
|
||||
]);
|
||||
|
||||
$this->load->library('AuthLib', null, 'AuthLib');
|
||||
$this->load->library('PhrasesLib');
|
||||
|
||||
// Loads phrases system
|
||||
$this->loadPhrases([
|
||||
'global',
|
||||
'person',
|
||||
'benotungstool',
|
||||
'lehre',
|
||||
'ui'
|
||||
]);
|
||||
require_once(FHCPATH . 'include/mobilitaet.class.php');
|
||||
|
||||
$this->load->model('education/LePruefung_model', 'LePruefungModel');
|
||||
$this->load->model('education/Lvgesamtnote_model', 'LvgesamtnoteModel');
|
||||
$this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel');
|
||||
$this->load->model('person/Person_model', 'PersonModel');
|
||||
$this->load->model('organisation/Studienplan_model', 'StudienplanModel');
|
||||
$this->load->model('crm/Student_model', 'StudentModel');
|
||||
|
||||
$this->load->helper('hlp_sancho_helper');
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* GET METHOD
|
||||
* expects 'lv_id', 'sem_kurzbz'
|
||||
* returns List of all Students of given lehrveranstaltung and semester and fetches their grades.
|
||||
* Loads LvGesamtnote aswell as Teilnoten from externalSources via getExternalGrades Event.
|
||||
* Calculates the Notenvorschlag for every student based on averaging their Teilnoten.
|
||||
* Finally also fetches all Prüfungen for every student which are linked to lva and semester.
|
||||
*/
|
||||
public function getStudentenNoten() {
|
||||
$lv_id = $this->input->get("lv_id",TRUE);
|
||||
$sem_kurzbz = $this->input->get("sem_kurzbz",TRUE);
|
||||
|
||||
if (!isset($lv_id) || isEmptyString($lv_id)
|
||||
|| !isset($sem_kurzbz) || isEmptyString($sem_kurzbz))
|
||||
$this->terminateWithError($this->p->t('global', 'wrongParameters'), 'general');
|
||||
|
||||
// get studenten for lva & sem with zeugnisnote if available
|
||||
$studenten = $this->LehrveranstaltungModel->getStudentsByLv($sem_kurzbz, $lv_id);
|
||||
$studentenData = $this->getDataOrTerminateWithError($studenten);
|
||||
|
||||
$func = function ($value) {
|
||||
return $value->uid;
|
||||
};
|
||||
|
||||
$grades = array();
|
||||
$student_uids = array_map($func, $studentenData);
|
||||
|
||||
foreach($student_uids as $uid) {
|
||||
$grades[$uid]['grades'] = [];
|
||||
|
||||
$res = $this->StudentModel->load([$uid]);
|
||||
if(!isError($res) && hasData($res)) $student = getData($res)[0];
|
||||
|
||||
$prestudent_id = $student->prestudent_id;
|
||||
|
||||
|
||||
// TODO: last class to get rid of but this one is complicated
|
||||
$mobility = new mobilitaet();
|
||||
$mobility->loadPrestudent($prestudent_id);
|
||||
$output = $mobility->result;
|
||||
$eintrag = '';
|
||||
foreach ($output as $k)
|
||||
{
|
||||
if(($k->mobilitaetstyp_kurzbz == 'GS') && ($k->studiensemester_kurzbz == $sem_kurzbz))
|
||||
$eintrag = ' (d.d.)';
|
||||
}
|
||||
$grades[$uid]['mobility'] = $eintrag;
|
||||
|
||||
$result = $this->LvgesamtnoteModel->getLvGesamtNoten($lv_id, $uid, $sem_kurzbz);
|
||||
|
||||
if(!isError($result) && hasData($result)) {
|
||||
$lvgesamtnote = getData($result)[0];
|
||||
$grades[$uid]['note_lv'] = $lvgesamtnote->note;
|
||||
$grades[$uid]['freigabedatum'] = $lvgesamtnote->freigabedatum;
|
||||
$grades[$uid]['benotungsdatum'] = $lvgesamtnote->benotungsdatum;
|
||||
$grades[$uid]['punkte_lv'] = $lvgesamtnote->punkte;
|
||||
} else {
|
||||
$grades[$uid]['note_lv'] = null;
|
||||
$grades[$uid]['freigabedatum'] = null;
|
||||
$grades[$uid]['benotungsdatum'] = null;
|
||||
$grades[$uid]['punkte_lv'] = null;
|
||||
}
|
||||
}
|
||||
|
||||
// send $grades reference to moodle addon
|
||||
Events::trigger(
|
||||
'getExternalGrades',
|
||||
function & () use (&$grades)
|
||||
{
|
||||
return $grades;
|
||||
},
|
||||
[
|
||||
'lvid' => $lv_id,
|
||||
'stsem' => $sem_kurzbz
|
||||
]
|
||||
);
|
||||
|
||||
// calculate notenvorschläge from teilnoten
|
||||
foreach($studentenData as $student) {
|
||||
$g = $grades[$student->uid]['grades'];
|
||||
$note_lv = $grades[$student->uid]['note_lv'];
|
||||
|
||||
// overwrite any calculation with lv note once available
|
||||
if(!is_null($note_lv)) {
|
||||
$student->note_vorschlag = $note_lv;
|
||||
} else if(count($g) > 0) {
|
||||
|
||||
$notensumme = 0;
|
||||
$notensumme_gewichtet = 0;
|
||||
$gewichtsumme = 0;
|
||||
$punktesumme = 0;
|
||||
$punktesumme_gewichtet = 0;
|
||||
$anzahlnoten = 0;
|
||||
foreach($g as $teilnote) {
|
||||
if (is_numeric($teilnote['grade']) || (is_null($teilnote['grade']) && is_numeric($teilnote['points'])))
|
||||
{
|
||||
$notensumme += $teilnote['grade'];
|
||||
$punktesumme += $teilnote['points'];
|
||||
$notensumme_gewichtet += $teilnote['grade'] * $teilnote['weight'];
|
||||
$punktesumme_gewichtet += $teilnote['points'] * $teilnote['weight'];
|
||||
$gewichtsumme += $teilnote['weight'];
|
||||
$anzahlnoten += 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// TODO: develop the punkte feature with models
|
||||
// calculate grades points from notenschlüssel
|
||||
if (CIS_GESAMTNOTE_PUNKTE)
|
||||
{
|
||||
if (defined('CIS_GESAMTNOTE_GEWICHTUNG') && CIS_GESAMTNOTE_GEWICHTUNG)
|
||||
{
|
||||
// Lehreinheitsgewichtung
|
||||
$punkte_vorschlag = round($punktesumme_gewichtet / $gewichtsumme, 2);
|
||||
$notenschluessel = new notenschluessel();
|
||||
$note_vorschlag = $notenschluessel->getNote($punkte_vorschlag, $lv_id, $sem_kurzbz);
|
||||
}
|
||||
else
|
||||
{
|
||||
$punkte_vorschlag = round($punktesumme / $anzahlnoten, 2);
|
||||
$notenschluessel = new notenschluessel();
|
||||
$note_vorschlag = $notenschluessel->getNote($punkte_vorschlag, $lv_id, $sem_kurzbz);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (defined('CIS_GESAMTNOTE_GEWICHTUNG') && CIS_GESAMTNOTE_GEWICHTUNG)
|
||||
{
|
||||
$note_vorschlag = round($notensumme_gewichtet / $gewichtsumme);
|
||||
}
|
||||
else
|
||||
{
|
||||
$note_vorschlag = round($notensumme / $anzahlnoten);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$student->note_vorschlag = $note_vorschlag;
|
||||
}
|
||||
}
|
||||
|
||||
// get all prüfungen with noten held in that semester in that lva
|
||||
$pruefungen = $this->LePruefungModel->getPruefungenByLvStudiensemester($lv_id, $sem_kurzbz);
|
||||
$pruefungenData = getData($pruefungen);
|
||||
|
||||
$this->terminateWithSuccess(array($studentenData, $pruefungenData, DOMAIN, $grades));
|
||||
}
|
||||
|
||||
/**
|
||||
* GET METHOD
|
||||
* returns List of all available & active NotenOptions
|
||||
*/
|
||||
public function getNoten() {
|
||||
$this->load->model('education/Note_model', 'NoteModel');
|
||||
|
||||
$result = $this->NoteModel->getAllActive();
|
||||
$noten = $this->getDataOrTerminateWithError($result);
|
||||
$this->terminateWithSuccess($noten);
|
||||
}
|
||||
|
||||
/**
|
||||
* POST METHOD
|
||||
* expects 'lv_id', 'sem_kurzbz', 'password', 'noten'
|
||||
* Notenfreigabe method which checks the users password as a security measure.
|
||||
* Tries to load Lehrveranstaltung, Studiengang and Person via Model in order to validate the coherency of input parameters
|
||||
* lv_id & sem_kurzbz in relation to the noten array delivered.
|
||||
* Updates the LvGesamtnote note, aswell as freigabedatum, which is key in the logic of the freigegeben/offen/changed notenStatus
|
||||
* Along this process builds a html table to be placed in a confirmation email (uid only and full variant depending on config)
|
||||
* which is being sent to the Lektor, aswell as the assigned Assistenz.
|
||||
*/
|
||||
public function saveStudentenNoten() {
|
||||
$result = $this->getPostJSON();
|
||||
|
||||
if(!property_exists($result, 'sem_kurzbz') || !property_exists($result, 'lv_id') ||
|
||||
!property_exists($result, 'password') || !property_exists($result, 'noten')) {
|
||||
$this->terminateWithError($this->p->t('global', 'missingParameters'), 'general');
|
||||
}
|
||||
|
||||
if(!$this->AuthLib->checkUserAuthByUsernamePassword(getAuthUID(), $result->password)->retval) {
|
||||
$this->terminateWithError($this->p->t('global', 'wrongPassword'), 'general');
|
||||
}
|
||||
|
||||
$lv_id = $result->lv_id;
|
||||
$sem_kurzbz = $result->sem_kurzbz;
|
||||
|
||||
$ret = [];
|
||||
|
||||
$res = $this->LehrveranstaltungModel->load($lv_id);
|
||||
if(isError($res) || !hasData($res)) {
|
||||
$this->terminateWithError($this->p->t('benotungstool', 'noValidLvFoundForId', [$lv_id]));
|
||||
}
|
||||
|
||||
$lv = getData($res)[0];
|
||||
|
||||
$studiengang_kz = $lv->studiengang_kz;
|
||||
$res = $this->StudiengangModel->load($studiengang_kz);
|
||||
if(isError($res) || !hasData($res)) {
|
||||
$this->terminateWithError($this->p->t('benotungstool', 'noValidStudiengangFoundForId', [$studiengang_kz]));
|
||||
}
|
||||
$sg = getData($res)[0];
|
||||
$lvaFullName = $sg->kurzbzlang . ' ' . $lv->semester . '.Semester
|
||||
' . $lv->bezeichnung . " - " .$lv->lehrform_kurzbz. " " . $lv->orgform_kurzbz . " - " . $sem_kurzbz;
|
||||
|
||||
$emails = explode(', ', $sg->email);
|
||||
|
||||
|
||||
$res = $this->PersonModel->load(getAuthPersonId());
|
||||
if(isError($res) || !hasData($res)) {
|
||||
$this->terminateWithError($this->p->t('benotungstool', 'noValidPersonFoundForId', [getAuthPersonId()]));
|
||||
}
|
||||
$pers = getData($res)[0];
|
||||
$lektorFullName = $pers->anrede.' '.$pers->vorname.' '.$pers->nachname; //.' ('.$pers->kurzbz.')';
|
||||
|
||||
|
||||
$res = $this->StudienplanModel->getStudienplanByLvaSemKurzbz($lv_id, $sem_kurzbz);
|
||||
$data = getData($res);
|
||||
$studienplan_bezeichnung = '';
|
||||
foreach ($data as $row) {
|
||||
$studienplan_bezeichnung .= $row->bezeichnung . ' ';
|
||||
}
|
||||
$betreff = $this->p->t('benotungstool','notenfreigabe').' ' . $lv->bezeichnung . ' ' . $lv->orgform_kurzbz . ' - ' . $studienplan_bezeichnung;
|
||||
|
||||
$studlist = "<table border='1'><tr>";
|
||||
|
||||
if (defined('CIS_GESAMTNOTE_FREIGABEMAIL_NOTE') && CIS_GESAMTNOTE_FREIGABEMAIL_NOTE) {
|
||||
$studlist .= "<td><b>" . $this->p->t('person','personenkennzeichen') . "</b></td>\n
|
||||
<td><b>" . $this->p->t('lehre','studiengang') . "</b></td>\n
|
||||
<td><b>" . $this->p->t('benotungstool','c4nachname') . "</b></td>\n
|
||||
<td><b>" . $this->p->t('benotungstool','c4vorname') . "</b></td>\n";
|
||||
$studlist .= "<td><b>" . $this->p->t('benotungstool','c4grade') . "</b></td>\n";
|
||||
$studlist .= "<td><b>" . $this->p->t('ui','bearbeitetVon') . "</b></td></tr>\n";
|
||||
} else {
|
||||
$studlist .= "<td><b>" . $this->p->t('person','uid') . "</b></td></tr>\n";
|
||||
}
|
||||
|
||||
foreach($result->noten as $note) {
|
||||
|
||||
$resultLVGes = $this->LvgesamtnoteModel->getLvGesamtNoten($lv_id, $note->uid, $sem_kurzbz);
|
||||
|
||||
if (!isError($resultLVGes) && hasData($resultLVGes))
|
||||
{
|
||||
$lvgesamtnote = getData($resultLVGes)[0];
|
||||
|
||||
if ($lvgesamtnote->benotungsdatum > $lvgesamtnote->freigabedatum)
|
||||
{
|
||||
|
||||
$id = $this->LvgesamtnoteModel->update(
|
||||
[$lvgesamtnote->student_uid, $lvgesamtnote->studiensemester_kurzbz, $lvgesamtnote->lehrveranstaltung_id],
|
||||
array(
|
||||
'note' => $note->note,
|
||||
'freigabevon_uid' => getAuthUID(),
|
||||
'freigabedatum' => date("Y-m-d H:i:s"),
|
||||
'updateamum' => date("Y-m-d H:i:s"),
|
||||
'updatevon' => getAuthUID()
|
||||
)
|
||||
);
|
||||
|
||||
if($id) {
|
||||
$res = $this->LvgesamtnoteModel->load($id->retval);
|
||||
if(hasData($res)) {
|
||||
$lvgesamtnote = getData($res)[0];
|
||||
$ret[] = array('uid' => $note->uid, 'freigabedatum' => $lvgesamtnote->freigabedatum, 'benotungsdatum' => $lvgesamtnote->benotungsdatum);
|
||||
}
|
||||
}
|
||||
|
||||
if (defined('CIS_GESAMTNOTE_FREIGABEMAIL_NOTE') && CIS_GESAMTNOTE_FREIGABEMAIL_NOTE)
|
||||
{
|
||||
$studlist .= "<tr><td>" . trim($note->matrikelnr) . "</td>";
|
||||
$studlist .= "<td>" . trim($note->kuerzel) . "</td>";
|
||||
$studlist .= "<td>" . trim($note->nachname) . "</td>";
|
||||
$studlist .= "<td>" . trim($note->vorname) . "</td>";
|
||||
|
||||
// TODO: if defined(CIS_PUNKTE) ...
|
||||
$studlist .= "<td>" .$note->noteBezeichnung. "</td>";
|
||||
|
||||
$studlist .= "<td>" . $lvgesamtnote->mitarbeiter_uid;
|
||||
if ($lvgesamtnote->updatevon != '')
|
||||
$studlist .= " (" . $lvgesamtnote->updatevon . ")";
|
||||
$studlist .= "</td></tr>";
|
||||
} else {
|
||||
$studlist .= "<tr><td>" . trim($note->uid) . "</td></tr>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$studlist .= "</table>";
|
||||
|
||||
// always send the mail, config toggles data contents
|
||||
$this->sendEmail($lektorFullName, $lvaFullName, count($result->noten), $emails, $studlist, $betreff);
|
||||
|
||||
$this->terminateWithSuccess($ret);
|
||||
}
|
||||
|
||||
|
||||
private function sendEmail($lektorFullName, $lvaFullName, $notenCount, $emailAdressen, $studlist, $betreff)
|
||||
{
|
||||
$emailAdressen[] = getAuthUID() . "@" . DOMAIN; // also send mail to lektors own adress
|
||||
$adressen = implode(";", $emailAdressen);
|
||||
|
||||
foreach ($emailAdressen as $email)
|
||||
{
|
||||
// Prepare mail content
|
||||
$body_fields = array(
|
||||
'lektor' => $lektorFullName,
|
||||
'lvaname' => $lvaFullName,
|
||||
'studlist' => $studlist,
|
||||
'neuenotencount' => $notenCount,
|
||||
'adressen' => $adressen
|
||||
);
|
||||
|
||||
// Send mail
|
||||
sendSanchoMail(
|
||||
'Notenfreigabe',
|
||||
$body_fields,
|
||||
$email,
|
||||
$betreff
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* GET METHOD
|
||||
* should return Notenvorschlag for single Students, not yet implemented since it is not needed anywhere right now,
|
||||
* but could be useful later on.
|
||||
*/
|
||||
public function getNotenvorschlagStudent() {
|
||||
// TODO: Notenvorschlag laden allgemeiner Endpunkt, der im Backend mit Logik (z.B. Moodle) angepasst werden kann.
|
||||
|
||||
$this->terminateWithSuccess();
|
||||
}
|
||||
|
||||
/**
|
||||
* POST METHOD
|
||||
* expects 'datum', 'lva_id', 'student_uid', 'note'
|
||||
* Inserts or updates a pruefung for lva & student_uid at given datum (YYYY-MM-DD). When creating a new
|
||||
* Pruefung, sets the provided (Prüfungs-) Note.
|
||||
* Updates the LvGesamtnote of student.
|
||||
* Can return 1 or 2 Prüfungen, since the original grade before the first prüfung is being saved as "Termin1" when
|
||||
* a "Termin2" is being created.
|
||||
*/
|
||||
public function saveStudentPruefung() { // einzelne pruefung speichern
|
||||
$result = $this->getPostJSON();
|
||||
|
||||
if(!property_exists($result, 'datum') || !property_exists($result, 'lva_id') ||
|
||||
!property_exists($result, 'student_uid') || !property_exists($result, 'note')) {
|
||||
$this->terminateWithError($this->p->t('global', 'missingParameters'), 'general');
|
||||
}
|
||||
|
||||
$student_uid = $result->student_uid;
|
||||
$note = $result->note;
|
||||
$punkte = null;
|
||||
$datum = $result->datum;
|
||||
$lva_id = $result->lva_id;
|
||||
$lehreinheit_id = $result->lehreinheit_id;
|
||||
|
||||
$stsem = $result->sem_kurzbz;
|
||||
$typ = $result->typ;
|
||||
|
||||
$jetzt = date("Y-m-d H:i:s");
|
||||
|
||||
// nachpruefungeintragen.php script calls query on campus.student_lehrveranstaltung to find a
|
||||
// lehreinheit_id for lva_id -> lehreinheit should be determined prior to that in new benotungstool
|
||||
// by retrieving it from students row in campus.vw_student_lehrveranstaltung earlier on
|
||||
|
||||
// $lehreinheit_id = getLehreinheit($db, $lvid, $student_uid, $stsem);
|
||||
// $lehreinheit_id = $result->lehreinheit_id;
|
||||
|
||||
$punkte = null;
|
||||
|
||||
// if($punkte!='')
|
||||
// {
|
||||
// // Bei Punkteeingabe wird die Note nochmals geprueft und ggf korrigiert
|
||||
// $notenschluessel = new notenschluessel();
|
||||
// $note_pruef = $notenschluessel->getNote($punkte, $lva_id, $stsem);
|
||||
// if($note_pruef!=$note)
|
||||
// {
|
||||
// $note = $note_pruef;
|
||||
// $note_dirty=true;
|
||||
// }
|
||||
// }
|
||||
|
||||
// TODO: more sophisticated empty check
|
||||
if($note=='')
|
||||
$note = 9;
|
||||
|
||||
|
||||
$this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel');
|
||||
$this->load->model('organisation/Studiengang_model', 'StudiengangModel');
|
||||
|
||||
$res = $this->LehrveranstaltungModel->load($lva_id);
|
||||
if(isError($res) || !hasData($res)) {
|
||||
$this->terminateWithError('Keine gültige Lehrveranstaltung gefunden für ID: '.$lva_id);
|
||||
}
|
||||
|
||||
$studiengang_kz = getData($res)[0]->studiengang_kz;
|
||||
$res = $this->StudiengangModel->load($studiengang_kz);
|
||||
if(isError($res) || !hasData($res)) {
|
||||
$this->terminateWithError('Kein gültiger Studiengang gefunden für ID: '.$studiengang_kz);
|
||||
}
|
||||
|
||||
$pruefungenChanged = $this->savePruefungstermin($typ, $student_uid, $lva_id, $stsem, $lehreinheit_id, $note, $punkte, $datum);
|
||||
|
||||
//Gesamtnote updaten
|
||||
$result = $this->LvgesamtnoteModel->getLvGesamtNoten($lva_id, $student_uid, $stsem);
|
||||
if(!isError($result) && !hasData($result)) {
|
||||
|
||||
$id = $this->LvgesamtnoteModel->insert(
|
||||
array(
|
||||
'student_uid' => $student_uid,
|
||||
'lehrveranstaltung_id' => $lva_id,
|
||||
'studiensemester_kurzbz' => $stsem,
|
||||
'note' => $note,
|
||||
'punkte' => $punkte,
|
||||
'mitarbeiter_uid' => getAuthUID(),
|
||||
'benotungsdatum' => $jetzt,
|
||||
'freigabedatum' => null,
|
||||
'freigabevon_uid' => null,
|
||||
'bemerkung' => null,
|
||||
'updateamum' => null,
|
||||
'updatevon' => null,
|
||||
'insertamum' => $jetzt,
|
||||
'insertvon' => getAuthUID()
|
||||
)
|
||||
);
|
||||
if($id) {
|
||||
$res = $this->LvgesamtnoteModel->load($id->retval);
|
||||
if(hasData($res)) $lvgesamtnote = getData($res)[0];
|
||||
}
|
||||
}
|
||||
else if(!isError($result) && hasData($result))
|
||||
{
|
||||
$lvgesamtnote = getData($result)[0];
|
||||
|
||||
$id = $this->LvgesamtnoteModel->update(
|
||||
[$lvgesamtnote->student_uid, $lvgesamtnote->studiensemester_kurzbz, $lvgesamtnote->lehrveranstaltung_id],
|
||||
array(
|
||||
'note' => $note,
|
||||
'punkte' => $punkte,
|
||||
'benotungsdatum' => $jetzt,
|
||||
'updateamum' => $jetzt,
|
||||
'updatevon' => getAuthUID()
|
||||
)
|
||||
);
|
||||
|
||||
if($id) {
|
||||
$res = $this->LvgesamtnoteModel->load($id->retval);
|
||||
if(hasData($res)) $lvgesamtnote = getData($res)[0];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$savedPruefung = $pruefungenChanged['savedPruefung'] ?? null;
|
||||
$extraPruefung = $pruefungenChanged['extraPruefung'] ?? null;
|
||||
|
||||
$savedPruefungData = count($savedPruefung) > 0 ? $savedPruefung[0] : null;
|
||||
$extraPruefungData = count($extraPruefung) > 0 ? $extraPruefung[0] : null;
|
||||
|
||||
$this->terminateWithSuccess(array($savedPruefungData, $lvgesamtnote, $extraPruefungData));
|
||||
}
|
||||
|
||||
/**
|
||||
* private helper method to update/insert pruefungstermine
|
||||
*/
|
||||
private function savePruefungstermin($typ, $student_uid, $lva_id, $stsem, $lehreinheit_id, $note, $punkte, $datum)
|
||||
{
|
||||
|
||||
$status = [];
|
||||
|
||||
// send $grades reference to moodle addon
|
||||
Events::trigger(
|
||||
'getEntschuldigungsStatusForStudentOnDate',
|
||||
function & () use (&$status)
|
||||
{
|
||||
return $status;
|
||||
},
|
||||
[
|
||||
'student_uid' => $student_uid,
|
||||
'datum' => $datum
|
||||
]
|
||||
);
|
||||
|
||||
if(count($status) > 0 && $status[0] == true) {
|
||||
$note = 17; //entschuldigt
|
||||
}
|
||||
|
||||
$jetzt = date("Y-m-d H:i:s");
|
||||
|
||||
$pruefungenChanged = [];
|
||||
|
||||
$this->load->model('education/Lvgesamtnote_model', 'LvgesamtnoteModel');
|
||||
|
||||
if($typ == "Termin2" && defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN2') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN2)
|
||||
{
|
||||
|
||||
// Wenn eine Nachprüfung angelegt wird, wird zuerst eine Pruefung mit 1. Termin angelegt welche für die ursprüngliche Note
|
||||
// vor den Prüfungsantritten zählt
|
||||
|
||||
$result1 = $this->LePruefungModel->getPruefungenByUidTypLvStudiensemester($student_uid, "Termin1", $lva_id, $stsem);
|
||||
|
||||
// if there is a termin 1 entry already do nothing
|
||||
if(!isError($result1) && hasData($result1)) {
|
||||
|
||||
} else if(!isError($result1) && !hasData($result1)) {
|
||||
// new entry termin1
|
||||
|
||||
$resultLV = $this->LvgesamtnoteModel->getLvGesamtNoten($lva_id, $student_uid, $stsem);
|
||||
|
||||
// update Termin1 note
|
||||
if (hasData($resultLV))
|
||||
{
|
||||
$lvgesamtnote = getData($resultLV)[0];
|
||||
$pr_note = $lvgesamtnote->note;
|
||||
$pr_punkte = $lvgesamtnote->punkte;
|
||||
$benotungsdatum = $lvgesamtnote->benotungsdatum;
|
||||
}
|
||||
else if(!hasData($resultLV))// set Termin1 note to "noch nicht eingetragen"
|
||||
{
|
||||
$pr_note = 9;
|
||||
$pr_punkte = null;
|
||||
$benotungsdatum = $jetzt;
|
||||
}
|
||||
|
||||
$id = $this->LePruefungModel->insert(
|
||||
array(
|
||||
'lehreinheit_id' => $lehreinheit_id,
|
||||
'student_uid' => $student_uid,
|
||||
'mitarbeiter_uid' => getAuthUID(),
|
||||
'note' => $pr_note,
|
||||
// 'punkte' => $pr_punkte,
|
||||
'pruefungstyp_kurzbz' => "Termin1",
|
||||
'datum' => $benotungsdatum,
|
||||
'anmerkung' => "",
|
||||
'insertamum' => $jetzt,
|
||||
'insertvon' => getAuthUID(),
|
||||
'updateamum' => null,
|
||||
'updatevon' => null,
|
||||
'ext_id' => null
|
||||
)
|
||||
);
|
||||
if($id) {
|
||||
$res = $this->LePruefungModel->load($id->retval);
|
||||
if(hasData($res)) $pruefungenChanged['extraPruefung'] = getData($res);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Die Pruefung wird als Termin2 eingetragen
|
||||
$result2 = $this->LePruefungModel->getPruefungenByUidTypLvStudiensemester($student_uid, "Termin2", $lva_id, $stsem);
|
||||
// if there is a termin 2 entry already update it
|
||||
if(!isError($result2) && hasData($result2)) {
|
||||
// update
|
||||
$termin2 = getData($result2)[0];
|
||||
$id = $this->LePruefungModel->update(
|
||||
$termin2->pruefung_id,
|
||||
array(
|
||||
'updateamum' => $jetzt,
|
||||
'updatevon' => getAuthUID(),
|
||||
'note' => $note,
|
||||
// 'punkte' => $punkte,
|
||||
'datum' => $datum,
|
||||
'anmerkung' => ""
|
||||
)
|
||||
);
|
||||
if($id) {
|
||||
$res = $this->LePruefungModel->load($id->retval);
|
||||
if(hasData($res)) $pruefungenChanged['savedPruefung'] = getData($res);
|
||||
}
|
||||
|
||||
} else if(!isError($result2) && !hasData($result2)) {
|
||||
// new entry termin 2
|
||||
|
||||
$id = $this->LePruefungModel->insert(
|
||||
array(
|
||||
'lehreinheit_id' => $lehreinheit_id,
|
||||
'student_uid' => $student_uid,
|
||||
'mitarbeiter_uid' => getAuthUID(),
|
||||
'note' => $note,
|
||||
// 'punkte' => null,//$punkte,
|
||||
'pruefungstyp_kurzbz' => $typ,
|
||||
'datum' => $datum,
|
||||
'anmerkung' => "",
|
||||
'insertamum' => $jetzt,
|
||||
'insertvon' => getAuthUID(),
|
||||
'updateamum' => null,
|
||||
'updatevon' => null,
|
||||
'ext_id' => null
|
||||
)
|
||||
);
|
||||
if($id) {
|
||||
$res = $this->LePruefungModel->load($id->retval);
|
||||
if(hasData($res)) $pruefungenChanged['savedPruefung'] = getData($res);
|
||||
}
|
||||
}
|
||||
|
||||
} else if($typ == "Termin3" && defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN3') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN3)
|
||||
{
|
||||
|
||||
$result3 = $this->LePruefungModel->getPruefungenByUidTypLvStudiensemester($student_uid, "Termin3", $lva_id, $stsem);
|
||||
|
||||
if(!isError($result3) && hasData($result3)) {
|
||||
// update
|
||||
$termin3 = getData($result3)[0];
|
||||
|
||||
$id = $this->LePruefungModel->update(
|
||||
$termin3->pruefung_id,
|
||||
array(
|
||||
'updateamum' => $jetzt,
|
||||
'updatevon' => getAuthUID(),
|
||||
'note' => $note,
|
||||
// 'punkte' => $punkte,
|
||||
'datum' => $datum,
|
||||
'anmerkung' => ""
|
||||
)
|
||||
);
|
||||
if($id) {
|
||||
$res = $this->LePruefungModel->load($id->retval);
|
||||
if(hasData($res)) $pruefungenChanged['savedPruefung'] = getData($res);
|
||||
}
|
||||
|
||||
} else if(!isError($result3) && !hasData($result3)) {
|
||||
// insert new termin3
|
||||
|
||||
$id = $this->LePruefungModel->insert(
|
||||
array(
|
||||
'lehreinheit_id' => $lehreinheit_id,
|
||||
'student_uid' => $student_uid,
|
||||
'mitarbeiter_uid' => getAuthUID(),
|
||||
'note' => $note,
|
||||
// 'punkte' => null,//$punkte,
|
||||
'pruefungstyp_kurzbz' => $typ,
|
||||
'datum' => $datum,
|
||||
'anmerkung' => "",
|
||||
'insertamum' => $jetzt,
|
||||
'insertvon' => getAuthUID(),
|
||||
'updateamum' => null,
|
||||
'updatevon' => null,
|
||||
'ext_id' => null
|
||||
)
|
||||
);
|
||||
if($id) {
|
||||
$res = $this->LePruefungModel->load($id->retval);
|
||||
if(hasData($res)) $pruefungenChanged['savedPruefung'] = getData($res);
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
$this->terminateWithError($this->p->t('benotungstool', 'wrongPruefungType', [$student_uid, $typ]), 'general');
|
||||
}
|
||||
|
||||
return $pruefungenChanged;
|
||||
}
|
||||
|
||||
/**
|
||||
* POST METHOD
|
||||
* expects 'sem_kurzbz', 'lv_id', 'student_uid', 'note'
|
||||
* Method that sets lv_note of student in lva and semester from provided Points/Grade Selection.
|
||||
* Updates the note & benotungsdatum, which is key in the noten state offen/freigegeben/changed
|
||||
*/
|
||||
public function saveNotenvorschlag() {
|
||||
$result = $this->getPostJSON();
|
||||
|
||||
if(!property_exists($result, 'lv_id') || !property_exists($result, 'sem_kurzbz') ||
|
||||
!property_exists($result, 'student_uid') || !property_exists($result, 'note')) {
|
||||
$this->terminateWithError($this->p->t('global', 'missingParameters'), 'general');
|
||||
}
|
||||
|
||||
$lv_id = $result->lv_id;
|
||||
$student_uid = $result->student_uid;
|
||||
$sem_kurzbz = $result->sem_kurzbz;
|
||||
$note = $result->note;
|
||||
|
||||
$result = $this->LvgesamtnoteModel->getLvGesamtNoten($lv_id, $student_uid, $sem_kurzbz);
|
||||
|
||||
if(!isError($result) && hasData($result)) {
|
||||
$lvgesamtnote = getData($result)[0];
|
||||
|
||||
$id = $this->LvgesamtnoteModel->update(
|
||||
[$lvgesamtnote->student_uid, $lvgesamtnote->studiensemester_kurzbz, $lvgesamtnote->lehrveranstaltung_id],
|
||||
array(
|
||||
'note' => $note,
|
||||
'punkte' => null,
|
||||
'benotungsdatum' => date("Y-m-d H:i:s"),
|
||||
'updateamum' => date("Y-m-d H:i:s"),
|
||||
'updatevon' => getAuthUID()
|
||||
)
|
||||
);
|
||||
|
||||
if($id) {
|
||||
$res = $this->LvgesamtnoteModel->load($id->retval);
|
||||
if(hasData($res)) $lvgesamtnote = getData($res)[0];
|
||||
}
|
||||
} else if(!isError($result) && !hasData($result)) {
|
||||
$id = $this->LvgesamtnoteModel->insert(
|
||||
array(
|
||||
'student_uid' => $student_uid,
|
||||
'lehrveranstaltung_id' => $lv_id,
|
||||
'studiensemester_kurzbz' => $sem_kurzbz,
|
||||
'note' => $note,
|
||||
'punkte' => null,
|
||||
'mitarbeiter_uid' => getAuthUID(),
|
||||
'benotungsdatum' => date("Y-m-d H:i:s"),
|
||||
'freigabedatum' => null,
|
||||
'freigabevon_uid' => null,
|
||||
'bemerkung' => null,
|
||||
'updateamum' => null,
|
||||
'updatevon' => null,
|
||||
'insertamum' => date("Y-m-d H:i:s"),
|
||||
'insertvon' => getAuthUID()
|
||||
)
|
||||
);
|
||||
if($id) {
|
||||
$res = $this->LvgesamtnoteModel->load($id->retval);
|
||||
if(hasData($res)) $lvgesamtnote = getData($res)[0];
|
||||
}
|
||||
}
|
||||
|
||||
$this->terminateWithSuccess(array($lvgesamtnote));
|
||||
}
|
||||
|
||||
/**
|
||||
* POST METHOD
|
||||
* expects 'sem_kurzbz', 'lv_id', 'noten'
|
||||
* Bulk variant of saveNotenvorschlag, used when importing grades from csv.
|
||||
*/
|
||||
public function saveNotenvorschlagBulk() {
|
||||
$result = $this->getPostJSON();
|
||||
|
||||
if(!property_exists($result, 'lv_id') || !property_exists($result, 'sem_kurzbz') ||
|
||||
!property_exists($result, 'noten')) {
|
||||
$this->terminateWithError($this->p->t('global', 'missingParameters'), 'general');
|
||||
}
|
||||
|
||||
$lv_id = $result->lv_id;
|
||||
$sem_kurzbz = $result->sem_kurzbz;
|
||||
$noten = $result->noten;
|
||||
|
||||
$retLvNoten = [];
|
||||
|
||||
foreach($noten as $note)
|
||||
{
|
||||
|
||||
$result = $this->LvgesamtnoteModel->getLvGesamtNoten($lv_id, $note->uid, $sem_kurzbz);
|
||||
|
||||
if(!isError($result) && hasData($result)) {
|
||||
$lvgesamtnote = getData($result)[0];
|
||||
|
||||
$id = $this->LvgesamtnoteModel->update(
|
||||
[$lvgesamtnote->student_uid, $lvgesamtnote->studiensemester_kurzbz, $lvgesamtnote->lehrveranstaltung_id],
|
||||
array(
|
||||
'note' => trim($note->note),
|
||||
'punkte' => null,
|
||||
'benotungsdatum' => date("Y-m-d H:i:s"),
|
||||
'updateamum' => date("Y-m-d H:i:s"),
|
||||
'updatevon' => getAuthUID()
|
||||
)
|
||||
);
|
||||
|
||||
if($id) {
|
||||
$res = $this->LvgesamtnoteModel->load($id->retval);
|
||||
if(hasData($res)) $lvgesamtnote = getData($res)[0];
|
||||
}
|
||||
} else if(!isError($result) && !hasData($result)) {
|
||||
$id = $this->LvgesamtnoteModel->insert(
|
||||
array(
|
||||
'student_uid' => $note->uid,
|
||||
'lehrveranstaltung_id' => $lv_id,
|
||||
'studiensemester_kurzbz' => $sem_kurzbz,
|
||||
'note' => trim($note->note),
|
||||
'punkte' => null,
|
||||
'mitarbeiter_uid' => getAuthUID(),
|
||||
'benotungsdatum' => date("Y-m-d H:i:s"),
|
||||
'freigabedatum' => null,
|
||||
'freigabevon_uid' => null,
|
||||
'bemerkung' => null,
|
||||
'updateamum' => null,
|
||||
'updatevon' => null,
|
||||
'insertamum' => date("Y-m-d H:i:s"),
|
||||
'insertvon' => getAuthUID()
|
||||
)
|
||||
);
|
||||
if($id) {
|
||||
$res = $this->LvgesamtnoteModel->load($id->retval);
|
||||
if(hasData($res)) $lvgesamtnote = getData($res)[0];
|
||||
}
|
||||
}
|
||||
|
||||
$retLvNoten[] = $lvgesamtnote;
|
||||
}
|
||||
|
||||
$this->terminateWithSuccess($retLvNoten);
|
||||
}
|
||||
|
||||
/**
|
||||
* POST METHOD
|
||||
* expects 'uids', 'datum'
|
||||
* Bulk variant of saveStudentPruefung, used when creating a new Prüfung for several students. Always sets note to
|
||||
* "noch nicht eingetragen" for the created Prüfung.
|
||||
*/
|
||||
public function createPruefungen() {
|
||||
$result = $this->getPostJSON();
|
||||
|
||||
if(!property_exists($result, 'uids') || !property_exists($result, 'datum')) {
|
||||
$this->terminateWithError($this->p->t('global', 'missingParameters'), 'general');
|
||||
}
|
||||
|
||||
$uids = $result->uids;
|
||||
$datum = $result->datum;
|
||||
$lva_id = $result->lva_id;
|
||||
|
||||
$stsem = $result->sem_kurzbz;
|
||||
|
||||
$ret = [];
|
||||
|
||||
foreach ($uids as $student) {
|
||||
$student_uid = $student->uid;
|
||||
$typ = $student->typ;
|
||||
$note = 9; //$result->note; // TODO: parameterize for import maybe
|
||||
$punkte = ''; // TODO: check punkte feature
|
||||
|
||||
$lehreinheit_id = $student->lehreinheit_id;
|
||||
$ret[$student->uid] = $this->savePruefungstermin($typ, $student_uid, $lva_id, $stsem, $lehreinheit_id, $note, $punkte, $datum);
|
||||
}
|
||||
|
||||
$this->terminateWithSuccess($ret);
|
||||
}
|
||||
|
||||
/**
|
||||
* POST METHOD
|
||||
* expects 'lv_id', 'sem_kurzbz', 'pruefungen'
|
||||
* Bulk variant of saveStudentPruefung, used when importing pruefungsdata from csv with available noten.
|
||||
*/
|
||||
public function savePruefungenBulk() {
|
||||
$result = $this->getPostJSON();
|
||||
|
||||
if(!property_exists($result, 'lv_id') || !property_exists($result, 'sem_kurzbz') ||
|
||||
!property_exists($result, 'pruefungen')) {
|
||||
$this->terminateWithError($this->p->t('global', 'missingParameters'), 'general');
|
||||
}
|
||||
|
||||
$lv_id = $result->lv_id;
|
||||
$sem_kurzbz = $result->sem_kurzbz;
|
||||
$pruefungen = $result->pruefungen;
|
||||
|
||||
$ret = [];
|
||||
|
||||
foreach ($pruefungen as $pruefung) {
|
||||
$student_uid = $pruefung->uid;
|
||||
$typ = $pruefung->typ;
|
||||
$note = $pruefung->note; // TODO: parameterize for import maybe
|
||||
$datum = $pruefung->datum;
|
||||
$punkte = ''; // TODO: check punkte feature
|
||||
|
||||
$lehreinheit_id = $pruefung->lehreinheit_id;
|
||||
$ret[$student_uid] = $this->savePruefungstermin($typ, $student_uid, $lv_id, $sem_kurzbz, $lehreinheit_id, $note, $punkte, $datum);
|
||||
}
|
||||
|
||||
$this->terminateWithSuccess($ret);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
<?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
|
||||
|
||||
}
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
* 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
|
||||
{
|
||||
@@ -27,13 +28,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');
|
||||
@@ -48,28 +49,37 @@ class Profil extends FHCAPI_Controller
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
public function profilViewData($uid=null){
|
||||
|
||||
/**
|
||||
* 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;
|
||||
|
||||
$this->load->library('ProfilLib');
|
||||
$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());
|
||||
$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();
|
||||
}
|
||||
|
||||
$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
|
||||
@@ -77,9 +87,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)) {
|
||||
@@ -87,10 +97,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));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -109,7 +119,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);
|
||||
@@ -117,30 +127,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
|
||||
@@ -150,23 +160,48 @@ 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),
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
<?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
|
||||
|
||||
}
|
||||
|
||||
@@ -1,67 +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 Studiensemester extends FHCAPI_Controller
|
||||
{
|
||||
|
||||
private $_ci;
|
||||
|
||||
/**
|
||||
* Object initialization
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'getStudiensemester'=> self::PERM_LOGGED,
|
||||
|
||||
]);
|
||||
|
||||
$this->_ci =& get_instance();
|
||||
|
||||
$this->_ci->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
|
||||
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* GET METHOD
|
||||
* returns List of all studiensemester as well as current one
|
||||
*/
|
||||
public function getStudiensemester()
|
||||
{
|
||||
$this->_ci->StudiensemesterModel->addOrder("start", "DESC");
|
||||
$result = $this->_ci->StudiensemesterModel->load();
|
||||
|
||||
$studiensemester = getData($result);
|
||||
$result = $this->_ci->StudiensemesterModel->getAkt();
|
||||
$aktuell = getData($result);
|
||||
|
||||
$this->terminateWithSuccess(array($studiensemester, $aktuell));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Private methods
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,86 +0,0 @@
|
||||
<?php
|
||||
|
||||
if (!defined('BASEPATH'))
|
||||
exit('No direct script access allowed');
|
||||
|
||||
class Config extends FHCAPI_Controller
|
||||
{
|
||||
private $_ci;
|
||||
private $_uid;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'get' => ['admin:r', 'assistenz:r'],
|
||||
'set' => ['admin:r', 'assistenz:r'],
|
||||
]);
|
||||
|
||||
$this->_ci = &get_instance();
|
||||
$this->_setAuthUID();
|
||||
|
||||
$this->loadPhrases([
|
||||
'lehre'
|
||||
]);
|
||||
|
||||
$this->_ci->load->library('VariableLib', ['uid' => $this->_uid]);
|
||||
$this->_ci->load->library('PermissionLib');
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function get()
|
||||
{
|
||||
if (!($this->permissionlib->isBerechtigt('basis/tempus')) && !($this->permissionlib->isBerechtigt('lv-plan')))
|
||||
$this->terminateWithSuccess([]);
|
||||
|
||||
$ignore_kollision = $this->_ci->variablelib->getVar('ignore_kollision');
|
||||
$ignore_zeitsperre = $this->_ci->variablelib->getVar('ignore_zeitsperre');
|
||||
$ignore_reservierung = $this->_ci->variablelib->getVar('ignore_reservierung');
|
||||
|
||||
$config['ignore_kollision'] = [
|
||||
"type" => "checkbox",
|
||||
"label" => 'ignore_kollision',
|
||||
"value" => $ignore_kollision,
|
||||
];
|
||||
|
||||
$config['ignore_zeitsperre'] = [
|
||||
"type" => "checkbox",
|
||||
"label" => 'ignore_zeitsperre',
|
||||
"value" => $ignore_zeitsperre,
|
||||
];
|
||||
|
||||
$config['ignore_reservierung'] = [
|
||||
"type" => "checkbox",
|
||||
"label" => 'ignore_reservierung',
|
||||
"value" => $ignore_reservierung,
|
||||
];
|
||||
|
||||
$this->terminateWithSuccess($config);
|
||||
}
|
||||
public function set()
|
||||
{
|
||||
if (!($this->permissionlib->isBerechtigt('basis/tempus')) && !($this->permissionlib->isBerechtigt('lv-plan')))
|
||||
$this->terminateWithSuccess([]);
|
||||
|
||||
$this->load->model('system/Variable_model', 'VariableModel');
|
||||
|
||||
foreach (['ignore_kollision','ignore_zeitsperre','ignore_reservierung'] as $variable)
|
||||
{
|
||||
if ($this->_ci->input->post($variable) !== null)
|
||||
{
|
||||
$this->VariableModel->update(array('uid' => $this->_uid, 'name' => $variable), array('wert' => $this->input->post($variable)));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$this->terminateWithSuccess();
|
||||
}
|
||||
|
||||
private function _setAuthUID()
|
||||
{
|
||||
$this->_uid = getAuthUID();
|
||||
|
||||
if (!$this->_uid)
|
||||
show_error('User authentification failed');
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,6 @@ class Gruppe extends FHCAPI_Controller
|
||||
'getBenutzerSearch' => ['admin:r', 'assistenz:r'],
|
||||
'getAllSearch' => ['admin:r', 'assistenz:r'],
|
||||
'getByLehreinheit' => ['admin:r', 'assistenz:r'],
|
||||
'getGruppe' => ['admin:r', 'assistenz:r'],
|
||||
]);
|
||||
|
||||
$this->_ci = &get_instance();
|
||||
@@ -68,7 +67,7 @@ class Gruppe extends FHCAPI_Controller
|
||||
|
||||
$this->checkPermission($lehreinheit_id);
|
||||
|
||||
$result = $this->_ci->LehreinheitgruppeModel->addGroup($lehreinheit_id, $gid, $lehrverband === true || $lehrverband === 'true');
|
||||
$result = $this->_ci->LehreinheitgruppeModel->addGroup($lehreinheit_id, $gid, !($lehrverband === 'false'));
|
||||
|
||||
if (isError($result))
|
||||
$this->terminateWithError(getError($result));
|
||||
@@ -76,71 +75,6 @@ class Gruppe extends FHCAPI_Controller
|
||||
$this->terminateWithSuccess($result);
|
||||
}
|
||||
|
||||
public function getGruppe()
|
||||
{
|
||||
$lehrverband = $this->input->post('lehrverband');
|
||||
|
||||
$gruppen_result = array();
|
||||
|
||||
if ($lehrverband === false)
|
||||
{
|
||||
$gruppen_result = $this->_ci->GruppeModel->loadWhere(array(
|
||||
'studiengang_kz' => $this->input->post('stg_kz'),
|
||||
'gruppe_kurzbz' => $this->input->post('gruppe_kurzbz'),
|
||||
'aktiv' => true
|
||||
));
|
||||
}
|
||||
else if ($lehrverband === true)
|
||||
{
|
||||
|
||||
if (!isEmptyString($this->input->post('verband')))
|
||||
{
|
||||
$this->LehrverbandModel->db->where('verband', $this->input->post('verband'));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->LehrverbandModel->db->group_start();
|
||||
$this->LehrverbandModel->db->where("trim(verband) = ''");
|
||||
$this->LehrverbandModel->db->or_where("verband IS NULL");
|
||||
$this->LehrverbandModel->db->group_end();
|
||||
}
|
||||
|
||||
if (!isEmptyString($this->input->post('gruppe')))
|
||||
{
|
||||
$this->LehrverbandModel->db->where('gruppe', $this->input->post('gruppe'));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->LehrverbandModel->db->group_start();
|
||||
$this->LehrverbandModel->db->where("trim(gruppe) = ''");
|
||||
$this->LehrverbandModel->db->or_where("gruppe IS NULL");
|
||||
$this->LehrverbandModel->db->group_end();
|
||||
}
|
||||
|
||||
if (!isEmptyString((string)$this->input->post('semester')))
|
||||
{
|
||||
$this->LehrverbandModel->db->where('semester', $this->input->post('semester'));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
$this->LehrverbandModel->db->group_start();
|
||||
$this->LehrverbandModel->db->where("semester = ''");
|
||||
$this->LehrverbandModel->db->or_where("semester IS NULL");
|
||||
$this->LehrverbandModel->db->group_end();
|
||||
}
|
||||
|
||||
$gruppen_result = $this->LehrverbandModel->loadWhere(array('studiengang_kz' => $this->input->post('stg_kz'), 'aktiv' => true));
|
||||
}
|
||||
|
||||
if (!hasData($gruppen_result))
|
||||
return $this->terminateWithError('No group found');
|
||||
|
||||
$gruppen_array = getData($gruppen_result)[0];
|
||||
|
||||
$this->terminateWithSuccess($gruppen_array->gid);
|
||||
}
|
||||
|
||||
public function getByLehreinheit($lehreinheit_id = null)
|
||||
{
|
||||
if (is_null($lehreinheit_id) || !ctype_digit((string)$lehreinheit_id))
|
||||
|
||||
@@ -134,14 +134,9 @@ class Lektor extends FHCAPI_Controller
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
}
|
||||
|
||||
$nullable_fields = array('semesterstunden', 'stundensatz', 'planstunden');
|
||||
|
||||
foreach ($nullable_fields as $nullable_field)
|
||||
if (isset($formData['semesterstunden']) && (!is_numeric($formData['semesterstunden']) || $formData['semesterstunden'] === ''))
|
||||
{
|
||||
if (isset($formData[$nullable_field]) && (!is_numeric($formData[$nullable_field]) || $formData[$nullable_field] === ''))
|
||||
{
|
||||
$formData[$nullable_field] = null;
|
||||
}
|
||||
$formData['semesterstunden'] = null;
|
||||
}
|
||||
|
||||
$lehreinheit_permission = $this->checkPermission($lehreinheit_id, array('admin', 'assistenz', 'lv-plan'));
|
||||
@@ -149,9 +144,6 @@ class Lektor extends FHCAPI_Controller
|
||||
if (!$lehreinheit_permission)
|
||||
$this->terminateWithError($this->p->t('ui', 'error_fieldWriteAccess'));
|
||||
|
||||
if (!is_null($this->getLektorVertrag($lehreinheit_id, $mitarbeiter_uid)) && (array_key_exists('mitarbeiter_uid', $formData) && $mitarbeiter_uid !== $formData['mitarbeiter_uid']))
|
||||
$this->terminateWithError($this->p->t('ui', 'error_fieldWriteAccess'));
|
||||
|
||||
$result = $this->_ci->lektorlib->updateLektorFromLehreinheit($lehreinheit_id, $mitarbeiter_uid, $formData);
|
||||
|
||||
if (isError($result)) $this->terminateWithError(getError($result));
|
||||
@@ -162,7 +154,7 @@ class Lektor extends FHCAPI_Controller
|
||||
{
|
||||
$value = str_replace(',', '.', $value);
|
||||
|
||||
if (!is_numeric($value) && $value !== "")
|
||||
if (!is_numeric($value))
|
||||
{
|
||||
$this->form_validation->set_message('_check_decimal', 'Das Feld {field} muss eine Zahl sein.');
|
||||
return false;
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
<?php
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Noten extends FHCAPI_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'getCertificate' => 'student/noten:r',
|
||||
'getTeacherProposal' => 'student/noten:r',
|
||||
]);
|
||||
|
||||
// Load Libraries
|
||||
$this->load->library('VariableLib', ['uid' => getAuthUID()]);
|
||||
|
||||
// Load Phrases
|
||||
$this->loadPhrases([
|
||||
'stv',
|
||||
'person',
|
||||
'lehre'
|
||||
]);
|
||||
}
|
||||
|
||||
public function getCertificate($lv_id, $studiensemester_kurzbz = null)
|
||||
{
|
||||
if (is_null($lv_id) || !ctype_digit((string)$lv_id))
|
||||
$this->terminateWithError( $this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL);
|
||||
|
||||
$this->load->model('education/lehrveranstaltung_model', 'LehrveranstaltungModel');
|
||||
$this->load->model('education/Zeugnisnote_model', 'ZeugnisnoteModel');
|
||||
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
|
||||
|
||||
$result = $this->LehrveranstaltungModel->loadWhere([
|
||||
'lehrveranstaltung_id' => $lv_id
|
||||
]);
|
||||
|
||||
$lehrveranstaltung = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
if (!$lehrveranstaltung)
|
||||
$this->terminateWithSuccess([]);
|
||||
|
||||
if ($studiensemester_kurzbz !== null && !$this->StudiensemesterModel->isValidStudiensemester($studiensemester_kurzbz))
|
||||
{
|
||||
$this->terminateWithError($studiensemester_kurzbz . ' - ' . $this->p->t('lehre', 'error_noStudiensemester'));
|
||||
}
|
||||
|
||||
$result = $this->ZeugnisnoteModel->getZeugnisnoten(null, $studiensemester_kurzbz, $lehrveranstaltung[0]->lehrveranstaltung_id);
|
||||
|
||||
$grades = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($grades);
|
||||
}
|
||||
|
||||
public function getTeacherProposal($lv_id, $studiensemester_kurzbz = null)
|
||||
{
|
||||
if (is_null($lv_id) || !ctype_digit((string)$lv_id))
|
||||
$this->terminateWithError( $this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL);
|
||||
|
||||
$this->load->model('education/lehrveranstaltung_model', 'LehrveranstaltungModel');
|
||||
$this->load->model('education/Lvgesamtnote_model', 'LvgesamtnoteModel');
|
||||
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
|
||||
|
||||
$result = $this->LehrveranstaltungModel->loadWhere([
|
||||
'lehrveranstaltung_id' => $lv_id
|
||||
]);
|
||||
|
||||
$lehrveranstaltung = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
if (!$lehrveranstaltung)
|
||||
$this->terminateWithSuccess([]);
|
||||
|
||||
if ($studiensemester_kurzbz !== null && !$this->StudiensemesterModel->isValidStudiensemester($studiensemester_kurzbz))
|
||||
{
|
||||
$this->terminateWithError($studiensemester_kurzbz . ' - ' . $this->p->t('lehre', 'error_noStudiensemester'));
|
||||
}
|
||||
|
||||
$result = $this->LvgesamtnoteModel->getLvGesamtNoten($lv_id, null, $studiensemester_kurzbz);
|
||||
|
||||
$grades = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($grades);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -27,8 +27,7 @@ class Setup extends FHCAPI_Controller
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'getLETabs' => ['admin:r', 'assistenz:r'],
|
||||
'getLVTabs' => ['admin:r', 'assistenz:r'],
|
||||
'getTabs' => ['admin:r', 'assistenz:r'],
|
||||
'getStudiensemester' => ['admin:r', 'assistenz:r'],
|
||||
'getSprache' => ['admin:r', 'assistenz:r'],
|
||||
'getRaumtyp' => ['admin:r', 'assistenz:r'],
|
||||
@@ -42,10 +41,9 @@ class Setup extends FHCAPI_Controller
|
||||
$this->_ci->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel');
|
||||
|
||||
$this->_ci->load->library('VariableLib', ['uid' => $this->_uid]);
|
||||
$this->_ci->load->helper('hlp_document');
|
||||
}
|
||||
|
||||
public function getLETabs()
|
||||
public function getTabs()
|
||||
{
|
||||
$tabs['details'] = array (
|
||||
'title' => 'Details',
|
||||
@@ -62,11 +60,6 @@ class Setup extends FHCAPI_Controller
|
||||
'component' => absoluteJsImportUrl('public/js/components/LVVerwaltung/Tabs/Lektor.js'),
|
||||
'config' => []
|
||||
);
|
||||
$tabs['termine'] = array (
|
||||
'title' => 'Termine',
|
||||
'component' => APP_ROOT . 'public/js/components/LVVerwaltung/Tabs/Termine.js',
|
||||
'config' => []
|
||||
);
|
||||
$tabs['notiz'] = array (
|
||||
'title' => 'Notizen',
|
||||
'component' => absoluteJsImportUrl('public/js/components/LVVerwaltung/Tabs/Notiz.js'),
|
||||
@@ -75,28 +68,6 @@ class Setup extends FHCAPI_Controller
|
||||
$this->terminateWithSuccess($tabs);
|
||||
}
|
||||
|
||||
public function getLVTabs()
|
||||
{
|
||||
$tabs['termine'] = array (
|
||||
'title' => 'Termine',
|
||||
'component' => APP_ROOT . 'public/js/components/LVVerwaltung/Tabs/LVTermine.js',
|
||||
'config' => []
|
||||
);
|
||||
$tabs['noten'] = array (
|
||||
'title' => 'Noten',
|
||||
'component' => APP_ROOT . 'public/js/components/LVVerwaltung/Tabs/Noten.js',
|
||||
'config' => [
|
||||
'usePoints' => defined('CIS_GESAMTNOTE_PUNKTE') && CIS_GESAMTNOTE_PUNKTE,
|
||||
'edit' => 'both', // Possible values: both|header|inline
|
||||
'delete' => 'inline', // Possible values: both|header|inline
|
||||
'documents' => 'inline', // Possible values: both|header|inline
|
||||
'documentslist' => gradesDocumentsList(),
|
||||
'semesterSelect' => false
|
||||
]
|
||||
);
|
||||
$this->terminateWithSuccess($tabs);
|
||||
}
|
||||
|
||||
public function getStudiensemester()
|
||||
{
|
||||
$this->_ci->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
|
||||
|
||||
@@ -25,25 +25,7 @@ class StgTree extends FHCAPI_Controller
|
||||
return $this->_outputAuthError([$method => ['admin:r', 'assistenz:r']]);
|
||||
}
|
||||
|
||||
$count = count($params);
|
||||
if (!$count)
|
||||
return $this->getStudiengang($method);
|
||||
|
||||
if ($count == 1) {
|
||||
if (is_numeric($params[0]))
|
||||
return $this->getSemester($method, $params[0]);
|
||||
else
|
||||
return $this->getStudiengang($method, $params[0]);
|
||||
}
|
||||
if ($count == 2) {
|
||||
if (is_numeric($params[0]))
|
||||
return $this->getVerband($method, $params[0], $params[1]);
|
||||
else
|
||||
return $this->getSemester($method, $params[1], $params[0]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
return $this->getStudiengang($method);
|
||||
show_404();
|
||||
}
|
||||
|
||||
@@ -82,27 +64,16 @@ class StgTree extends FHCAPI_Controller
|
||||
$this->terminateWithSuccess($list);
|
||||
}
|
||||
|
||||
protected function getStudiengang($studiengang_kz, $org_form = null)
|
||||
protected function getStudiengang($studiengang_kz)
|
||||
{
|
||||
$link = $studiengang_kz . '/';
|
||||
if ($org_form !== null)
|
||||
$link .= $org_form . '/';
|
||||
|
||||
$this->StudiengangModel->addJoin('public.tbl_lehrverband v', 'studiengang_kz');
|
||||
|
||||
$this->StudiengangModel->addDistinct();
|
||||
$this->StudiengangModel->addSelect("CONCAT(" . $this->StudiengangModel->escape($link) . ", semester) AS link", false);
|
||||
$this->StudiengangModel->addSelect("CONCAT(
|
||||
UPPER(CONCAT(typ, kurzbz)),
|
||||
'-',
|
||||
semester,
|
||||
(
|
||||
SELECT CASE WHEN bezeichnung IS NULL OR bezeichnung='' THEN ''::TEXT ELSE CONCAT(' (', bezeichnung, ')') END
|
||||
FROM public.tbl_lehrverband
|
||||
WHERE studiengang_kz=v.studiengang_kz AND semester=v.semester
|
||||
ORDER BY verband, gruppe LIMIT 1
|
||||
)
|
||||
) AS name", false);
|
||||
$this->StudiengangModel->addSelect("CONCAT(UPPER(CONCAT(typ, kurzbz)), '-', semester, (SELECT CASE WHEN bezeichnung IS NULL OR bezeichnung='' THEN ''::TEXT ELSE CONCAT(' (', bezeichnung, ')') END FROM public.tbl_lehrverband WHERE studiengang_kz=v.studiengang_kz AND semester=v.semester ORDER BY verband, gruppe LIMIT 1)) AS name", false);
|
||||
$this->StudiengangModel->addSelect("TRUE AS leaf", false);
|
||||
|
||||
$this->StudiengangModel->addSelect('semester');
|
||||
$this->StudiengangModel->addSelect($this->StudiengangModel->escape($studiengang_kz) . '::integer AS stg_kz', false);
|
||||
@@ -140,115 +111,6 @@ class StgTree extends FHCAPI_Controller
|
||||
$list = array_merge($list, $result);
|
||||
}
|
||||
}
|
||||
$this->terminateWithSuccess($list);
|
||||
}
|
||||
|
||||
protected function getSemester($studiengang_kz, $semester, $org_form = null)
|
||||
{
|
||||
$link = $studiengang_kz . '/';
|
||||
if ($org_form !== null)
|
||||
$link .= $org_form . '/';
|
||||
$link .= $semester . '/';
|
||||
|
||||
|
||||
$this->load->model('organisation/Gruppe_model', 'GruppeModel');
|
||||
|
||||
$this->GruppeModel->addDistinct();
|
||||
$this->GruppeModel->addSelect("CONCAT(" . $this->GruppeModel->escape($link . 'grp/') . ", gruppe_kurzbz) AS link", false);
|
||||
$this->GruppeModel->addSelect("CONCAT(gruppe_kurzbz, ' (', bezeichnung, ')') AS name", false);
|
||||
$this->GruppeModel->addSelect("TRUE AS leaf", false);
|
||||
|
||||
$this->GruppeModel->addSelect('sort');
|
||||
$this->GruppeModel->addSelect('gruppe_kurzbz');
|
||||
$this->GruppeModel->addSelect($this->GruppeModel->escape($studiengang_kz) . '::integer AS stg_kz', false);
|
||||
|
||||
$this->GruppeModel->addOrder('sort');
|
||||
$this->GruppeModel->addOrder('gruppe_kurzbz');
|
||||
|
||||
$where = [
|
||||
'studiengang_kz' => $studiengang_kz,
|
||||
'semester' => $semester,
|
||||
'lehre' => true,
|
||||
'sichtbar' => true,
|
||||
'aktiv' => true,
|
||||
'direktinskription' => false
|
||||
];
|
||||
|
||||
if ($org_form !== null)
|
||||
$where['orgform_kurzbz'] = $org_form;
|
||||
|
||||
$result = $this->GruppeModel->loadWhere($where);
|
||||
|
||||
$list = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->StudiengangModel->addJoin('public.tbl_lehrverband v', 'studiengang_kz');
|
||||
|
||||
$this->StudiengangModel->addSelect("CONCAT(" . $this->StudiengangModel->escape($link) . ", verband) AS link", false);
|
||||
$this->StudiengangModel->addSelect("CONCAT(UPPER(CONCAT(typ, kurzbz)), '-', semester, verband, (SELECT CASE WHEN bezeichnung IS NULL OR bezeichnung='' THEN ''::TEXT ELSE CONCAT(' (', bezeichnung, ')') END FROM public.tbl_lehrverband WHERE studiengang_kz=v.studiengang_kz AND semester=v.semester AND verband=v.verband ORDER BY gruppe LIMIT 1)) AS name", false);
|
||||
$this->StudiengangModel->addSelect("CASE WHEN MAX(gruppe)='' OR MAX(gruppe)=' ' THEN TRUE ELSE FALSE END AS leaf");
|
||||
|
||||
$this->StudiengangModel->addSelect($this->StudiengangModel->escape($semester) . ' AS semester');
|
||||
$this->StudiengangModel->addSelect('verband');
|
||||
$this->StudiengangModel->addSelect($this->StudiengangModel->escape($studiengang_kz) . '::integer AS stg_kz', false);
|
||||
|
||||
$this->StudiengangModel->addOrder('verband');
|
||||
|
||||
$this->StudiengangModel->addGroupBy('link, name, verband');
|
||||
|
||||
$where = [
|
||||
'v.studiengang_kz' => $studiengang_kz,
|
||||
'v.semester' => $semester,
|
||||
'v.verband !=' => '',
|
||||
'v.aktiv' => true
|
||||
];
|
||||
|
||||
if ($org_form !== null && $semester) // NOTE(chris): on semester 0 show all?
|
||||
$where['v.orgform_kurzbz'] = $org_form;
|
||||
|
||||
$result = $this->StudiengangModel->loadWhere($where);
|
||||
$result = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$list = array_merge($list, $result);
|
||||
|
||||
$this->terminateWithSuccess($list);
|
||||
}
|
||||
|
||||
protected function getVerband($studiengang_kz, $semester, $verband, $org_form = null)
|
||||
{
|
||||
$link = $studiengang_kz . '/';
|
||||
if ($org_form !== null)
|
||||
$link .= $org_form . '/';
|
||||
$link .= $semester . '/'. $verband . '/';
|
||||
|
||||
|
||||
$this->StudiengangModel->addJoin('public.tbl_lehrverband v', 'studiengang_kz');
|
||||
|
||||
$this->StudiengangModel->addDistinct();
|
||||
$this->StudiengangModel->addSelect("CONCAT(" . $this->StudiengangModel->escape($link) . ", gruppe) AS link", false);
|
||||
$this->StudiengangModel->addSelect("CONCAT(UPPER(CONCAT(typ, kurzbz)), '-', semester, verband, gruppe, (SELECT CASE WHEN bezeichnung IS NULL OR bezeichnung='' THEN ''::TEXT ELSE CONCAT(' (', bezeichnung, ')') END FROM public.tbl_lehrverband WHERE studiengang_kz=v.studiengang_kz AND semester=v.semester AND verband=v.verband AND gruppe=v.gruppe ORDER BY gruppe LIMIT 1)) AS name", false);
|
||||
$this->StudiengangModel->addSelect("TRUE AS leaf", false);
|
||||
|
||||
$this->StudiengangModel->addSelect('v.semester');
|
||||
$this->StudiengangModel->addSelect('v.verband');
|
||||
$this->StudiengangModel->addSelect('gruppe');
|
||||
$this->StudiengangModel->addSelect($this->StudiengangModel->escape($studiengang_kz) . '::integer AS stg_kz', false);
|
||||
|
||||
$this->StudiengangModel->addOrder('gruppe');
|
||||
|
||||
$where = [
|
||||
'v.studiengang_kz' => $studiengang_kz,
|
||||
'v.semester' => $semester,
|
||||
'v.verband' => $verband,
|
||||
'v.gruppe !=' => '',
|
||||
'v.aktiv' => true
|
||||
];
|
||||
|
||||
if ($org_form !== null && $semester)
|
||||
$where['v.orgform_kurzbz'] = $org_form;
|
||||
|
||||
$result = $this->StudiengangModel->loadWhere($where);
|
||||
|
||||
$list = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($list);
|
||||
}
|
||||
|
||||
@@ -42,14 +42,22 @@ class Messages extends FHCAPI_Controller
|
||||
]);
|
||||
}
|
||||
|
||||
public function getMessages($id, $type_id, $size, $page)
|
||||
public function getMessages($id, $type_id, $size=null, $page=null)
|
||||
{
|
||||
if($type_id != 'person_id'){
|
||||
$id = $this->_getPersonId($id, $type_id);
|
||||
}
|
||||
|
||||
$offset = $size * ($page - 1);
|
||||
$limit = $size;
|
||||
if(!(is_null($size) && is_null($page)))
|
||||
{
|
||||
$offset = $size * ($page - 1);
|
||||
$limit = $size;
|
||||
}
|
||||
else
|
||||
{
|
||||
$offset = null;
|
||||
$limit = null;
|
||||
}
|
||||
|
||||
$result = $this->MessageModel->getMessagesForTable($id, $offset, $limit);
|
||||
|
||||
|
||||
@@ -301,7 +301,6 @@ class Config extends FHCAPI_Controller
|
||||
|
||||
public function student()
|
||||
{
|
||||
$this->load->helper('hlp_document');
|
||||
$result = [];
|
||||
$config = $this->config->item('tabs');
|
||||
|
||||
@@ -377,9 +376,9 @@ class Config extends FHCAPI_Controller
|
||||
'config' => [
|
||||
'usePoints' => defined('CIS_GESAMTNOTE_PUNKTE') && CIS_GESAMTNOTE_PUNKTE,
|
||||
'edit' => 'both', // Possible values: both|header|inline
|
||||
'delete' => 'inline', // Possible values: both|header|inline
|
||||
'documents' => 'inline', // Possible values: both|header|inline
|
||||
'documentslist' => gradesDocumentsList()
|
||||
'delete' => 'both', // Possible values: both|header|inline
|
||||
'documents' => 'both', // Possible values: both|header|inline
|
||||
'documentslist' => $this->gradesDocumentsList()
|
||||
]
|
||||
];
|
||||
|
||||
@@ -623,6 +622,188 @@ class Config extends FHCAPI_Controller
|
||||
] + $this->kontoColumns();
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function to generate the default documentslist config for the
|
||||
* grades tab.
|
||||
*
|
||||
* The resulting array consists of elements which are associative arrays
|
||||
* that can have the following entries:
|
||||
* title (required) on the first level this can be HTML code.
|
||||
* permissioncheck (optional) an URL to an FHCAPI endpoint which returns
|
||||
* true or false.
|
||||
* link (optional) an URL that will be called if "action" and
|
||||
* "children" are not defined.
|
||||
* action (optional) an associative array that describes an
|
||||
* POST action that will be called if "children" is
|
||||
* not defined.
|
||||
* It can have the following entries:
|
||||
* - url (required) an URL to an FHCAPI endpoint.
|
||||
* - post (optional) an associative array with the POST data to
|
||||
* be sent.
|
||||
* - response (optional) a string that will be displayed on success.
|
||||
* children (optional) an array of child elements
|
||||
*
|
||||
* All strings that start with { and end with } in the URLs and the
|
||||
* actions post parameter will be replaced with the corresponding
|
||||
* attribute of the current dataset (e.G: {uid} will be replaced with the
|
||||
* uid of the current dataset)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function gradesDocumentsList()
|
||||
{
|
||||
$permissioncheck = site_url("api/frontend/v1/documents/permissionAlternativeFormat/{studiengang_kz}");
|
||||
|
||||
$title_ger = $this->p->t("global", "deutsch");
|
||||
$title_eng = $this->p->t("global", "englisch");
|
||||
$title_ff = $this->p->t("stv", "document_certificate");
|
||||
$title_lv = $this->p->t("stv", "document_coursecertificate");
|
||||
|
||||
$link_ff = "documents/export/" .
|
||||
"zertifikat.rdf.php/" .
|
||||
"Zertifikat" .
|
||||
"?stg_kz={studiengang_kz_lv}" .
|
||||
"&uid={uid}" .
|
||||
"&ss={studiensemester_kurzbz}" .
|
||||
"&lvid={lehrveranstaltung_id}";
|
||||
$link_lv_ger = "documents/export/" .
|
||||
"lehrveranstaltungszeugnis.rdf.php/" .
|
||||
"LVZeugnis" .
|
||||
"?stg_kz={studiengang_kz}" .
|
||||
"&uid={uid}" .
|
||||
"&ss={studiensemester_kurzbz}" .
|
||||
"&lvid={lehrveranstaltung_id}";
|
||||
$link_lv_eng = "documents/export/" .
|
||||
"lehrveranstaltungszeugnis.rdf.php/" .
|
||||
"LVZeugnisEng" .
|
||||
"?stg_kz={studiengang_kz}" .
|
||||
"&uid={uid}" .
|
||||
"&ss={studiensemester_kurzbz}" .
|
||||
"&lvid={lehrveranstaltung_id}";
|
||||
|
||||
$archive_url = "api/frontend/v1/documents/archiveSigned";
|
||||
$archive_response = $this->p->t("stv", "document_signed_and_archived");
|
||||
$archive_post_ff = [
|
||||
"xml" => "zertifikat.rdf.php",
|
||||
"xsl" => "Zertifikat",
|
||||
"stg_kz" => "{studiengang_kz_lv}",
|
||||
"uid" => "{uid}",
|
||||
"ss" => "{studiensemester_kurzbz}",
|
||||
"lvid" => "{lehrveranstaltung_id}"
|
||||
];
|
||||
$archive_post_lv_ger = [
|
||||
"xml" => "lehrveranstaltungszeugnis.rdf.php",
|
||||
"xsl" => "LVZeugnis",
|
||||
"stg_kz" => "{studiengang_kz}",
|
||||
"uid" => "{uid}",
|
||||
"ss" => "{studiensemester_kurzbz}",
|
||||
"lvid" => "{lehrveranstaltung_id}"
|
||||
];
|
||||
$archive_post_lv_eng = [
|
||||
"xml" => "lehrveranstaltungszeugnis.rdf.php",
|
||||
"xsl" => "LVZeugnisEng",
|
||||
"stg_kz" => "{studiengang_kz}",
|
||||
"uid" => "{uid}",
|
||||
"ss" => "{studiensemester_kurzbz}",
|
||||
"lvid" => "{lehrveranstaltung_id}"
|
||||
];
|
||||
|
||||
$list = [
|
||||
[
|
||||
'title' => '<i class="fa fa-download" title="' . $this->p->t("stv", "document_download") . '"></i>',
|
||||
'children' => [
|
||||
[
|
||||
'title' => $title_ff,
|
||||
'link' => site_url($link_ff)
|
||||
],
|
||||
[
|
||||
'title' => $title_lv,
|
||||
'children' => [
|
||||
[
|
||||
'title' => $title_ger,
|
||||
'link' => site_url($link_lv_ger),
|
||||
'children' => [
|
||||
[
|
||||
'title' => 'PDF',
|
||||
'permissioncheck' => $permissioncheck,
|
||||
'link' => site_url($link_lv_ger)
|
||||
],
|
||||
[
|
||||
'title' => 'DOC',
|
||||
'permissioncheck' => $permissioncheck,
|
||||
'link' => site_url($link_lv_ger . "&output=doc")
|
||||
],
|
||||
[
|
||||
'title' => 'ODT',
|
||||
'permissioncheck' => $permissioncheck,
|
||||
'link' => site_url($link_lv_ger . "&output=odt")
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => $title_eng,
|
||||
'link' => site_url($link_lv_eng),
|
||||
'children' => [
|
||||
[
|
||||
'title' => 'PDF',
|
||||
'permissioncheck' => $permissioncheck,
|
||||
'link' => site_url($link_lv_eng)
|
||||
],
|
||||
[
|
||||
'title' => 'DOC',
|
||||
'permissioncheck' => $permissioncheck,
|
||||
'link' => site_url($link_lv_eng . "&output=doc")
|
||||
],
|
||||
[
|
||||
'title' => 'ODT',
|
||||
'permissioncheck' => $permissioncheck,
|
||||
'link' => site_url($link_lv_eng . "&output=odt")
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => '<i class="fas fa-archive" title="' . $this->p->t("stv", "document_archive") . '"></i>',
|
||||
'children' => [
|
||||
[
|
||||
'title' => $title_ff,
|
||||
'action' => [
|
||||
'url' => site_url($archive_url),
|
||||
'post' => $archive_post_ff,
|
||||
'response' => $archive_response
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => $title_lv,
|
||||
'children' => [
|
||||
[
|
||||
'title' => $title_ger,
|
||||
'action' => [
|
||||
'url' => site_url($archive_url),
|
||||
'post' => $archive_post_lv_ger,
|
||||
'response' => $archive_response
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => $title_eng,
|
||||
'action' => [
|
||||
'url' => site_url($archive_url),
|
||||
'post' => $archive_post_lv_eng,
|
||||
'response' => $archive_response
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
];
|
||||
|
||||
return $list;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sort tab list
|
||||
*
|
||||
|
||||
@@ -34,7 +34,7 @@ class LvTermine extends FHCAPI_Controller
|
||||
|
||||
//TODO Build own lib or combine with Controller Stundenplan.php
|
||||
//here use of logic of Stundenplan.php, extended with parameters uid, grouping, and used dbTable
|
||||
public function getStundenplan($uid, $start_date = null, $end_date = null, $dbStundenplanTable = "stundenplan", $groupConsecutiveHours = false)
|
||||
public function getStundenplan($uid, $start_date = null, $end_date = null, $groupConsecutiveHours = false, $dbStundenplanTable = "stundenplan")
|
||||
{
|
||||
$student_uid = $uid;
|
||||
$semester_range = $this->studienSemesterErmitteln($start_date, $end_date);
|
||||
@@ -80,6 +80,13 @@ class LvTermine extends FHCAPI_Controller
|
||||
|
||||
$stundenplan_data = $this->getDataOrTerminateWithError($stundenplan_data) ?? [];
|
||||
$this->terminateWithSuccess($stundenplan_data);
|
||||
|
||||
$this->expand_object_information($stundenplan_data);
|
||||
|
||||
$this->returnObj['$stundenplan_query'] = $stundenplan_query;
|
||||
$this->returnObj['$student_lehrverband'] = $student_lehrverband;
|
||||
$this->returnObj['$benutzer_gruppen'] = $benutzer_gruppen;
|
||||
$this->terminateWithSuccess($stundenplan_data);
|
||||
}
|
||||
|
||||
public function getStudiensemester()
|
||||
|
||||
@@ -0,0 +1,517 @@
|
||||
<?php
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Base Site URL
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| URL to your CodeIgniter root. Typically this will be your base URL,
|
||||
| WITH a trailing slash:
|
||||
|
|
||||
| http://example.com/
|
||||
|
|
||||
| If this is not set then CodeIgniter will try guess the protocol, domain
|
||||
| and path to your installation. However, you should always configure this
|
||||
| explicitly and never rely on auto-guessing, especially in production
|
||||
| environments.
|
||||
|
|
||||
*/
|
||||
$config['base_url'] = 'https://c3p0.dev.technikum-wien.at/ma1434/core/FHC-Core/';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Index File
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Typically this will be your index.php file, unless you've renamed it to
|
||||
| something else. If you are using mod_rewrite to remove the page set this
|
||||
| variable so that it is blank.
|
||||
|
|
||||
*/
|
||||
$config['index_page'] = 'index.ci.php';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| URI PROTOCOL
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This item determines which server global should be used to retrieve the
|
||||
| URI string. The default setting of 'REQUEST_URI' works for most servers.
|
||||
| If your links do not seem to work, try one of the other delicious flavors:
|
||||
|
|
||||
| 'REQUEST_URI' Uses $_SERVER['REQUEST_URI']
|
||||
| 'QUERY_STRING' Uses $_SERVER['QUERY_STRING']
|
||||
| 'PATH_INFO' Uses $_SERVER['PATH_INFO']
|
||||
|
|
||||
| WARNING: If you set this to 'PATH_INFO', URIs will always be URL-decoded!
|
||||
*/
|
||||
$config['uri_protocol'] = 'REQUEST_URI';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| URL suffix
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option allows you to add a suffix to all URLs generated by CodeIgniter.
|
||||
| For more information please see the user guide:
|
||||
|
|
||||
| http://codeigniter.com/user_guide/general/urls.html
|
||||
*/
|
||||
$config['url_suffix'] = '';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Language
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This determines which set of language files should be used. Make sure
|
||||
| there is an available translation if you intend to use something other
|
||||
| than english.
|
||||
|
|
||||
*/
|
||||
$config['language'] = '';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Character Set
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This determines which character set is used by default in various methods
|
||||
| that require a character set to be provided.
|
||||
|
|
||||
| See http://php.net/htmlspecialchars for a list of supported charsets.
|
||||
|
|
||||
*/
|
||||
$config['charset'] = 'UTF-8';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Enable/Disable System Hooks
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If you would like to use the 'hooks' feature you must enable it by
|
||||
| setting this variable to TRUE (boolean). See the user guide for details.
|
||||
|
|
||||
*/
|
||||
$config['enable_hooks'] = FALSE;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Class Extension Prefix
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This item allows you to set the filename/classname prefix when extending
|
||||
| native libraries. For more information please see the user guide:
|
||||
|
|
||||
| http://codeigniter.com/user_guide/general/core_classes.html
|
||||
| http://codeigniter.com/user_guide/general/creating_libraries.html
|
||||
|
|
||||
*/
|
||||
$config['subclass_prefix'] = 'FHC_';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Composer auto-loading
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Enabling this setting will tell CodeIgniter to look for a Composer
|
||||
| package auto-loader script in application/vendor/autoload.php.
|
||||
|
|
||||
| $config['composer_autoload'] = TRUE;
|
||||
|
|
||||
| Or if you have your vendor/ directory located somewhere else, you
|
||||
| can opt to set a specific path as well:
|
||||
|
|
||||
| $config['composer_autoload'] = '/path/to/vendor/autoload.php';
|
||||
|
|
||||
| For more information about Composer, please visit http://getcomposer.org/
|
||||
|
|
||||
| Note: This will NOT disable or override the CodeIgniter-specific
|
||||
| autoloading (application/config/autoload.php)
|
||||
*/
|
||||
$config['composer_autoload'] = FALSE;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Allowed URL Characters
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This lets you specify which characters are permitted within your URLs.
|
||||
| When someone tries to submit a URL with disallowed characters they will
|
||||
| get a warning message.
|
||||
|
|
||||
| As a security measure you are STRONGLY encouraged to restrict URLs to
|
||||
| as few characters as possible. By default only these are allowed: a-z 0-9~%.:_-
|
||||
|
|
||||
| Leave blank to allow all characters -- but only if you are insane.
|
||||
|
|
||||
| The configured value is actually a regular expression character group
|
||||
| and it will be executed as: ! preg_match('/^[<permitted_uri_chars>]+$/i
|
||||
|
|
||||
| DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!
|
||||
|
|
||||
*/
|
||||
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Enable Query Strings
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| By default CodeIgniter uses search-engine friendly segment based URLs:
|
||||
| example.com/who/what/where/
|
||||
|
|
||||
| By default CodeIgniter enables access to the $_GET array. If for some
|
||||
| reason you would like to disable it, set 'allow_get_array' to FALSE.
|
||||
|
|
||||
| You can optionally enable standard query string based URLs:
|
||||
| example.com?who=me&what=something&where=here
|
||||
|
|
||||
| Options are: TRUE or FALSE (boolean)
|
||||
|
|
||||
| The other items let you set the query string 'words' that will
|
||||
| invoke your controllers and its functions:
|
||||
| example.com/index.php?c=controller&m=function
|
||||
|
|
||||
| Please note that some of the helpers won't work as expected when
|
||||
| this feature is enabled, since CodeIgniter is designed primarily to
|
||||
| use segment based URLs.
|
||||
|
|
||||
*/
|
||||
$config['allow_get_array'] = TRUE;
|
||||
$config['enable_query_strings'] = FALSE;
|
||||
$config['controller_trigger'] = 'c';
|
||||
$config['function_trigger'] = 'm';
|
||||
$config['directory_trigger'] = 'd';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Error Logging Threshold
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| You can enable error logging by setting a threshold over zero. The
|
||||
| threshold determines what gets logged. Threshold options are:
|
||||
|
|
||||
| 0 = Disables logging, Error logging TURNED OFF
|
||||
| 1 = Error Messages (including PHP errors)
|
||||
| 2 = Debug Messages
|
||||
| 3 = Informational Messages
|
||||
| 4 = All Messages
|
||||
|
|
||||
| You can also pass an array with threshold levels to show individual error types
|
||||
|
|
||||
| array(2) = Debug Messages, without Error Messages
|
||||
|
|
||||
| For a live site you'll usually only enable Errors (1) to be logged otherwise
|
||||
| your log files will fill up very fast.
|
||||
|
|
||||
*/
|
||||
$config['log_threshold'] = 1;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Error Logging Directory Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Leave this BLANK unless you would like to set something other than the default
|
||||
| application/logs/ directory. Use a full server path with trailing slash.
|
||||
|
|
||||
*/
|
||||
$config['log_path'] = '';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Log File Extension
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The default filename extension for log files. The default 'php' allows for
|
||||
| protecting the log files via basic scripting, when they are to be stored
|
||||
| under a publicly accessible directory.
|
||||
|
|
||||
| Note: Leaving it blank will default to 'php'.
|
||||
|
|
||||
*/
|
||||
$config['log_file_extension'] = 'log';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Log File Permissions
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The file system permissions to be applied on newly created log files.
|
||||
|
|
||||
| IMPORTANT: This MUST be an integer (no quotes) and you MUST use octal
|
||||
| integer notation (i.e. 0700, 0644, etc.)
|
||||
*/
|
||||
$config['log_file_permissions'] = 0644;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Date Format for Logs
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Each item that is logged has an associated date. You can use PHP date
|
||||
| codes to set your own date formatting
|
||||
|
|
||||
*/
|
||||
$config['log_date_format'] = 'Y-m-d H:i:s';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Error Views Directory Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Leave this BLANK unless you would like to set something other than the default
|
||||
| application/views/errors/ directory. Use a full server path with trailing slash.
|
||||
|
|
||||
*/
|
||||
$config['error_views_path'] = '';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache Directory Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Leave this BLANK unless you would like to set something other than the default
|
||||
| application/cache/ directory. Use a full server path with trailing slash.
|
||||
|
|
||||
*/
|
||||
$config['cache_path'] = '';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache Include Query String
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Whether to take the URL query string into consideration when generating
|
||||
| output cache files. Valid options are:
|
||||
|
|
||||
| FALSE = Disabled
|
||||
| TRUE = Enabled, take all query parameters into account.
|
||||
| Please be aware that this may result in numerous cache
|
||||
| files generated for the same page over and over again.
|
||||
| array('q') = Enabled, but only take into account the specified list
|
||||
| of query parameters.
|
||||
|
|
||||
*/
|
||||
$config['cache_query_string'] = FALSE;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Encryption Key
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If you use the Encryption class, you must set an encryption key.
|
||||
| See the user guide for more info.
|
||||
|
|
||||
| http://codeigniter.com/user_guide/libraries/encryption.html
|
||||
|
|
||||
*/
|
||||
$config['encryption_key'] = '';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Variables
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| 'sess_driver'
|
||||
|
|
||||
| The storage driver to use: files, database, redis, memcached
|
||||
|
|
||||
| 'sess_cookie_name'
|
||||
|
|
||||
| The session cookie name, must contain only [0-9a-z_-] characters
|
||||
|
|
||||
| 'sess_expiration'
|
||||
|
|
||||
| The number of SECONDS you want the session to last.
|
||||
| Setting to 0 (zero) means expire when the browser is closed.
|
||||
|
|
||||
| 'sess_save_path'
|
||||
|
|
||||
| The location to save sessions to, driver dependent.
|
||||
|
|
||||
| For the 'files' driver, it's a path to a writable directory.
|
||||
| WARNING: Only absolute paths are supported!
|
||||
|
|
||||
| For the 'database' driver, it's a table name.
|
||||
| Please read up the manual for the format with other session drivers.
|
||||
|
|
||||
| IMPORTANT: You are REQUIRED to set a valid save path!
|
||||
|
|
||||
| 'sess_match_ip'
|
||||
|
|
||||
| Whether to match the user's IP address when reading the session data.
|
||||
|
|
||||
| 'sess_time_to_update'
|
||||
|
|
||||
| How many seconds between CI regenerating the session ID.
|
||||
| NOTE: Keep it as it is to prevent security issues (https://en.wikipedia.org/wiki/Session_fixation)
|
||||
|
|
||||
| 'sess_regenerate_destroy'
|
||||
|
|
||||
| Whether to destroy session data associated with the old session ID
|
||||
| when auto-regenerating the session ID. When set to FALSE, the data
|
||||
| will be later deleted by the garbage collector.
|
||||
|
|
||||
| Other session cookie settings are shared with the rest of the application,
|
||||
| except for 'cookie_prefix' and 'cookie_httponly', which are ignored here.
|
||||
|
|
||||
*/
|
||||
$config['sess_driver'] = 'files';
|
||||
$config['sess_cookie_name'] = 'sess_ci_session';
|
||||
$config['sess_expiration'] = 1800; // Session expires every 30 minutes
|
||||
$config['sess_save_path'] = NULL;
|
||||
$config['sess_match_ip'] = FALSE;
|
||||
$config['sess_time_to_update'] = 300;
|
||||
$config['sess_regenerate_destroy'] = FALSE;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cookie Related Variables
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| 'cookie_prefix' = Set a cookie name prefix if you need to avoid collisions
|
||||
| 'cookie_domain' = Set to .your-domain.com for site-wide cookies
|
||||
| 'cookie_path' = Typically will be a forward slash
|
||||
| 'cookie_secure' = Cookie will only be set if a secure HTTPS connection exists.
|
||||
| 'cookie_httponly' = Cookie will only be accessible via HTTP(S) (no javascript)
|
||||
|
|
||||
| Note: These settings (with the exception of 'cookie_prefix' and
|
||||
| 'cookie_httponly') will also affect sessions.
|
||||
|
|
||||
*/
|
||||
$config['cookie_prefix'] = '';
|
||||
$config['cookie_domain'] = '';
|
||||
$config['cookie_path'] = '/';
|
||||
$config['cookie_secure'] = FALSE;
|
||||
$config['cookie_httponly'] = FALSE;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Standardize newlines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Determines whether to standardize newline characters in input data,
|
||||
| meaning to replace \r\n, \r, \n occurrences with the PHP_EOL value.
|
||||
|
|
||||
| This is particularly useful for portability between UNIX-based OSes,
|
||||
| (usually \n) and Windows (\r\n).
|
||||
|
|
||||
*/
|
||||
$config['standardize_newlines'] = FALSE;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Global XSS Filtering
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Determines whether the XSS filter is always active when GET, POST or
|
||||
| COOKIE data is encountered
|
||||
|
|
||||
| WARNING: This feature is DEPRECATED and currently available only
|
||||
| for backwards compatibility purposes!
|
||||
|
|
||||
*/
|
||||
$config['global_xss_filtering'] = FALSE;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cross Site Request Forgery
|
||||
|--------------------------------------------------------------------------
|
||||
| Enables a CSRF cookie token to be set. When set to TRUE, token will be
|
||||
| checked on a submitted form. If you are accepting user data, it is strongly
|
||||
| recommended CSRF protection be enabled.
|
||||
|
|
||||
| 'csrf_token_name' = The token name
|
||||
| 'csrf_cookie_name' = The cookie name
|
||||
| 'csrf_expire' = The number in seconds the token should expire.
|
||||
| 'csrf_regenerate' = Regenerate token on every submission
|
||||
| 'csrf_exclude_uris' = Array of URIs which ignore CSRF checks
|
||||
*/
|
||||
$config['csrf_protection'] = FALSE;
|
||||
$config['csrf_token_name'] = 'csrf_test_name';
|
||||
$config['csrf_cookie_name'] = 'csrf_cookie_name';
|
||||
$config['csrf_expire'] = 7200;
|
||||
$config['csrf_regenerate'] = TRUE;
|
||||
$config['csrf_exclude_uris'] = array();
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Output Compression
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Enables Gzip output compression for faster page loads. When enabled,
|
||||
| the output class will test whether your server supports Gzip.
|
||||
| Even if it does, however, not all browsers support compression
|
||||
| so enable only if you are reasonably sure your visitors can handle it.
|
||||
|
|
||||
| Only used if zlib.output_compression is turned off in your php.ini.
|
||||
| Please do not use it together with httpd-level output compression.
|
||||
|
|
||||
| VERY IMPORTANT: If you are getting a blank page when compression is enabled it
|
||||
| means you are prematurely outputting something to your browser. It could
|
||||
| even be a line of whitespace at the end of one of your scripts. For
|
||||
| compression to work, nothing can be sent before the output buffer is called
|
||||
| by the output class. Do not 'echo' any values with compression enabled.
|
||||
|
|
||||
*/
|
||||
$config['compress_output'] = FALSE;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Master Time Reference
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Options are 'local' or any PHP supported timezone. This preference tells
|
||||
| the system whether to use your server's local time as the master 'now'
|
||||
| reference, or convert it to the configured one timezone. See the 'date
|
||||
| helper' page of the user guide for information regarding date handling.
|
||||
|
|
||||
*/
|
||||
$config['time_reference'] = 'local';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Rewrite PHP Short Tags
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If your PHP installation does not have short tag support enabled CI
|
||||
| can rewrite the tags on-the-fly, enabling you to utilize that syntax
|
||||
| in your view files. Options are TRUE or FALSE (boolean)
|
||||
|
|
||||
| Note: You need to have eval() enabled for this to work.
|
||||
|
|
||||
*/
|
||||
$config['rewrite_short_tags'] = FALSE;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Reverse Proxy IPs
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If your server is behind a reverse proxy, you must whitelist the proxy
|
||||
| IP addresses from which CodeIgniter should trust headers such as
|
||||
| HTTP_X_FORWARDED_FOR and HTTP_CLIENT_IP in order to properly identify
|
||||
| the visitor's IP address.
|
||||
|
|
||||
| You can use both an array or a comma-separated list of proxy addresses,
|
||||
| as well as specifying whole subnets. Here are a few examples:
|
||||
|
|
||||
| Comma-separated: '10.0.1.200,192.168.5.0/24'
|
||||
| Array: array('10.0.1.200', '192.168.5.0/24')
|
||||
*/
|
||||
$config['proxy_ips'] = '';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| FHComplete Build Version
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Version Number of the Current Build
|
||||
| This is used to invalidate Cache for JS and CSS Files
|
||||
|
|
||||
| Example: 2019102901
|
||||
*/
|
||||
$config['fhcomplete_build_version'] = '2019102903';
|
||||
@@ -0,0 +1,122 @@
|
||||
<?php
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
defined('DB_HOST') OR require_once './config/system.config.inc.php'; // For CLI-Migrations
|
||||
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
| DATABASE CONNECTIVITY SETTINGS
|
||||
| -------------------------------------------------------------------
|
||||
| This file will contain the settings needed to access your database.
|
||||
|
|
||||
| For complete instructions please consult the 'Database Connection'
|
||||
| page of the User Guide.
|
||||
|
|
||||
| -------------------------------------------------------------------
|
||||
| EXPLANATION OF VARIABLES
|
||||
| -------------------------------------------------------------------
|
||||
|
|
||||
| ['dsn'] The full DSN string describe a connection to the database.
|
||||
| ['hostname'] The hostname of your database server.
|
||||
| ['username'] The username used to connect to the database
|
||||
| ['password'] The password used to connect to the database
|
||||
| ['database'] The name of the database you want to connect to
|
||||
| ['dbdriver'] The database driver. e.g.: mysqli.
|
||||
| Currently supported:
|
||||
| cubrid, ibase, mssql, mysql, mysqli, oci8,
|
||||
| odbc, pdo, postgre, sqlite, sqlite3, sqlsrv
|
||||
| ['dbprefix'] You can add an optional prefix, which will be added
|
||||
| to the table name when using the Query Builder class
|
||||
| ['pconnect'] TRUE/FALSE - Whether to use a persistent connection
|
||||
| ['db_debug'] TRUE/FALSE - Whether database errors should be displayed.
|
||||
| ['cache_on'] TRUE/FALSE - Enables/disables query caching
|
||||
| ['cachedir'] The path to the folder where cache files should be stored
|
||||
| ['char_set'] The character set used in communicating with the database
|
||||
| ['dbcollat'] The character collation used in communicating with the database
|
||||
| NOTE: For MySQL and MySQLi databases, this setting is only used
|
||||
| as a backup if your server is running PHP < 5.2.3 or MySQL < 5.0.7
|
||||
| (and in table creation queries made with DB Forge).
|
||||
| There is an incompatibility in PHP with mysql_real_escape_string() which
|
||||
| can make your site vulnerable to SQL injection if you are using a
|
||||
| multi-byte character set and are running versions lower than these.
|
||||
| Sites using Latin-1 or UTF-8 database character set and collation are unaffected.
|
||||
| ['swap_pre'] A default table prefix that should be swapped with the dbprefix
|
||||
| ['encrypt'] Whether or not to use an encrypted connection.
|
||||
|
|
||||
| 'mysql' (deprecated), 'sqlsrv' and 'pdo/sqlsrv' drivers accept TRUE/FALSE
|
||||
| 'mysqli' and 'pdo/mysql' drivers accept an array with the following options:
|
||||
|
|
||||
| 'ssl_key' - Path to the private key file
|
||||
| 'ssl_cert' - Path to the public key certificate file
|
||||
| 'ssl_ca' - Path to the certificate authority file
|
||||
| 'ssl_capath' - Path to a directory containing trusted CA certificats in PEM format
|
||||
| 'ssl_cipher' - List of *allowed* ciphers to be used for the encryption, separated by colons (':')
|
||||
| 'ssl_verify' - TRUE/FALSE; Whether verify the server certificate or not ('mysqli' only)
|
||||
|
|
||||
| ['compress'] Whether or not to use client compression (MySQL only)
|
||||
| ['stricton'] TRUE/FALSE - forces 'Strict Mode' connections
|
||||
| - good for ensuring strict SQL while developing
|
||||
| ['ssl_options'] Used to set various SSL options that can be used when making SSL connections.
|
||||
| ['failover'] array - A array with 0 or more data for connections if the main should fail.
|
||||
| ['save_queries'] TRUE/FALSE - Whether to "save" all executed queries.
|
||||
| NOTE: Disabling this will also effectively disable both
|
||||
| $this->db->last_query() and profiling of DB queries.
|
||||
| When you run a query, with this setting set to TRUE (default),
|
||||
| CodeIgniter will store the SQL statement for debugging purposes.
|
||||
| However, this may cause high memory usage, especially if you run
|
||||
| a lot of SQL queries ... disable this to avoid that problem.
|
||||
|
|
||||
| The $active_group variable lets you choose which connection group to
|
||||
| make active. By default there is only one group (the 'default' group).
|
||||
|
|
||||
| The $query_builder variables lets you determine whether or not to load
|
||||
| the query builder class.
|
||||
*/
|
||||
$active_group = 'default';
|
||||
$query_builder = TRUE;
|
||||
|
||||
$db['default'] = array(
|
||||
'dsn' => '',
|
||||
'hostname' => DB_HOST,
|
||||
'username' => DB_USER,
|
||||
'password' => DB_PASSWORD,
|
||||
'port' => DB_PORT,
|
||||
'database' => DB_NAME,
|
||||
'dbdriver' => 'postgre',
|
||||
'dbprefix' => '',
|
||||
'pconnect' => DB_CONNECT_PERSISTENT,
|
||||
'db_debug' => (ENVIRONMENT !== 'production'),
|
||||
'cache_on' => FALSE,
|
||||
'cachedir' => '',
|
||||
'char_set' => 'utf8',
|
||||
'dbcollat' => 'utf8_general_ci',
|
||||
'swap_pre' => '',
|
||||
'encrypt' => FALSE,
|
||||
'compress' => FALSE,
|
||||
'stricton' => FALSE,
|
||||
'failover' => array(),
|
||||
'save_queries' => TRUE
|
||||
);
|
||||
|
||||
$db['system'] = array(
|
||||
'dsn' => '',
|
||||
'hostname' => DB_HOST,
|
||||
'username' => 'fhcomplete',
|
||||
'password' => 'Fhcomplet3Onc4p1',
|
||||
'database' => DB_NAME,
|
||||
'port' => DB_PORT,
|
||||
'dbschema' => 'public',
|
||||
'dbdriver' => 'postgre',
|
||||
'dbprefix' => '',
|
||||
'pconnect' => DB_CONNECT_PERSISTENT,
|
||||
'db_debug' => (ENVIRONMENT !== 'production'),
|
||||
'cache_on' => FALSE,
|
||||
'cachedir' => '',
|
||||
'char_set' => 'utf8',
|
||||
'dbcollat' => 'utf8_general_ci',
|
||||
'swap_pre' => '',
|
||||
'encrypt' => FALSE,
|
||||
'compress' => FALSE,
|
||||
'stricton' => FALSE,
|
||||
'failover' => array(),
|
||||
'save_queries' => TRUE
|
||||
);
|
||||
@@ -1,188 +0,0 @@
|
||||
<?php
|
||||
|
||||
if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Helper function to generate the default documentslist config for the
|
||||
* grades tab.
|
||||
*
|
||||
* The resulting array consists of elements which are associative arrays
|
||||
* that can have the following entries:
|
||||
* title (required) on the first level this can be HTML code.
|
||||
* permissioncheck (optional) an URL to an FHCAPI endpoint which returns
|
||||
* true or false.
|
||||
* link (optional) an URL that will be called if "action" and
|
||||
* "children" are not defined.
|
||||
* action (optional) an associative array that describes an
|
||||
* POST action that will be called if "children" is
|
||||
* not defined.
|
||||
* It can have the following entries:
|
||||
* - url (required) an URL to an FHCAPI endpoint.
|
||||
* - post (optional) an associative array with the POST data to
|
||||
* be sent.
|
||||
* - response (optional) a string that will be displayed on success.
|
||||
* children (optional) an array of child elements
|
||||
*
|
||||
* All strings that start with { and end with } in the URLs and the
|
||||
* actions post parameter will be replaced with the corresponding
|
||||
* attribute of the current dataset (e.G: {uid} will be replaced with the
|
||||
* uid of the current dataset)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
function gradesDocumentsList()
|
||||
{
|
||||
$ci =& get_instance();
|
||||
$ci->load->library('PhrasesLib', array('stv'), 'p');
|
||||
|
||||
$permissioncheck = site_url("api/frontend/v1/documents/permissionAlternativeFormat/{studiengang_kz}");
|
||||
|
||||
$title_ger = $ci->p->t("global", "deutsch");
|
||||
$title_eng = $ci->p->t("global", "englisch");
|
||||
$title_ff = $ci->p->t("stv", "document_certificate");
|
||||
$title_lv = $ci->p->t("stv", "document_coursecertificate");
|
||||
|
||||
$link_ff = "documents/export/" .
|
||||
"zertifikat.rdf.php/" .
|
||||
"Zertifikat" .
|
||||
"?stg_kz={studiengang_kz_lv}" .
|
||||
"&uid={uid}" .
|
||||
"&ss={studiensemester_kurzbz}" .
|
||||
"&lvid={lehrveranstaltung_id}";
|
||||
$link_lv_ger = "documents/export/" .
|
||||
"lehrveranstaltungszeugnis.rdf.php/" .
|
||||
"LVZeugnis" .
|
||||
"?stg_kz={studiengang_kz}" .
|
||||
"&uid={uid}" .
|
||||
"&ss={studiensemester_kurzbz}" .
|
||||
"&lvid={lehrveranstaltung_id}";
|
||||
$link_lv_eng = "documents/export/" .
|
||||
"lehrveranstaltungszeugnis.rdf.php/" .
|
||||
"LVZeugnisEng" .
|
||||
"?stg_kz={studiengang_kz}" .
|
||||
"&uid={uid}" .
|
||||
"&ss={studiensemester_kurzbz}" .
|
||||
"&lvid={lehrveranstaltung_id}";
|
||||
|
||||
$archive_url = "api/frontend/v1/documents/archiveSigned";
|
||||
$archive_response = $ci->p->t("stv", "document_signed_and_archived");
|
||||
$archive_post_ff = [
|
||||
"xml" => "zertifikat.rdf.php",
|
||||
"xsl" => "Zertifikat",
|
||||
"stg_kz" => "{studiengang_kz_lv}",
|
||||
"uid" => "{uid}",
|
||||
"ss" => "{studiensemester_kurzbz}",
|
||||
"lvid" => "{lehrveranstaltung_id}"
|
||||
];
|
||||
$archive_post_lv_ger = [
|
||||
"xml" => "lehrveranstaltungszeugnis.rdf.php",
|
||||
"xsl" => "LVZeugnis",
|
||||
"stg_kz" => "{studiengang_kz}",
|
||||
"uid" => "{uid}",
|
||||
"ss" => "{studiensemester_kurzbz}",
|
||||
"lvid" => "{lehrveranstaltung_id}"
|
||||
];
|
||||
$archive_post_lv_eng = [
|
||||
"xml" => "lehrveranstaltungszeugnis.rdf.php",
|
||||
"xsl" => "LVZeugnisEng",
|
||||
"stg_kz" => "{studiengang_kz}",
|
||||
"uid" => "{uid}",
|
||||
"ss" => "{studiensemester_kurzbz}",
|
||||
"lvid" => "{lehrveranstaltung_id}"
|
||||
];
|
||||
|
||||
$list = [
|
||||
[
|
||||
'title' => '<i class="fa fa-download" title="' . $ci->p->t("stv", "document_download") . '"></i>',
|
||||
'children' => [
|
||||
[
|
||||
'title' => $title_ff,
|
||||
'link' => site_url($link_ff)
|
||||
],
|
||||
[
|
||||
'title' => $title_lv,
|
||||
'children' => [
|
||||
[
|
||||
'title' => $title_ger,
|
||||
'link' => site_url($link_lv_ger),
|
||||
'children' => [
|
||||
[
|
||||
'title' => 'PDF',
|
||||
'permissioncheck' => $permissioncheck,
|
||||
'link' => site_url($link_lv_ger)
|
||||
],
|
||||
[
|
||||
'title' => 'DOC',
|
||||
'permissioncheck' => $permissioncheck,
|
||||
'link' => site_url($link_lv_ger . "&output=doc")
|
||||
],
|
||||
[
|
||||
'title' => 'ODT',
|
||||
'permissioncheck' => $permissioncheck,
|
||||
'link' => site_url($link_lv_ger . "&output=odt")
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => $title_eng,
|
||||
'link' => site_url($link_lv_eng),
|
||||
'children' => [
|
||||
[
|
||||
'title' => 'PDF',
|
||||
'permissioncheck' => $permissioncheck,
|
||||
'link' => site_url($link_lv_eng)
|
||||
],
|
||||
[
|
||||
'title' => 'DOC',
|
||||
'permissioncheck' => $permissioncheck,
|
||||
'link' => site_url($link_lv_eng . "&output=doc")
|
||||
],
|
||||
[
|
||||
'title' => 'ODT',
|
||||
'permissioncheck' => $permissioncheck,
|
||||
'link' => site_url($link_lv_eng . "&output=odt")
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => '<i class="fas fa-archive" title="' . $ci->p->t("stv", "document_archive") . '"></i>',
|
||||
'children' => [
|
||||
[
|
||||
'title' => $title_ff,
|
||||
'action' => [
|
||||
'url' => site_url($archive_url),
|
||||
'post' => $archive_post_ff,
|
||||
'response' => $archive_response
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => $title_lv,
|
||||
'children' => [
|
||||
[
|
||||
'title' => $title_ger,
|
||||
'action' => [
|
||||
'url' => site_url($archive_url),
|
||||
'post' => $archive_post_lv_ger,
|
||||
'response' => $archive_response
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => $title_eng,
|
||||
'action' => [
|
||||
'url' => site_url($archive_url),
|
||||
'post' => $archive_post_lv_eng,
|
||||
'response' => $archive_response
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
];
|
||||
|
||||
return $list;
|
||||
}
|
||||
@@ -17,12 +17,7 @@ class LektorLib
|
||||
$this->_ci->load->model('organisation/Organisationseinheit_model', 'OrganisationseinheitModel');
|
||||
$this->_ci->load->model('ressource/mitarbeiter_model', 'MitarbeiterModel');
|
||||
$this->_ci->load->model('person/Benutzer_model', 'BenutzerModel');
|
||||
$this->_ci->load->model('ressource/Zeitsperre_model', 'ZeitsperreModel');
|
||||
$this->_ci->load->model('ressource/Reservierung_model', 'ReservierungModel');
|
||||
$this->_ci->load->model('ressource/stundenplandev_model', 'StundenplandevModel');
|
||||
|
||||
$this->_ci->load->library('PhrasesLib', array('lehre'));
|
||||
$this->_ci->load->library('VariableLib', ['uid' => getAuthUID()]);
|
||||
}
|
||||
|
||||
public function addLektorToLehreinheit($lehreinheit_id, $mitarbeiter_uid)
|
||||
@@ -83,13 +78,10 @@ class LektorLib
|
||||
|
||||
public function updateLektorFromLehreinheit($lehreinheit_id, $mitarbeiter_uid, $new_data)
|
||||
{
|
||||
$old_uid = $mitarbeiter_uid;
|
||||
$new_uid = isset($new_data['mitarbeiter_uid']) ? $new_data['mitarbeiter_uid'] : $mitarbeiter_uid;
|
||||
|
||||
$this->_ci->LehreinheitmitarbeiterModel->addSelect('lehre.tbl_lehreinheitmitarbeiter.*, lehre.tbl_lehreinheit.studiensemester_kurzbz, tbl_lehrveranstaltung.studiengang_kz');
|
||||
$this->_ci->LehreinheitmitarbeiterModel->addJoin('lehre.tbl_lehreinheit', 'lehreinheit_id');
|
||||
$this->_ci->LehreinheitmitarbeiterModel->addJoin('lehre.tbl_lehrveranstaltung', 'lehrveranstaltung_id');
|
||||
$lehreinheit_result = $this->_ci->LehreinheitmitarbeiterModel->loadWhere(array('lehreinheit_id' => $lehreinheit_id, 'mitarbeiter_uid' => $old_uid));
|
||||
$lehreinheit_result = $this->_ci->LehreinheitmitarbeiterModel->loadWhere(array('lehreinheit_id' => $lehreinheit_id, 'mitarbeiter_uid' => $mitarbeiter_uid));
|
||||
|
||||
if (isError($lehreinheit_result)) return $lehreinheit_result;
|
||||
|
||||
@@ -97,47 +89,27 @@ class LektorLib
|
||||
|
||||
$lehreinheit = getData($lehreinheit_result)[0];
|
||||
|
||||
$semesterstunden_alt = $lehreinheit->semesterstunden;
|
||||
$semesterstunden_neu = isset($new_data['semesterstunden']) ? $new_data['semesterstunden'] : $semesterstunden_alt;
|
||||
$bismelden_neu = isset($new_data['bismelden']) ? $new_data['bismelden'] : $lehreinheit->bismelden;
|
||||
$neue_stunden_eingerechnet = (bool)$bismelden_neu;
|
||||
$alte_stunden_eingerechnet = (bool)$lehreinheit->bismelden;
|
||||
$stundenplan_update = false;
|
||||
|
||||
if ($old_uid !== $new_uid)
|
||||
//TODO kollision check, wird vorerst nicht implementiert -> nur über das FAS möglich
|
||||
if (isset($new_data['mitarbeiter_uid']) && $new_data['mitarbeiter_uid'] !== $mitarbeiter_uid)
|
||||
{
|
||||
$lehreinheit_data = $this->_ci->LehreinheitmitarbeiterModel->loadWhere(array('mitarbeiter_uid' => $new_uid, 'lehreinheit_id' => $lehreinheit_id));
|
||||
$this->_ci->load->model('ressource/stundenplandev_model', 'StundenplandevModel');
|
||||
$this->_ci->StundenplandevModel->addGroupBy('stundenplandev_id');
|
||||
$this->_ci->StundenplandevModel->addGroupBy('mitarbeiter_uid');
|
||||
$this->_ci->StundenplandevModel->addGroupBy('mitarbeiter_uid');
|
||||
$verplant = $this->_ci->StundenplandevModel->loadWhere(array('lehreinheit_id' => $lehreinheit_id, 'mitarbeiter_uid' => $mitarbeiter_uid));
|
||||
|
||||
if (hasData($verplant))
|
||||
return error($this->_ci->phraseslib->t("lehre", "lektorbereitsverplant"));
|
||||
|
||||
$lehreinheit_data = $this->_ci->LehreinheitmitarbeiterModel->loadWhere(array('mitarbeiter_uid' => $new_data['mitarbeiter_uid'], 'lehreinheit_id' => $lehreinheit_id));
|
||||
|
||||
if (hasData($lehreinheit_data))
|
||||
return error($this->_ci->phraseslib->t("lehre", "bereitzugeteilt"));
|
||||
|
||||
$this->_ci->StundenplandevModel->addGroupBy('stundenplandev_id');
|
||||
$this->_ci->StundenplandevModel->addGroupBy('mitarbeiter_uid');
|
||||
$verplant = $this->_ci->StundenplandevModel->loadWhere(array('lehreinheit_id' => $lehreinheit_id, 'mitarbeiter_uid' => $old_uid));
|
||||
|
||||
if (hasData($verplant))
|
||||
{
|
||||
$kollision = $this->hasKollision(getData($verplant), $new_uid);
|
||||
|
||||
$ignore_kollision = $this->_ci->variablelib->getVar('ignore_kollision');
|
||||
|
||||
if ($kollision === false || $ignore_kollision == 'true')
|
||||
{
|
||||
$stundenplan_update = true;
|
||||
}
|
||||
else if (is_array($kollision))
|
||||
{
|
||||
return error( "Änderung fehlgeschlagen! Die Änderung des Lektors führt zu ".count($kollision)." Kollision(en) im LV-Plan. Deaktivieren Sie die Kollisionspruefung oder wenden Sie sich an die LV-Planung!\n zB. $kollision[0]");
|
||||
}
|
||||
else
|
||||
{
|
||||
return error($kollision);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$warning = '';
|
||||
if (($semesterstunden_neu !== '' && $semesterstunden_alt !== '') && (($semesterstunden_neu > $semesterstunden_alt) || $neue_stunden_eingerechnet))
|
||||
if (isset($new_data['semesterstunden']))
|
||||
{
|
||||
$studiengang_result = $this->_ci->StudiengangModel->loadWhere(array('studiengang_kz' => $lehreinheit->studiengang_kz));
|
||||
if (isError($studiengang_result)) return $studiengang_result;
|
||||
@@ -148,7 +120,7 @@ class LektorLib
|
||||
if (isError($studiensemester_result)) return $studiensemester_result;
|
||||
$studiensemester = getData($studiensemester_result)[0];
|
||||
|
||||
$echter_dv_result = $this->_ci->DienstverhaeltnisModel->existsDienstverhaeltnis($new_uid, $studiensemester->start, $studiensemester->ende, 'echterdv');
|
||||
$echter_dv_result = $this->_ci->DienstverhaeltnisModel->existsDienstverhaeltnis($mitarbeiter_uid, $studiensemester->start, $studiensemester->ende, 'echterdv');
|
||||
|
||||
$echter_dv = false;
|
||||
|
||||
@@ -157,78 +129,83 @@ class LektorLib
|
||||
$echter_dv = true;
|
||||
}
|
||||
|
||||
$stundengrenze_result = $this->_ci->OrganisationseinheitModel->getStundengrenze($studiengang->oe_kurzbz, $echter_dv);
|
||||
if (isError($stundengrenze_result)) return $stundengrenze_result;
|
||||
$neue_stunden_eingerechnet = isset($new_data['bismelden']) ? $new_data['bismelden'] : $lehreinheit->bismelden;
|
||||
$alte_stunden_eingerechnet = $lehreinheit->bismelden;
|
||||
|
||||
$stundengrenze = getData($stundengrenze_result)[0];
|
||||
|
||||
$oe_result = $this->_ci->OrganisationseinheitModel->getChilds($stundengrenze->oe_kurzbz);
|
||||
$oe_array = hasData($oe_result) ? array_column(getData($oe_result), 'oe_kurzbz') : array();
|
||||
|
||||
if ($alte_stunden_eingerechnet && $neue_stunden_eingerechnet)
|
||||
$this->_ci->LehreinheitmitarbeiterModel->addSelect("(SUM(tbl_lehreinheitmitarbeiter.semesterstunden) - ($semesterstunden_alt) + {$this->_ci->LehreinheitmitarbeiterModel->db->escape($semesterstunden_neu)}) as summe");
|
||||
else if ($alte_stunden_eingerechnet && !$neue_stunden_eingerechnet)
|
||||
$this->_ci->LehreinheitmitarbeiterModel->addSelect("(SUM(tbl_lehreinheitmitarbeiter.semesterstunden) - ($semesterstunden_alt)) as summe");
|
||||
else if (!$alte_stunden_eingerechnet && $neue_stunden_eingerechnet)
|
||||
$this->_ci->LehreinheitmitarbeiterModel->addSelect("(SUM(tbl_lehreinheitmitarbeiter.semesterstunden) + ({$this->_ci->LehreinheitmitarbeiterModel->db->escape($semesterstunden_neu)})) as summe");
|
||||
else if (!$alte_stunden_eingerechnet && !$neue_stunden_eingerechnet)
|
||||
$this->_ci->LehreinheitmitarbeiterModel->addSelect("(SUM(tbl_lehreinheitmitarbeiter.semesterstunden)) as summe");
|
||||
|
||||
$this->_ci->LehreinheitmitarbeiterModel->addJoin('lehre.tbl_lehreinheit', 'lehreinheit_id');
|
||||
$this->_ci->LehreinheitmitarbeiterModel->addJoin('lehre.tbl_lehrveranstaltung', 'lehrveranstaltung_id');
|
||||
$this->_ci->LehreinheitmitarbeiterModel->addJoin('public.tbl_studiengang', 'studiengang_kz');
|
||||
|
||||
$this->_ci->LehreinheitmitarbeiterModel->db->where('mitarbeiter_uid', $new_uid);
|
||||
$this->_ci->LehreinheitmitarbeiterModel->db->where('studiensemester_kurzbz', $lehreinheit->studiensemester_kurzbz);
|
||||
$this->_ci->LehreinheitmitarbeiterModel->db->where('bismelden', true);
|
||||
$this->_ci->LehreinheitmitarbeiterModel->db->where('lower(mitarbeiter_uid) NOT LIKE', '_dummy%');
|
||||
|
||||
if (count($oe_array) > 0)
|
||||
if (($new_data['semesterstunden'] > $lehreinheit->semesterstunden) || $neue_stunden_eingerechnet)
|
||||
{
|
||||
$stundengrenze_result = $this->_ci->OrganisationseinheitModel->getStundengrenze($studiengang->oe_kurzbz, $echter_dv);
|
||||
if (isError($stundengrenze_result)) return $stundengrenze_result;
|
||||
|
||||
$stundengrenze = getData($stundengrenze_result)[0];
|
||||
|
||||
$oe_result = $this->_ci->OrganisationseinheitModel->getChilds($stundengrenze->oe_kurzbz);
|
||||
$oe_array = hasData($oe_result) ? array_column(getData($oe_result), 'oe_kurzbz') : array('');
|
||||
|
||||
if ($alte_stunden_eingerechnet && $neue_stunden_eingerechnet)
|
||||
$this->_ci->LehreinheitmitarbeiterModel->addSelect("(SUM(tbl_lehreinheitmitarbeiter.semesterstunden) - ($lehreinheit->semesterstunden) + {$this->_ci->LehreinheitmitarbeiterModel->db->escape($new_data['semesterstunden'])}) as summe");
|
||||
else if ($alte_stunden_eingerechnet && !$neue_stunden_eingerechnet)
|
||||
$this->_ci->LehreinheitmitarbeiterModel->addSelect("(SUM(tbl_lehreinheitmitarbeiter.semesterstunden) - ($lehreinheit->semesterstunden)) as summe");
|
||||
else if (!$alte_stunden_eingerechnet && $neue_stunden_eingerechnet)
|
||||
$this->_ci->LehreinheitmitarbeiterModel->addSelect("(SUM(tbl_lehreinheitmitarbeiter.semesterstunden) + ({$this->_ci->LehreinheitmitarbeiterModel->db->escape($new_data['semesterstunden'])})) as summe");
|
||||
else if (!$alte_stunden_eingerechnet && !$neue_stunden_eingerechnet)
|
||||
$this->_ci->LehreinheitmitarbeiterModel->addSelect("(SUM(tbl_lehreinheitmitarbeiter.semesterstunden)) as summe");
|
||||
|
||||
$this->_ci->LehreinheitmitarbeiterModel->addJoin('lehre.tbl_lehreinheit', 'lehreinheit_id');
|
||||
$this->_ci->LehreinheitmitarbeiterModel->addJoin('lehre.tbl_lehrveranstaltung', 'lehrveranstaltung_id');
|
||||
$this->_ci->LehreinheitmitarbeiterModel->addJoin('public.tbl_studiengang', 'studiengang_kz');
|
||||
|
||||
$this->_ci->LehreinheitmitarbeiterModel->db->where('mitarbeiter_uid', (isset($new_data['mitarbeiter_uid']) ? $new_data['mitarbeiter_uid'] : $mitarbeiter_uid));
|
||||
$this->_ci->LehreinheitmitarbeiterModel->db->where('studiensemester_kurzbz', $lehreinheit->studiensemester_kurzbz);
|
||||
$this->_ci->LehreinheitmitarbeiterModel->db->where('bismelden', true);
|
||||
$this->_ci->LehreinheitmitarbeiterModel->db->where('lower(mitarbeiter_uid) NOT LIKE', '_dummy%');
|
||||
|
||||
$this->_ci->LehreinheitmitarbeiterModel->db->where_in('tbl_studiengang.oe_kurzbz', $oe_array);
|
||||
}
|
||||
|
||||
if(defined('FAS_LV_LEKTORINNENZUTEILUNG_STUNDEN_IGNORE_OE')
|
||||
&& is_array(FAS_LV_LEKTORINNENZUTEILUNG_STUNDEN_IGNORE_OE)
|
||||
&& count(FAS_LV_LEKTORINNENZUTEILUNG_STUNDEN_IGNORE_OE) > 0)
|
||||
{
|
||||
$this->_ci->LehreinheitmitarbeiterModel->db->where_not_in('tbl_studiengang.oe_kurzbz', FAS_LV_LEKTORINNENZUTEILUNG_STUNDEN_IGNORE_OE);
|
||||
}
|
||||
|
||||
$summe_result = $this->_ci->LehreinheitmitarbeiterModel->load();
|
||||
|
||||
if (isError($summe_result)) return $summe_result;
|
||||
|
||||
if (!hasData($summe_result)) return error('Fehler beim Ermitteln der Gesamtstunden');
|
||||
|
||||
$summe = getData($summe_result)[0]->summe;
|
||||
|
||||
if ($summe > $stundengrenze->stunden)
|
||||
{
|
||||
if (!$echter_dv && (!$this->_ci->permissionlib->isBerechtigt('admin')))
|
||||
if(defined('FAS_LV_LEKTORINNENZUTEILUNG_STUNDEN_IGNORE_OE')
|
||||
&& is_array(FAS_LV_LEKTORINNENZUTEILUNG_STUNDEN_IGNORE_OE)
|
||||
&& count(FAS_LV_LEKTORINNENZUTEILUNG_STUNDEN_IGNORE_OE) > 0)
|
||||
{
|
||||
if (!$this->LehrauftragAufFirma($new_uid))
|
||||
return error("ACHTUNG: Die maximal erlaubte Semesterstundenanzahl des Lektors von $summe Stunden ($stundengrenze->stunden) wurde ueberschritten!\nDaten wurden NICHT gespeichert!\n\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
$warning .= "ACHTUNG: Die maximal erlaubte Semesterstundenanzahl des Lektors von $summe Stunden ($stundengrenze->stunden) wurde ueberschritten!\nDaten wurden gespeichert!\n\n";
|
||||
$this->_ci->LehreinheitmitarbeiterModel->db->where_not_in('tbl_studiengang.oe_kurzbz', FAS_LV_LEKTORINNENZUTEILUNG_STUNDEN_IGNORE_OE);
|
||||
}
|
||||
|
||||
$stunden_limit_result = $this->getStundenInstitut($new_uid, $lehreinheit->studiensemester_kurzbz, $oe_array);
|
||||
$summe_result = $this->_ci->LehreinheitmitarbeiterModel->load();
|
||||
|
||||
if (hasData($stunden_limit_result))
|
||||
if (isError($summe_result)) return $summe_result;
|
||||
|
||||
if (!hasData($summe_result)) return error('Fehler beim Ermitteln der Gesamtstunden');
|
||||
|
||||
$summe = getData($summe_result)[0]->summe;
|
||||
|
||||
if ($summe > $stundengrenze->stunden)
|
||||
{
|
||||
$stunden_limit_array = getData($stunden_limit_result);
|
||||
foreach ($stunden_limit_array as $stunden_limit)
|
||||
|
||||
if (!$echter_dv && (!$this->_ci->permissionlib->isBerechtigt('admin')))
|
||||
{
|
||||
$warning .= $stunden_limit->summe . ' Stunden ' . $stunden_limit->bezeichnung . "\n";
|
||||
if (!$this->LehrauftragAufFirma(isset($formData['mitarbeiter_uid']) ? $formData['mitarbeiter_uid'] : $mitarbeiter_uid))
|
||||
return error("ACHTUNG: Die maximal erlaubte Semesterstundenanzahl des Lektors von $summe Stunden ($stundengrenze->stunden) wurde ueberschritten!\nDaten wurden NICHT gespeichert!\n\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
$warning .= "ACHTUNG: Die maximal erlaubte Semesterstundenanzahl des Lektors von $summe Stunden ($stundengrenze->stunden) wurde ueberschritten!\nDaten wurden gespeichert!\n\n";
|
||||
}
|
||||
|
||||
$stunden_limit_result = $this->getStundenInstitut($mitarbeiter_uid, $lehreinheit->studiensemester_kurzbz, $oe_array);
|
||||
|
||||
if (hasData($stunden_limit_result))
|
||||
{
|
||||
$stunden_limit_array = getData($stunden_limit_result);
|
||||
foreach ($stunden_limit_array as $stunden_limit)
|
||||
{
|
||||
$warning .= $stunden_limit->summe . ' Stunden ' . $stunden_limit->bezeichnung . "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$benutzer_result = $this->_ci->BenutzerModel->load(array($new_uid));
|
||||
$benutzer_result = $this->_ci->BenutzerModel->load(array(isset($formData['mitarbeiter_uid']) ? $formData['mitarbeiter_uid'] : $mitarbeiter_uid));
|
||||
|
||||
if (isError($benutzer_result)) return $benutzer_result;
|
||||
|
||||
@@ -250,23 +227,12 @@ class LektorLib
|
||||
'bismelden'
|
||||
);
|
||||
|
||||
$nullable_fields = array('stundensatz', 'semesterstunden', 'planstunden');
|
||||
|
||||
$updateData = array();
|
||||
foreach ($updatableFields as $field)
|
||||
{
|
||||
if (!array_key_exists($field, $new_data))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$value = isset($new_data[$field]) ? $new_data[$field] : null;
|
||||
|
||||
$value = $new_data[$field];
|
||||
|
||||
if (in_array($field, $nullable_fields))
|
||||
{
|
||||
$updateData[$field] = $value;
|
||||
}
|
||||
elseif ($value !== null)
|
||||
if ($value !== null)
|
||||
{
|
||||
$updateData[$field] = $value;
|
||||
}
|
||||
@@ -274,24 +240,10 @@ class LektorLib
|
||||
$updateData['updatevon'] = getAuthUID();
|
||||
$updateData['updateamum'] = date('Y-m-d H:i:s');
|
||||
|
||||
$result = $this->_ci->LehreinheitmitarbeiterModel->update(array('lehreinheit_id' => $lehreinheit_id, 'mitarbeiter_uid' => $old_uid), $updateData);
|
||||
$result = $this->_ci->LehreinheitmitarbeiterModel->update(array('lehreinheit_id' => $lehreinheit_id, 'mitarbeiter_uid' => $mitarbeiter_uid), $updateData);
|
||||
|
||||
if (isError($result)) return $result;
|
||||
|
||||
if ($stundenplan_update)
|
||||
{
|
||||
$update_result = $this->_ci->StundenplandevModel->update([
|
||||
'lehreinheit_id' => $lehreinheit_id,
|
||||
'mitarbeiter_uid' => $old_uid,
|
||||
], [
|
||||
'mitarbeiter_uid' => $new_uid,
|
||||
'updateamum' => date('Y-m-d H:i:s'),
|
||||
'updatevon' => getAuthUID()
|
||||
]);
|
||||
|
||||
if (isError($update_result)) return $update_result;
|
||||
}
|
||||
|
||||
if ($warning !== '') return success(['warning' => $warning]);
|
||||
|
||||
return success('Erfolgreich geupdated');
|
||||
@@ -395,52 +347,4 @@ class LektorLib
|
||||
$this->_ci->LehreinheitmitarbeiterModel->addGroupBy('tbl_studiengang.bezeichnung');
|
||||
return $this->_ci->LehreinheitmitarbeiterModel->load();
|
||||
}
|
||||
|
||||
private function hasKollision($stunden, $mitarbeiter)
|
||||
{
|
||||
$kollision = array();
|
||||
|
||||
$ignore_zeitsperre = $this->_ci->variablelib->getVar('ignore_zeitsperre');
|
||||
$ignore_reservierung = $this->_ci->variablelib->getVar('ignore_reservierung');
|
||||
|
||||
foreach ($stunden as $stunde)
|
||||
{
|
||||
$stundenplan_result = $this->_ci->StundenplandevModel->lektorHasStundenplandevEintrag($mitarbeiter, $stunde->datum, $stunde->stunde);
|
||||
|
||||
if (isError($stundenplan_result))
|
||||
return $stundenplan_result;
|
||||
|
||||
if (hasData($stundenplan_result))
|
||||
{
|
||||
$stundenplan_result = getData($stundenplan_result)[0];
|
||||
$kollision[] = "Kollision stundenplandev: $stundenplan_result->stundenplandev_id|$stundenplan_result->lektor|$stundenplan_result->ort_kurzbz|$stundenplan_result->stg_kurzbz-$stundenplan_result->semester$stundenplan_result->verband$stundenplan_result->gruppe$stundenplan_result->gruppe_kurzbz - $stundenplan_result->datum/$stundenplan_result->stunde";
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($ignore_zeitsperre == 'false' && (!defined('KOLLISIONSFREIE_USER') || !in_array($mitarbeiter, unserialize(KOLLISIONSFREIE_USER))))
|
||||
{
|
||||
$zeitsperre_result = $this->_ci->ZeitsperreModel->checkIfZeitsperreExists($mitarbeiter, $stunde->datum, $stunde->stunde);
|
||||
|
||||
if (hasData($zeitsperre_result))
|
||||
{
|
||||
$zeitsperre_result = getData($zeitsperre_result)[0];
|
||||
$kollision[] = "Kollision (Zeitsperre): $zeitsperre_result->zeitsperre_id|$zeitsperre_result->mitarbeiter_uid|$zeitsperre_result->zeitsperretyp_kurzbz - $zeitsperre_result->vondatum/$zeitsperre_result->vonstunde|$zeitsperre_result->bisdatum/$zeitsperre_result->bisstunde";
|
||||
}
|
||||
}
|
||||
|
||||
if ($ignore_reservierung == 'false' && (!defined('KOLLISIONSFREIE_USER') || !in_array($mitarbeiter, unserialize(KOLLISIONSFREIE_USER))))
|
||||
{
|
||||
$reservierung_result = $this->_ci->ReservierungModel->lektorHasReservierung($mitarbeiter, $stunde->datum, $stunde->stunde);
|
||||
|
||||
if (hasData($reservierung_result))
|
||||
{
|
||||
$reservierung_result = getData($reservierung_result)[0];
|
||||
$kollision[] = "Kollision (Reservierung): $reservierung_result->reservierung_id|$reservierung_result->uid|$reservierung_result->ort_kurzbz|$reservierung_result->stg_kurzbz-$reservierung_result->semester$reservierung_result->verband$reservierung_result->gruppe$reservierung_result->gruppe_kurzbz - $reservierung_result->datum/$reservierung_result->stunde";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return isEmptyArray($kollision) ? false : $kollision;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,13 +40,16 @@ class StundenplanLib
|
||||
* @return stdClass
|
||||
* @access public
|
||||
*/
|
||||
public function getEventsUser($start, $end)
|
||||
public function getEventsUser($start, $end, $uid = null)
|
||||
{
|
||||
$this->_ci =& get_instance();
|
||||
|
||||
$this->_ci->load->model('ressource/Mitarbeiter_model', 'MitarbeiterModel');
|
||||
|
||||
$uid = getAuthUID();
|
||||
if (!$uid) {
|
||||
$uid = getAuthUID();
|
||||
}
|
||||
|
||||
if (is_null($uid))
|
||||
return error("No UID");
|
||||
|
||||
@@ -181,21 +184,6 @@ class StundenplanLib
|
||||
return success($stundenplan_data);
|
||||
}
|
||||
|
||||
public function getEventsByLE($lehreinheit_id, $start, $end, $stundenplan)
|
||||
{
|
||||
$this->_ci =& get_instance();
|
||||
|
||||
$this->_ci->load->model('ressource/Stundenplan_model', 'StundenplanModel');
|
||||
return $this->_ci->StundenplanModel->getStundenplanLE($lehreinheit_id, $start, $end, $stundenplan);
|
||||
}
|
||||
|
||||
public function getEventsByLV($lehrveranstaltung_id, $start, $end, $stundenplan)
|
||||
{
|
||||
$this->_ci =& get_instance();
|
||||
|
||||
$this->_ci->load->model('ressource/Stundenplan_model', 'StundenplanModel');
|
||||
return $this->_ci->StundenplanModel->getStundenplanLV($lehrveranstaltung_id, $start, $end, $stundenplan);
|
||||
}
|
||||
/**
|
||||
* Get stundenplan for a room
|
||||
*
|
||||
@@ -232,7 +220,7 @@ class StundenplanLib
|
||||
* @param string $ort_kurzbz
|
||||
* @return stdClass
|
||||
*/
|
||||
public function getReservierungen($start_date, $end_date, $ort_kurzbz = '')
|
||||
public function getReservierungen($start_date, $end_date, $ort_kurzbz = '', $uid = null)
|
||||
{
|
||||
$this->_ci =& get_instance();
|
||||
|
||||
@@ -243,14 +231,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(getAuthUID()));
|
||||
$is_mitarbeiter = getData($this->_ci->MitarbeiterModel->isMitarbeiter($uid ?? 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);
|
||||
$reservierungen = $this->_ci->ReservierungModel->getReservierungenMitarbeiter($start_date, $end_date, $uid);
|
||||
} else {
|
||||
// querying the reservierungen
|
||||
$reservierungen = $this->_ci->ReservierungModel->getReservierungen($start_date, $end_date, $ort_kurzbz);
|
||||
$reservierungen = $this->_ci->ReservierungModel->getReservierungen($start_date, $end_date, $ort_kurzbz, $uid);
|
||||
}
|
||||
|
||||
if (isError($reservierungen))
|
||||
@@ -460,6 +448,24 @@ class StundenplanLib
|
||||
return success($ferienEventsFlattened);
|
||||
}
|
||||
|
||||
public function getEventsStgOrg( $start, $end, $stg_kz, $sem, $verband, $gruppe)
|
||||
{
|
||||
$this->_ci =& get_instance();
|
||||
|
||||
$this->_ci->load->model('ressource/Stundenplan_model', 'StundenplanModel');
|
||||
|
||||
$stundenplan_data = $this->_ci->StundenplanModel->getStundenplanStudiengang($start, $end, $stg_kz, $sem, $verband, $gruppe);
|
||||
if (isError($stundenplan_data))
|
||||
return $stundenplan_data;
|
||||
$stundenplan_data = getData($stundenplan_data) ?? [];
|
||||
|
||||
$function_error = $this->expandObjectInformation($stundenplan_data);
|
||||
if ($function_error)
|
||||
return $function_error;
|
||||
|
||||
return success($stundenplan_data);
|
||||
}
|
||||
|
||||
// start of the private functions ########################################################################################################
|
||||
|
||||
// function used to sort an array of studiensemester strings
|
||||
|
||||
@@ -3,6 +3,7 @@ namespace vertragsbestandteil;
|
||||
|
||||
use Exception;
|
||||
use vertragsbestandteil\VertragsbestandteilStunden;
|
||||
use vertragsbestandteil\VertragsbestandteilLohnguide;
|
||||
|
||||
/**
|
||||
* Description of VertragsbestandteilFactory
|
||||
@@ -22,6 +23,7 @@ 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)
|
||||
{
|
||||
@@ -69,6 +71,11 @@ 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 '
|
||||
@@ -127,6 +134,12 @@ 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,6 +10,7 @@ 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';
|
||||
|
||||
|
||||
@@ -0,0 +1,155 @@
|
||||
<?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()
|
||||
{
|
||||
if( !(filter_var($this->tage, FILTER_VALIDATE_INT,
|
||||
array(
|
||||
'options' => array(
|
||||
'min_range' => 1,
|
||||
'max_range' => 50
|
||||
)
|
||||
)
|
||||
)) ) {
|
||||
$this->validationerrors[] = 'Urlaubsanspruch muss eine Tagesanzahl im Bereich 1 bis 50 sein.';
|
||||
}
|
||||
|
||||
return parent::validate();
|
||||
} */
|
||||
}
|
||||
@@ -52,53 +52,4 @@ class LePruefung_model extends DB_Model
|
||||
'student_uid' => $student_uid
|
||||
]);
|
||||
}
|
||||
|
||||
public function getPruefungenByLvStudiensemester($lv_id, $sem_kurzbz) {
|
||||
$qry = "SELECT tbl_pruefung.*, tbl_lehrveranstaltung.bezeichnung as lehrveranstaltung_bezeichnung, tbl_lehrveranstaltung.lehrveranstaltung_id,
|
||||
tbl_note.bezeichnung as note_bezeichnung, tbl_pruefungstyp.beschreibung as typ_beschreibung, tbl_lehreinheit.studiensemester_kurzbz as studiensemester_kurzbz
|
||||
FROM lehre.tbl_pruefung, lehre.tbl_lehreinheit, lehre.tbl_lehrveranstaltung, lehre.tbl_note, lehre.tbl_pruefungstyp
|
||||
WHERE tbl_pruefung.lehreinheit_id=tbl_lehreinheit.lehreinheit_id
|
||||
AND tbl_lehreinheit.lehrveranstaltung_id=tbl_lehrveranstaltung.lehrveranstaltung_id
|
||||
AND tbl_pruefung.note = tbl_note.note
|
||||
AND tbl_pruefung.pruefungstyp_kurzbz=tbl_pruefungstyp.pruefungstyp_kurzbz
|
||||
AND tbl_lehrveranstaltung.lehrveranstaltung_id = ?
|
||||
AND tbl_lehreinheit.studiensemester_kurzbz = ?
|
||||
ORDER BY datum DESC;";
|
||||
|
||||
return $this->execReadOnlyQuery($qry, array($lv_id, $sem_kurzbz));
|
||||
}
|
||||
|
||||
public function getPruefungenByUidTypLvStudiensemester($uid, $typ = null, $lv_id = null, $sem_kurzbz = null) {
|
||||
$params = [$uid];
|
||||
$qry = "SELECT tbl_pruefung.*, tbl_lehrveranstaltung.bezeichnung as lehrveranstaltung_bezeichnung, tbl_lehrveranstaltung.lehrveranstaltung_id,
|
||||
tbl_note.bezeichnung as note_bezeichnung, tbl_pruefungstyp.beschreibung as typ_beschreibung, tbl_lehreinheit.studiensemester_kurzbz as studiensemester_kurzbz
|
||||
FROM lehre.tbl_pruefung, lehre.tbl_lehreinheit, lehre.tbl_lehrveranstaltung, lehre.tbl_note, lehre.tbl_pruefungstyp
|
||||
WHERE student_uid= ?
|
||||
AND tbl_pruefung.lehreinheit_id=tbl_lehreinheit.lehreinheit_id
|
||||
AND tbl_lehreinheit.lehrveranstaltung_id=tbl_lehrveranstaltung.lehrveranstaltung_id
|
||||
AND tbl_pruefung.note = tbl_note.note
|
||||
AND tbl_pruefung.pruefungstyp_kurzbz=tbl_pruefungstyp.pruefungstyp_kurzbz";
|
||||
if ($typ != null)
|
||||
{
|
||||
$qry .= " AND tbl_pruefungstyp.pruefungstyp_kurzbz = ?";
|
||||
$params[] = $typ;
|
||||
}
|
||||
|
||||
if ($lv_id != null)
|
||||
{
|
||||
$qry .= " AND tbl_lehrveranstaltung.lehrveranstaltung_id = ?";
|
||||
$params[] = $lv_id;
|
||||
}
|
||||
|
||||
if ($sem_kurzbz != null)
|
||||
{
|
||||
$qry .= " AND tbl_lehreinheit.studiensemester_kurzbz = ?";
|
||||
$params[] = $sem_kurzbz;
|
||||
}
|
||||
|
||||
|
||||
$qry .= " ORDER BY datum DESC";
|
||||
|
||||
return $this->execReadOnlyQuery($qry, $params);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -314,28 +314,6 @@ EOSQL;
|
||||
return $this->execQuery($query, $params);
|
||||
}
|
||||
|
||||
public function getAllLehreinheitenForLvaAndMaUid($lva_id, $ma_uid, $sem_kurzbz)
|
||||
{
|
||||
$query = "SELECT DISTINCT tbl_lehreinheitmitarbeiter.lehreinheit_id, tbl_lehreinheit.lehrveranstaltung_id, tbl_lehreinheit.lehrform_kurzbz,
|
||||
tbl_lehreinheitmitarbeiter.mitarbeiter_uid,
|
||||
tbl_lehreinheitgruppe.semester,
|
||||
tbl_lehreinheitgruppe.verband,
|
||||
tbl_lehreinheitgruppe.gruppe,
|
||||
tbl_lehreinheitgruppe.gruppe_kurzbz,
|
||||
tbl_lehrveranstaltung.kurzbz,
|
||||
tbl_studiengang.kurzbzlang,
|
||||
(SELECT COUNT(DISTINCT datum) FROM campus.vw_stundenplan WHERE lehreinheit_id = lehre.tbl_lehreinheit.lehreinheit_id) as termincount,
|
||||
(SELECT COUNT(*) FROM campus.vw_student_lehrveranstaltung WHERE lehreinheit_id = lehre.tbl_lehreinheit.lehreinheit_id) as studentcount
|
||||
FROM lehre.tbl_lehreinheit JOIN lehre.tbl_lehreinheitmitarbeiter USING(lehreinheit_id)
|
||||
JOIN lehre.tbl_lehreinheitgruppe USING(lehreinheit_id)
|
||||
JOIN lehre.tbl_lehrveranstaltung USING(lehrveranstaltung_id)
|
||||
JOIN public.tbl_studiengang ON (tbl_lehreinheitgruppe.studiengang_kz = tbl_studiengang.studiengang_kz)
|
||||
WHERE lehrveranstaltung_id = ? AND studiensemester_kurzbz = ? AND mitarbeiter_uid = ?
|
||||
ORDER BY tbl_lehreinheitgruppe.gruppe_kurzbz";
|
||||
|
||||
return $this->execQuery($query, [$lva_id, $sem_kurzbz, $ma_uid]);
|
||||
}
|
||||
|
||||
|
||||
public function getOes($lehreinheit_id)
|
||||
{
|
||||
|
||||
@@ -341,7 +341,7 @@ class Lehreinheitgruppe_model extends DB_Model
|
||||
$this->db->where('lehreinheit_id', $lehreinheit_id);
|
||||
$this->db->where('studiengang_kz', $gruppen_array->studiengang_kz);
|
||||
|
||||
if (!isEmptyString((string)$gruppen_array->semester))
|
||||
if (!isEmptyString($gruppen_array->semester))
|
||||
{
|
||||
$this->db->where('semester', $gruppen_array->semester);
|
||||
}
|
||||
@@ -444,37 +444,30 @@ class Lehreinheitgruppe_model extends DB_Model
|
||||
)
|
||||
ELSE tbl_gruppe.beschreibung
|
||||
END AS beschreibung");
|
||||
$this->addSelect("
|
||||
CASE
|
||||
WHEN trim(COALESCE(tbl_lehreinheitgruppe.gruppe_kurzbz, '')) = '' THEN
|
||||
$this->addSelect("CASE
|
||||
WHEN tbl_lehreinheitgruppe.gruppe_kurzbz IS NULL THEN
|
||||
(
|
||||
SELECT EXISTS (
|
||||
SELECT 1
|
||||
FROM lehre.tbl_stundenplandev
|
||||
WHERE lehreinheit_id = tbl_lehreinheitgruppe.lehreinheit_id
|
||||
AND studiengang_kz = tbl_lehreinheitgruppe.studiengang_kz
|
||||
AND semester = tbl_lehreinheitgruppe.semester
|
||||
AND TRIM(COALESCE(verband, '')) = TRIM(tbl_lehreinheitgruppe.verband)
|
||||
AND TRIM(COALESCE(gruppe, '')) = TRIM(tbl_lehreinheitgruppe.gruppe)
|
||||
AND (gruppe_kurzbz IS NULL OR gruppe_kurzbz = '')
|
||||
)
|
||||
)
|
||||
ELSE
|
||||
(
|
||||
SELECT EXISTS (
|
||||
SELECT 1
|
||||
FROM lehre.tbl_stundenplandev sp
|
||||
WHERE sp.lehreinheit_id = tbl_lehreinheitgruppe.lehreinheit_id
|
||||
AND sp.studiengang_kz = tbl_lehreinheitgruppe.studiengang_kz
|
||||
AND sp.semester = tbl_lehreinheitgruppe.semester
|
||||
AND trim(COALESCE(sp.verband, '')) = trim(COALESCE(tbl_lehreinheitgruppe.verband, ''))
|
||||
AND trim(COALESCE(sp.gruppe, '')) = trim(COALESCE(tbl_lehreinheitgruppe.gruppe, ''))
|
||||
AND trim(COALESCE(sp.gruppe_kurzbz, '')) = ''
|
||||
FROM lehre.tbl_stundenplandev
|
||||
WHERE lehreinheit_id = tbl_lehreinheitgruppe.lehreinheit_id
|
||||
AND gruppe_kurzbz = tbl_lehreinheitgruppe.gruppe_kurzbz
|
||||
)
|
||||
)
|
||||
ELSE
|
||||
(
|
||||
SELECT EXISTS (
|
||||
SELECT 1
|
||||
FROM lehre.tbl_stundenplandev sp
|
||||
WHERE sp.lehreinheit_id = tbl_lehreinheitgruppe.lehreinheit_id
|
||||
AND sp.studiengang_kz = tbl_lehreinheitgruppe.studiengang_kz
|
||||
AND sp.semester = tbl_lehreinheitgruppe.semester
|
||||
AND trim(COALESCE(sp.verband, '')) = trim(COALESCE(tbl_lehreinheitgruppe.verband, ''))
|
||||
AND trim(COALESCE(sp.gruppe, '')) = trim(COALESCE(tbl_lehreinheitgruppe.gruppe, ''))
|
||||
AND trim(COALESCE(sp.gruppe_kurzbz, '')) = trim(COALESCE(tbl_lehreinheitgruppe.gruppe_kurzbz, ''))
|
||||
)
|
||||
)
|
||||
END AS verplant
|
||||
");
|
||||
|
||||
END AS verplant");
|
||||
$this->addJoin('tbl_studiengang', 'studiengang_kz', 'LEFT');
|
||||
$this->addJoin('public.tbl_gruppe', 'gruppe_kurzbz', 'LEFT');
|
||||
|
||||
|
||||
@@ -317,9 +317,7 @@ class Lehrveranstaltung_model extends DB_Model
|
||||
tbl_bisio.bisio_id, tbl_bisio.von, tbl_bisio.bis, tbl_student.studiengang_kz AS stg_kz_student,
|
||||
tbl_zeugnisnote.note, tbl_mitarbeiter.mitarbeiter_uid, tbl_person.matr_nr, tbl_benutzer.uid,
|
||||
UPPER(tbl_studiengang.typ::varchar(1) || tbl_studiengang.kurzbz) as kuerzel, tbl_studiengang.orgform_kurzbz, vw_student_lehrveranstaltung.semester, vw_student_lehrveranstaltung.studiensemester_kurzbz, vw_student_lehrveranstaltung.bezeichnung,
|
||||
tbl_student.prestudent_id,
|
||||
campus.vw_student_lehrveranstaltung.lehreinheit_id
|
||||
|
||||
tbl_student.prestudent_id
|
||||
FROM
|
||||
campus.vw_student_lehrveranstaltung
|
||||
JOIN public.tbl_benutzer USING(uid)
|
||||
@@ -1056,26 +1054,6 @@ class Lehrveranstaltung_model extends DB_Model
|
||||
return $this->execQuery($qry, $params);
|
||||
}
|
||||
|
||||
public function getLvForLektorInSemester($sem_kurzbz, $uid) {
|
||||
$qry = "SELECT DISTINCT (tbl_lehrveranstaltung.lehrveranstaltung_id),
|
||||
UPPER(tbl_studiengang.typ::varchar(1) || tbl_studiengang.kurzbz) as stg_kurzbz,
|
||||
tbl_lehrveranstaltung.semester as lv_semester,
|
||||
tbl_lehrveranstaltung.bezeichnung as lv_bezeichnung,
|
||||
(SELECT kurzbz FROM public.tbl_mitarbeiter
|
||||
WHERE mitarbeiter_uid=tbl_lehreinheitmitarbeiter.mitarbeiter_uid) as lektor
|
||||
FROM
|
||||
lehre.tbl_lehreinheit JOIN lehre.tbl_lehreinheitmitarbeiter USING(lehreinheit_id)
|
||||
JOIN lehre.tbl_lehrveranstaltung USING(lehrveranstaltung_id)
|
||||
JOIN public.tbl_studiengang USING(studiengang_kz)
|
||||
JOIN lehre.tbl_lehrveranstaltung as lehrfach ON(tbl_lehreinheit.lehrfach_id=lehrfach.lehrveranstaltung_id)
|
||||
WHERE
|
||||
tbl_lehreinheit.studiensemester_kurzbz = ?
|
||||
AND mitarbeiter_uid = ?
|
||||
ORDER BY stg_kurzbz,lv_semester,lv_bezeichnung";
|
||||
|
||||
return $this->execReadOnlyQuery($qry, array($sem_kurzbz, $uid));
|
||||
}
|
||||
|
||||
public function getLvsByOrganization($oe_kurzbz)
|
||||
{
|
||||
$qry="
|
||||
@@ -1267,7 +1245,7 @@ class Lehrveranstaltung_model extends DB_Model
|
||||
{
|
||||
return "
|
||||
SELECT
|
||||
distinct on (lehrveranstaltung_id) lehrveranstaltung_id, tbl_lehrveranstaltung.kurzbz as lv_kurzbz, tbl_lehrveranstaltung.bezeichnung as lv_bezeichnung, bezeichnung_english as lv_bezeichnung_english, studiengang_kz,
|
||||
lehrveranstaltung_id, tbl_lehrveranstaltung.kurzbz as lv_kurzbz, tbl_lehrveranstaltung.bezeichnung as lv_bezeichnung, bezeichnung_english as lv_bezeichnung_english, studiengang_kz,
|
||||
tbl_studienplan_lehrveranstaltung.semester, tbl_lehrveranstaltung.sprache,
|
||||
ects as lv_ects, semesterstunden, anmerkung, lehre, lehreverzeichnis as lv_lehreverzeichnis, tbl_lehrveranstaltung.aktiv,
|
||||
planfaktor as lv_planfaktor, planlektoren as lv_planlektoren, planpersonalkosten as lv_planpersonalkosten,
|
||||
|
||||
@@ -29,14 +29,10 @@ class Lvgesamtnote_model extends DB_Model
|
||||
$this->addSelect("lv.bezeichnung AS lehrveranstaltung_bezeichnung");
|
||||
$this->addSelect("lv.studiengang_kz");
|
||||
$this->addSelect("UPPER(stg.typ || stg.kurzbz) AS studiengang");
|
||||
$this->addSelect("person.vorname");
|
||||
$this->addSelect("person.nachname");
|
||||
|
||||
$this->addJoin("lehre.tbl_note n", "note");
|
||||
$this->addJoin("lehre.tbl_lehrveranstaltung lv", "lehrveranstaltung_id");
|
||||
$this->addJoin("public.tbl_studiengang stg", "studiengang_kz");
|
||||
$this->addJoin("public.tbl_benutzer benutzer", "uid = student_uid", "LEFT");
|
||||
$this->addJoin("public.tbl_person person", "person_id", "LEFT");
|
||||
|
||||
$this->db->where($this->dbTable . ".freigabedatum <", "NOW()", false);
|
||||
|
||||
|
||||
@@ -149,8 +149,6 @@ class Projektarbeit_model extends DB_Model
|
||||
lehre.tbl_projektarbeit.abstract as abstract,
|
||||
lehre.tbl_projektarbeit.abstract_en as abstract_en,
|
||||
lehre.tbl_projektarbeit.insertamum as insertamum,
|
||||
(SELECT abgeschicktvon FROM extension.tbl_projektarbeitsbeurteilung WHERE projektarbeit_id = tbl_projektarbeit.projektarbeit_id AND betreuer_person_id = tbl_projektbetreuer.person_id) AS babgeschickt,
|
||||
(SELECT abgeschicktvon FROM extension.tbl_projektarbeitsbeurteilung WHERE projektarbeit_id = tbl_projektarbeit.projektarbeit_id AND betreuerart_kurzbz IN ('Zweitbetreuer', 'Zweitbegutachter') LIMIT 1) AS zweitbetreuer_abgeschickt,
|
||||
(SELECT datum FROM campus.tbl_paabgabe WHERE paabgabetyp_kurzbz = 'end' AND abgabedatum IS NOT NULL AND projektarbeit_id = tbl_projektarbeit.projektarbeit_id LIMIT 1) AS abgegeben
|
||||
|
||||
FROM lehre.tbl_projektarbeit
|
||||
@@ -169,7 +167,7 @@ class Projektarbeit_model extends DB_Model
|
||||
(projekttyp_kurzbz='Bachelor' OR projekttyp_kurzbz='Diplom')
|
||||
AND betreuerart_kurzbz IN ('Betreuer', 'Begutachter', 'Erstbegutachter', 'Senatsvorsitz')) as base
|
||||
ORDER BY insertamum DESC";
|
||||
|
||||
|
||||
return $this->execReadOnlyQuery($betreuerQuery, array($studentUID));
|
||||
}
|
||||
|
||||
@@ -218,16 +216,13 @@ class Projektarbeit_model extends DB_Model
|
||||
}
|
||||
|
||||
public function getProjektbetreuerAnrede($bperson_id) {
|
||||
$qry_betr="SELECT distinct trim(COALESCE(titelpre,'')||' '||COALESCE(vorname,'')||' '||COALESCE(nachname,'')||' '||COALESCE(titelpost,'')) as first,
|
||||
public.tbl_mitarbeiter.mitarbeiter_uid, anrede
|
||||
FROM public.tbl_person JOIN lehre.tbl_projektbetreuer ON(lehre.tbl_projektbetreuer.person_id=public.tbl_person.person_id)
|
||||
JOIN public.tbl_benutzer ON(public.tbl_benutzer.person_id=public.tbl_person.person_id)
|
||||
JOIN public.tbl_mitarbeiter ON(public.tbl_benutzer.uid=public.tbl_mitarbeiter.mitarbeiter_uid)
|
||||
WHERE public.tbl_person.person_id= ?";
|
||||
$qry_betr="SELECT DISTINCT ON(public.tbl_person.person_id) trim(COALESCE(titelpre,'')||' '||COALESCE(vorname,'')||' '||COALESCE(nachname,'')||' '||COALESCE(titelpost,'')) as first, anrede
|
||||
FROM public.tbl_person JOIN lehre.tbl_projektbetreuer ON(lehre.tbl_projektbetreuer.person_id=public.tbl_person.person_id)
|
||||
WHERE public.tbl_person.person_id= ?";
|
||||
|
||||
return $this->execReadOnlyQuery($qry_betr, [$bperson_id]);
|
||||
}
|
||||
|
||||
|
||||
public function getProjektbetreuerEmail($projektarbeit_id) {
|
||||
$qry = "SELECT (
|
||||
SELECT kontakt
|
||||
@@ -249,7 +244,7 @@ class Projektarbeit_model extends DB_Model
|
||||
|
||||
return $this->execReadOnlyQuery($qry, [$projektarbeit_id]);
|
||||
}
|
||||
|
||||
|
||||
public function getProjektbetreuerEmailByPersonID($person_id) {
|
||||
$qry = "SELECT (
|
||||
SELECT kontakt
|
||||
@@ -343,8 +338,8 @@ class Projektarbeit_model extends DB_Model
|
||||
|
||||
return $this->execReadOnlyQuery($qry, array($projektarbeit_id));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function getProjektarbeitenForStudiengang($studiengang_kz, $benotet) {
|
||||
$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(
|
||||
@@ -504,137 +499,20 @@ class Projektarbeit_model extends DB_Model
|
||||
OR lehre.tbl_projektbetreuer.betreuerart_kurzbz = '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
|
||||
) as tmp";
|
||||
|
||||
|
||||
return $this->execReadOnlyQuery($new_qry, array($studiengang_kz));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Prüft ob Projektarbeit aktuell ist (also zurzeit online bewertet wird).
|
||||
* @param $projektarbeit_id
|
||||
* @return boolean
|
||||
*/
|
||||
public function projektarbeitIsCurrent($projektarbeit_id) {
|
||||
$version = $this->getVersion($projektarbeit_id);
|
||||
// paarbeit sollte nur ab einem Studiensemester online bewertet werden
|
||||
return $version === null ? null : $version->isCurrent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Holt sich Version der Projektarbeit.
|
||||
* Liefert auch mit, ob die Version die aktuellste ist.
|
||||
* z.B.: Masterarbeiten waren ab der Änderung zur Gewichtung der Punkte aktuell,
|
||||
* Bachelorarbeiten waren ab dem Umstieg auf das Online Beurteilungsformular aktuell.
|
||||
* @param $projektarbeit_id
|
||||
* @return objekt mit Versionsinfo, null im Fehlerfall
|
||||
*/
|
||||
private function getVersion($projektarbeit_id) {
|
||||
$_versions_query = array(
|
||||
'Diplom' => array(
|
||||
'SS2025',
|
||||
'SS2023',
|
||||
'SS2022'
|
||||
),
|
||||
'Others' => array(
|
||||
'SS2025',
|
||||
'SS2022',
|
||||
)
|
||||
);
|
||||
|
||||
$_versions_check = array(
|
||||
'Diplom' => array(
|
||||
'SS2025' => 3,
|
||||
'SS2023' => 2,
|
||||
'SS2022' => 1
|
||||
),
|
||||
'Others' => array(
|
||||
'SS2025' => 2,
|
||||
'SS2022' => 1
|
||||
)
|
||||
);
|
||||
|
||||
// paarbeit sollte nur ab einem Studiensemester online bewertet werden
|
||||
$qry="
|
||||
SELECT
|
||||
CASE
|
||||
WHEN semesters_diplom.studiensemester_kurzbz IS NOT NULL
|
||||
THEN semesters_diplom.studiensemester_kurzbz
|
||||
ELSE semesters.studiensemester_kurzbz
|
||||
END AS version_studiensemester_kurzbz,
|
||||
pa.projekttyp_kurzbz
|
||||
FROM
|
||||
lehre.tbl_projektarbeit pa
|
||||
JOIN lehre.tbl_lehreinheit USING(lehreinheit_id)
|
||||
JOIN public.tbl_studiensemester sem USING(studiensemester_kurzbz)
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
start, studiensemester_kurzbz
|
||||
FROM
|
||||
public.tbl_studiensemester
|
||||
WHERE
|
||||
studiensemester_kurzbz IN ?
|
||||
) semesters ON sem.start >= semesters.start AND pa.projekttyp_kurzbz <> 'Diplom'
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
start, studiensemester_kurzbz
|
||||
FROM
|
||||
public.tbl_studiensemester
|
||||
WHERE
|
||||
studiensemester_kurzbz IN ?
|
||||
) semesters_diplom ON sem.start >= semesters_diplom.start AND pa.projekttyp_kurzbz = 'Diplom'
|
||||
WHERE
|
||||
projektarbeit_id = ?
|
||||
ORDER BY
|
||||
semesters.start DESC, semesters_diplom.start DESC
|
||||
LIMIT 1";
|
||||
|
||||
$resultociniBambini = $this->execReadOnlyQuery($qry, array($_versions_query['Others'], $_versions_query['Diplom'], $projektarbeit_id));
|
||||
|
||||
if(hasData($resultociniBambini)) {
|
||||
$data = getData($resultociniBambini);
|
||||
if(count($data) > 0) {
|
||||
$row = $data[0];
|
||||
|
||||
// known project types
|
||||
if (isset($_versions_check[$row->projekttyp_kurzbz][$row->version_studiensemester_kurzbz]))
|
||||
{
|
||||
$row->versionNumber = $_versions_check[$row->projekttyp_kurzbz][$row->version_studiensemester_kurzbz];
|
||||
$row->isCurrent =
|
||||
$_versions_check[$row->projekttyp_kurzbz][$row->version_studiensemester_kurzbz]
|
||||
== max($_versions_check[$row->projekttyp_kurzbz]);
|
||||
|
||||
}
|
||||
elseif (isset($_versions_check['Others'][$row->version_studiensemester_kurzbz]))
|
||||
{
|
||||
$row->versionNumber = $_versions_check['Others'][$row->version_studiensemester_kurzbz];
|
||||
$row->isCurrent =
|
||||
$_versions_check['Others'][$row->version_studiensemester_kurzbz]
|
||||
== max($_versions_check['Others']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$row->isCurrent = false;
|
||||
$row->versionNumber = 0;
|
||||
}
|
||||
return $row;
|
||||
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
* @param
|
||||
* @return object success or error
|
||||
|
||||
@@ -306,5 +306,4 @@ class Pruefung_model extends DB_Model
|
||||
|
||||
return $this->loadWhereCommitteeExamsFailed();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@ class Zeugnisnote_model extends DB_Model
|
||||
*
|
||||
* @return object
|
||||
*/
|
||||
public function getZeugnisnoten($student_uid, $studiensemester_kurzbz, $lehrveranstaltung_id = null)
|
||||
public function getZeugnisnoten($student_uid, $studiensemester_kurzbz)
|
||||
{
|
||||
$params = array();
|
||||
$where='';
|
||||
@@ -163,11 +163,6 @@ class Zeugnisnote_model extends DB_Model
|
||||
$where.=" AND vw_student_lehrveranstaltung.studiensemester_kurzbz= ?";
|
||||
$params[] = $studiensemester_kurzbz;
|
||||
}
|
||||
if($lehrveranstaltung_id != null)
|
||||
{
|
||||
$where .= " AND vw_student_lehrveranstaltung.lehrveranstaltung_id = ?";
|
||||
$params[] = $lehrveranstaltung_id;
|
||||
}
|
||||
|
||||
$where2='';
|
||||
|
||||
@@ -181,11 +176,6 @@ class Zeugnisnote_model extends DB_Model
|
||||
$where2 .= " AND studiensemester_kurzbz= ?";
|
||||
$params[] = $studiensemester_kurzbz;
|
||||
}
|
||||
if($lehrveranstaltung_id != null)
|
||||
{
|
||||
$where2 .=" AND lehrveranstaltung_id = ?";
|
||||
$params[] = $lehrveranstaltung_id;
|
||||
}
|
||||
|
||||
$qry = "SELECT
|
||||
a.*,
|
||||
@@ -198,10 +188,7 @@ class Zeugnisnote_model extends DB_Model
|
||||
lv.semester AS semester_lv,
|
||||
lv.ects AS ects_lv,
|
||||
lv.zeugnis,
|
||||
lv.bezeichnung_english AS lehrveranstaltung_bezeichnung_english,
|
||||
s.verband,
|
||||
person.vorname,
|
||||
person.nachname
|
||||
lv.bezeichnung_english AS lehrveranstaltung_bezeichnung_english
|
||||
FROM (
|
||||
SELECT vw_student_lehrveranstaltung.lehrveranstaltung_id, uid,
|
||||
vw_student_lehrveranstaltung.studiensemester_kurzbz, note, punkte, uebernahmedatum, benotungsdatum,
|
||||
@@ -244,8 +231,6 @@ class Zeugnisnote_model extends DB_Model
|
||||
ORDER BY sort
|
||||
) a
|
||||
LEFT JOIN public.tbl_student s ON (a.uid = s.student_uid)
|
||||
LEFT JOIN public.tbl_benutzer benutzer ON benutzer.uid = s.student_uid
|
||||
LEFT JOIN public.tbl_person person ON benutzer.person_id = person.person_id
|
||||
LEFT JOIN public.tbl_studiengang stg1 ON (s.studiengang_kz = stg1.studiengang_kz)
|
||||
LEFT JOIN lehre.tbl_lehrveranstaltung lv USING (lehrveranstaltung_id)
|
||||
LEFT JOIN public.tbl_studiengang stg2 ON (lv.studiengang_kz = stg2.studiengang_kz)";
|
||||
|
||||
@@ -59,37 +59,6 @@ class Studienplan_model extends DB_Model
|
||||
'tbl_studienplan_lehrveranstaltung.semester' => $semester
|
||||
));
|
||||
}
|
||||
|
||||
public function getStudienplanByLvaSemKurzbz($lehrveranstaltung_id, $studiensemester_kurzbz) {
|
||||
$qry= "
|
||||
SELECT
|
||||
DISTINCT tbl_studienplan.*
|
||||
FROM
|
||||
lehre.tbl_studienplan
|
||||
JOIN lehre.tbl_studienplan_lehrveranstaltung
|
||||
USING(studienplan_id)
|
||||
WHERE
|
||||
tbl_studienplan_lehrveranstaltung.lehrveranstaltung_id IN (
|
||||
SELECT
|
||||
lv.lehrveranstaltung_id
|
||||
FROM
|
||||
lehre.tbl_lehrveranstaltung AS lv
|
||||
LEFT JOIN lehre.tbl_lehrveranstaltung AS t ON t.lehrveranstaltung_id=lv.lehrveranstaltung_template_id
|
||||
WHERE
|
||||
lv.lehrtyp_kurzbz<>'tpl'
|
||||
AND (lv.lehrveranstaltung_id= ? OR (lv.lehrveranstaltung_template_id= ? AND t.lehrtyp_kurzbz='tpl'))
|
||||
)
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM
|
||||
lehre.tbl_studienplan_semester
|
||||
WHERE studienplan_id=tbl_studienplan.studienplan_id
|
||||
AND studiensemester_kurzbz= ?
|
||||
AND semester = tbl_studienplan_lehrveranstaltung.semester)
|
||||
ORDER BY bezeichnung";
|
||||
|
||||
return $this->execReadOnlyQuery($qry, array($lehrveranstaltung_id, $lehrveranstaltung_id, $studiensemester_kurzbz));
|
||||
}
|
||||
|
||||
public function getStudienplanLehrveranstaltungForPrestudent($studienplan_id, $semester, $prestudent_id)
|
||||
{
|
||||
|
||||
@@ -206,7 +206,6 @@ class Notiz_model extends DB_Model
|
||||
person_bearbeiter.vorname, person_bearbeiter.nachname
|
||||
";
|
||||
|
||||
|
||||
return $this->execQuery($qry, array($type, $id));
|
||||
}
|
||||
|
||||
|
||||
@@ -18,10 +18,10 @@ class Reservierung_model extends DB_Model
|
||||
*
|
||||
* @return stdClass
|
||||
*/
|
||||
public function getReservierungen($start_date, $end_date, $ort_kurzbz = null)
|
||||
public function getReservierungen($start_date, $end_date, $ort_kurzbz = null, $uid = 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) ?[getAuthUID(), getAuthUID(),$start_date,$end_date]: [$ort_kurzbz, $start_date, $end_date]);
|
||||
", is_null($ort_kurzbz) ? [$uid ?? getAuthUID(), $uid ?? 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)
|
||||
public function getReservierungenMitarbeiter($start_date, $end_date, $uid = null)
|
||||
{
|
||||
|
||||
$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
|
||||
", [getAuthUID(), $start_date, $end_date]);
|
||||
", [$uid ?? getAuthUID(), $start_date, $end_date]);
|
||||
|
||||
|
||||
return $query_result;
|
||||
@@ -129,21 +129,10 @@ 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]);
|
||||
}
|
||||
|
||||
public function lektorHasReservierung($uid, $datum, $stunde)
|
||||
{
|
||||
$qry = "SELECT reservierung_id, uid, stg_kurzbz, ort_kurzbz, semester, verband, gruppe, gruppe_kurzbz, datum, stunde
|
||||
FROM lehre.vw_reservierung
|
||||
WHERE uid = ?
|
||||
AND datum = ?
|
||||
AND stunde = ?";
|
||||
|
||||
return $this->execReadOnlyQuery($qry, [$uid, $datum, $stunde]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -333,68 +333,6 @@ class Stundenplan_model extends DB_Model
|
||||
", [$start_date, $end_date, $lv_id]);
|
||||
}
|
||||
|
||||
public function getStundenplanLE($lehreinheit, $start_date, $end_date, $stundenplan)
|
||||
{
|
||||
$qry = "
|
||||
WITH lehreinheiten AS (
|
||||
SELECT lehreinheit_id FROM lehre.tbl_lehreinheit WHERE lehreinheit_id = ?
|
||||
), " . $this->getStundenplanCTE($stundenplan) . "
|
||||
SELECT *
|
||||
FROM stundenplanentries
|
||||
";
|
||||
|
||||
return $this->execReadOnlyQuery($qry, array($lehreinheit, $start_date, $end_date));
|
||||
}
|
||||
|
||||
public function getStundenplanLV($lehrveranstaltung_id, $start_date, $end_date, $stundenplan)
|
||||
{
|
||||
$qry = "
|
||||
WITH lehreinheiten AS (
|
||||
SELECT lehreinheit_id
|
||||
FROM lehre.tbl_lehreinheit
|
||||
JOIN tbl_studiensemester USING(studiensemester_kurzbz)
|
||||
WHERE lehrveranstaltung_id = ?
|
||||
AND tbl_studiensemester.start >= ? AND tbl_studiensemester.ende <= ?
|
||||
), " . $this->getStundenplanCTE($stundenplan) . "
|
||||
SELECT *
|
||||
FROM stundenplanentries
|
||||
";
|
||||
|
||||
return $this->execReadOnlyQuery($qry, array($lehrveranstaltung_id, $start_date, $end_date, $start_date, $end_date));
|
||||
}
|
||||
|
||||
private function getStundenplanCTE($stundenplan)
|
||||
{
|
||||
return "entries AS (
|
||||
SELECT
|
||||
datum, min(stunde) as stunde_beginn, max(stunde) as stunde_ende,
|
||||
array_agg(DISTINCT(
|
||||
CASE WHEN gruppe_kurzbz is not null THEN gruppe_kurzbz
|
||||
ELSE (UPPER(stg_typ || stg_kurzbz) || COALESCE(semester,'0') || COALESCE(verband,'') || COALESCE(gruppe,''))
|
||||
END)) as gruppen_kuerzel,
|
||||
array_agg(DISTINCT CONCAT(vorname || ' ' || nachname)) as lektorname,
|
||||
array_agg(DISTINCT stundenplan.ort_kurzbz) as ort_kurzbz,
|
||||
array_agg(DISTINCT titel) as titel,
|
||||
lehrfach_bez, stundenplan.lehreinheit_id, lehrveranstaltung_id
|
||||
FROM lehre.vw_$stundenplan as stundenplan
|
||||
JOIN public.tbl_mitarbeiter ON stundenplan.uid = tbl_mitarbeiter.mitarbeiter_uid
|
||||
JOIN tbl_benutzer ON tbl_mitarbeiter.mitarbeiter_uid = tbl_benutzer.uid
|
||||
JOIN tbl_person USING(person_id)
|
||||
JOIN lehreinheiten ON stundenplan.lehreinheit_id = lehreinheiten.lehreinheit_id
|
||||
WHERE datum >= ? AND datum <= ?
|
||||
GROUP BY datum, unr, stundenplan.lehreinheit_id, lehrveranstaltung_id, lehrfach_bez, lehrfach_bez
|
||||
ORDER BY datum, min(stunde), unr, lehreinheit_id
|
||||
),
|
||||
stundenplanentries AS (
|
||||
SELECT
|
||||
entries.*,
|
||||
stundeb.beginn AS beginn,
|
||||
stundee.ende AS ende
|
||||
FROM entries
|
||||
JOIN lehre.tbl_stunde stundeb ON stundeb.stunde = entries.stunde_beginn
|
||||
JOIN lehre.tbl_stunde stundee ON stundee.stunde = entries.stunde_ende
|
||||
)";
|
||||
}
|
||||
/**
|
||||
* queries Stundenplan and filters by assigned ma_kurzbz, very similar to get by LVA
|
||||
*
|
||||
@@ -450,6 +388,84 @@ class Stundenplan_model extends DB_Model
|
||||
|
||||
ORDER BY datum, beginn", [$start_date, $end_date, $ma_uid]);
|
||||
}
|
||||
|
||||
/**
|
||||
* queries Stundenplan and filters by studiengang, semester, verband gruppe
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function getStundenplanStudiengang($start_date, $end_date, $stg_kz, $sem, $verband, $gruppe) {
|
||||
|
||||
$qry_params = [$start_date, $end_date, $stg_kz];
|
||||
|
||||
$qry = "
|
||||
SELECT
|
||||
'lehreinheit' as type, beginn, ende, datum,
|
||||
CONCAT(lehrfach,'-',lehrform) as topic,
|
||||
array_agg(DISTINCT lektor) as lektor,
|
||||
array_agg(DISTINCT (gruppe,verband,semester,studiengang_kz,gruppen_kuerzel)) as gruppe,
|
||||
string_agg(DISTINCT ort_kurzbz, '/') as ort_kurzbz,
|
||||
array_agg(DISTINCT lehreinheit_id) as lehreinheit_id,
|
||||
titel, lehrfach, lehrform, lehrfach_bez, organisationseinheit, farbe, lehrveranstaltung_id
|
||||
FROM
|
||||
(
|
||||
SELECT unr,datum,beginn, ende,
|
||||
CASE
|
||||
WHEN sp.mitarbeiter_kurzbz IS NOT NULL THEN sp.mitarbeiter_kurzbz
|
||||
ELSE sp.lektor
|
||||
END as lektor,
|
||||
CASE
|
||||
WHEN gruppe_kurzbz IS NOT NULL THEN gruppe_kurzbz
|
||||
ELSE CONCAT(UPPER(sp.stg_typ),UPPER(sp.stg_kurzbz),'-',COALESCE(CAST(sp.semester AS varchar),'/'),COALESCE(CAST(sp.verband AS varchar),'/'))
|
||||
END as gruppen_kuerzel,
|
||||
(SELECT bezeichnung
|
||||
FROM public.tbl_organisationseinheit
|
||||
WHERE oe_kurzbz IN(
|
||||
SELECT oe_kurzbz
|
||||
FROM lehre.tbl_lehrveranstaltung
|
||||
WHERE lehrveranstaltung_id = sp.lehrveranstaltung_id
|
||||
)) as organisationseinheit,
|
||||
sp.ort_kurzbz, sp.studiengang_kz, sp.titel,sp.lehreinheit_id,sp.lehrfach_id,sp.anmerkung,fix,lehrveranstaltung_id,stg_kurzbzlang,stg_bezeichnung,stg_typ,fachbereich_kurzbz,lehrfach,lehrfach_bez,farbe,lehrform,anmerkung_lehreinheit,gruppe, verband, semester,stg_kurzbz
|
||||
FROM (
|
||||
SELECT sp.*
|
||||
FROM lehre.vw_stundenplan sp
|
||||
WHERE
|
||||
sp.datum >= ?
|
||||
AND sp.datum <= ?
|
||||
) sp
|
||||
JOIN lehre.tbl_stunde ON lehre.tbl_stunde.stunde = sp.stunde
|
||||
WHERE studiengang_kz = ? ";
|
||||
|
||||
if($sem != NULL)
|
||||
{
|
||||
$qry_params[] = $sem;
|
||||
$qry .= " AND (semester = ? OR semester IS NULL)";
|
||||
}
|
||||
if($verband != NULL)
|
||||
{
|
||||
$qry_params[] = $verband;
|
||||
$qry .= " AND (verband = ? OR verband IS NULL OR verband = '0' OR verband = '')";
|
||||
}
|
||||
if($gruppe != NULL)
|
||||
{
|
||||
$qry_params[] = $gruppe;
|
||||
$qry .= " AND (gruppe = ? OR gruppe IS NULL OR gruppe = '0' OR gruppe = '') ";
|
||||
}
|
||||
$qry.= " AND (
|
||||
gruppe_kurzbz is null OR EXISTS(
|
||||
SELECT 1
|
||||
FROM
|
||||
public.tbl_gruppe WHERE gruppe_kurzbz = sp.gruppe_kurzbz AND direktinskription = false
|
||||
)
|
||||
)";
|
||||
|
||||
$qry.= " ) as subquery
|
||||
|
||||
GROUP BY unr, datum, beginn, ende, titel, lehrform, lehrfach, lehrfach_bez, organisationseinheit, farbe, lehrveranstaltung_id
|
||||
ORDER BY datum, beginn; ";
|
||||
|
||||
return $this->execReadOnlyQuery($qry, $qry_params);
|
||||
}
|
||||
|
||||
/**
|
||||
* NO STANDALONE FUNCTION - Generates a SQL query string to fetch 'stundenplan' events for a specific student within the current semester.
|
||||
|
||||
@@ -241,15 +241,4 @@ class Stundenplandev_model extends DB_Model
|
||||
|
||||
return $this->delete(array('lehreinheit_id' => $lehreinheit_id, 'mitarbeiter_uid' => $mitarbeiter_uid));
|
||||
}
|
||||
|
||||
public function lektorHasStundenplandevEintrag($uid, $datum, $stunde)
|
||||
{
|
||||
$qry = "SELECT stundenplandev_id, lektor, stg_kurzbz, ort_kurzbz, semester, verband, gruppe, gruppe_kurzbz, datum, stunde
|
||||
FROM lehre.vw_stundenplandev
|
||||
WHERE uid = ?
|
||||
AND datum = ?
|
||||
AND stunde = ?";
|
||||
|
||||
return $this->execReadOnlyQuery($qry, [$uid, $datum, $stunde]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,40 +61,4 @@ class Zeitsperre_model extends DB_Model
|
||||
|
||||
return $this->execQuery($qry);
|
||||
}
|
||||
|
||||
public function checkIfZeitsperreExists($uid, $datum, $stunde)
|
||||
{
|
||||
$this->db->select("*");
|
||||
|
||||
$this->db->where('mitarbeiter_uid', $uid);
|
||||
$this->db->where('zeitsperretyp_kurzbz !=', 'ZVerfueg');
|
||||
|
||||
$this->db->group_start();
|
||||
|
||||
$this->db->where('vondatum <', $datum);
|
||||
$this->db->or_group_start();
|
||||
$this->db->where('vondatum', $datum);
|
||||
$this->db->group_start();
|
||||
$this->db->where('vonstunde <=', $stunde);
|
||||
$this->db->or_where('vonstunde IS NULL', null, false);
|
||||
$this->db->group_end();
|
||||
$this->db->group_end();
|
||||
$this->db->group_end();
|
||||
|
||||
|
||||
$this->db->group_start();
|
||||
$this->db->where('bisdatum >', $datum);
|
||||
$this->db->or_group_start();
|
||||
$this->db->where('bisdatum', $datum);
|
||||
$this->db->group_start();
|
||||
$this->db->where('bisstunde >=', $stunde);
|
||||
$this->db->or_where('bisstunde IS NULL', null, false);
|
||||
$this->db->group_end();
|
||||
|
||||
$this->db->group_end();
|
||||
$this->db->group_end();
|
||||
|
||||
return $this->load();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -242,6 +242,7 @@ 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
|
||||
@@ -310,11 +311,12 @@ class Message_model extends DB_Model
|
||||
public.tbl_person pr on pr.person_id = fm.recipient_id
|
||||
order by
|
||||
m.insertamum DESC
|
||||
limit ?
|
||||
offset ?;
|
||||
{$limitoffset}
|
||||
EOSQL;
|
||||
|
||||
$parametersArray = array($person_id, $person_id, $limit, $offset);
|
||||
$parametersArray = $limitoffset
|
||||
? array($person_id, $person_id, $limit, $offset)
|
||||
: array($person_id, $person_id);
|
||||
|
||||
$count = 0;
|
||||
$data = $this->execQuery($sql, $parametersArray);
|
||||
@@ -325,7 +327,7 @@ EOSQL;
|
||||
$data = getData($data);
|
||||
if($data)
|
||||
{
|
||||
$count = ceil($data[0]->total_msgs / $limit);
|
||||
$count = is_null($limit) ? 1 : ceil($data[0]->total_msgs / $limit);
|
||||
}
|
||||
|
||||
return success(['data' => $data, 'count' => $count]);
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
class VertragsbestandteilLohnguide_model extends DB_Model
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->dbTable = 'hr.tbl_vertragsbestandteil_lohnguide';
|
||||
$this->pk = 'vertragsbestandteil_id';
|
||||
}
|
||||
}
|
||||
@@ -37,7 +37,8 @@ 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
|
||||
z.zeitaufzeichnung, z.azgrelevant, z.homeoffice,
|
||||
lg.stellenbezeichnung, lg.vordienstzeit, lg.fachrichtung_kurzbz, lg.modellstelle_kurzbz, lg.kommentar_person, lg.kommentar_modellstelle
|
||||
FROM
|
||||
hr.tbl_vertragsbestandteil v
|
||||
LEFT JOIN
|
||||
@@ -63,6 +64,8 @@ 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;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ $includesArray = array(
|
||||
'skipID' => '#fhccontent',
|
||||
'vuedatepicker11' => true,
|
||||
'customCSSs' => array(
|
||||
'vendor/vuejs/vuedatepicker_css/main.css',
|
||||
'public/css/components/verticalsplit.css',
|
||||
'public/css/components/searchbar/searchbar.css',
|
||||
'public/css/Fhc.css',
|
||||
@@ -33,17 +32,14 @@ $includesArray = array(
|
||||
'vendor/npm-asset/primevue/inputnumber/inputnumber.min.js',
|
||||
'vendor/npm-asset/primevue/speeddial/speeddial.min.js',
|
||||
'vendor/npm-asset/primevue/textarea/textarea.min.js',
|
||||
'vendor/moment/luxonjs/luxon.min.js',
|
||||
'vendor/npm-asset/primevue/password/password.min.js',
|
||||
'vendor/npm-asset/primevue/multiselect/multiselect.min.js',
|
||||
'vendor/npm-asset/primevue/timeline/timeline.min.js',
|
||||
'vendor/npm-asset/primevue/inplace/inplace.min.js',
|
||||
'vendor/npm-asset/primevue/message/message.min.js',
|
||||
'vendor/npm-asset/primevue/tieredmenu/tieredmenu.js',
|
||||
'vendor/moment/luxonjs/luxon.min.js'
|
||||
),
|
||||
'customJSModules' => array(
|
||||
'public/js/apps/Dashboard/Fhc.js',
|
||||
'vendor/olifolkerd/tabulator5/src/js/modules/ColumnCalcs/ColumnCalcs.js'
|
||||
),
|
||||
|
||||
);
|
||||
@@ -51,8 +47,6 @@ $includesArray = array(
|
||||
$this->load->view('templates/CISVUE-Header', $includesArray);
|
||||
?>
|
||||
<div id="fhccontent" class="h-100" route=<?php echo $route ?>>
|
||||
<router-view
|
||||
:view-data='<?php echo json_encode($viewData) ?>'
|
||||
></router-view>
|
||||
<router-view></router-view>
|
||||
</div>
|
||||
<?php $this->load->view('templates/CISVUE-Footer', $includesArray); ?>
|
||||
|
||||
@@ -31,8 +31,6 @@
|
||||
lv-root="<?= site_url('LVVerwaltung'); ?>"
|
||||
:permissions="<?= htmlspecialchars(json_encode($permissions));?>"
|
||||
:config="<?= htmlspecialchars(json_encode($configs)); ?>"
|
||||
avatar-url="<?= site_url('Cis/Pub/bild/person/' . getAuthPersonId()); ?>"
|
||||
logout-url="<?= site_url('Cis/Auth/logout'); ?>"
|
||||
>
|
||||
</router-view>
|
||||
|
||||
|
||||
@@ -315,15 +315,22 @@
|
||||
WHERE tpl.app = '.$APP.'
|
||||
) pl USING(person_id)
|
||||
LEFT JOIN (
|
||||
SELECT DISTINCT ON (tbl_rueckstellung.person_id)
|
||||
SELECT
|
||||
tbl_rueckstellung.person_id,
|
||||
tbl_rueckstellung.datum_bis,
|
||||
tbl_rueckstellung.status_kurzbz,
|
||||
array_to_json(bezeichnung_mehrsprachig::varchar[])->>0 as bezeichnung
|
||||
FROM public.tbl_rueckstellung
|
||||
JOIN public.tbl_rueckstellung_status USING(status_kurzbz)
|
||||
WHERE tbl_rueckstellung.datum_bis >= NOW()
|
||||
ORDER BY tbl_rueckstellung.person_id, tbl_rueckstellung.datum_bis DESC
|
||||
JOIN public.tbl_person sp ON tbl_rueckstellung.person_id = sp.person_id
|
||||
WHERE tbl_rueckstellung.rueckstellung_id =
|
||||
(
|
||||
SELECT srueck.rueckstellung_id
|
||||
FROM public.tbl_rueckstellung srueck
|
||||
WHERE srueck.person_id = tbl_rueckstellung.person_id
|
||||
AND datum_bis >= NOW()
|
||||
ORDER BY srueck.datum_bis DESC LIMIT 1
|
||||
)
|
||||
) rueck ON rueck.person_id = p.person_id
|
||||
WHERE
|
||||
EXISTS (
|
||||
|
||||
@@ -24,15 +24,22 @@ $query = '
|
||||
WHERE tpl.app = '.$APP.'
|
||||
) pl ON p.person_id = pl.person_id
|
||||
LEFT JOIN (
|
||||
SELECT DISTINCT ON (tbl_rueckstellung.person_id)
|
||||
SELECT
|
||||
tbl_rueckstellung.person_id,
|
||||
tbl_rueckstellung.datum_bis,
|
||||
tbl_rueckstellung.status_kurzbz,
|
||||
array_to_json(bezeichnung_mehrsprachig::varchar[])->>0 as bezeichnung
|
||||
FROM public.tbl_rueckstellung
|
||||
JOIN public.tbl_rueckstellung_status USING(status_kurzbz)
|
||||
WHERE tbl_rueckstellung.datum_bis >= NOW()
|
||||
ORDER BY tbl_rueckstellung.person_id, tbl_rueckstellung.datum_bis DESC
|
||||
JOIN public.tbl_rueckstellung_status USING(status_kurzbz)
|
||||
JOIN public.tbl_person sp ON tbl_rueckstellung.person_id = sp.person_id
|
||||
WHERE tbl_rueckstellung.rueckstellung_id =
|
||||
(
|
||||
SELECT srueck.rueckstellung_id
|
||||
FROM public.tbl_rueckstellung srueck
|
||||
WHERE srueck.person_id = tbl_rueckstellung.person_id
|
||||
AND datum_bis >= NOW()
|
||||
ORDER BY srueck.datum_bis DESC LIMIT 1
|
||||
)
|
||||
) rueck ON rueck.person_id = p.person_id
|
||||
WHERE p.person_id NOT IN (SELECT person_id FROM public.tbl_prestudent)';
|
||||
|
||||
|
||||
+5
-5
@@ -41,11 +41,11 @@ ob_start();
|
||||
<link href="../skin/style.css.php" rel="stylesheet" type="text/css">
|
||||
<title>Menu</title>
|
||||
<link href="../skin/flexcrollstyles.css" rel="stylesheet" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="../skin/jquery-ui-1.9.2.custom.min.css">
|
||||
<script type="text/javascript" src="../vendor/jquery/jquery1/jquery-1.12.4.min.js"></script>
|
||||
<script type="text/javascript" src="../vendor/christianbach/tablesorter/jquery.tablesorter.min.js"></script>
|
||||
<script type="text/javascript" src="../vendor/components/jqueryui/jquery-ui.min.js"></script>
|
||||
<script type="text/javascript" src="../include/js/jquery.ui.datepicker.translation.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="../skin/jquery-ui-1.9.2.custom.min.css">
|
||||
<script type="text/javascript" src="../vendor/jquery/jquery1/jquery-1.12.4.min.js"></script>
|
||||
<script type="text/javascript" src="../vendor/christianbach/tablesorter/jquery.tablesorter.min.js"></script>
|
||||
<script type="text/javascript" src="../vendor/components/jqueryui/jquery-ui.min.js"></script>
|
||||
<script type="text/javascript" src="../include/js/jquery.ui.datepicker.translation.js"></script>
|
||||
<script type="text/javascript" src="../vendor/jquery/sizzle/sizzle.js"></script>
|
||||
<script type="text/javascript">
|
||||
function treemenu(obj)
|
||||
|
||||
+11
-75
@@ -80,17 +80,9 @@ echo '
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml; charset=UTF-8" />
|
||||
<link rel="stylesheet" href="../../vendor/components/jqueryui/themes/base/jquery-ui.min.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../vendor/twbs/bootstrap3/dist/css/bootstrap.min.css" type="text/css"/>
|
||||
<link href="../../skin/style.css.php" rel="stylesheet" type="text/css" />
|
||||
<style>
|
||||
.ui-dialog-titlebar-close
|
||||
{
|
||||
visibility: hidden !important;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript" src="../../vendor/components/jquery/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../vendor/components/jqueryui/jquery-ui.min.js"></script>
|
||||
<script type="text/javascript" src="../../vendor/twbs/bootstrap3/dist/js/bootstrap.min.js"></script>
|
||||
<script language="Javascript" type="text/javascript">
|
||||
//<![CDATA[
|
||||
@@ -139,78 +131,22 @@ echo '
|
||||
}
|
||||
}
|
||||
|
||||
function GebietStarten(bezeichnung, stunde, minute, sekunde, gebiet_id)
|
||||
function GebietStarten(bezeichnung,stunde,minute,sekunde,gebiet_id)
|
||||
{
|
||||
let message = <?php echo "'".$p->t('testtool/okKlickenUmZuStarten')."'"?> + ' ' + stunde + 'h ' + minute + 'm ' + sekunde + 's';
|
||||
let title = <?php echo "'".$p->t('testtool/startGebiet')."'"?>;
|
||||
let abbrechen = <?php echo "'".$p->t('testtool/abbrechen')."'"?>;
|
||||
|
||||
if ($('#gebiet-dialog').length === 0)
|
||||
{
|
||||
$('body').append(
|
||||
'<div id="gebiet-dialog" title="' + title + '">' +
|
||||
'<p id="gebiet-dialog-msg">' + message + '</p>' +
|
||||
'</div>'
|
||||
);
|
||||
var check = confirm(<?php echo "'".$p->t('testtool/okKlickenUmZuStarten')."'"?>+' '+stunde+'h '+minute+'m '+sekunde+'s');
|
||||
if (check == true) {
|
||||
var sprache_user = <?php echo "'".$sprache_user."'"?>;
|
||||
document.location.href = 'frage.php?gebiet_id='+gebiet_id+'&start=true';
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
|
||||
$('#gebiet-dialog').dialog({
|
||||
modal: true,
|
||||
width: 400,
|
||||
resizable: false,
|
||||
buttons: [
|
||||
{
|
||||
text: 'OK',
|
||||
click: function() {
|
||||
$(this).dialog('close');
|
||||
document.location.href = 'frage.php?gebiet_id=' + gebiet_id + '&start=true';
|
||||
}
|
||||
},
|
||||
{
|
||||
text: abbrechen,
|
||||
click: function() {
|
||||
$(this).dialog('close');
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
let letzteFrageBestaetigt = false;
|
||||
|
||||
function letzteFrage()
|
||||
{
|
||||
if (letzteFrageBestaetigt)
|
||||
return true;
|
||||
|
||||
let message = <?php echo "'".$p->t("testtool/alleFragenBeantwortet")."'"?>;
|
||||
|
||||
if ($('#fertig-dialog').length === 0)
|
||||
{
|
||||
$('body').append(
|
||||
'<div id="fertig-dialog">' +
|
||||
'<p>' + message + '</p>' +
|
||||
'</div>'
|
||||
);
|
||||
}
|
||||
|
||||
$('#fertig-dialog').dialog({
|
||||
modal: true,
|
||||
width: 400,
|
||||
resizable: false,
|
||||
buttons: [
|
||||
{
|
||||
text: 'OK',
|
||||
click: function() {
|
||||
$(this).dialog('close');
|
||||
letzteFrageBestaetigt = true;
|
||||
$('[name="submitantwort"]').click();
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
return false;
|
||||
alert(<?php echo "'".$p->t("testtool/alleFragenBeantwortet")."'"?>);
|
||||
return true;
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
@@ -711,7 +647,7 @@ if($frage->frage_id!='')
|
||||
}
|
||||
|
||||
$letzte = $frage->getNextFrage($gebiet_id, $_SESSION['pruefling_id'], $frage_id, $demo);
|
||||
echo "<form action=\"$PHP_SELF?gebiet_id=$gebiet_id&frage_id=$frage->frage_id\" method=\"POST\" ".(!$letzte && !$levelgebiet?"onsubmit=\"return letzteFrage()\"":"").">";
|
||||
echo "<form action=\"$PHP_SELF?gebiet_id=$gebiet_id&frage_id=$frage->frage_id\" method=\"POST\" ".(!$letzte && !$levelgebiet?"onsubmit=\"letzteFrage()\"":"").">";
|
||||
echo '
|
||||
<div class="row text-center">
|
||||
<table class="table" style="width: 600px; margin-left: auto; margin-right: auto;">
|
||||
|
||||
+2
-11
@@ -142,9 +142,7 @@ if (isset($_REQUEST['prestudent']))
|
||||
}
|
||||
if ($reihungstest_id != '' && $rt->load($reihungstest_id))
|
||||
{
|
||||
$pruefling_exist = new Pruefling();
|
||||
$alreadyInRT = $pruefling_exist->personAlreadyInRT($ps->person_id, $rt->reihungstest_id, $ps->prestudent_id);
|
||||
if ($rt->freigeschaltet && !$alreadyInRT)
|
||||
if ($rt->freigeschaltet)
|
||||
{
|
||||
// regenerate Session ID after Login
|
||||
session_regenerate_id();
|
||||
@@ -284,14 +282,7 @@ if (isset($_REQUEST['prestudent']))
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($alreadyInRT)
|
||||
{
|
||||
$alertmsg .= '<div class="alert alert-danger">'.$p->t('testtool/reihungstestNichtRegistriert').'</div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$alertmsg .= '<div class="alert alert-danger">'.$p->t('testtool/reihungstestNichtFreigeschalten').'</div>';
|
||||
}
|
||||
$alertmsg .= '<div class="alert alert-danger">'.$p->t('testtool/reihungstestNichtFreigeschalten').'</div>';
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -584,32 +584,6 @@ class pruefling extends basis_db
|
||||
|
||||
$qry .= " LIMIT 1";
|
||||
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
if ($this->db_num_rows($result) == 0)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler bei einer Abfrage';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public function personAlreadyInRT($person_id, $reihungstest_id, $prestudent_id)
|
||||
{
|
||||
$qry = "SELECT tbl_prestudent.prestudent_id
|
||||
FROM public.tbl_rt_person
|
||||
JOIN public.tbl_prestudent ON tbl_prestudent.person_id = tbl_rt_person.person_id
|
||||
JOIN public.tbl_prestudentstatus ON tbl_prestudent.prestudent_id = tbl_prestudentstatus.prestudent_id AND status_kurzbz = 'Bewerber'
|
||||
AND tbl_prestudentstatus.studienplan_id = tbl_rt_person.studienplan_id
|
||||
WHERE tbl_rt_person.person_id = " . $this->db_add_param($person_id) . "
|
||||
AND tbl_rt_person.rt_id = " . $this->db_add_param($reihungstest_id) . "
|
||||
AND tbl_prestudent.prestudent_id != " . $this->db_add_param($prestudent_id) . "
|
||||
AND get_rolle_prestudent(tbl_prestudent.prestudent_id, NULL) = 'Bewerber'
|
||||
LIMIT 1";
|
||||
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
if ($this->db_num_rows($result) == 0)
|
||||
|
||||
@@ -17,7 +17,6 @@ $this->phrasen['testtool/basic']='Basic';
|
||||
$this->phrasen['testtool/basisgebiete']='Basisgebiete';
|
||||
$this->phrasen['testtool/semester']='Semester';
|
||||
$this->phrasen['testtool/reihungstestNichtFreigeschalten']='Der zuteilte Reihungstest ist noch nicht freigeschaltet';
|
||||
$this->phrasen['testtool/reihungstestNichtRegistriert']='Sie sind für den Reihungstest nicht registriert';
|
||||
$this->phrasen['testtool/reihungstestKannNichtGeladenWerden']='Der Reihungstest dem Sie zugeteilt sind, kann nicht geladen werden. Melden Sie sich bitte bei der Reihungstestaufsicht.';
|
||||
$this->phrasen['testtool/geburtsdatumStimmtNichtUeberein']='Ihr Geburtsdatum stimmt nicht mit unseren Daten überein. Bitte wenden Sie sich an die Aufsichtsperson';
|
||||
$this->phrasen['testtool/home']='Home';
|
||||
@@ -36,8 +35,6 @@ $this->phrasen['testtool/spracheDerTestfragen']='Gewünschte Sprache der Testfra
|
||||
$this->phrasen['testtool/einleitung']='Einleitung';
|
||||
$this->phrasen['testtool/blaettern']='Blättern';
|
||||
$this->phrasen['testtool/demo']='Demobeispiel ansehen';
|
||||
$this->phrasen['testtool/abbrechen']='Abbrechen';
|
||||
$this->phrasen['testtool/startGebiet']='Gebiet starten';
|
||||
$this->phrasen['testtool/okKlickenUmZuStarten']='Klicken Sie OK um dieses Gebiet zu starten. \nSie haben für die Bearbeitung ein Zeitlimit von';
|
||||
$this->phrasen['testtool/bitteZuerstAnmelden']='Bitte zuerst anmelden!';
|
||||
$this->phrasen['testtool/fehlerBeimGenerierenDesFragenpools']='Fehler beim generieren des Fragenpools';
|
||||
|
||||
@@ -17,7 +17,6 @@ $this->phrasen['testtool/basic']='Basic';
|
||||
$this->phrasen['testtool/basisgebiete']='Basic test';
|
||||
$this->phrasen['testtool/semester']='Semester';
|
||||
$this->phrasen['testtool/reihungstestNichtFreigeschalten']='The entrance examination assigned has not yet been activated.';
|
||||
$this->phrasen['testtool/reihungstestNichtRegistriert']='You are not registered for the placement test.';
|
||||
$this->phrasen['testtool/reihungstestKannNichtGeladenWerden']='The placement test you are assigned to could not be loaded. Please contact the placement test supervisior.';
|
||||
$this->phrasen['testtool/geburtsdatumStimmtNichtUeberein']='Your date of birth does not correspond to the data we have. Please speak to the supervisor. ';
|
||||
$this->phrasen['testtool/home']='Home';
|
||||
@@ -36,8 +35,6 @@ $this->phrasen['testtool/spracheDerTestfragen']='Desired language of questions';
|
||||
$this->phrasen['testtool/einleitung']='Introduction';
|
||||
$this->phrasen['testtool/blaettern']='Browse';
|
||||
$this->phrasen['testtool/demo']='See an example';
|
||||
$this->phrasen['testtool/abbrechen']='Cancel';
|
||||
$this->phrasen['testtool/startGebiet']='Start the section';
|
||||
$this->phrasen['testtool/okKlickenUmZuStarten']='Click OK to start this section. \nYou have a timelimit of';
|
||||
$this->phrasen['testtool/bitteZuerstAnmelden']='Please log in first!';
|
||||
$this->phrasen['testtool/fehlerBeimGenerierenDesFragenpools']='Error in generating the pool of questions.';
|
||||
|
||||
Generated
+6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "FHC-Core",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {}
|
||||
}
|
||||
+1
-19
@@ -407,7 +407,6 @@ html {
|
||||
background-color: var(--fhc-background);
|
||||
border-color: var(--fhc-border);
|
||||
padding: var(--fhc-cis-main-py) var(--fhc-cis-main-px);
|
||||
min-width: 0; /* fix flex-grow with tabulator exceeding width */
|
||||
}
|
||||
|
||||
#cis-main .fa-arrow-up-right-from-square {
|
||||
@@ -857,25 +856,8 @@ html {
|
||||
|
||||
}
|
||||
|
||||
/* styling for editable dropdown column of notenvorschläge in benotungstool*/
|
||||
#notentable .tabulator-tableholder .tabulator-editable {
|
||||
position: relative;
|
||||
background-color: rgba(255, 255, 157, 0.73);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#notentable .tabulator-tableholder .tabulator-editable::after {
|
||||
content: "▾";
|
||||
position: absolute;
|
||||
right: 6px;
|
||||
color: rgba(176, 176, 106, 0.73);;
|
||||
font-size: x-large;
|
||||
bottom: 6px;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.bordered-modal {
|
||||
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||
border-radius: 0.5rem;
|
||||
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
}
|
||||
@@ -38,9 +38,3 @@ textarea[name="anmerkung"] {
|
||||
{
|
||||
border-color: black;
|
||||
}
|
||||
|
||||
.node-verband {
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ export default {
|
||||
getViewData() {
|
||||
return {
|
||||
method: 'get',
|
||||
url: '/api/frontend/v1/Cis4FhcApi/getViewData'
|
||||
url: '/api/frontend/v1/Cis4FhcApi/dashboardViewData'
|
||||
};
|
||||
}
|
||||
};
|
||||
@@ -35,19 +35,5 @@ export default {
|
||||
method: 'get',
|
||||
url: `/api/frontend/v1/Lehre/Pruefungen/${lehrveranstaltung_id}`
|
||||
};
|
||||
},
|
||||
getZugewieseneLv(uid, sem_kurzbz){
|
||||
return {
|
||||
method: 'get',
|
||||
url: '/api/frontend/v1/Lehre/getZugewieseneLv',
|
||||
params: { uid, sem_kurzbz}
|
||||
};
|
||||
},
|
||||
getLeForLv(lv_id, sem_kurzbz) {
|
||||
return {
|
||||
method: 'get',
|
||||
url: '/api/frontend/v1/Lehre/getLeForLv',
|
||||
params: { lv_id, sem_kurzbz }
|
||||
};
|
||||
}
|
||||
};
|
||||
@@ -16,6 +16,12 @@
|
||||
*/
|
||||
|
||||
export default {
|
||||
getMyLvPlanViewData() {
|
||||
return {
|
||||
method: 'get',
|
||||
url: `/api/frontend/v1/LvPlan/myLvPlanViewData`,
|
||||
};
|
||||
},
|
||||
getRoomInfo(ort_kurzbz, start_date, end_date) {
|
||||
return {
|
||||
method: 'post',
|
||||
@@ -30,11 +36,11 @@ export default {
|
||||
params: { start_date, end_date, lv_id }
|
||||
};
|
||||
},
|
||||
eventsPersonal(start_date, end_date) {
|
||||
eventsPersonal(start_date, end_date, uid = null) {
|
||||
return {
|
||||
method: 'post',
|
||||
url: '/api/frontend/v1/lvPlan/eventsPersonal',
|
||||
params: { start_date, end_date }
|
||||
params: { start_date, end_date, uid }
|
||||
};
|
||||
},
|
||||
eventsLv(lv_id, start_date, end_date) {
|
||||
@@ -57,11 +63,11 @@ export default {
|
||||
params: { start_date, end_date }
|
||||
};
|
||||
},
|
||||
getLvPlanReservierungen(start_date, end_date) {
|
||||
getLvPlanReservierungen(start_date, end_date, uid = null) {
|
||||
return {
|
||||
method: 'post',
|
||||
url: '/api/frontend/v1/LvPlan/getReservierungen',
|
||||
params: { start_date, end_date }
|
||||
params: { start_date, end_date, uid }
|
||||
};
|
||||
},
|
||||
getLehreinheitStudiensemester(lehreinheit_id) {
|
||||
@@ -92,5 +98,36 @@ export default {
|
||||
method: 'get',
|
||||
url: '/api/frontend/v1/LvPlan/getLv/' + lehrveranstaltung_id
|
||||
};
|
||||
},
|
||||
eventsStgOrg(start_date, end_date, stg_kz, sem, verband, gruppe) {
|
||||
return {
|
||||
method: 'post',
|
||||
url: '/api/frontend/v1/lvPlan/eventsStgOrg',
|
||||
params: { start_date, end_date, stg_kz, sem, verband, gruppe }
|
||||
};
|
||||
},
|
||||
getStudiengaenge(){
|
||||
return {
|
||||
method: 'get',
|
||||
url: '/api/frontend/v1/lvPlan/getStudiengaenge'
|
||||
}
|
||||
},
|
||||
getLehrverband(stg_kz, sem){
|
||||
return {
|
||||
method: 'get',
|
||||
url: `/api/frontend/v1/lvPlan/getLehrverband/${stg_kz}/${sem}`
|
||||
}
|
||||
},
|
||||
getGruppe(stg_kz, sem, verband){
|
||||
return {
|
||||
method: 'get',
|
||||
url: `/api/frontend/v1/lvPlan/getLehrverband/${stg_kz}/${sem}/${verband}`
|
||||
}
|
||||
},
|
||||
checkPermissionOtherLvPlan(){
|
||||
return {
|
||||
method: 'get',
|
||||
url: '/api/frontend/v1/lvPlan/permissionOtherLvPlan',
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -17,13 +17,16 @@
|
||||
|
||||
export default {
|
||||
getMessages(params) {
|
||||
let url = 'api/frontend/v1/messages/messages/getMessages'
|
||||
+ '/' + params.id
|
||||
+ '/' + params.type;
|
||||
if(params.size && params.page) {
|
||||
url += '/' + params.size
|
||||
+ '/' + params.page;
|
||||
}
|
||||
return {
|
||||
method: 'get',
|
||||
url: 'api/frontend/v1/messages/messages/getMessages/'
|
||||
+ params.id + '/'
|
||||
+ params.type + '/'
|
||||
+ params.size + '/'
|
||||
+ params.page
|
||||
url: url
|
||||
};
|
||||
},
|
||||
getVorlagen(){
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
/**
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
export default {
|
||||
getStudentenNoten(lv_id, sem_kurzbz) {
|
||||
return {
|
||||
method: 'get',
|
||||
url: '/api/frontend/v1/Noten/getStudentenNoten',
|
||||
params: { lv_id, sem_kurzbz }
|
||||
};
|
||||
},
|
||||
getNoten(){
|
||||
return {
|
||||
method: 'get',
|
||||
url: '/api/frontend/v1/Noten/getNoten'
|
||||
};
|
||||
},
|
||||
saveStudentenNoten(password, noten, lv_id, sem_kurzbz) {
|
||||
return {
|
||||
method: 'post',
|
||||
url: '/api/frontend/v1/Noten/saveStudentenNoten',
|
||||
params: { password, noten, lv_id, sem_kurzbz }
|
||||
};
|
||||
},
|
||||
saveNotenvorschlag(lv_id, sem_kurzbz, student_uid, note) {
|
||||
return {
|
||||
method: 'post',
|
||||
url: '/api/frontend/v1/Noten/saveNotenvorschlag',
|
||||
params: { lv_id, sem_kurzbz, student_uid, note }
|
||||
};
|
||||
},
|
||||
saveStudentPruefung(student_uid, note, punkte, datum, lva_id, lehreinheit_id, sem_kurzbz, typ){
|
||||
return {
|
||||
method: 'post',
|
||||
url: '/api/frontend/v1/Noten/saveStudentPruefung',
|
||||
params: { student_uid, note, punkte, datum, lva_id, lehreinheit_id, sem_kurzbz, typ }
|
||||
};
|
||||
},
|
||||
createPruefungen(uids, datum, lva_id, sem_kurzbz){
|
||||
return {
|
||||
method: 'post',
|
||||
url: '/api/frontend/v1/Noten/createPruefungen',
|
||||
params: { uids, datum, lva_id, sem_kurzbz }
|
||||
};
|
||||
},
|
||||
saveNotenvorschlagBulk(lv_id, sem_kurzbz, noten) {
|
||||
return {
|
||||
method: 'post',
|
||||
url: '/api/frontend/v1/Noten/saveNotenvorschlagBulk',
|
||||
params: { lv_id, sem_kurzbz, noten }
|
||||
};
|
||||
},
|
||||
saveStudentPruefungBulk(lv_id, sem_kurzbz, pruefungen) {
|
||||
return {
|
||||
method: 'post',
|
||||
url: '/api/frontend/v1/Noten/savePruefungenBulk',
|
||||
params: { lv_id, sem_kurzbz, pruefungen }
|
||||
};
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
export default {
|
||||
getOtherLvPlanViewData(uid) {
|
||||
return {
|
||||
method: 'get',
|
||||
url: `/api/frontend/v1/OtherLvPlan/otherLvPlanViewData/${uid}`,
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
export default {
|
||||
|
||||
profilViewData(uid) {
|
||||
getProfilViewData(uid = null) {
|
||||
let url = "/api/frontend/v1/Profil/profilViewData";
|
||||
if(uid){
|
||||
url += `/${uid}`;
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
export default {
|
||||
getStgOrgLvPlanViewData(uid) {
|
||||
return {
|
||||
method: 'get',
|
||||
url: `/api/frontend/v1/StgOrgLvPlan/stgOrgLvPlanViewData`,
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -16,12 +16,6 @@
|
||||
*/
|
||||
|
||||
export default {
|
||||
getStudiensemester() {
|
||||
return {
|
||||
method: 'get',
|
||||
url: '/api/frontend/v1/Studiensemester/getStudiensemester'
|
||||
};
|
||||
},
|
||||
getAllStudiensemesterAndAktOrNext() {
|
||||
return {
|
||||
method: 'get',
|
||||
|
||||
@@ -16,20 +16,16 @@
|
||||
*/
|
||||
|
||||
export default {
|
||||
getCourselist(student_uid, start_date, end_date, stundenplan) {
|
||||
getCourselist(params) {
|
||||
return {
|
||||
method: 'get',
|
||||
url: 'api/frontend/v1/stv/LvTermine/getStundenplan/' + encodeURIComponent(student_uid) + '/'
|
||||
+ encodeURIComponent(start_date) + '/'
|
||||
+ encodeURIComponent(end_date) + '/'
|
||||
+ encodeURIComponent(stundenplan) + '/'
|
||||
+ encodeURIComponent(true)
|
||||
url: 'api/frontend/v1/stv/LvTermine/getStundenplan/' + params.student_uid + '/'
|
||||
+ params.start_date + '/'
|
||||
+ params.end_date + '/'
|
||||
+ params.group_consecutiveHours + '/'
|
||||
+ params.dbStundenplanTable
|
||||
};
|
||||
},
|
||||
exportCalendar(student_uid, stundenplan)
|
||||
{
|
||||
return FHC_JS_DATA_STORAGE_OBJECT.app_root + 'content/statistik/termine.xls.php?student_uid=' + encodeURIComponent(student_uid) + '&db_stpl_table='+encodeURIComponent(stundenplan);
|
||||
},
|
||||
getStudiensemester(){
|
||||
return {
|
||||
method: 'get',
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
export default {
|
||||
get() {
|
||||
return {
|
||||
method: 'get',
|
||||
url: '/api/frontend/v1/lv/config/get'
|
||||
};
|
||||
},
|
||||
set(params) {
|
||||
return {
|
||||
method: 'post',
|
||||
url: 'api/frontend/v1/lv/config/set',
|
||||
params
|
||||
};
|
||||
}
|
||||
};
|
||||
@@ -18,14 +18,6 @@ export default {
|
||||
params: newData
|
||||
};
|
||||
},
|
||||
getGruppe(gruppe)
|
||||
{
|
||||
return {
|
||||
method: 'post',
|
||||
url: '/api/frontend/v1/lv/gruppe/getGruppe/',
|
||||
params: gruppe
|
||||
};
|
||||
},
|
||||
getByLehreinheit(lehreinheit_id)
|
||||
{
|
||||
return {
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
export default {
|
||||
getCourselist(le_id, start_date, end_date, stundenplan)
|
||||
{
|
||||
return {
|
||||
method: 'get',
|
||||
url: '/api/frontend/v1/lvPlan/getLeEvents/' + encodeURIComponent(le_id) + "/" + encodeURIComponent(start_date) + "/" + encodeURIComponent(end_date) + "/" + encodeURIComponent(stundenplan),
|
||||
};
|
||||
},
|
||||
exportCalendar(le_id, stundenplan)
|
||||
{
|
||||
return FHC_JS_DATA_STORAGE_OBJECT.app_root + 'content/statistik/termine.xls.php?lehreinheit_id=' + encodeURIComponent(le_id) + '&db_stpl_table='+encodeURIComponent(stundenplan);
|
||||
},
|
||||
getStudiensemester(){
|
||||
return {
|
||||
method: 'get',
|
||||
url: '/api/frontend/v1/lv/setup/getStudiensemester/'
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -1,19 +0,0 @@
|
||||
export default {
|
||||
getCourselist(lv_id, start_date, end_date, stundenplan)
|
||||
{
|
||||
return {
|
||||
method: 'get',
|
||||
url: '/api/frontend/v1/lvPlan/getLvEvents/' + encodeURIComponent(lv_id) + "/" + encodeURIComponent(start_date) + "/" + encodeURIComponent(end_date) + "/" + encodeURIComponent(stundenplan),
|
||||
};
|
||||
},
|
||||
exportCalendar(lv_id, stundenplan)
|
||||
{
|
||||
return FHC_JS_DATA_STORAGE_OBJECT.app_root + 'content/statistik/termine.xls.php?lehrveranstaltung_id=' + encodeURIComponent(lv_id) + '&db_stpl_table='+encodeURIComponent(stundenplan);
|
||||
},
|
||||
getStudiensemester(){
|
||||
return {
|
||||
method: 'get',
|
||||
url: '/api/frontend/v1/lv/setup/getStudiensemester/'
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -1,25 +0,0 @@
|
||||
import Grades from '../factory/stv/grades.js';
|
||||
|
||||
export default {
|
||||
...Grades,
|
||||
getCertificate(lv_id, studiensemester_kurzbz) {
|
||||
let url = 'api/frontend/v1/lv/noten/getCertificate/' + encodeURIComponent(lv_id);
|
||||
if (!!studiensemester_kurzbz) {
|
||||
url = url + '/' + encodeURIComponent(studiensemester_kurzbz);
|
||||
}
|
||||
return {
|
||||
method: 'get',
|
||||
url: url
|
||||
};
|
||||
},
|
||||
getTeacherProposal(lv_id, studiensemester_kurzbz) {
|
||||
let url = 'api/frontend/v1/lv/noten/getTeacherProposal/' + encodeURIComponent(lv_id);
|
||||
if (!!studiensemester_kurzbz) {
|
||||
url = url + '/' + encodeURIComponent(studiensemester_kurzbz);
|
||||
}
|
||||
return {
|
||||
method: 'get',
|
||||
url: url
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -1,16 +1,9 @@
|
||||
export default {
|
||||
getLETabs()
|
||||
getTabs()
|
||||
{
|
||||
return {
|
||||
method: 'get',
|
||||
url: '/api/frontend/v1/lv/setup/getLETabs/'
|
||||
};
|
||||
},
|
||||
getLVTabs()
|
||||
{
|
||||
return {
|
||||
method: 'get',
|
||||
url: '/api/frontend/v1/lv/setup/getLVTabs/'
|
||||
url: '/api/frontend/v1/lv/setup/getTabs/'
|
||||
};
|
||||
},
|
||||
}
|
||||
|
||||
+150
-95
@@ -1,146 +1,201 @@
|
||||
import FhcSearchbar from "../components/searchbar/searchbar.js";
|
||||
import CisMenu from "../components/Cis/Menu.js";
|
||||
import PluginsPhrasen from '../plugins/Phrasen.js';
|
||||
import ApiSearchbar from '../api/factory/searchbar.js';
|
||||
import PluginsPhrasen from "../plugins/Phrasen.js";
|
||||
import Theme from "../plugins/Theme.js";
|
||||
|
||||
import ApiSearchbar from "../api/factory/searchbar.js";
|
||||
import ApiLvPlan from "../api/factory/lvPlan.js";
|
||||
|
||||
const app = Vue.createApp({
|
||||
name: 'CisApp',
|
||||
components: {
|
||||
FhcSearchbar,
|
||||
CisMenu
|
||||
},
|
||||
data: function() {
|
||||
return {
|
||||
searchbaroptions: {
|
||||
name: "CisApp",
|
||||
components: {
|
||||
FhcSearchbar,
|
||||
CisMenu,
|
||||
},
|
||||
data: function () {
|
||||
return {
|
||||
searchbaroptions: {
|
||||
origin: "cis",
|
||||
cssclass: "",
|
||||
calcheightonly: true,
|
||||
types: {
|
||||
employee: Vue.computed(() => this.$p.t("search/type_employee")),
|
||||
student: Vue.computed(() => this.$p.t("search/type_student")),
|
||||
employee: Vue.computed(() =>
|
||||
this.$p.t("search/type_employee"),
|
||||
),
|
||||
student: Vue.computed(() =>
|
||||
this.$p.t("search/type_student"),
|
||||
),
|
||||
room: Vue.computed(() => this.$p.t("search/type_room")),
|
||||
organisationunit: Vue.computed(() => this.$p.t("search/type_organisationunit")),
|
||||
organisationunit: Vue.computed(() =>
|
||||
this.$p.t("search/type_organisationunit"),
|
||||
),
|
||||
cms: Vue.computed(() => this.$p.t("search/type_cms")),
|
||||
dms: Vue.computed(() => this.$p.t("search/type_dms"))
|
||||
dms: Vue.computed(() => this.$p.t("search/type_dms")),
|
||||
},
|
||||
actions: {
|
||||
employee: {
|
||||
defaultaction: {
|
||||
type: "link",
|
||||
action: function(data) {
|
||||
return FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router+
|
||||
"/Cis/Profil/View/"+data.uid;
|
||||
}
|
||||
actions: {
|
||||
employee: {
|
||||
defaultaction: {
|
||||
type: "link",
|
||||
action: function (data) {
|
||||
return (
|
||||
FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
|
||||
"/Cis/Profil/View/" +
|
||||
data.uid
|
||||
);
|
||||
},
|
||||
},
|
||||
childactions: []
|
||||
childactions: [],
|
||||
},
|
||||
student: {
|
||||
defaultaction: {
|
||||
type: "link",
|
||||
action: function (data) {
|
||||
return FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router +
|
||||
"/Cis/Profil/View/" + data.uid;
|
||||
|
||||
}
|
||||
return (
|
||||
FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
|
||||
"/Cis/Profil/View/" +
|
||||
data.uid
|
||||
);
|
||||
},
|
||||
},
|
||||
childactions: []
|
||||
childactions: [],
|
||||
},
|
||||
room: {
|
||||
defaultaction: {
|
||||
type: "link",
|
||||
renderif: function(data) {
|
||||
if(data.content_id === null){
|
||||
room: {
|
||||
defaultaction: {
|
||||
type: "link",
|
||||
renderif: function (data) {
|
||||
if (data.content_id === null) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
action: function(data) {
|
||||
const link= FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
action: function (data) {
|
||||
const link =
|
||||
FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
|
||||
'/CisVue/Cms/content/' + data.content_id;
|
||||
"/CisVue/Cms/content/" +
|
||||
data.content_id;
|
||||
return link;
|
||||
}
|
||||
},
|
||||
childactions: [
|
||||
{
|
||||
label: "LV-Plan",
|
||||
icon: "fas fa-bookmark",
|
||||
type: "link",
|
||||
action: function(data) {
|
||||
const link = FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
},
|
||||
},
|
||||
childactions: [
|
||||
{
|
||||
label: "LV-Plan",
|
||||
icon: "fas fa-bookmark",
|
||||
type: "link",
|
||||
action: function (data) {
|
||||
const link =
|
||||
FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
|
||||
'/CisVue/Cms/getRoomInformation/' + data.ort_kurzbz;
|
||||
"/CisVue/Cms/getRoomInformation/" +
|
||||
data.ort_kurzbz;
|
||||
return link;
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "Rauminformation",
|
||||
icon: "fas fa-info-circle",
|
||||
type: "link",
|
||||
renderif: function(data) {
|
||||
if(data.content_id === null){
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "Rauminformation",
|
||||
icon: "fas fa-info-circle",
|
||||
type: "link",
|
||||
renderif: function (data) {
|
||||
if (data.content_id === null) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
action: function(data) {
|
||||
const link= FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
},
|
||||
action: function (data) {
|
||||
const link =
|
||||
FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
|
||||
'/CisVue/Cms/content/' + data.content_id;
|
||||
"/CisVue/Cms/content/" +
|
||||
data.content_id;
|
||||
return link;
|
||||
}
|
||||
},
|
||||
]
|
||||
},
|
||||
organisationunit: {
|
||||
defaultaction: {
|
||||
type: "link",
|
||||
renderif: function(data) {
|
||||
if(data.mailgroup) {
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
organisationunit: {
|
||||
defaultaction: {
|
||||
type: "link",
|
||||
renderif: function (data) {
|
||||
if (data.mailgroup) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
action: function(data) {
|
||||
const link = 'mailto:' + data.mailgroup;
|
||||
action: function (data) {
|
||||
const link = "mailto:" + data.mailgroup;
|
||||
return link;
|
||||
}
|
||||
},
|
||||
childactions: []
|
||||
},
|
||||
},
|
||||
},
|
||||
childactions: [],
|
||||
},
|
||||
cms: {
|
||||
defaultaction: {
|
||||
type: "link",
|
||||
action: function (data) {
|
||||
const link = FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
const link =
|
||||
FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
|
||||
'/CisVue/Cms/content/' + data.content_id;
|
||||
"/CisVue/Cms/content/" +
|
||||
data.content_id;
|
||||
return link;
|
||||
}
|
||||
},
|
||||
},
|
||||
childactions: []
|
||||
childactions: [],
|
||||
},
|
||||
dms: {
|
||||
defaultaction: {
|
||||
type: "link",
|
||||
action: function (data) {
|
||||
const link = FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
'cms/dms.php?id=' + data.dms_id;
|
||||
const link =
|
||||
FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
"cms/dms.php?id=" +
|
||||
data.dms_id;
|
||||
return link;
|
||||
}
|
||||
},
|
||||
},
|
||||
childactions: []
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
searchfunction: function(searchsettings) {
|
||||
return this.$api.call(ApiSearchbar.searchCis(searchsettings));
|
||||
}
|
||||
}
|
||||
childactions: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
searchfunction: function (searchsettings) {
|
||||
return this.$api.call(ApiSearchbar.searchCis(searchsettings));
|
||||
},
|
||||
},
|
||||
async mounted() {
|
||||
const openOtherLvPlanAction = {
|
||||
label: Vue.computed(() => this.$p.t("lehre/stundenplan")),
|
||||
icon: "fas fa-calendar-days",
|
||||
type: "link",
|
||||
action: function (data) {
|
||||
const uid = JSON.parse(data.data).uid;
|
||||
const link =
|
||||
FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
|
||||
"/Cis/OtherLvPlan/" +
|
||||
uid;
|
||||
return link;
|
||||
},
|
||||
};
|
||||
let checkPermissionOtherLvPlanResult = await this.$api.call(
|
||||
ApiLvPlan.checkPermissionOtherLvPlan(),
|
||||
);
|
||||
if (
|
||||
checkPermissionOtherLvPlanResult.meta.status === "success" &&
|
||||
checkPermissionOtherLvPlanResult.data
|
||||
) {
|
||||
this.searchbaroptions.actions.employee.childactions.push(
|
||||
openOtherLvPlanAction,
|
||||
);
|
||||
this.searchbaroptions.actions.student.childactions.push(
|
||||
openOtherLvPlanAction,
|
||||
);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
FhcApps.makeExtendable(app);
|
||||
@@ -148,9 +203,9 @@ FhcApps.makeExtendable(app);
|
||||
app.use(primevue.config.default, {
|
||||
zIndex: {
|
||||
overlay: 9000,
|
||||
tooltip: 8000
|
||||
}
|
||||
})
|
||||
tooltip: 8000,
|
||||
},
|
||||
});
|
||||
app.use(PluginsPhrasen);
|
||||
app.use(Theme);
|
||||
app.mount('#cis-header');
|
||||
app.mount("#cis-header");
|
||||
|
||||
@@ -4,7 +4,7 @@ import Theme from '../../plugins/Theme.js';
|
||||
import contrast from '../../directives/contrast.js';
|
||||
import {setScrollbarWidth} from "../../helpers/CssVarCalcHelpers.js";
|
||||
import LvPlan from "../../components/Cis/LvPlan/Lehrveranstaltung.js";
|
||||
import MyLvPlan from "../../components/Cis/LvPlan/Personal.js";
|
||||
import MyLvPlan from "../../components/Cis/LvPlan/MyLvPlan.js";
|
||||
import MylvStudent from "../../components/Cis/Mylv/Student.js";
|
||||
import Profil from "../../components/Cis/Profil/Profil.js";
|
||||
import Raumsuche from "../../components/Cis/Raumsuche/Raumsuche.js";
|
||||
@@ -17,10 +17,11 @@ import AbgabetoolMitarbeiter from "../../components/Cis/Abgabetool/AbgabetoolMit
|
||||
import AbgabetoolAssistenz from "../../components/Cis/Abgabetool/AbgabetoolAssistenz.js";
|
||||
import DeadlineOverview from "../../components/Cis/Abgabetool/DeadlineOverview.js";
|
||||
import Studium from "../../components/Cis/Studium/Studium.js";
|
||||
import StgOrgLvPlan from "../../components/Cis/LvPlan/StgOrg.js";
|
||||
import OtherLvPlan from "../../components/Cis/LvPlan/OtherLvPlan.js";
|
||||
|
||||
import ApiRenderers from '../../api/factory/renderers.js';
|
||||
import ApiRouteInfo from '../../api/factory/routeinfo.js';
|
||||
import Benotungstool from "../../components/Cis/Benotungstool/Benotungstool.js";
|
||||
import {capitalize} from "../../helpers/StringHelpers.js";
|
||||
|
||||
const ciPath = FHC_JS_DATA_STORAGE_OBJECT.app_root.replace(/(https:|)(^|\/\/)(.*?\/)/g, '') + FHC_JS_DATA_STORAGE_OBJECT.ci_router;
|
||||
@@ -76,12 +77,6 @@ const router = VueRouter.createRouter({
|
||||
component: Raumsuche,
|
||||
props: true
|
||||
},
|
||||
{
|
||||
path: `/Cis/Benotungstool/:lv_id/:sem_kurzbz`,
|
||||
name: 'Benotungstool',
|
||||
component: Benotungstool,
|
||||
props: true
|
||||
},
|
||||
// Redirect old links to new format
|
||||
{
|
||||
path: "/CisVue/Cms/getRoomInformation/:ort_kurzbz",
|
||||
@@ -204,6 +199,26 @@ const router = VueRouter.createRouter({
|
||||
};
|
||||
}
|
||||
},
|
||||
{
|
||||
path: `/Cis/StgOrgLvPlan/:mode?/:focus_date?/:stgkz?/:sem?/:verband?/:gruppe?`,
|
||||
name: 'StgOrgLvPlan',
|
||||
component: StgOrgLvPlan,
|
||||
props(route) {
|
||||
return {
|
||||
propsViewData: route.params
|
||||
};
|
||||
}
|
||||
},
|
||||
{
|
||||
path: `/Cis/OtherLvPlan/:otherUid/:mode?/:focus_date?`,
|
||||
name: "OtherLvPlan",
|
||||
component: OtherLvPlan,
|
||||
props(route) {
|
||||
return {
|
||||
propsViewData: route.params
|
||||
};
|
||||
}
|
||||
},
|
||||
{
|
||||
path: `/Cis4`,
|
||||
name: 'Cis4',
|
||||
@@ -290,7 +305,6 @@ const app = Vue.createApp({
|
||||
}
|
||||
},
|
||||
async created(){
|
||||
|
||||
await this.$api
|
||||
.call(ApiRenderers.loadRenderers())
|
||||
.then(res => res.data)
|
||||
|
||||
@@ -88,12 +88,15 @@ export default {
|
||||
updateRange(rangeInterval) {
|
||||
this.rangeInterval = rangeInterval;
|
||||
this.$emit('update:range', rangeInterval);
|
||||
},
|
||||
resetEventLoader() {
|
||||
this.reset();
|
||||
}
|
||||
},
|
||||
setup(props, context) {
|
||||
const rangeInterval = Vue.ref(null);
|
||||
|
||||
const { events, lv } = useEventLoader(rangeInterval, props.getPromiseFunc);
|
||||
const { events, lv, reset } = useEventLoader(rangeInterval, props.getPromiseFunc);
|
||||
|
||||
Vue.watch(lv, newValue => {
|
||||
context.emit('update:lv', newValue);
|
||||
@@ -102,7 +105,8 @@ export default {
|
||||
return {
|
||||
rangeInterval,
|
||||
events,
|
||||
lv
|
||||
lv,
|
||||
reset
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
||||
@@ -42,14 +42,6 @@ export const AbgabetoolAssistenz = {
|
||||
stg_kz_prop: {
|
||||
default: null
|
||||
},
|
||||
viewData: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({name: '', uid: ''}),
|
||||
validator(value) {
|
||||
return value && value.uid // && value.name -> extensive viewData use only for cis4 onwards
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -31,16 +31,6 @@ export const AbgabetoolMitarbeiter = {
|
||||
old_abgabe_beurteilung_link: Vue.computed(() => this.old_abgabe_beurteilung_link)
|
||||
}
|
||||
},
|
||||
props: {
|
||||
viewData: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({name: '', uid: ''}),
|
||||
validator(value) {
|
||||
return value && value.uid // && value.name -> extensive viewData use only for cis4 onwards
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableData: null,
|
||||
|
||||
@@ -3,6 +3,7 @@ import ApiAbgabe from '../../../api/factory/abgabe.js'
|
||||
import BsModal from "../../Bootstrap/Modal.js";
|
||||
import FhcOverlay from "../../Overlay/FhcOverlay.js";
|
||||
import { getDateStyleClass} from "./getDateStyleClass.js";
|
||||
import ApiAuthinfo from "../../../api/factory/authinfo.js";
|
||||
|
||||
export const AbgabetoolStudent = {
|
||||
name: "AbgabetoolStudent",
|
||||
@@ -24,14 +25,6 @@ export const AbgabetoolStudent = {
|
||||
student_uid_prop: {
|
||||
default: null
|
||||
},
|
||||
viewData: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({uid: ''}),
|
||||
validator(value) {
|
||||
return value && value.uid
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -44,9 +37,18 @@ export const AbgabetoolStudent = {
|
||||
detail: null,
|
||||
projektarbeiten: null,
|
||||
selectedProjektarbeit: null,
|
||||
moodle_link: null
|
||||
moodle_link: null,
|
||||
uid: null,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
isViewMode() {
|
||||
return this.student_uid !== this.uid
|
||||
},
|
||||
student_uid() {
|
||||
return this.student_uid_prop || this.uid || null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
checkQualityGatesStrict(termine) {
|
||||
let qgate1Passed = false
|
||||
@@ -258,18 +260,11 @@ export const AbgabetoolStudent = {
|
||||
},
|
||||
handleDownloadBeurteilung2(projektarbeit) {
|
||||
window.open(projektarbeit.beurteilung2)
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
},
|
||||
computed: {
|
||||
isViewMode() {
|
||||
return this.student_uid !== this.viewData.uid
|
||||
},
|
||||
student_uid() {
|
||||
return this.student_uid_prop || this.viewData?.uid || null
|
||||
}
|
||||
async fetchAuthUID() {
|
||||
const authIdResponse = await this.$api.call(ApiAuthinfo.getAuthUID());
|
||||
this.uid = authIdResponse.data.uid;
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.phrasenPromise = this.$p.loadCategory(['abgabetool', 'global'])
|
||||
@@ -302,6 +297,8 @@ export const AbgabetoolStudent = {
|
||||
}).catch(e => {
|
||||
this.loading = false
|
||||
})
|
||||
|
||||
await this.fetchAuthUID();
|
||||
},
|
||||
mounted() {
|
||||
this.setupMounted()
|
||||
|
||||
@@ -10,14 +10,6 @@ export const DeadlineOverview = {
|
||||
person_uid_prop: {
|
||||
default: null
|
||||
},
|
||||
viewData: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({name: '', uid: ''}),
|
||||
validator(value) {
|
||||
return value && value.name && value.uid
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -11,22 +11,21 @@ export default {
|
||||
FhcCalendar
|
||||
},
|
||||
props: {
|
||||
viewData: Object, // NOTE(chris): this is inherited from router-view
|
||||
propsViewData: Object
|
||||
},
|
||||
data() {
|
||||
const now = luxon.DateTime.now().setZone(this.viewData.timezone);
|
||||
return {
|
||||
studiensemester_kurzbz: null,
|
||||
studiensemester_start: null,
|
||||
studiensemester_ende: null,
|
||||
uid: null,
|
||||
lv: null
|
||||
lv: null,
|
||||
timezone: FHC_JS_DATA_STORAGE_OBJECT.timezone,
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
currentDay() {
|
||||
return this.propsViewData?.focus_date || luxon.DateTime.now().setZone(this.viewData.timezone).toISODate();
|
||||
return this.propsViewData?.focus_date || luxon.DateTime.now().setZone(this.timezone).toISODate();
|
||||
},
|
||||
currentMode() {
|
||||
return this.propsViewData?.mode || DEFAULT_MODE_LVPLAN;
|
||||
@@ -35,7 +34,7 @@ export default {
|
||||
if (!this.studiensemester_start || !this.studiensemester_ende || !this.uid)
|
||||
return false;
|
||||
|
||||
const opts = { zone: this.viewData.timezone };
|
||||
const opts = { zone: this.timezone };
|
||||
const start = luxon.DateTime
|
||||
.fromISO(this.studiensemester_start, opts)
|
||||
.toUnixInteger();
|
||||
@@ -115,7 +114,7 @@ export default {
|
||||
<fhc-calendar
|
||||
ref="calendar"
|
||||
v-model:lv="lv"
|
||||
:timezone="viewData.timezone"
|
||||
:timezone="timezone"
|
||||
:get-promise-func="getPromiseFunc"
|
||||
:date="currentDay"
|
||||
:mode="currentMode"
|
||||
|
||||
+17
-14
@@ -11,7 +11,6 @@ export default {
|
||||
FhcCalendar
|
||||
},
|
||||
props: {
|
||||
viewData: Object, // NOTE(chris): this is inherited from router-view
|
||||
propsViewData: Object
|
||||
},
|
||||
data() {
|
||||
@@ -21,13 +20,14 @@ export default {
|
||||
studiensemester_ende: null,
|
||||
uid: null,
|
||||
isMitarbeiter: false,
|
||||
isStudent: false
|
||||
isStudent: false,
|
||||
timezone: FHC_JS_DATA_STORAGE_OBJECT.timezone,
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
currentDay() {
|
||||
if (!this.propsViewData?.focus_date || isNaN(new Date(this.propsViewData?.focus_date)))
|
||||
return luxon.DateTime.now().setZone(this.viewData.timezone).toISODate();
|
||||
return luxon.DateTime.now().setZone(this.timezone).toISODate();
|
||||
return this.propsViewData?.focus_date;
|
||||
},
|
||||
currentMode() {
|
||||
@@ -47,7 +47,7 @@ export default {
|
||||
return;
|
||||
}
|
||||
|
||||
const opts = { zone: this.viewData.timezone };
|
||||
const opts = { zone: this.timezone };
|
||||
const start = luxon.DateTime
|
||||
.fromISO(this.studiensemester_start, opts)
|
||||
.toUnixInteger();
|
||||
@@ -102,16 +102,18 @@ export default {
|
||||
this.$api.call(ApiLvPlan.eventsPersonal(start.toISODate(), end.toISODate())),
|
||||
this.$api.call(ApiLvPlan.getLvPlanReservierungen(start.toISODate(), end.toISODate()))
|
||||
];
|
||||
}
|
||||
},
|
||||
async fetchAuthInfo() {
|
||||
const authInfoResponse = await this.$api.call(ApiAuthinfo.getAuthInfo());
|
||||
|
||||
const authInfo = authInfoResponse.data;
|
||||
this.uid = authInfo.uid;
|
||||
this.isMitarbeiter = authInfo.isMitarbeiter;
|
||||
this.isStudent = authInfo.isStudent;
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.$api
|
||||
.call(ApiAuthinfo.getAuthInfo())
|
||||
.then(res => {
|
||||
this.uid = res.data.uid;
|
||||
this.isMitarbeiter = res.data.isMitarbeiter;
|
||||
this.isStudent = res.data.isStudent;
|
||||
});
|
||||
async created() {
|
||||
await this.fetchAuthInfo();
|
||||
},
|
||||
template: /*html*/`
|
||||
<div class="cis-lvplan-personal d-flex flex-column h-100">
|
||||
@@ -123,8 +125,9 @@ export default {
|
||||
</h2>
|
||||
<hr>
|
||||
<fhc-calendar
|
||||
v-if="timezone"
|
||||
ref="calendar"
|
||||
:timezone="viewData.timezone"
|
||||
:timezone="timezone"
|
||||
:get-promise-func="getPromiseFunc"
|
||||
:date="currentDay"
|
||||
:mode="currentMode"
|
||||
@@ -0,0 +1,262 @@
|
||||
import FormForm from "../../Form/Form.js";
|
||||
import FormInput from "../../Form/Input.js";
|
||||
import FhcCalendar from "../../Calendar/LvPlan.js";
|
||||
|
||||
import ApiLvPlan from "../.././../api/factory/lvPlan.js";
|
||||
import ApiOtherLvPlan from "../.././../api/factory/otherLvPlan.js";
|
||||
import ApiAuthinfo from "../../../api/factory/authinfo.js";
|
||||
|
||||
export const DEFAULT_MODE_LVPLAN = "Week";
|
||||
|
||||
export default {
|
||||
name: "OtherLvPlan",
|
||||
components: {
|
||||
FormForm,
|
||||
FormInput,
|
||||
FhcCalendar,
|
||||
},
|
||||
props: {
|
||||
propsViewData: Object,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
localProps: {},
|
||||
studiensemester_kurzbz: null,
|
||||
studiensemester_start: null,
|
||||
studiensemester_ende: null,
|
||||
isOtherPersonMitarbeiter: false,
|
||||
isOtherPersonStudent: false,
|
||||
currentStgBezeichnung: null,
|
||||
listVerband: [],
|
||||
listGroup: [],
|
||||
rangeIntervalFirst: null,
|
||||
otherPersonData: {
|
||||
fullName: "",
|
||||
photo: "",
|
||||
},
|
||||
timezone: FHC_JS_DATA_STORAGE_OBJECT.timezone,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
currentDay() {
|
||||
if (
|
||||
!this.propsViewData?.focus_date ||
|
||||
isNaN(new Date(this.propsViewData?.focus_date))
|
||||
)
|
||||
return luxon.DateTime.now().setZone(this.timezone).toISODate();
|
||||
return this.propsViewData?.focus_date;
|
||||
},
|
||||
currentMode() {
|
||||
if (
|
||||
!this.propsViewData?.mode ||
|
||||
!["day", "week", "month"].includes(
|
||||
this.propsViewData?.mode.toLowerCase(),
|
||||
)
|
||||
)
|
||||
return DEFAULT_MODE_LVPLAN;
|
||||
return this.propsViewData?.mode;
|
||||
},
|
||||
downloadLinks() {
|
||||
if (
|
||||
!this.studiensemester_start ||
|
||||
!this.studiensemester_ende ||
|
||||
!this.propsViewData.otherUid
|
||||
)
|
||||
return false;
|
||||
|
||||
const type = this.isOtherPersonStudent
|
||||
? "student"
|
||||
: this.isOtherPersonMitarbeiter
|
||||
? "lektor"
|
||||
: null;
|
||||
|
||||
if (!type) return;
|
||||
|
||||
const opts = { zone: this.timezone };
|
||||
const start = luxon.DateTime.fromISO(
|
||||
this.studiensemester_start,
|
||||
opts,
|
||||
).toUnixInteger();
|
||||
const ende = luxon.DateTime.fromISO(
|
||||
this.studiensemester_ende,
|
||||
opts,
|
||||
).toUnixInteger();
|
||||
|
||||
const download_link =
|
||||
FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
"cis/private/lvplan/stpl_kalender.php" +
|
||||
"?type=" +
|
||||
type +
|
||||
"&pers_uid=" +
|
||||
this.propsViewData.otherUid +
|
||||
"&begin=" +
|
||||
start +
|
||||
"&ende=" +
|
||||
ende;
|
||||
|
||||
return [
|
||||
{
|
||||
title: "excel",
|
||||
icon: "fa-solid fa-file-excel",
|
||||
link: download_link + "&format=excel",
|
||||
},
|
||||
{
|
||||
title: "csv",
|
||||
icon: "fa-solid fa-file-csv",
|
||||
link: download_link + "&format=csv",
|
||||
},
|
||||
{
|
||||
title: "ical1",
|
||||
icon: "fa-regular fa-calendar",
|
||||
link: download_link + "&format=ical&version=1&target=ical",
|
||||
},
|
||||
{
|
||||
title: "ical2",
|
||||
icon: "fa-regular fa-calendar",
|
||||
link: download_link + "&format=ical&version=2&target=ical",
|
||||
},
|
||||
];
|
||||
},
|
||||
get_image_base64_src: function () {
|
||||
if (!this.otherPersonData.photo?.length) {
|
||||
return "";
|
||||
}
|
||||
return "data:image/jpeg;base64," + this.otherPersonData.photo;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
"propsViewData.otherUid": {
|
||||
handler() {
|
||||
this.$router.go();
|
||||
},
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
handleChangeDate(day, newMode) {
|
||||
return this.handleChangeMode(newMode, day);
|
||||
},
|
||||
handleChangeMode(newMode, day) {
|
||||
const mode = newMode[0].toUpperCase() + newMode.slice(1);
|
||||
const focus_date = day.toISODate();
|
||||
|
||||
this.$router.push({
|
||||
name: "OtherLvPlan",
|
||||
params: {
|
||||
mode,
|
||||
focus_date,
|
||||
},
|
||||
});
|
||||
},
|
||||
updateRange(rangeInterval) {
|
||||
this.$api
|
||||
.call(
|
||||
ApiLvPlan.studiensemesterDateInterval(
|
||||
rangeInterval.end.startOf("week").toISODate(),
|
||||
),
|
||||
)
|
||||
.then((res) => {
|
||||
this.studiensemester_kurzbz =
|
||||
res.data.studiensemester_kurzbz;
|
||||
this.studiensemester_start = res.data.start;
|
||||
this.studiensemester_ende = res.data.ende;
|
||||
});
|
||||
},
|
||||
getPromiseFunc(start, end) {
|
||||
return [
|
||||
this.$api.call(
|
||||
ApiLvPlan.eventsPersonal(
|
||||
start.toISODate(),
|
||||
end.toISODate(),
|
||||
this.propsViewData.otherUid,
|
||||
),
|
||||
),
|
||||
this.$api.call(
|
||||
ApiLvPlan.getLvPlanReservierungen(
|
||||
start.toISODate(),
|
||||
end.toISODate(),
|
||||
this.propsViewData.otherUid,
|
||||
),
|
||||
),
|
||||
];
|
||||
},
|
||||
async fetchViewData() {
|
||||
const viewDataResponse = await this.$api.call(
|
||||
ApiOtherLvPlan.getOtherLvPlanViewData(
|
||||
this.propsViewData.otherUid,
|
||||
),
|
||||
);
|
||||
|
||||
const viewData = viewDataResponse.data;
|
||||
|
||||
this.isOtherPersonMitarbeiter =
|
||||
!!viewData?.user_data?.is_mitarbeiter;
|
||||
this.isOtherPersonStudent = !!viewData?.user_data?.is_student;
|
||||
this.otherPersonData.fullName =
|
||||
viewData?.user_data?.vorname +
|
||||
" " +
|
||||
viewData?.user_data?.nachname;
|
||||
this.otherPersonData.photo = viewData?.user_data?.foto;
|
||||
},
|
||||
async redirectToMyLvPlanIfAuthUid() {
|
||||
const authInfoResponse = await this.$api.call(
|
||||
ApiAuthinfo.getAuthInfo(),
|
||||
);
|
||||
const authId = authInfoResponse.data.uid;
|
||||
if (authId === this.propsViewData.otherUid) {
|
||||
this.$router.push({ name: "MyLvPlan" });
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.redirectToMyLvPlanIfAuthUid();
|
||||
await this.fetchViewData();
|
||||
},
|
||||
template: `
|
||||
<div class="d-flex flex-column h-100">
|
||||
<h2>
|
||||
<div class="d-flex flex-row justify-content-between align-items-center">
|
||||
<span>
|
||||
{{ $p.t('lehre/stundenplan') + (studiensemester_kurzbz ? " " + studiensemester_kurzbz : "") }}
|
||||
</span>
|
||||
<div @click="this.$router.push({name: 'ProfilView', params: {uid: propsViewData.otherUid}})" type="button" class="d-flex flex-row align-items-center gap-3">
|
||||
<span v-if="otherPersonData.fullName?.length">
|
||||
{{ otherPersonData.fullName }}
|
||||
</span>
|
||||
<img v-if="otherPersonData.photo?.length" alt="profile picture" class=" img-thumbnail " style=" max-height:60px; " :src="get_image_base64_src"/>
|
||||
</div>
|
||||
</div>
|
||||
</h2>
|
||||
<hr>
|
||||
<fhc-calendar
|
||||
v-if="timezone"
|
||||
ref="calendar"
|
||||
:timezone="timezone"
|
||||
:get-promise-func="getPromiseFunc"
|
||||
:date="currentDay"
|
||||
:mode="currentMode"
|
||||
@update:date="handleChangeDate"
|
||||
@update:mode="handleChangeMode"
|
||||
@update:range="updateRange"
|
||||
class="responsive-calendar"
|
||||
>
|
||||
<div
|
||||
v-if="downloadLinks"
|
||||
class="d-flex gap-1 justify-items-start"
|
||||
>
|
||||
<div v-for="{ title, icon, link } in downloadLinks">
|
||||
<a
|
||||
:href="link"
|
||||
:aria-label="title"
|
||||
class="py-1 btn btn-outline-secondary"
|
||||
>
|
||||
<div class="d-flex flex-column">
|
||||
<i aria-hidden="true" :class="icon"></i>
|
||||
<span style="font-size:.5rem">{{ title }}</span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</fhc-calendar>
|
||||
</div>
|
||||
`,
|
||||
};
|
||||
@@ -0,0 +1,341 @@
|
||||
import FormForm from '../../Form/Form.js';
|
||||
import FormInput from '../../Form/Input.js';
|
||||
import FhcCalendar from "../../Calendar/LvPlan.js";
|
||||
|
||||
import ApiLvPlan from '../.././../api/factory/lvPlan.js';
|
||||
import ApiStgOrgLvPlan from '../.././../api/factory/stgOrgLvPlan.js';
|
||||
import ApiAuthinfo from '../../../api/factory/authinfo.js';
|
||||
|
||||
export const DEFAULT_MODE_LVPLAN = 'Week';
|
||||
|
||||
export default {
|
||||
name: 'LvPlanStgOrg',
|
||||
components: {
|
||||
FormForm,
|
||||
FormInput,
|
||||
FhcCalendar,
|
||||
},
|
||||
props: {
|
||||
propsViewData: Object
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
localProps: {},
|
||||
studiensemester_kurzbz: null,
|
||||
studiensemester_start: null,
|
||||
studiensemester_ende: null,
|
||||
uid: null,
|
||||
isMitarbeiter: false,
|
||||
isStudent: false,
|
||||
currentStgBezeichnung: null,
|
||||
formData: {
|
||||
stgkz: null,
|
||||
sem: null,
|
||||
verband: null,
|
||||
gruppe: null,
|
||||
},
|
||||
listStg: [],
|
||||
listSem: [1,2,3,4,5,6,7,8,9,10],
|
||||
listVerband: [],
|
||||
listGroup: [],
|
||||
rangeIntervalFirst: null,
|
||||
timezone: FHC_JS_DATA_STORAGE_OBJECT.timezone,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
maxSemester(){
|
||||
const currentStg = this.listStg.find(
|
||||
item => item.studiengang_kz === this.formData.stgkz
|
||||
);
|
||||
return currentStg?.max_semester;
|
||||
},
|
||||
currentDay() {
|
||||
if (!this.propsViewData?.focus_date || isNaN(new Date(this.propsViewData?.focus_date)))
|
||||
return luxon.DateTime.now().setZone(this.timezone).toISODate();
|
||||
return this.propsViewData?.focus_date;
|
||||
},
|
||||
currentMode() {
|
||||
if (!this.propsViewData?.mode || !['day', 'week', 'month'].includes(this.propsViewData?.mode.toLowerCase()))
|
||||
return DEFAULT_MODE_LVPLAN;
|
||||
return this.propsViewData?.mode;
|
||||
},
|
||||
downloadLinks() {
|
||||
if (!this.studiensemester_start || !this.studiensemester_ende || !this.uid)
|
||||
return false;
|
||||
|
||||
let type = false;
|
||||
type = this.isStudent ? 'student' : type;
|
||||
type = this.isMitarbeiter ? 'lektor' : type;
|
||||
if (false === type)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const opts = { zone: this.timezone };
|
||||
const start = luxon.DateTime
|
||||
.fromISO(this.studiensemester_start, opts)
|
||||
.toUnixInteger();
|
||||
const ende = luxon.DateTime
|
||||
.fromISO(this.studiensemester_ende, opts)
|
||||
.toUnixInteger();
|
||||
|
||||
const download_link = FHC_JS_DATA_STORAGE_OBJECT.app_root
|
||||
+ 'cis/private/lvplan/stpl_kalender.php'
|
||||
+ '?type=' + type
|
||||
+ '&pers_uid=' + this.uid
|
||||
+ '&begin=' + start
|
||||
+ '&ende=' + ende;
|
||||
|
||||
return [
|
||||
{ title: "excel", icon: 'fa-solid fa-file-excel', link: download_link + '&format=excel' },
|
||||
{ title: "csv", icon: 'fa-solid fa-file-csv', link: download_link + '&format=csv' },
|
||||
{ title: "ical1", icon: 'fa-regular fa-calendar', link: download_link + '&format=ical&version=1&target=ical' },
|
||||
{ title: "ical2", icon: 'fa-regular fa-calendar', link: download_link + '&format=ical&version=2&target=ical' }
|
||||
];
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadLvPlan(){
|
||||
if(!this.formData.stgkz){
|
||||
this.$fhcAlert.alertError(this.$p.t('LvPlan', 'chooseStg'));
|
||||
return;
|
||||
}
|
||||
|
||||
if(!this.formData.sem && (this.formData.verband || this.formData.gruppe)){
|
||||
this.$fhcAlert.alertError(this.$p.t('LvPlan', 'error_SemMissing'));
|
||||
return;
|
||||
}
|
||||
|
||||
if(!this.formData.verband && this.formData.gruppe){
|
||||
this.$fhcAlert.alertError(this.$p.t('LvPlan', 'error_VerbandMissing'));
|
||||
return;
|
||||
}
|
||||
|
||||
const params = {
|
||||
mode: this.currentMode,
|
||||
focus_date: this.currentDay,
|
||||
stgkz: this.formData.stgkz,
|
||||
sem: this.formData.sem,
|
||||
verband: this.formData.verband,
|
||||
gruppe: this.formData.gruppe,
|
||||
};
|
||||
|
||||
//ensure logic: no value after a null value in route
|
||||
if(params.sem == null)
|
||||
{
|
||||
params.verband = null;
|
||||
params.gruppe = null;
|
||||
}
|
||||
if(params.verband == null) {
|
||||
params.gruppe = null;
|
||||
}
|
||||
|
||||
//delete all null values to avoid null in router
|
||||
Object.keys(params).forEach(
|
||||
key => params[key] == null && delete params[key]
|
||||
);
|
||||
|
||||
this.$router.push({
|
||||
name: "StgOrgLvPlan",
|
||||
params,
|
||||
});
|
||||
|
||||
this.$refs['calendar']?.resetEventLoader();
|
||||
},
|
||||
loadListSem(){
|
||||
this.listSem = [...Array(this.maxSemester).keys()].map(i => i + 1);
|
||||
},
|
||||
loadListVerband(){
|
||||
this.$api
|
||||
.call(ApiLvPlan.getLehrverband(this.formData.stgkz, this.formData.semester, this.formData.verband))
|
||||
.then(result => {
|
||||
const data = result.data;
|
||||
const mappedData = data.map(item => item.verband);
|
||||
this.listVerband = [...new Set(mappedData.filter(v =>
|
||||
v !== null &&
|
||||
v !== undefined &&
|
||||
String(v).trim() !== ""
|
||||
))]
|
||||
.sort();
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
},
|
||||
loadListGroup(){
|
||||
this.$api
|
||||
.call(ApiLvPlan.getGruppe(this.formData.stgkz, this.formData.semester, this.formData.verband))
|
||||
.then(result => {
|
||||
const data = result.data;
|
||||
const mappedData = data.map(item => item.gruppe);
|
||||
this.listGroup = [...new Set(mappedData.filter(v =>
|
||||
v !== null &&
|
||||
v !== undefined &&
|
||||
String(v).trim() !== ""))]
|
||||
.sort();
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
},
|
||||
handleChangeDate(day, newMode) {
|
||||
return this.handleChangeMode(newMode, day);
|
||||
},
|
||||
handleChangeMode(newMode, day) {
|
||||
const mode = newMode[0].toUpperCase() + newMode.slice(1);
|
||||
const focus_date = day.toISODate();
|
||||
|
||||
this.$router.push({
|
||||
name: "StgOrgLvPlan",
|
||||
params: {
|
||||
mode,
|
||||
focus_date,
|
||||
stgkz: this.formData.stgkz,
|
||||
sem: this.formData.sem,
|
||||
verband: this.formData.verband,
|
||||
gruppe: this.formData.gruppe,
|
||||
},
|
||||
});
|
||||
},
|
||||
updateRange(rangeInterval) {
|
||||
this.$api
|
||||
.call(ApiLvPlan.studiensemesterDateInterval(
|
||||
rangeInterval.end.startOf('week').toISODate()
|
||||
))
|
||||
.then(res => {
|
||||
this.studiensemester_kurzbz = res.data.studiensemester_kurzbz;
|
||||
this.studiensemester_start = res.data.start;
|
||||
this.studiensemester_ende = res.data.ende;
|
||||
});
|
||||
},
|
||||
getPromiseFunc(start, end) {
|
||||
return [
|
||||
this.$api.call(ApiLvPlan.eventsStgOrg(start, end, this.formData.stgkz, this.formData.sem, this.formData.verband, this.formData.gruppe))
|
||||
];
|
||||
},
|
||||
async fetchAuthInfo() {
|
||||
const authInfoResponse = await this.$api.call(ApiAuthinfo.getAuthInfo());
|
||||
|
||||
const authInfo = authInfoResponse.data;
|
||||
this.uid = authInfo.uid;
|
||||
this.isMitarbeiter = authInfo.isMitarbeiter;
|
||||
this.isStudent = authInfo.isStudent;
|
||||
},
|
||||
async fetchViewData() {
|
||||
const viewDataResponse = await this.$api.call(ApiStgOrgLvPlan.getStgOrgLvPlanViewData());
|
||||
|
||||
const viewData = viewDataResponse.data;
|
||||
this.listStg = viewData.studiengaenge;
|
||||
},
|
||||
},
|
||||
async created(){
|
||||
await this.fetchAuthInfo();
|
||||
await this.fetchViewData();
|
||||
|
||||
if (this.propsViewData) {
|
||||
this.formData.stgkz = this.propsViewData.stgkz ? this.propsViewData.stgkz: null;
|
||||
this.formData.sem = this.propsViewData.sem ? this.propsViewData.sem: null;
|
||||
this.formData.verband = this.propsViewData.verband ? this.propsViewData.verband: null;
|
||||
this.formData.gruppe = this.propsViewData.gruppe ? this.propsViewData.gruppe: null;
|
||||
}
|
||||
},
|
||||
template: `
|
||||
<div class="cis-lvplan-stg-org d-flex flex-column h-100">
|
||||
|
||||
<div class="mt-3">
|
||||
<form-form class="row row-cols-1 row-cols-md-2 row-cols-lg-4 row-cols-xl-5 g-3 mb-3">
|
||||
<form-input
|
||||
type="select"
|
||||
v-model="formData.stgkz"
|
||||
@change="loadListSem(formData.stgkz)"
|
||||
>
|
||||
<option :value="null" selected>{{ $p.t('LvPlan/chooseStg') }}</option>
|
||||
<option
|
||||
v-for="stg in listStg"
|
||||
:key="stg.studiengang_kz"
|
||||
:value="stg.studiengang_kz"
|
||||
>
|
||||
{{ stg.kurzbzlang }} ({{ stg.bezeichnung }})
|
||||
</option>
|
||||
</form-input>
|
||||
<form-input
|
||||
type="select"
|
||||
v-model="formData.sem"
|
||||
@change="loadListVerband()"
|
||||
@click="loadListSem(formData.stgkz)"
|
||||
>
|
||||
<option :value="null" selected>Semester</option>
|
||||
<option
|
||||
v-for="sem in listSem"
|
||||
:key="sem"
|
||||
:value="sem"
|
||||
>
|
||||
{{ sem }}
|
||||
</option>
|
||||
</form-input>
|
||||
<form-input
|
||||
type="select"
|
||||
v-model="formData.verband"
|
||||
@change="loadListGroup()"
|
||||
>
|
||||
<option :value="null" selected>{{ $p.t('lehre/verband') }} </option>
|
||||
<option
|
||||
v-for="verband in listVerband"
|
||||
:key="verband"
|
||||
:value="verband"
|
||||
>
|
||||
{{ verband }}
|
||||
</option>
|
||||
</form-input>
|
||||
<form-input
|
||||
type="select"
|
||||
v-model="formData.gruppe"
|
||||
>
|
||||
<option :value="null" selected>{{ $p.t('gruppenmanagement/gruppe') }}</option>
|
||||
<option
|
||||
v-for="group in listGroup"
|
||||
:key="group"
|
||||
:value="group"
|
||||
>
|
||||
{{ group }}
|
||||
</option>
|
||||
</form-input>
|
||||
<button type="button" class="btn btn-secondary" @click="loadLvPlan">{{ $p.t('LvPlan/loadLvPlan') }}</button>
|
||||
|
||||
</form-form>
|
||||
</div>
|
||||
|
||||
<template v-if="timezone">
|
||||
<fhc-calendar
|
||||
v-if="propsViewData && propsViewData.stgkz"
|
||||
ref="calendar"
|
||||
v-model:lv="formData"
|
||||
:timezone="timezone"
|
||||
:get-promise-func="getPromiseFunc"
|
||||
:date="currentDay"
|
||||
:mode="currentMode"
|
||||
@update:date="handleChangeDate"
|
||||
@update:mode="handleChangeMode"
|
||||
@update:range="updateRange"
|
||||
class="responsive-calendar"
|
||||
>
|
||||
<div
|
||||
v-if="downloadLinks"
|
||||
class="d-flex gap-1 justify-items-start"
|
||||
>
|
||||
<div v-for="{ title, icon, link } in downloadLinks">
|
||||
<a
|
||||
:href="link"
|
||||
:aria-label="title"
|
||||
class="py-1 btn btn-outline-secondary"
|
||||
>
|
||||
<div class="d-flex flex-column">
|
||||
<i aria-hidden="true" :class="icon"></i>
|
||||
<span style="font-size:.5rem">{{ title }}</span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</fhc-calendar>
|
||||
</template>
|
||||
</div>
|
||||
`,
|
||||
|
||||
|
||||
};
|
||||
@@ -0,0 +1,187 @@
|
||||
import FhcCalendar from "../../Calendar/LvPlan.js";
|
||||
|
||||
import ApiLvPlan from '../.././../api/factory/lvPlan.js';
|
||||
import ApiAuthinfo from '../../../api/factory/authinfo.js';
|
||||
|
||||
export const DEFAULT_MODE_LVPLAN = 'Week';
|
||||
|
||||
export default {
|
||||
name: 'LvPlanStgOrg',
|
||||
inject: {
|
||||
cisRoot: {
|
||||
from: 'cisRoot'
|
||||
},
|
||||
},
|
||||
components: {
|
||||
FhcCalendar,
|
||||
},
|
||||
props: {
|
||||
viewData: Object,
|
||||
propsViewData: Object
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
studiensemester_kurzbz: null,
|
||||
studiensemester_start: null,
|
||||
studiensemester_ende: null,
|
||||
uid: null,
|
||||
isMitarbeiter: false,
|
||||
isStudent: false,
|
||||
listStg: [],
|
||||
currentStgBezeichnung: null
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
currentDay() {
|
||||
if (!this.propsViewData?.focus_date || isNaN(new Date(this.propsViewData?.focus_date)))
|
||||
return luxon.DateTime.now().setZone(this.viewData.timezone).toISODate();
|
||||
return this.propsViewData?.focus_date;
|
||||
},
|
||||
currentMode() {
|
||||
if (!this.propsViewData?.mode || !['day', 'week', 'month'].includes(this.propsViewData?.mode.toLowerCase()))
|
||||
return DEFAULT_MODE_LVPLAN;
|
||||
return this.propsViewData?.mode;
|
||||
},
|
||||
downloadLinks() {
|
||||
if (!this.studiensemester_start || !this.studiensemester_ende || !this.uid)
|
||||
return false;
|
||||
|
||||
let type = false;
|
||||
type = this.isStudent ? 'student' : type;
|
||||
type = this.isMitarbeiter ? 'lektor' : type;
|
||||
if (false === type)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const opts = { zone: this.viewData.timezone };
|
||||
const start = luxon.DateTime
|
||||
.fromISO(this.studiensemester_start, opts)
|
||||
.toUnixInteger();
|
||||
const ende = luxon.DateTime
|
||||
.fromISO(this.studiensemester_ende, opts)
|
||||
.toUnixInteger();
|
||||
|
||||
const download_link = FHC_JS_DATA_STORAGE_OBJECT.app_root
|
||||
+ 'cis/private/lvplan/stpl_kalender.php'
|
||||
+ '?type=' + type
|
||||
+ '&pers_uid=' + this.uid
|
||||
+ '&begin=' + start
|
||||
+ '&ende=' + ende;
|
||||
|
||||
return [
|
||||
{ title: "excel", icon: 'fa-solid fa-file-excel', link: download_link + '&format=excel' },
|
||||
{ title: "csv", icon: 'fa-solid fa-file-csv', link: download_link + '&format=csv' },
|
||||
{ title: "ical1", icon: 'fa-regular fa-calendar', link: download_link + '&format=ical&version=1&target=ical' },
|
||||
{ title: "ical2", icon: 'fa-regular fa-calendar', link: download_link + '&format=ical&version=2&target=ical' }
|
||||
];
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleChangeDate(day, newMode) {
|
||||
return this.handleChangeMode(newMode, day);
|
||||
},
|
||||
handleChangeMode(newMode, day) {
|
||||
const mode = newMode[0].toUpperCase() + newMode.slice(1)
|
||||
const focus_date = day.toISODate();
|
||||
|
||||
this.$router.push({
|
||||
name: "StgOrgLvPlan",
|
||||
params: {
|
||||
mode,
|
||||
focus_date,
|
||||
stgkz: this.propsViewData.stgkz,
|
||||
sem: this.propsViewData.sem,
|
||||
verband: this.propsViewData.verband,
|
||||
gruppe: this.propsViewData.gruppe,
|
||||
}
|
||||
});
|
||||
},
|
||||
updateRange(rangeInterval) {
|
||||
this.$api
|
||||
.call(ApiLvPlan.studiensemesterDateInterval(
|
||||
rangeInterval.end.startOf('week').toISODate()
|
||||
))
|
||||
.then(res => {
|
||||
this.studiensemester_kurzbz = res.data.studiensemester_kurzbz;
|
||||
this.studiensemester_start = res.data.start;
|
||||
this.studiensemester_ende = res.data.ende;
|
||||
});
|
||||
},
|
||||
getPromiseFunc(start, end) {
|
||||
return [
|
||||
this.$api.call(ApiLvPlan.eventsStgOrg(start.toISODate(), end.toISODate(), this.propsViewData.stgkz, this.propsViewData.sem, this.propsViewData.verband, this.propsViewData.gruppe)),
|
||||
//local for test
|
||||
/* this.$api.call(ApiLvPlan.eventsStgOrg(start.toISODate(), end.toISODate(), this.stgkz, this.sem, this.verband, this.gruppe))*/
|
||||
];
|
||||
},
|
||||
backToDropdown(){
|
||||
this.$router.push({
|
||||
name: "OverviewLvPlan",
|
||||
});
|
||||
}
|
||||
},
|
||||
created(){
|
||||
this.$api
|
||||
.call(ApiAuthinfo.getAuthInfo())
|
||||
.then(res => {
|
||||
this.uid = res.data.uid;
|
||||
this.isMitarbeiter = res.data.isMitarbeiter;
|
||||
this.isStudent = res.data.isStudent;
|
||||
});
|
||||
|
||||
if(this.propsViewData.stgkz) {
|
||||
this.$api
|
||||
.call(ApiLvPlan.getStudiengaenge())
|
||||
.then(result => {
|
||||
const currentStg = result.data.find(
|
||||
item => item.studiengang_kz == this.propsViewData.stgkz
|
||||
);
|
||||
this.currentStgBezeichnung = currentStg.kurzbzlang + " - " + currentStg.bezeichnung;
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
}
|
||||
},
|
||||
template: `
|
||||
<div class="cis-lvplan-stg-org d-flex flex-column h-100">
|
||||
<h2>{{ $p.t('LvPlan/headerLvPlanLvVerband') }}</h2>
|
||||
<p v-if="propsViewData.stgkz"><span><strong>{{currentStgBezeichnung}}</strong></span>
|
||||
<span v-if="propsViewData.sem" style="margin-left:10px;"> Semester: {{propsViewData.sem}} </span>
|
||||
<span v-if="propsViewData.verband" style="margin-left:10px;"> Verband: {{propsViewData.verband}} </span>
|
||||
<span v-if="propsViewData.gruppe" style="margin-left:10px;"> Gruppe: {{propsViewData.gruppe}} </span>
|
||||
<button class="py-1 btn btn-outline-secondary" :title="this.$p.t('LvPlan', 'backToDropdown')" style="margin-left:10px;"> <i class="fa fa-arrow-left fa-xs" @click="backToDropdown"></i></button>
|
||||
</p>
|
||||
<p v-else>{{ $p.t('LvPlan/noStgProvided') }}</p>
|
||||
|
||||
<fhc-calendar
|
||||
ref="calendar"
|
||||
:timezone="viewData.timezone"
|
||||
:get-promise-func="getPromiseFunc"
|
||||
:date="currentDay"
|
||||
:mode="currentMode"
|
||||
@update:date="handleChangeDate"
|
||||
@update:mode="handleChangeMode"
|
||||
@update:range="updateRange"
|
||||
class="responsive-calendar"
|
||||
>
|
||||
<div
|
||||
v-if="downloadLinks"
|
||||
class="d-flex gap-1 justify-items-start"
|
||||
>
|
||||
<div v-for="{ title, icon, link } in downloadLinks">
|
||||
<a
|
||||
:href="link"
|
||||
:aria-label="title"
|
||||
class="py-1 btn btn-outline-secondary"
|
||||
>
|
||||
<div class="d-flex flex-column">
|
||||
<i aria-hidden="true" :class="icon"></i>
|
||||
<span style="font-size:.5rem">{{ title }}</span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</fhc-calendar>
|
||||
</div>
|
||||
`,
|
||||
};
|
||||
@@ -9,6 +9,7 @@ import QuickLinks from "./ProfilComponents/QuickLinks.js";
|
||||
import ProfilEmails from "./ProfilComponents/ProfilEmails.js";
|
||||
import RoleInformation from "./ProfilComponents/RoleInformation.js";
|
||||
import ProfilInformation from "./ProfilComponents/ProfilInformation.js";
|
||||
import CalendarSync from "./ProfilComponents/CalendarSync.js";
|
||||
|
||||
import ApiProfilUpdate from '../../../api/factory/profilUpdate.js';
|
||||
import { dateFilter } from '../../../tabulator/filters/Dates.js';
|
||||
@@ -26,6 +27,7 @@ export default {
|
||||
ProfilEmails,
|
||||
RoleInformation,
|
||||
ProfilInformation,
|
||||
CalendarSync,
|
||||
},
|
||||
|
||||
inject: ["sortProfilUpdates", "collapseFunction", "language","isEditable"],
|
||||
@@ -103,7 +105,6 @@ export default {
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
betriebsmittel_table_options: {
|
||||
persistenceID: "filterTableMaProfilBetriebsmittel",
|
||||
persistence: {
|
||||
@@ -160,6 +161,7 @@ export default {
|
||||
props: {
|
||||
data: Object,
|
||||
editData: Object,
|
||||
calendarSyncUrls: Array,
|
||||
},
|
||||
|
||||
methods: {
|
||||
@@ -296,6 +298,11 @@ export default {
|
||||
}
|
||||
};
|
||||
},
|
||||
quickLinks() {
|
||||
let quickLinks = [];
|
||||
//
|
||||
return quickLinks;
|
||||
},
|
||||
},
|
||||
|
||||
created() {
|
||||
@@ -313,7 +320,6 @@ export default {
|
||||
});
|
||||
//? sorts the profil Updates: pending -> accepted -> rejected
|
||||
this.data.profilUpdates?.sort(this.sortProfilUpdates);
|
||||
|
||||
},
|
||||
watch: {
|
||||
'data.funktionen'(newVal) {
|
||||
@@ -331,12 +337,6 @@ export default {
|
||||
<edit-profil v-if="showModal" ref="editModal" :isMitarbeiter="true" @hideBsModal="hideEditProfilModal" :value="JSON.parse(JSON.stringify(filteredEditData))" :titel="$p.t('profil','profilBearbeiten')"></edit-profil>
|
||||
<div class="row">
|
||||
<div class="d-md-none col-12 ">
|
||||
<!--TODO: uncomment when implemented
|
||||
<div class="row mb-3">
|
||||
<div class="col">
|
||||
<quick-links :title="$p.t('profil','quickLinks')" :mobile="true"></quick-links>
|
||||
</div>
|
||||
</div>-->
|
||||
<!-- Bearbeiten Button -->
|
||||
<div v-if="isEditable" class="row mb-3 ">
|
||||
<div class="col">
|
||||
@@ -465,17 +465,11 @@ export default {
|
||||
</div>
|
||||
<!-- START OF SIDE PANEL -->
|
||||
<div class="col-md-4 col-xxl-3 col-sm-12 text-break" >
|
||||
<!--TODO: uncomment when implemented
|
||||
<div class="row d-none d-md-block mb-3">
|
||||
|
||||
<div class="col">
|
||||
|
||||
<quick-links :title="$p.t('profil','quickLinks')"></quick-links>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>-->
|
||||
<div v-if="quickLinks.length" class="row mb-4">
|
||||
<div class="col">
|
||||
<quick-links :title="$p.t('profil/quickLinks')" :links="quickLinks" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- Bearbeiten Button -->
|
||||
<div class="row d-none d-md-block ">
|
||||
<div class="col mb-3">
|
||||
@@ -501,12 +495,17 @@ export default {
|
||||
<ausweis-status :data="data.zutrittsdatum"></ausweis-status>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="row mb-3">
|
||||
<div class="col">
|
||||
<!-- MAILVERTEILER -->
|
||||
<mailverteiler :data="data?.mailverteiler" :title="$p.t('profil','mailverteiler')"></mailverteiler>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<calendar-sync :uid="$props.data.username" :calendarSyncUrls="$props.calendarSyncUrls"></calendar-sync>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
import {CoreFilterCmpt} from "../../../components/filter/Filter.js";
|
||||
import { CoreFilterCmpt } from "../../../components/filter/Filter.js";
|
||||
import Mailverteiler from "./ProfilComponents/Mailverteiler.js";
|
||||
import QuickLinks from "./ProfilComponents/QuickLinks.js";
|
||||
import RoleInformation from "./ProfilComponents/RoleInformation.js";
|
||||
import ProfilEmails from "./ProfilComponents/ProfilEmails.js";
|
||||
import ProfilInformation from "./ProfilComponents/ProfilInformation.js";
|
||||
import QuickLinks from "./ProfilComponents/QuickLinks.js";
|
||||
|
||||
import { dateFilter } from '../../../tabulator/filters/Dates.js';
|
||||
import { dateFilter } from "../../../tabulator/filters/Dates.js";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
CoreFilterCmpt,
|
||||
Mailverteiler,
|
||||
QuickLinks,
|
||||
RoleInformation,
|
||||
ProfilEmails,
|
||||
ProfilInformation,
|
||||
QuickLinks,
|
||||
},
|
||||
inject: ["collapseFunction", "language"],
|
||||
data() {
|
||||
return {
|
||||
collapseIconFunktionen: true,
|
||||
preloadedPhrasen:{},
|
||||
preloadedPhrasen: {},
|
||||
funktionen_table_options: {
|
||||
persistenceID: "filterTableMaViewProfilFunktionen",
|
||||
persistence: {
|
||||
columns: false
|
||||
columns: false,
|
||||
},
|
||||
minHeight: 300,
|
||||
layout: "fitColumns",
|
||||
@@ -35,58 +35,65 @@ export default {
|
||||
//? option when wanting to hide the collapsed list
|
||||
|
||||
{
|
||||
title:
|
||||
"<i id='collapseIconFunktionen' role='button' class='fa-solid fa-angle-down '></i>",
|
||||
title: "<i id='collapseIconFunktionen' role='button' class='fa-solid fa-angle-down '></i>",
|
||||
field: "collapse",
|
||||
headerSort: false,
|
||||
headerFilter: false,
|
||||
formatter: "responsiveCollapse",
|
||||
maxWidth: 40,
|
||||
headerClick: this.collapseFunction,
|
||||
visible: true
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
title: Vue.computed(() => this.$p.t('ui/bezeichnung')),
|
||||
title: Vue.computed(() => this.$p.t("ui/bezeichnung")),
|
||||
field: "Bezeichnung",
|
||||
headerFilter: true,
|
||||
minWidth: 200,
|
||||
visible: true
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
title: Vue.computed(() => this.$p.t('lehre/organisationseinheit')),
|
||||
title: Vue.computed(() =>
|
||||
this.$p.t("lehre/organisationseinheit"),
|
||||
),
|
||||
field: "Organisationseinheit",
|
||||
headerFilter: true,
|
||||
minWidth: 200,
|
||||
visible: true
|
||||
visible: true,
|
||||
},
|
||||
{
|
||||
title: Vue.computed(() => this.$p.t('global/gueltigVon')),
|
||||
title: Vue.computed(() =>
|
||||
this.$p.t("global/gueltigVon"),
|
||||
),
|
||||
field: "Gültig_von",
|
||||
headerFilterFunc: 'dates',
|
||||
headerFilterFunc: "dates",
|
||||
headerFilter: dateFilter,
|
||||
resizable: true,
|
||||
minWidth: 200,
|
||||
visible: true,
|
||||
formatter:"datetime",
|
||||
formatterParams: this.datetimeFormatterParams()
|
||||
formatter: "datetime",
|
||||
formatterParams: this.datetimeFormatterParams(),
|
||||
},
|
||||
{
|
||||
title: Vue.computed(() => this.$p.t('global/gueltigBis')),
|
||||
title: Vue.computed(() =>
|
||||
this.$p.t("global/gueltigBis"),
|
||||
),
|
||||
field: "Gültig_bis",
|
||||
headerFilterFunc: 'dates',
|
||||
headerFilterFunc: "dates",
|
||||
headerFilter: dateFilter,
|
||||
resizable: true,
|
||||
minWidth: 200,
|
||||
visible: true,
|
||||
formatter:"datetime",
|
||||
formatterParams: this.datetimeFormatterParams()
|
||||
formatter: "datetime",
|
||||
formatterParams: this.datetimeFormatterParams(),
|
||||
},
|
||||
{
|
||||
title: Vue.computed(() => this.$p.t('profil/wochenstunden')),
|
||||
title: Vue.computed(() =>
|
||||
this.$p.t("profil/wochenstunden"),
|
||||
),
|
||||
field: "Wochenstunden",
|
||||
headerFilter: true,
|
||||
minWidth: 200,
|
||||
visible: true
|
||||
visible: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -94,47 +101,56 @@ export default {
|
||||
},
|
||||
|
||||
//? this is the prop passed to the dynamic component with the custom data of the view
|
||||
props: ["data"],
|
||||
props: ["data", "permissions"],
|
||||
methods: {
|
||||
funktionenTableBuilt: function () {
|
||||
this.$refs.funktionenTable.tabulator.setData(this.data.funktionen);
|
||||
},
|
||||
datetimeFormatterParams: function() {
|
||||
datetimeFormatterParams: function () {
|
||||
const params = {
|
||||
inputFormat:"yyyy-MM-dd",
|
||||
outputFormat:"dd.MM.yyyy",
|
||||
invalidPlaceholder:"(invalid date)",
|
||||
timezone:FHC_JS_DATA_STORAGE_OBJECT.timezone
|
||||
inputFormat: "yyyy-MM-dd",
|
||||
outputFormat: "dd.MM.yyyy",
|
||||
invalidPlaceholder: "(invalid date)",
|
||||
timezone: FHC_JS_DATA_STORAGE_OBJECT.timezone,
|
||||
};
|
||||
return params;
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
'data.funktionen'(newVal) {
|
||||
if(this.$refs.funktionenTable) this.$refs.funktionenTable.tabulator.setData(newVal);
|
||||
"data.funktionen"(newVal) {
|
||||
if (this.$refs.funktionenTable)
|
||||
this.$refs.funktionenTable.tabulator.setData(newVal);
|
||||
},
|
||||
"language.value"(newVal) {
|
||||
// reevaluates computed phrasen
|
||||
if (this.$refs.funktionenTable)
|
||||
this.$refs.funktionenTable.tabulator.setColumns(
|
||||
this.funktionen_table_options.columns,
|
||||
);
|
||||
},
|
||||
'language.value'(newVal) { // reevaluates computed phrasen
|
||||
if(this.$refs.funktionenTable) this.$refs.funktionenTable.tabulator.setColumns(this.funktionen_table_options.columns)
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
getTelefonValue() {
|
||||
if(this.data.standort_telefon?.kontakt) {
|
||||
return this.data.standort_telefon.kontakt + " " + this.data.telefonklappe
|
||||
} else if(this.data.standort_telefon) {
|
||||
return this.data.standort_telefon + " " + this.data.telefonklappe
|
||||
if (this.data.standort_telefon?.kontakt) {
|
||||
return (
|
||||
this.data.standort_telefon.kontakt +
|
||||
" " +
|
||||
this.data.telefonklappe
|
||||
);
|
||||
} else if (this.data.standort_telefon) {
|
||||
return (
|
||||
this.data.standort_telefon + " " + this.data.telefonklappe
|
||||
);
|
||||
} else {
|
||||
return this.data.telefonklappe
|
||||
return this.data.telefonklappe;
|
||||
}
|
||||
},
|
||||
fotoStatus() {
|
||||
return this.data?.fotoStatus ?? null;
|
||||
},
|
||||
|
||||
personEmails() {
|
||||
return this.data?.emails ? this.data.emails : [];
|
||||
},
|
||||
|
||||
profilInformation() {
|
||||
if (!this.data) {
|
||||
return {};
|
||||
@@ -151,42 +167,67 @@ export default {
|
||||
foto: this.data.foto,
|
||||
};
|
||||
},
|
||||
|
||||
roleInformation() {
|
||||
if (!this.data) {
|
||||
return {};
|
||||
}
|
||||
return {
|
||||
geburtsdatum: {
|
||||
label: `${this.$p.t('profil','Geburtsdatum')}`,
|
||||
value: this.data.gebdatum
|
||||
label: `${this.$p.t("profil", "Geburtsdatum")}`,
|
||||
value: this.data.gebdatum,
|
||||
},
|
||||
geburtsort: {
|
||||
label: `${this.$p.t('profil','Geburtsort')}`,
|
||||
value: this.data.gebort
|
||||
label: `${this.$p.t("profil", "Geburtsort")}`,
|
||||
value: this.data.gebort,
|
||||
},
|
||||
personenkennzeichen: {
|
||||
label: `${this.$p.t('profil','Kurzzeichen')}`,
|
||||
value: this.data.kurzbz
|
||||
label: `${this.$p.t("profil", "Kurzzeichen")}`,
|
||||
value: this.data.kurzbz,
|
||||
},
|
||||
telefon: {
|
||||
label: `${this.$p.t('profil','Telefon')}`,
|
||||
value: this.getTelefonValue
|
||||
label: `${this.$p.t("profil", "Telefon")}`,
|
||||
value: this.getTelefonValue,
|
||||
},
|
||||
office: {
|
||||
label: `${this.$p.t('profil','Büro')}`,
|
||||
value: this.data.ort_kurzbz
|
||||
}
|
||||
label: `${this.$p.t("profil", "Büro")}`,
|
||||
value: this.data.ort_kurzbz,
|
||||
},
|
||||
};
|
||||
},
|
||||
quickLinks() {
|
||||
let quickLinks = [];
|
||||
if (
|
||||
this.$props.permissions &&
|
||||
this.$props.permissions["basis/other_lv_plan"]
|
||||
) {
|
||||
quickLinks.push({
|
||||
icon: "fa-calendar-days",
|
||||
phrase: "lehre/stundenplan",
|
||||
action: () => {
|
||||
this.$router.push({
|
||||
name: "OtherLvPlan",
|
||||
params: { otherUid: this.$props.data.username },
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
return quickLinks;
|
||||
},
|
||||
},
|
||||
created(){
|
||||
created() {
|
||||
this.$p.loadCategory(["ui", "lehre", "global", "profil"]).then(() => {
|
||||
this.preloadedPhrasen.bezeichnungPhrase = this.$p.t('ui/bezeichnung');
|
||||
this.preloadedPhrasen.organisationseinheitPhrase = this.$p.t('lehre/organisationseinheit');
|
||||
this.preloadedPhrasen.gueltigVonPhrase = this.$p.t('global/gueltigVon');
|
||||
this.preloadedPhrasen.gueltigBisPhrase = this.$p.t('global/gueltigBis');
|
||||
this.preloadedPhrasen.wochenstundenPhrase = this.$p.t('profil/wochenstunden');
|
||||
this.preloadedPhrasen.bezeichnungPhrase =
|
||||
this.$p.t("ui/bezeichnung");
|
||||
this.preloadedPhrasen.organisationseinheitPhrase = this.$p.t(
|
||||
"lehre/organisationseinheit",
|
||||
);
|
||||
this.preloadedPhrasen.gueltigVonPhrase =
|
||||
this.$p.t("global/gueltigVon");
|
||||
this.preloadedPhrasen.gueltigBisPhrase =
|
||||
this.$p.t("global/gueltigBis");
|
||||
this.preloadedPhrasen.wochenstundenPhrase = this.$p.t(
|
||||
"profil/wochenstunden",
|
||||
);
|
||||
this.preloadedPhrasen.loaded = true;
|
||||
});
|
||||
},
|
||||
@@ -242,7 +283,7 @@ export default {
|
||||
</div>
|
||||
<!-- START OF THE SECOND PROFIL INFORMATION ROW -->
|
||||
<!-- ROW WITH PROFIL IMAGE AND INFORMATION END -->
|
||||
</div >
|
||||
</div>
|
||||
<!-- SECOND ROW UNDER THE PROFIL IMAGE AND INFORMATION WITH THE TABLES -->
|
||||
<div class="row">
|
||||
<!-- FIRST TABLE -->
|
||||
@@ -256,26 +297,22 @@ export default {
|
||||
<!-- START OF SIDE PANEL -->
|
||||
<div class="col-md-4 col-xxl-3 col-sm-12 text-break" >
|
||||
<!-- VISIBLE UNTIL VIEWPORT MD -->
|
||||
<!--TODO: uncomment when implemented
|
||||
<div class="row d-none d-md-block mb-3">
|
||||
<div class="col">
|
||||
|
||||
<quick-links :title="$p.t('profil','quickLinks')" ></quick-links>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<!-- MAILVERTEILER -->
|
||||
<mailverteiler :data="data?.mailverteiler" :title="$p.t('profil','mailverteiler')"></mailverteiler>
|
||||
</div>
|
||||
</div>
|
||||
<!-- END OF SIDE PANEL -->
|
||||
</div>
|
||||
<div v-if="quickLinks.length" class="row mb-4">
|
||||
<div class="col">
|
||||
<quick-links :title="$p.t('profil/quickLinks')" :links="quickLinks" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<!-- MAILVERTEILER -->
|
||||
<mailverteiler :data="data?.mailverteiler" :title="$p.t('profil','mailverteiler')"></mailverteiler>
|
||||
</div>
|
||||
</div>
|
||||
<!-- END OF SIDE PANEL -->
|
||||
</div>
|
||||
<!-- END OF CONTAINER ROW-->
|
||||
</div>
|
||||
<!-- END OF CONTAINER -->
|
||||
</div>
|
||||
<!-- END OF CONTAINER -->
|
||||
</div>
|
||||
`,
|
||||
};
|
||||
|
||||
@@ -4,8 +4,8 @@ import ViewStudentProfil from "./StudentViewProfil.js";
|
||||
import ViewMitarbeiterProfil from "./MitarbeiterViewProfil.js";
|
||||
import Loading from "../../Loader.js";
|
||||
|
||||
import ApiProfil from '../../../api/factory/profil.js';
|
||||
import ApiProfilUpdate from '../../../api/factory/profilUpdate.js';
|
||||
import ApiProfil from "../../../api/factory/profil.js";
|
||||
import ApiProfilUpdate from "../../../api/factory/profilUpdate.js";
|
||||
|
||||
Vue.$collapseFormatter = function (data) {
|
||||
//data - an array of objects containing the column title and value for each cell
|
||||
@@ -35,7 +35,7 @@ Vue.$collapseFormatter = function (data) {
|
||||
};
|
||||
|
||||
export const Profil = {
|
||||
name: 'Profil',
|
||||
name: "Profil",
|
||||
components: {
|
||||
StudentProfil,
|
||||
MitarbeiterProfil,
|
||||
@@ -46,11 +46,8 @@ export const Profil = {
|
||||
props: {
|
||||
uid: {
|
||||
type: String,
|
||||
required:false,
|
||||
required: false,
|
||||
},
|
||||
viewData: {
|
||||
type: Object,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -62,17 +59,19 @@ export const Profil = {
|
||||
data: null,
|
||||
// notfound is null by default, but contains an UID if no user exists with that UID
|
||||
notFoundUID: null,
|
||||
isEditable: this.viewData.editable ?? false,
|
||||
isEditable: false,
|
||||
authPermissions: null,
|
||||
calendarSyncUrls: [],
|
||||
};
|
||||
},
|
||||
provide() {
|
||||
return {
|
||||
isEditable: Vue.computed(()=>this.isEditable),
|
||||
isEditable: Vue.computed(() => this.isEditable),
|
||||
profilUpdateStates: Vue.computed(() =>
|
||||
this.profilUpdateStates ? this.profilUpdateStates : false
|
||||
this.profilUpdateStates ? this.profilUpdateStates : false,
|
||||
),
|
||||
profilUpdateTopic: Vue.computed(() =>
|
||||
this.profilUpdateTopic ? this.profilUpdateTopic : false
|
||||
this.profilUpdateTopic ? this.profilUpdateTopic : false,
|
||||
),
|
||||
setLoading: (newValue) => {
|
||||
this.loading = newValue;
|
||||
@@ -130,8 +129,12 @@ export const Profil = {
|
||||
//? if they have the same status the insert date is used for ordering
|
||||
if (ele1.status === ele2.status) {
|
||||
result =
|
||||
new Date(ele2.insertamum.split(".").reverse().join("-")) -
|
||||
new Date(ele1.insertamum.split(".").reverse().join("-"));
|
||||
new Date(
|
||||
ele2.insertamum.split(".").reverse().join("-"),
|
||||
) -
|
||||
new Date(
|
||||
ele1.insertamum.split(".").reverse().join("-"),
|
||||
);
|
||||
}
|
||||
return result;
|
||||
},
|
||||
@@ -139,6 +142,8 @@ export const Profil = {
|
||||
},
|
||||
methods: {
|
||||
async load() {
|
||||
await this.fetchViewData();
|
||||
|
||||
// fetch profilUpdateStates to provide them to children components
|
||||
await this.$api
|
||||
.call(ApiProfilUpdate.getStatus())
|
||||
@@ -157,20 +162,20 @@ export const Profil = {
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
|
||||
this.$api
|
||||
.call(ApiProfil.profilViewData(this.$route.params.uid??null))
|
||||
.then((response) => response.data).then(data=>{
|
||||
this.view = data?.profil_data.view;
|
||||
this.data = data?.profil_data.data;
|
||||
this.isEditable = data?.editable ?? false;
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
async fetchViewData() {
|
||||
let viewDataResult = await this.$api.call(
|
||||
ApiProfil.getProfilViewData(this.$route.params.uid ?? null),
|
||||
);
|
||||
|
||||
const data = viewDataResult.data;
|
||||
if (!data) return;
|
||||
|
||||
this.view = data.profil_data.view;
|
||||
this.isEditable = data.profil_data.editable;
|
||||
this.data = data.profil_data.data;
|
||||
this.calendarSyncUrls = data.calendar_sync_urls ?? [];
|
||||
this.authPermissions = data.permissions;
|
||||
},
|
||||
zustellAdressenCount() {
|
||||
if (!this.data || !this.data.adressen) {
|
||||
@@ -186,7 +191,7 @@ export const Profil = {
|
||||
})
|
||||
.map((adresse) => {
|
||||
return adresse.requested_change.adresse_id;
|
||||
})
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -197,8 +202,9 @@ export const Profil = {
|
||||
.every((adresse) =>
|
||||
this.data.profilUpdates.some(
|
||||
(update) =>
|
||||
update.requested_change.adresse_id == adresse.adresse_id
|
||||
)
|
||||
update.requested_change.adresse_id ==
|
||||
adresse.adresse_id,
|
||||
),
|
||||
)
|
||||
) {
|
||||
adressenArray = adressenArray.concat(
|
||||
@@ -208,12 +214,11 @@ export const Profil = {
|
||||
})
|
||||
.map((adr) => {
|
||||
return adr.adresse_id;
|
||||
})
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
return [...new Set(adressenArray)];
|
||||
|
||||
},
|
||||
zustellKontakteCount() {
|
||||
if (!this.data || !this.data.kontakte) {
|
||||
@@ -226,14 +231,17 @@ export const Profil = {
|
||||
kontakteArray = kontakteArray.concat(
|
||||
this.data.profilUpdates
|
||||
.filter((update) => {
|
||||
return update.status === 'Pending' && update.requested_change.zustellung;
|
||||
return (
|
||||
update.status === "Pending" &&
|
||||
update.requested_change.zustellung
|
||||
);
|
||||
})
|
||||
.map((kontant) => {
|
||||
return {
|
||||
kontakt_id: kontant.requested_change.kontakt_id,
|
||||
kontakttyp: kontant.requested_change.kontakttyp
|
||||
};
|
||||
})
|
||||
kontakt_id: kontant.requested_change.kontakt_id,
|
||||
kontakttyp: kontant.requested_change.kontakttyp,
|
||||
};
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -244,8 +252,10 @@ export const Profil = {
|
||||
.every((kontakt) =>
|
||||
this.data.profilUpdates.some(
|
||||
(update) =>
|
||||
update.status === 'Pending' && update.requested_change.kontakt_id == kontakt.kontakt_id
|
||||
)
|
||||
update.status === "Pending" &&
|
||||
update.requested_change.kontakt_id ==
|
||||
kontakt.kontakt_id,
|
||||
),
|
||||
)
|
||||
) {
|
||||
kontakteArray = kontakteArray.concat(
|
||||
@@ -255,10 +265,10 @@ export const Profil = {
|
||||
})
|
||||
.map((kon) => {
|
||||
return {
|
||||
kontakt_id: kon.kontakt_id,
|
||||
kontakttyp: kon.kontakttyp
|
||||
};
|
||||
})
|
||||
kontakt_id: kon.kontakt_id,
|
||||
kontakttyp: kon.kontakttyp,
|
||||
};
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -266,7 +276,6 @@ export const Profil = {
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
|
||||
filteredEditData() {
|
||||
if (!this.data) {
|
||||
return;
|
||||
@@ -330,8 +339,12 @@ export const Profil = {
|
||||
// excludes all contacts that are already used in pending profil update requests
|
||||
return !this.data.profilUpdates?.some(
|
||||
(update) =>
|
||||
update.status === this.profilUpdateStates["Pending"] &&
|
||||
update.requested_change?.kontakt_id === item.kontakt_id
|
||||
update.status ===
|
||||
this.profilUpdateStates[
|
||||
"Pending"
|
||||
] &&
|
||||
update.requested_change?.kontakt_id ===
|
||||
item.kontakt_id,
|
||||
);
|
||||
})
|
||||
.map((kontakt) => {
|
||||
@@ -347,12 +360,18 @@ export const Profil = {
|
||||
topic: this.profilUpdateTopic?.["Private Adressen"],
|
||||
data: this.data.adressen
|
||||
?.filter((item) => {
|
||||
return !this.data.profilUpdates?.some((update) => {
|
||||
return (
|
||||
update.status === this.profilUpdateStates["Pending"] &&
|
||||
update.requested_change?.adresse_id == item.adresse_id
|
||||
);
|
||||
});
|
||||
return !this.data.profilUpdates?.some(
|
||||
(update) => {
|
||||
return (
|
||||
update.status ===
|
||||
this.profilUpdateStates[
|
||||
"Pending"
|
||||
] &&
|
||||
update.requested_change
|
||||
?.adresse_id == item.adresse_id
|
||||
);
|
||||
},
|
||||
);
|
||||
})
|
||||
.map((adresse) => {
|
||||
return {
|
||||
@@ -374,12 +393,12 @@ export const Profil = {
|
||||
this.$refs.loadingModalRef.hide();
|
||||
}
|
||||
},
|
||||
uid (newVal, oldVal) {
|
||||
this.load()
|
||||
}
|
||||
uid(newVal, oldVal) {
|
||||
this.load();
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.load()
|
||||
this.load();
|
||||
},
|
||||
template: `
|
||||
<div>
|
||||
@@ -388,9 +407,14 @@ export const Profil = {
|
||||
</div>
|
||||
<div v-else>
|
||||
<loading ref="loadingModalRef" :timeout="0"></loading>
|
||||
<component :is="view" :data="data" :editData="filteredEditData" ></component>
|
||||
<component
|
||||
:is="view"
|
||||
:data="data"
|
||||
:editData="filteredEditData"
|
||||
:permissions="authPermissions"
|
||||
:calendarSyncUrls="calendarSyncUrls"></component>
|
||||
</div>
|
||||
</div>`,
|
||||
}
|
||||
};
|
||||
|
||||
export default Profil
|
||||
export default Profil;
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
export default {
|
||||
name: "CalendarSync",
|
||||
props: { uid: String, calendarSyncUrls: Array },
|
||||
data() {
|
||||
return {
|
||||
syncInstructionsUrlWithoutParam:
|
||||
FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
"cms/content.php?content_id=",
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
copyUrlToClipboard(url) {
|
||||
navigator.clipboard.writeText(url);
|
||||
this.$fhcAlert.alertSuccess(
|
||||
this.$p.t("profil/calendar_sync_clipboard_copy_confirmation"),
|
||||
);
|
||||
},
|
||||
},
|
||||
template: `
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
{{ $p.t("profil/calendar_sync") }}
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="d-flex flex-column gap-3">
|
||||
<a
|
||||
target="_blank"
|
||||
:href="syncInstructionsUrlWithoutParam + $p.t('DMS-Link/lvplanSyncFAQ')"
|
||||
class="fhc-link-color d-flex flex-row gap-2 align-items-center"
|
||||
>
|
||||
<span>
|
||||
<i class="fa-solid fa-up-right-from-square ms-2"></i>
|
||||
</span>
|
||||
<span>
|
||||
{{ $p.t("profil/calendar_sync_instructions") }}
|
||||
</span>
|
||||
</a>
|
||||
<a
|
||||
v-for="syncUrl in $props.calendarSyncUrls"
|
||||
:key="syncUrl.identifier"
|
||||
@click.prevent="copyUrlToClipboard(syncUrl.url)"
|
||||
@contextmenu.prevent="copyUrlToClipboard(syncUrl.url)"
|
||||
href="#"
|
||||
class="fhc-link-color d-flex flex-row gap-2 align-items-center"
|
||||
>
|
||||
<span>
|
||||
<i class="fa-regular fa-copy ms-2 text-decoration-none"></i>
|
||||
</span>
|
||||
{{ $p.t(syncUrl.labelPhrase) }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>`,
|
||||
};
|
||||
@@ -1,53 +1,31 @@
|
||||
export default {
|
||||
//TODO: To be implemented
|
||||
props: {
|
||||
data: {
|
||||
type: String,
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
mobile: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
hideCollapse: function () {
|
||||
this.collapseOpen = false;
|
||||
},
|
||||
showCollapse: function () {
|
||||
this.collapseOpen = true;
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
collapseOpen: false,
|
||||
};
|
||||
},
|
||||
template: /*html*/ `
|
||||
name: "QuickLinks",
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
links: {
|
||||
type: Array,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
template: `
|
||||
<div class="card">
|
||||
<template v-if="mobile">
|
||||
<button class="btn btn-outline-primary" data-bs-toggle="collapse" data-bs-target="#quickLinks" :aria-expanded="collapseOpen" aria-controls="quickLinks" >
|
||||
{{title}}
|
||||
<i class="fa " :class="collapseOpen?'fa-chevron-up':'fa-chevron-down'"></i>
|
||||
</button>
|
||||
<div @[\`show.bs.collapse\`]="collapseOpen=true;" @[\`hide.bs.collapse\`]="collapseOpen=false;" class="mt-1 collapse" id="quickLinks">
|
||||
<div class="list-group">
|
||||
<a href="#" class="list-group-item list-group-item-action">{{$p.t('profil','zeitwuensche')}}</a>
|
||||
<a href="#" class="list-group-item list-group-item-action">{{$p.t('profil','lehrveranstaltungen')}}</a>
|
||||
<a href="#" class="list-group-item list-group-item-action ">{{$p.t('profil','zeitsperren')}}</a>
|
||||
<div class="card-header">
|
||||
{{title}}
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="d-flex flex-row align-items-center gap-3 flex-wrap">
|
||||
<div v-for="link in links" @click="link.action()" type="button" class="d-flex flex-row gap-2 px-3 py-2 border fhc-primary">
|
||||
<div><i class="fa" :class="link.icon"></i></div>
|
||||
{{ $p.t(link.phrase) }}
|
||||
<div><i class="fa fa-arrow-up-right-from-square" style="color:var(--fhc-light) !important"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="card-header">{{title}}</div>
|
||||
<div class="card-body">
|
||||
<a style="text-decoration:none" class="my-1 d-block" href="#">{{$p.t('profil','zeitwuensche')}}</a>
|
||||
<a style="text-decoration:none" class="my-1 d-block" href="#">{{$p.t('profil','lehrveranstaltungen')}}</a>
|
||||
<a style="text-decoration:none" class="my-1 d-block" href="#">{{$p.t('profil','zeitsperren')}}</a>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>`,
|
||||
};
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user