diff --git a/application/config/routes.php b/application/config/routes.php
index aa4ba9db8..8024f449a 100644
--- a/application/config/routes.php
+++ b/application/config/routes.php
@@ -64,6 +64,9 @@ $route['api/v1/system/[S|s]prache/(:any)'] = 'api/v1/system/sprache2/$1';
$route['Cis/LvPlan/.*'] = 'Cis/LvPlan/index/$1';
$route['Cis/MyLvPlan/.*'] = 'Cis/MyLvPlan/index/$1';
$route['Cis/MyLv/.*'] = 'Cis/MyLv/index/$1';
+$route['Cis/OtherLvPlan/.*'] = 'Cis/OtherLvPlan/index/$1';
+//Route for LV Plan Stg/Semester/Verband/Gruppe
+$route['Cis/StgOrgLvPlan/.*'] = 'Cis/StgOrgLvPlan/index/$1';
$route['Abgabetool/Assistenz'] = 'Cis/Abgabetool/Assistenz';
$route['Abgabetool/Assistenz/(:any)'] = 'Cis/Abgabetool/Assistenz/$1';
diff --git a/application/controllers/Cis/Abgabetool.php b/application/controllers/Cis/Abgabetool.php
index 04338b1a9..28414dafa 100644
--- a/application/controllers/Cis/Abgabetool.php
+++ b/application/controllers/Cis/Abgabetool.php
@@ -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']);
}
diff --git a/application/controllers/Cis/Auth.php b/application/controllers/Cis/Auth.php
index 67267ebf6..87ef5d3da 100644
--- a/application/controllers/Cis/Auth.php
+++ b/application/controllers/Cis/Auth.php
@@ -40,7 +40,7 @@ class Auth extends FHC_Controller
if ($this->form_validation->run())
{
- redirect($this->authlib->getLandingPage('/CisVue/Dashboard'));
+ redirect($this->authlib->getLandingPage('/Cis4'));
}
else
{
diff --git a/application/controllers/Cis/LvPlan.php b/application/controllers/Cis/LvPlan.php
index 884c8a9a0..32e622f5a 100644
--- a/application/controllers/Cis/LvPlan.php
+++ b/application/controllers/Cis/LvPlan.php
@@ -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']);
}
}
diff --git a/application/controllers/Cis/MyLv.php b/application/controllers/Cis/MyLv.php
index 819d56b05..0f24d3a80 100644
--- a/application/controllers/Cis/MyLv.php
+++ b/application/controllers/Cis/MyLv.php
@@ -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']);
}
}
diff --git a/application/controllers/Cis/MyLvPlan.php b/application/controllers/Cis/MyLvPlan.php
index 366ce8e65..a7f21aa20 100644
--- a/application/controllers/Cis/MyLvPlan.php
+++ b/application/controllers/Cis/MyLvPlan.php
@@ -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']);
}
}
diff --git a/application/controllers/Cis/OtherLvPlan.php b/application/controllers/Cis/OtherLvPlan.php
new file mode 100644
index 000000000..e62644dd1
--- /dev/null
+++ b/application/controllers/Cis/OtherLvPlan.php
@@ -0,0 +1,34 @@
+ ['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']);
+ }
+}
diff --git a/application/controllers/Cis/Profil.php b/application/controllers/Cis/Profil.php
index c287d87d0..dd7963228 100644
--- a/application/controllers/Cis/Profil.php
+++ b/application/controllers/Cis/Profil.php
@@ -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;
}
-
-
}
diff --git a/application/controllers/Cis/Raumsuche.php b/application/controllers/Cis/Raumsuche.php
index 055038275..f48beb0f3 100644
--- a/application/controllers/Cis/Raumsuche.php
+++ b/application/controllers/Cis/Raumsuche.php
@@ -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']);
}
}
diff --git a/application/controllers/Cis/StgOrgLvPlan.php b/application/controllers/Cis/StgOrgLvPlan.php
new file mode 100644
index 000000000..bf329fcb8
--- /dev/null
+++ b/application/controllers/Cis/StgOrgLvPlan.php
@@ -0,0 +1,33 @@
+ ['basis/cis:r']
+ ]);
+
+ // Load Config
+ $this->load->config('calendar');
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ // Public methods
+
+ /**
+ * @return void
+ */
+ public function index()
+ {
+ $this->load->view('CisRouterView/CisRouterView.php', ['route' => 'StgOrgLvPlan']);
+ }
+}
diff --git a/application/controllers/Cis/Studium.php b/application/controllers/Cis/Studium.php
index a298de648..20f323dff 100644
--- a/application/controllers/Cis/Studium.php
+++ b/application/controllers/Cis/Studium.php
@@ -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']);
}
diff --git a/application/controllers/Cis4.php b/application/controllers/Cis4.php
index b7ba2029d..48fd6c240 100644
--- a/application/controllers/Cis4.php
+++ b/application/controllers/Cis4.php
@@ -1,6 +1,7 @@
'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']);
}
}
diff --git a/application/controllers/CisVue/Dashboard.php b/application/controllers/CisVue/Dashboard.php
deleted file mode 100644
index ee830cb8b..000000000
--- a/application/controllers/CisVue/Dashboard.php
+++ /dev/null
@@ -1,43 +0,0 @@
- 'dashboard/benutzer:r'
- )
- );
- }
-
- // -----------------------------------------------------------------------------------------------------------------
- // Public methods
-
- /**
- * @return void
- */
- public function index()
- {
-
- $this->load->model('person/Person_model','PersonModel');
- $personData = getData($this->PersonModel->getByUid(getAuthUID()))[0];
-
- $viewData = array(
- 'uid' => getAuthUID(),
- 'name' => $personData->vorname,
- 'person_id' => $personData->person_id
- );
-
- $this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData]);
-
- }
-}
\ No newline at end of file
diff --git a/application/controllers/api/frontend/v1/Bookmark.php b/application/controllers/api/frontend/v1/Bookmark.php
index 3e646bb51..aa45709d4 100644
--- a/application/controllers/api/frontend/v1/Bookmark.php
+++ b/application/controllers/api/frontend/v1/Bookmark.php
@@ -18,6 +18,8 @@
if (! defined('BASEPATH')) exit('No direct script access allowed');
+use \DateTime as DateTime;
+
class Bookmark extends FHCAPI_Controller
{
@@ -28,111 +30,162 @@ class Bookmark extends FHCAPI_Controller
{
parent::__construct([
'getBookmarks' => self::PERM_LOGGED,
- 'delete' => self::PERM_LOGGED,
- 'insert' => self::PERM_LOGGED,
+ 'delete' => self::PERM_LOGGED,
+ 'insert' => self::PERM_LOGGED,
'update' => self::PERM_LOGGED,
- ]);
+ 'changeOrder' => self::PERM_LOGGED
+ ]);
$this->load->model('dashboard/Bookmark_model', 'BookmarkModel');
$this->uid = getAuthUID();
$this->pid = getAuthPersonID();
-
}
//------------------------------------------------------------------------------------------------------------------
// Public methods
- /**
- * gets the bookmarks associated to a user
+ /**
+ * gets the bookmarks associated to a user
* @access public
* @return void
*/
public function getBookmarks()
{
- $this->BookmarkModel->addOrder("bookmark_id");
+ $this->BookmarkModel->addOrder("sort");
$bookmarks = $this->BookmarkModel->loadWhere(["uid"=>$this->uid]);
- $bookmarks = $this->getDataOrTerminateWithError($bookmarks);
+ $bookmarks = $this->getDataOrTerminateWithError($bookmarks);
- $this->terminateWithSuccess($bookmarks);
- }
-
- /**
- * deletes bookmark from associated user
- * @access public
- * @return void
- */
- public function delete($bookmark_id)
- {
- $bookmark = $this->BookmarkModel->load($bookmark_id);
-
- $bookmark = current($this->getDataOrTerminateWithError($bookmark));
-
- // only delete bookmark if the user is the owner of the bookmark
- if($bookmark->uid == $this->uid || $this->permissionlib->isBerechtigt('admin')){
-
- $delete_result = $this->BookmarkModel->delete($bookmark_id);
-
- $delete_result = $this->getDataOrTerminateWithError($delete_result);
-
- $this->terminateWithSuccess($delete_result);
- }else{
- $this->_outputAuthError(['delete' => ['admin:rw']]);
- }
- }
-
- /**
- * inserts new bookmark into the bookmark table
- * @access public
- * @return void
- */
- public function insert()
- {
- // form validation
- $this->load->library('form_validation');
- $this->form_validation->set_rules('url', 'URL', 'required|valid_url|max_length[511]');
- $this->form_validation->set_rules('title', 'Title', 'required|max_length[255]');
- if($this->form_validation->run() == FALSE) $this->terminateWithValidationErrors($this->form_validation->error_array());
-
- $url = $this->input->post('url',true);
- $title = $this->input->post('title',true);
- $tag = $this->input->post('tag', true);
-
- $insert_into_result = $this->BookmarkModel->insert(['uid'=>$this->uid, 'url'=>$url, 'title'=>$title,'tag'=>$tag, 'insertvon'=>$this->uid, 'updateamum'=>NULL, 'updatevon'=>NULL]);
-
- $insert_into_result = $this->getDataOrTerminateWithError($insert_into_result);
-
- $this->terminateWithSuccess($insert_into_result);
-
- }
+ $this->terminateWithSuccess($bookmarks);
+ }
/**
- * updates bookmark in the bookmark table
+ * deletes bookmark from associated user
* @access public
* @return void
*/
- public function update($bookmark_id)
+ public function delete($bookmark_id)
{
- // form validation
- $this->load->library('form_validation');
- $this->form_validation->set_rules('url', 'URL', 'required|valid_url|max_length[511]');
- $this->form_validation->set_rules('title', 'Title', 'required|max_length[255]');
- if($this->form_validation->run() == FALSE) $this->terminateWithValidationErrors($this->form_validation->error_array());
+ $bookmark = $this->BookmarkModel->load($bookmark_id);
- $url = $this->input->post('url',true);
- $title = $this->input->post('title',true);
+ $bookmark = current($this->getDataOrTerminateWithError($bookmark));
+
+ // only delete bookmark if the user is the owner of the bookmark
+ if ($bookmark->uid == $this->uid || $this->permissionlib->isBerechtigt('admin')) {
+ $delete_result = $this->BookmarkModel->delete($bookmark_id);
+
+ $delete_result = $this->getDataOrTerminateWithError($delete_result);
+
+ $this->terminateWithSuccess($delete_result);
+ } else {
+ $this->_outputAuthError(['delete' => ['admin:rw']]);
+ }
+ }
+
+ /**
+ * inserts new bookmark into the bookmark table
+ * @access public
+ * @return void
+ */
+ public function insert()
+ {
+ // form validation
+ $this->load->library('form_validation');
+ $this->form_validation->set_rules('url', 'URL', 'required|valid_url|max_length[511]');
+ $this->form_validation->set_rules('title', 'Title', 'required|max_length[255]');
+ if (!$this->form_validation->run())
+ $this->terminateWithValidationErrors($this->form_validation->error_array());
+
+ $url = $this->input->post('url', true);
+ $title = $this->input->post('title', true);
+ $tag = $this->input->post('tag', true);
+ if (is_array($tag)) {
+ $tag = json_encode($tag); // convert PHP array to JSON string
+ }
+ $sort = $this->input->post('sort', true);
+
+ $insert_into_result = $this->BookmarkModel->insert([
+ 'uid' => $this->uid,
+ 'url' => $url,
+ 'title' => $title,
+ 'tag' => $tag,
+ 'insertvon' => $this->uid,
+ 'updateamum' => null,
+ 'updatevon' => null,
+ 'sort' => $sort
+ ]);
+
+ $insert_into_result = $this->getDataOrTerminateWithError($insert_into_result);
+
+ $this->terminateWithSuccess($insert_into_result);
+ }
+
+ /**
+ * updates bookmark in the bookmark table
+ * @access public
+ * @return void
+ */
+ public function update($bookmark_id)
+ {
+ // form validation
+ $this->load->library('form_validation');
+ $this->form_validation->set_rules('url', 'URL', 'required|valid_url|max_length[511]');
+ $this->form_validation->set_rules('title', 'Title', 'required|max_length[255]');
+ if (!$this->form_validation->run())
+ $this->terminateWithValidationErrors($this->form_validation->error_array());
+
+ $url = $this->input->post('url', true);
+ $title = $this->input->post('title', true);
+ $tag = $this->input->post('tag', true);
+ if (is_array($tag)) {
+ $tag = json_encode($tag);
+ }
$now = new DateTime();
$now = $now->format('Y-m-d H:i:s');
- $update_result = $this->BookmarkModel->update($bookmark_id,['url'=>$url, 'title'=>$title,'updateamum'=>$now]);
+ $update_result = $this->BookmarkModel->update($bookmark_id, [
+ 'url' => $url,
+ 'title' => $title,
+ 'tag' => $tag,
+ 'updateamum' => $now
+ ]);
- $update_result = $this->getDataOrTerminateWithError($update_result);
+ $update_result = $this->getDataOrTerminateWithError($update_result);
- $this->terminateWithSuccess($update_result);
+ $this->terminateWithSuccess($update_result);
+ }
- }
+ /**
+ * changes sort of two bookmarks in the bookmark table
+ * @access public
+ * @return void
+ */
+ public function changeOrder($bookmark_id1, $bookmark_id2)
+ {
+ $update_result = [];
+
+ $result1 = $this->BookmarkModel->load($bookmark_id1);
+ $data1 = $this->getDataOrTerminateWithError($result1);
+ $sort1 = current($data1)->sort;
+
+ $result2 = $this->BookmarkModel->load(["bookmark_id"=>$bookmark_id2]);
+ $data2 = $this->getDataOrTerminateWithError($result2);
+ $sort2 = current($data2)->sort;
+
+ $update_result1 = $this->BookmarkModel->update($bookmark_id1, [
+ 'sort' => $sort2
+ ]);
+ $update_result[] = $this->getDataOrTerminateWithError($update_result1);
+
+ $update_result2 = $this->BookmarkModel->update($bookmark_id2, [
+ 'sort' => $sort1
+ ]);
+ $update_result[] = $this->getDataOrTerminateWithError($update_result2);
+
+ $this->terminateWithSuccess($update_result);
+ }
}
diff --git a/application/controllers/api/frontend/v1/Cis4FhcApi.php b/application/controllers/api/frontend/v1/Cis4FhcApi.php
index 372e4bfaa..4d0f906f0 100644
--- a/application/controllers/api/frontend/v1/Cis4FhcApi.php
+++ b/application/controllers/api/frontend/v1/Cis4FhcApi.php
@@ -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);
diff --git a/application/controllers/api/frontend/v1/LvPlan.php b/application/controllers/api/frontend/v1/LvPlan.php
index 28b48e3f1..dc87732b9 100644
--- a/application/controllers/api/frontend/v1/LvPlan.php
+++ b/application/controllers/api/frontend/v1/LvPlan.php
@@ -16,7 +16,8 @@
* along with this program. If not, see
{{currentStgBezeichnung}} + Semester: {{propsViewData.sem}} + Verband: {{propsViewData.verband}} + Gruppe: {{propsViewData.gruppe}} + +
+{{ $p.t('LvPlan/noStgProvided') }}
+ +| + {{$p.t('lehre/headerAverage')}} + | ++ {{ gradeAverage }} + | +
| + {{$p.t('lehre/headerWeightedAverage')}} + | ++ {{ gradeWeightedAverage }} + | +
{{$p.t('lehre/info_noGradesYet')}}
+