diff --git a/.gitignore b/.gitignore index de95987a8..8ebe61e25 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,8 @@ documents/ .project .buildpath application/config/development/ +application/config/testing/ +application/config/production application/extensions/ application/controllers/extensions/ application/config/extensions/ @@ -30,3 +32,4 @@ tests/codeception/tests/acceptance.suite.yml tests/codeception/tests/unit.suite.yml /sparks/* /webdav/google.php +system/sql/ diff --git a/application/config/roles.php b/application/config/roles.php index a95a94215..75a928db0 100644 --- a/application/config/roles.php +++ b/application/config/roles.php @@ -56,7 +56,7 @@ $config['roles'] = array 'basis/adresse','basis/akte','basis/kontakt','basis/log','basis/nation','basis/notiz','basis/notizzuordnung', 'basis/person','basis/prestudent','basis/prestudentstatus','basis/status','basis/zgv','basis/zgvmaster', 'lehre/studienplan','system/filters','fs/dms','basis/message','basis/benutzerrolle', 'basis/sprache', - 'system/personlock','basis/benutzerfunktion','system/vorlagestudiengang' + 'system/personlock','basis/benutzerfunktion','system/vorlagestudiengang', 'basis/bewerbungstermine' ) ) ); diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index 835cac464..d5ef7854d 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -229,9 +229,10 @@ class InfoCenter extends VileSci_Controller $studienordnung = $this->PrestudentstatusModel->getStudienordnungWithZgvText($prestudent_id); $prestudentdata = $this->_getPersonAndStudiengangFromPrestudent($prestudent_id); + $studiengangkurzbz = $prestudentdata['studiengang_kurzbz']; $studiengangbezeichnung = $prestudentdata['studiengang_bezeichnung']; - $data = array('studiengang_bezeichnung' => $studiengangbezeichnung, 'data' => null); + $data = array('studiengang_bezeichnung' => $studiengangbezeichnung, 'studiengang_kurzbz' => $studiengangkurzbz, 'data' => null); if (hasData($studienordnung)) { diff --git a/application/core/FHC_Controller.php b/application/core/FHC_Controller.php index f6f138441..815c03da2 100644 --- a/application/core/FHC_Controller.php +++ b/application/core/FHC_Controller.php @@ -4,6 +4,10 @@ if (! defined('BASEPATH')) exit('No direct script access allowed'); class FHC_Controller extends CI_Controller { + const FHC_CONTROLLER_ID = 'fhc_controller_id'; // name of the parameter used to identify uniquely a call to a controller + + private $_controllerId; // contains the unique identifier of a call to a controller + /** * Standard construct for all the controllers, loads the authentication system */ @@ -11,6 +15,8 @@ class FHC_Controller extends CI_Controller { parent::__construct(); + $this->_controllerId = null; // set _controllerId as null by default + $this->load->helper('fhcauth'); } @@ -23,4 +29,34 @@ class FHC_Controller extends CI_Controller { $this->load->library('PhrasesLib', array($categories, $language), 'p'); } + + /** + * Sets the unique id for the called controller + * NOTE: it is only working with HTTP GET request, not neeaded with POST + * because the first call to the controller is via HTTP GET, + * therefore a fhc_controller_id is already generated + */ + protected function setControllerId() + { + if ($_SERVER['REQUEST_METHOD'] === 'GET') + { + $this->_controllerId = $this->input->get(self::FHC_CONTROLLER_ID); + + if (!isset($this->_controllerId) || empty($this->_controllerId)) + { + $this->_controllerId = uniqid(); // generate a unique id + // Redirect to the same URL, but giving FHC_CONTROLLER_ID as HTTP GET parameter + header(sprintf('Location: %s?%s=%s', $_SERVER['REQUEST_URI'], self::FHC_CONTROLLER_ID, $this->_controllerId)); + exit; // terminate immediately the execution of this controller + } + } + } + + /** + * Return the value of the property _controllerId + */ + protected function getControllerId() + { + return $this->_controllerId; + } } diff --git a/application/libraries/DocumentLib.php b/application/libraries/DocumentLib.php index 204b1d30f..ed87a9f38 100644 --- a/application/libraries/DocumentLib.php +++ b/application/libraries/DocumentLib.php @@ -57,8 +57,19 @@ class DocumentLib case 'application/vnd.ms-word': case 'application/vnd.oasis.opendocument.text': case 'text/plain': - $this->convert($filename, $outFile, 'pdf'); - return success($outFile); + // Unoconv Version 0.6 seems to fail on converting TXT Files + if ($this->unoconv_version == '0.6') + return error(); + + $ret = $this->convert($filename, $outFile, 'pdf'); + if(isSuccess($ret)) + { + return success($outFile); + } + else + { + return error($ret->retval); + } case 'application/pdf': return success($filename); default: diff --git a/application/models/organisation/Geschaeftsjahr_model.php b/application/models/organisation/Geschaeftsjahr_model.php index e806058ae..9c856f40e 100644 --- a/application/models/organisation/Geschaeftsjahr_model.php +++ b/application/models/organisation/Geschaeftsjahr_model.php @@ -21,7 +21,9 @@ class Geschaeftsjahr_model extends DB_Model $query = 'SELECT * FROM public.tbl_geschaeftsjahr WHERE start <= now() - AND ende >= now()'; + AND ende >= now() + ORDER BY start DESC + LIMIT 1'; return $this->execQuery($query); } diff --git a/application/views/system/infocenter/infocenterData.php b/application/views/system/infocenter/infocenterData.php index 6dd10b4ef..e880068b2 100755 --- a/application/views/system/infocenter/infocenterData.php +++ b/application/views/system/infocenter/infocenterData.php @@ -14,7 +14,7 @@ SELECT zeitpunkt FROM system.tbl_log WHERE taetigkeit_kurzbz IN(\'bewerbung\',\'kommunikation\') - AND logdata->>\'name\' NOT IN (\'Login with code\', \'New application\') + AND logdata->>\'name\' NOT IN (\'Login with code\', \'New application\', \'Interessent rejected\') AND person_id = p.person_id ORDER BY zeitpunkt DESC LIMIT 1 @@ -23,7 +23,7 @@ SELECT insertvon FROM system.tbl_log WHERE taetigkeit_kurzbz IN(\'bewerbung\',\'kommunikation\') - AND logdata->>\'name\' NOT IN (\'Login with code\', \'New application\') + AND logdata->>\'name\' NOT IN (\'Login with code\', \'New application\', \'Interessent rejected\') AND person_id = p.person_id ORDER BY zeitpunkt DESC LIMIT 1 diff --git a/application/views/system/infocenter/notizen.php b/application/views/system/infocenter/notizen.php index f0d155f82..d0c13e5ee 100644 --- a/application/views/system/infocenter/notizen.php +++ b/application/views/system/infocenter/notizen.php @@ -9,9 +9,9 @@ + title="text) ? strip_tags($notiz->text) : '' ?>" style="cursor: pointer"> insertamum), 'd.m.Y H:i:s') ?> - titel) ?> + titel) ?> verfasser_uid ?> notiz_id ?> diff --git a/application/views/system/infocenter/studiengangZgvInfo.php b/application/views/system/infocenter/studiengangZgvInfo.php index 92f9d08e1..6242d0db6 100644 --- a/application/views/system/infocenter/studiengangZgvInfo.php +++ b/application/views/system/infocenter/studiengangZgvInfo.php @@ -17,7 +17,7 @@ $this->load->view(
- +
diff --git a/application/views/system/infocenter/zgvpruefungen.php b/application/views/system/infocenter/zgvpruefungen.php index 08624e62c..383dd5a62 100644 --- a/application/views/system/infocenter/zgvpruefungen.php +++ b/application/views/system/infocenter/zgvpruefungen.php @@ -2,14 +2,20 @@ infoonly; - //set bootstrap columns + //set bootstrap columns for zgv form $columns = array(4, 3, 2, 3); + $headercolumns = array(7, 5); + if (!$infoonly && isset($zgvpruefung->prestudentstatus->bewerbungsnachfrist) && isset($zgvpruefung->prestudentstatus->bewerbungstermin)) + { + $headercolumns[0] = 5; + $headercolumns[1] = 7; + } ?>
-
+

studiengang.' - '.$zgvpruefung->studiengangbezeichnung.' | '.(isset($zgvpruefung->prestudentstatus->status_kurzbz) ? $zgvpruefung->prestudentstatus->status_kurzbz : ''); @@ -19,13 +25,13 @@ prestudentstatus->status_kurzbz) && $zgvpruefung->prestudentstatus->status_kurzbz === 'Interessent'/* && !$infoonly*/): ?> prestudentstatus->bestaetigtam)): ?> -
+
p->t('global', 'anStudiengangFreigegeben') ?>
-
+
p->t('infocenter','bewerbung')) . ' ' . $this->p->t('global','abgeschickt') . ': '.(isset($zgvpruefung->prestudentstatus->bewerbung_abgeschicktamum) ? '' : ''); ?> prestudentstatus->bewerbungsnachfrist) ? ' | ' . $this->p->t('infocenter', 'nachfrist') . ': ' . date_format(date_create($zgvpruefung->prestudentstatus->bewerbungsnachfrist), 'd.m.Y') : ''); ?> prestudentstatus->bewerbungstermin) ? ' | ' . $this->p->t('infocenter', 'bewerbungsfrist') . ': ' . date_format(date_create($zgvpruefung->prestudentstatus->bewerbungstermin), 'd.m.Y') : ''); ?> diff --git a/application/views/templates/FHC-Header.php b/application/views/templates/FHC-Header.php index 52ed50dbd..853eb8de7 100755 --- a/application/views/templates/FHC-Header.php +++ b/application/views/templates/FHC-Header.php @@ -2,7 +2,7 @@ if (! defined('BASEPATH')) exit('No direct script access allowed'); -// Retrives the URL path of the called controller + controller method +// Retrives the URL path of the called controller + called controller method // NOTE: placed here because it doesn't work inside functions $calledPath = $this->router->directory.$this->router->class; $calledMethod = $this->router->method; @@ -15,6 +15,7 @@ $customJSs = isset($customJSs) ? $customJSs : null; // By default set the parameters to false $jquery = isset($jquery) ? $jquery : false; $jqueryui = isset($jqueryui) ? $jqueryui : false; +$ajaxlib = isset($ajaxlib) ? $ajaxlib : false; $bootstrap = isset($bootstrap) ? $bootstrap : false; $fontawesome = isset($fontawesome) ? $fontawesome : false; $tablesorter = isset($tablesorter) ? $tablesorter : false; @@ -141,12 +142,15 @@ function _generateAddonsJSsInclude($calledFrom) // jQuery UI CSS if ($jqueryui === true) _generateCSSsInclude('vendor/components/jqueryui/themes/base/jquery-ui.min.css'); - // bootstrap CSS + // Bootstrap CSS if ($bootstrap === true) _generateCSSsInclude('vendor/twbs/bootstrap/dist/css/bootstrap.min.css'); - // font awesome CSS + // Font Awesome CSS if ($fontawesome === true) _generateCSSsInclude('vendor/components/font-awesome/css/font-awesome.min.css'); + // AjaxLib CSS + if ($ajaxlib === true) _generateCSSsInclude('public/css/AjaxLib.css'); + // Table sorter CSS if ($tablesorter === true) { @@ -154,7 +158,7 @@ function _generateAddonsJSsInclude($calledFrom) _generateCSSsInclude('vendor/mottie/tablesorter/dist/css/jquery.tablesorter.pager.min.css'); } - // sb admin template CSS + // SB Admin 2 template CSS if ($sbadmintemplate === true) { _generateCSSsInclude('vendor/BlackrockDigital/startbootstrap-sb-admin-2/vendor/metisMenu/metisMenu.min.css'); @@ -164,10 +168,11 @@ function _generateAddonsJSsInclude($calledFrom) // Eventually required CSS _generateCSSsInclude($customCSSs); // Eventually required CSS + // -------------------------------------------------------------------------------------------------------- // Javascripts - // Generates the global object to pass useful parms to the other javascripts + // Generates the global object to pass useful parameters to other javascripts // NOTE: must be called before any other JS include _generateJSDataStorageObject($calledPath, $calledMethod); @@ -178,11 +183,13 @@ function _generateAddonsJSsInclude($calledFrom) if ($jqueryui === true) { _generateJSsInclude('vendor/components/jqueryui/jquery-ui.min.js'); - //datepicker german language file - _generateJSsInclude('vendor/components/jqueryui/ui/i18n/datepicker-de.js'); + _generateJSsInclude('vendor/components/jqueryui/ui/i18n/datepicker-de.js'); // datepicker german language file } - // bootstrap JS + // AjaxLib JS + if ($ajaxlib === true) _generateJSsInclude('public/js/AjaxLib.js'); + + // Bootstrap JS if ($bootstrap === true) _generateJSsInclude('vendor/twbs/bootstrap/dist/js/bootstrap.min.js'); // Table sorter JS @@ -193,10 +200,10 @@ function _generateAddonsJSsInclude($calledFrom) _generateJSsInclude('vendor/mottie/tablesorter/dist/js/extras/jquery.tablesorter.pager.min.js'); } - //tinymce JS + // Tinymce JS if($tinymce === true) _generateJSsInclude('vendor/tinymce/tinymce/tinymce.min.js') ; - // sb admin template JS + // SB Admin 2 template JS if ($sbadmintemplate === true) { _generateJSsInclude('vendor/BlackrockDigital/startbootstrap-sb-admin-2/vendor/metisMenu/metisMenu.min.js'); diff --git a/content/student/studentenoverlay.xul.php b/content/student/studentenoverlay.xul.php index 8f311784d..a9de22360 100644 --- a/content/student/studentenoverlay.xul.php +++ b/content/student/studentenoverlay.xul.php @@ -288,10 +288,6 @@ else class="sortDirectionIndicator" sort="rdf:http://www.technikum-wien.at/student/rdf#matrikelnummer" onclick="StudentTreeSort()"/> -

'; if(!$rechte->isBerechtigt('basis/testtool', null, 's')) - die('Sie haben keine Berechtigung für diese Seite'); + die($rechte->errormsg.'  Seite neu laden'); if(isset($_POST['personzuteilen'])) { if(!$rechte->isBerechtigt('basis/testtool', null, 'sui')) - die('Sie haben keine Berechtigung für diese Aktion. Seite neu laden'); + die($rechte->errormsg.'  Seite neu laden'); $prestudent = new prestudent(); if($prestudent->load($_POST['prestudent_id'])) @@ -333,7 +333,7 @@ echo '    Sie haben keine Berechtigung für diese Aktion. Seite neu laden'); + die($rechte->errormsg.'  Seite neu laden'); if(isset($_POST['prestudent']) && isset($_POST['gebiet']) && is_numeric($_POST['prestudent']) && is_numeric($_POST['gebiet'])) @@ -591,7 +591,7 @@ echo '

isBerechtigt('basis/testtool', null, 'suid')) - die('Sie haben keine Berechtigung für diese Aktion. Seite neu laden'); + die($rechte->errormsg.'  Seite neu laden'); $qry = "DELETE FROM testtool.tbl_antwort WHERE pruefling_id=(SELECT pruefling_id FROM testtool.tbl_pruefling WHERE prestudent_id=".$db->db_add_param(PRESTUDENT_ID_DUMMY_STUDENT)."); DELETE FROM testtool.tbl_pruefling_frage where pruefling_id=(SELECT pruefling_id FROM testtool.tbl_pruefling WHERE prestudent_id=".$db->db_add_param(PRESTUDENT_ID_DUMMY_STUDENT).");"; @@ -606,7 +606,7 @@ echo '

'; if(isset($_POST['savedummystg']) && isset($_POST['stg'])) { if(!$rechte->isBerechtigt('basis/testtool', null, 'su')) - die('Sie haben keine Berechtigung für diese Aktion. Seite neu laden'); + die($rechte->errormsg.'  Seite neu laden'); $qry = "UPDATE public.tbl_prestudent SET studiengang_kz=".$db->db_add_param($_POST['stg'])." WHERE prestudent_id=".$db->db_add_param(PRESTUDENT_ID_DUMMY_STUDENT)."; UPDATE testtool.tbl_pruefling SET studiengang_kz=".$db->db_add_param($_POST['stg'])." WHERE prestudent_id=".$db->db_add_param(PRESTUDENT_ID_DUMMY_STUDENT).";"; @@ -859,7 +859,7 @@ echo 'Freigeschaltene Reihungstests:'; if(isset($_GET['action']) && $_GET['action']=='sperren') { if(!$rechte->isBerechtigt('basis/testtool', null, 'su')) - die('Sie haben keine Berechtigung für diese Aktion. Seite neu laden'); + die($rechte->errormsg.'  Seite neu laden'); $rt = new reihungstest(); if($rt->load($_GET['reihungstest_id'])) diff --git a/vilesci/stammdaten/reihungstestverwaltung.php b/vilesci/stammdaten/reihungstestverwaltung.php index 1afcc0c3c..0f43094c2 100644 --- a/vilesci/stammdaten/reihungstestverwaltung.php +++ b/vilesci/stammdaten/reihungstestverwaltung.php @@ -2169,8 +2169,10 @@ if($reihungstest_id!='') if ($item->prestudent_id == $row->prestudent_id && $rt_letztes_login < $rt_antrittstermin) { - $rt_in_anderen_stg .= '(Letzter '.$studiengang->kuerzel_arr[$pruefling->studiengang_kz].'-Antritt: '.$datum_obj->formatDatum($rt_letztes_login, 'd.m.Y').',
'; - $rt_in_anderen_stg .= 'absolvierte RT-Gebiete entsperren)
'; + $rt_in_anderen_stg .= '(Letzter '.$studiengang->kuerzel_arr[$pruefling->studiengang_kz].'-Antritt: '.$datum_obj->formatDatum($rt_letztes_login, 'd.m.Y'); + if($rechte->isBerechtigt('basis/testtool', null, 'suid')) + $rt_in_anderen_stg .= ',
absolvierte RT-Gebiete entsperren'; + $rt_in_anderen_stg .= ')
'; } } } diff --git a/vilesci/stammdaten/studiengang_edit.php b/vilesci/stammdaten/studiengang_edit.php index 658d9d300..308c65899 100644 --- a/vilesci/stammdaten/studiengang_edit.php +++ b/vilesci/stammdaten/studiengang_edit.php @@ -49,7 +49,7 @@ $rechte = new benutzerberechtigung(); $rechte->getBerechtigungen($user); if(!$rechte->isBerechtigt('assistenz')) - die('Sie haben keine Berechtigung fuer diese Seite'); + die($rechte->errormsg); if(isset($_GET['studiengang_kz'])) $stg_kz = $_GET['studiengang_kz']; @@ -62,7 +62,7 @@ if(isset($_GET['action']) && $_GET['action']=='save') $studiengang = new studiengang(); $studiengang->load($studiengang_kz); if(!$rechte->isBerechtigt('assistenz', $studiengang->oe_kurzbz, 'suid')) - die('Sie haben keine Berechtigung fuer diese Seite'); + die($rechte->errormsg); $bezeichnung = $_POST['bezeichnung']; $english = $_POST['english']; @@ -127,15 +127,18 @@ echo '
Studiengang:
';