mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-21 08:52:21 +00:00
add semester filter for tags
- in detailheader: use currentSem for manual triggering and refactor formatter - in list: preload list of ids with start and end for tabulator formatter to enable filtering
This commit is contained in:
@@ -15,11 +15,12 @@ class Tag_Controller extends FHCAPI_Controller
|
||||
'getTag' => self::BERECHTIGUNG_KURZBZ,
|
||||
'getTags' => self::BERECHTIGUNG_KURZBZ,
|
||||
'addTag' => self::BERECHTIGUNG_KURZBZ,
|
||||
|
||||
'updateTag' => self::BERECHTIGUNG_KURZBZ,
|
||||
'doneTag' => self::BERECHTIGUNG_KURZBZ,
|
||||
'deleteTag' => self::BERECHTIGUNG_KURZBZ,
|
||||
'getAllTags' => self::BERECHTIGUNG_KURZBZ,
|
||||
'getSemDates' => self::BERECHTIGUNG_KURZBZ,
|
||||
'getAllStartAndEndAutomatedTags' => self::BERECHTIGUNG_KURZBZ,
|
||||
'rebuildTagsForTypeId' => self::BERECHTIGUNG_KURZBZ,
|
||||
];
|
||||
|
||||
@@ -341,16 +342,46 @@ class Tag_Controller extends FHCAPI_Controller
|
||||
{
|
||||
$id = $this->input->post('id');
|
||||
$typeId = $this->input->post('typeId');
|
||||
$semester = $this->input->post('sem');
|
||||
|
||||
$result = $this->taglib->rebuildTagsForTypeId($typeId, $id, $semester);
|
||||
|
||||
$result = $this->taglib->rebuildTagsForTypeId($typeId, $id);
|
||||
//TODO (refactor; um semester, studiengang_kz)
|
||||
//$result = $this->taglib->rebuildTagsForTypeId($params);
|
||||
if (isError($result))
|
||||
return error ('Error occurred during updateAutomatedTags');
|
||||
|
||||
$this->terminateWithSuccess($result);
|
||||
}
|
||||
|
||||
public function getSemDates()
|
||||
{
|
||||
$studiensemester_kurzbz = $this->input->get('semester');
|
||||
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
|
||||
$result = $this->StudiensemesterModel->loadWhere(array('studiensemester_kurzbz' => $studiensemester_kurzbz));
|
||||
if (isError($result))
|
||||
return error('Error occurred during retrieving studiensemester');
|
||||
$data = getData($result);
|
||||
$this->terminateWithSuccess(current($data));
|
||||
|
||||
}
|
||||
|
||||
public function getAllStartAndEndAutomatedTags()
|
||||
{
|
||||
$this->NotizModel->addSelect('notiz_id as id');
|
||||
$this->NotizModel->addSelect('start');
|
||||
$this->NotizModel->addSelect('ende');
|
||||
$this->NotizModel->addSelect('typ');
|
||||
|
||||
$result = $this->NotizModel->loadWhere(array(
|
||||
'titel' => 'TAG',
|
||||
'verfasser_uid' => 'sftest'
|
||||
));
|
||||
|
||||
if (isError($result))
|
||||
return error('Error occurred during retrieving intervalls automated tags');
|
||||
$data = getData($result);
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
private function _setAuthUID()
|
||||
{
|
||||
$this->_uid = getAuthUID();
|
||||
|
||||
Reference in New Issue
Block a user