diff --git a/application/controllers/Cis/Pub.php b/application/controllers/Cis/Pub.php index bebc844ab..de456145b 100644 --- a/application/controllers/Cis/Pub.php +++ b/application/controllers/Cis/Pub.php @@ -14,7 +14,7 @@ class Pub extends Auth_Controller { parent::__construct( array( - 'bild' => ['basis/cis:r'] + 'bild' => ['basis/cis:r', 'assistenz:r'] ) ); } diff --git a/application/controllers/api/v1/person/Person.php b/application/controllers/api/v1/person/Person.php index 6a373137f..935fbae62 100644 --- a/application/controllers/api/v1/person/Person.php +++ b/application/controllers/api/v1/person/Person.php @@ -233,10 +233,10 @@ class Person extends API_Controller //Quersumme bilden for ($i = 0; $i < 10; $i++) { - $erg += $gewichtung[$i] * $tmpSvnr{$i}; + $erg += $gewichtung[$i] * $tmpSvnr[$i]; } - if ($tmpSvnr{3} != ($erg % 11)) //Vergleichen der Pruefziffer mit Quersumme Modulo 11 + if ($tmpSvnr[3] != ($erg % 11)) //Vergleichen der Pruefziffer mit Quersumme Modulo 11 { return error('SVNR ist ungueltig'); } @@ -244,7 +244,7 @@ class Person extends API_Controller if (mb_strlen($person['svnr']) == 12) { $last = substr($person['svnr'], 10, 12); - if ($last{0} != 'v' || !is_numeric($last{1})) + if ($last[0] != 'v' || !is_numeric($last[1])) { return error('SVNR ist ungueltig'); } diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index 1a4f566e6..eaa207ff1 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -22,6 +22,7 @@ class InfoCenter extends Auth_Controller const REIHUNGSTESTABSOLVIERT_PAGE = 'reihungstestAbsolviert'; const ABGEWIESEN_PAGE = 'abgewiesen'; const AUFGENOMMEN_PAGE = 'aufgenommen'; + const ONBOARDING_PAGE = 'onboarding'; const SHOW_DETAILS_PAGE = 'showDetails'; const SHOW_ZGV_DETAILS_PAGE = 'showZGVDetails'; const ZGV_UBERPRUEFUNG_PAGE = 'ZGVUeberpruefung'; @@ -116,6 +117,7 @@ class InfoCenter extends Auth_Controller 'index' => 'infocenter:r', 'freigegeben' => 'infocenter:r', 'abgewiesen' => 'infocenter:r', + 'onboarding' => 'infocenter:r', 'aufgenommen' => 'infocenter:r', 'reihungstestAbsolviert' => 'infocenter:r', 'showDetails' => 'infocenter:r', @@ -230,6 +232,13 @@ class InfoCenter extends Auth_Controller $this->load->view('system/infocenter/infocenterAbgewiesen.php'); } + + public function onboarding() + { + $this->_setNavigationMenu(self::ONBOARDING_PAGE); // define the navigation menu for this page + + $this->load->view('system/infocenter/onboarding.php'); + } /** * Aufgenommene page of the InfoCenter tool @@ -1553,6 +1562,7 @@ class InfoCenter extends Auth_Controller $reihungstestAbsolviertLink = site_url(self::INFOCENTER_URI.'/'.self::REIHUNGSTESTABSOLVIERT_PAGE); $abgewiesenLink = site_url(self::INFOCENTER_URI.'/'.self::ABGEWIESEN_PAGE); $aufgenommenLink = site_url(self::INFOCENTER_URI.'/'.self::AUFGENOMMEN_PAGE); + $onboardingLink = site_url(self::INFOCENTER_URI.'/'.self::ONBOARDING_PAGE); $currentFilterId = $this->input->get(self::FILTER_ID); if (isset($currentFilterId)) @@ -1561,6 +1571,7 @@ class InfoCenter extends Auth_Controller $reihungstestAbsolviertLink .= '?'.self::PREV_FILTER_ID.'='.$currentFilterId; $abgewiesenLink .= '?'.self::PREV_FILTER_ID.'='.$currentFilterId; $aufgenommenLink .= '?'.self::PREV_FILTER_ID.'='.$currentFilterId; + $onboardingLink .= '?'.self::PREV_FILTER_ID.'='.$currentFilterId; } $this->navigationlib->setSessionMenu( @@ -1624,6 +1635,18 @@ class InfoCenter extends Auth_Controller '', // target 40 // sort ), + 'ohnePrestudent' => $this->navigationlib->oneLevel( + 'Electronic Onboarding', // description + $onboardingLink, // link + null, // children + 'users', // icon + null, // subscriptDescription + false, // expand + null, // subscriptLinkClass + null, // subscriptLinkValue + '', // target + 50 // sort + ), ) ); } @@ -1650,6 +1673,8 @@ class InfoCenter extends Auth_Controller $link = site_url(self::ZGV_UEBERPRUEFUNG_URI); if ($origin_page === self::ABGEWIESEN_PAGE) $link = site_url(self::INFOCENTER_URI.'/'.self::ABGEWIESEN_PAGE); + if ($origin_page === self::ONBOARDING_PAGE) + $link = site_url(self::INFOCENTER_URI.'/'.self::ONBOARDING_PAGE); if ($origin_page === self::AUFGENOMMEN_PAGE) $link = site_url(self::INFOCENTER_URI.'/'.self::AUFGENOMMEN_PAGE); @@ -1691,6 +1716,7 @@ class InfoCenter extends Auth_Controller $freigegebenLink = site_url(self::INFOCENTER_URI.'/'.self::FREIGEGEBEN_PAGE); $absolviertLink = site_url(self::INFOCENTER_URI.'/'.self::REIHUNGSTESTABSOLVIERT_PAGE); $abgewiesenLink = site_url(self::INFOCENTER_URI.'/'.self::ABGEWIESEN_PAGE); + $onboardingLink = site_url(self::INFOCENTER_URI.'/'.self::ONBOARDING_PAGE); $prevFilterId = $this->input->get(self::PREV_FILTER_ID); if (isset($prevFilterId)) { @@ -1767,6 +1793,24 @@ class InfoCenter extends Auth_Controller ) ); } + if($page == self::ONBOARDING_PAGE) + { + $this->navigationlib->setSessionElementMenu( + 'onboarding', + $this->navigationlib->oneLevel( + 'Electronic Onboarding', // description + $onboardingLink, // link + null, // children + 'users', // icon + null, // subscriptDescription + false, // expand + null, // subscriptLinkClass + null, // subscriptLinkValue + '', // target + 50 // sort + ) + ); + } } /** diff --git a/application/views/system/infocenter/onboarding.php b/application/views/system/infocenter/onboarding.php new file mode 100644 index 000000000..1f5bae847 --- /dev/null +++ b/application/views/system/infocenter/onboarding.php @@ -0,0 +1,47 @@ +load->view( + 'templates/FHC-Header', + array( + 'title' => 'Info Center', + 'jquery3' => true, + 'jqueryui1' => true, + 'jquerycheckboxes1' => true, + 'bootstrap3' => true, + 'fontawesome4' => true, + 'sbadmintemplate3' => true, + 'tablesorter2' => true, + 'ajaxlib' => true, + 'filterwidget' => true, + 'navigationwidget' => true, + 'dialoglib' => true, + 'phrases' => array( + 'person' => array('vorname', 'nachname'), + 'ui' => array('bitteEintragWaehlen') + ), + 'customCSSs' => array('public/css/sbadmin2/tablesort_bootstrap.css', 'public/css/infocenter/infocenterPersonDataset.css'), + 'customJSs' => array('public/js/bootstrapper.js', 'public/js/infocenter/rueckstellung.js', 'public/js/infocenter/infocenterPersonDataset.js') + ) + ); +?> + +
+ + widgetlib->widget('NavigationWidget'); ?> + +
+
+
+
+ +
+
+
+ load->view('system/infocenter/onboardingData.php'); ?> +
+
+
+
+ +load->view('templates/FHC-Footer'); ?> diff --git a/application/views/system/infocenter/onboardingData.php b/application/views/system/infocenter/onboardingData.php new file mode 100644 index 000000000..5ee66fdde --- /dev/null +++ b/application/views/system/infocenter/onboardingData.php @@ -0,0 +1,116 @@ +>0 as bezeichnung + FROM public.tbl_rueckstellung + 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)'; + + $filterWidgetArray = array( + 'query' => $query, + 'app' => InfoCenter::APP, + 'datasetName' => 'onboarding', + 'filter_id' => $this->input->get('filter_id'), + 'requiredPermissions' => 'infocenter', + 'datasetRepresentation' => 'tablesorter', + 'checkboxes' => 'PersonId', + 'additionalColumns' => array('Details'), + 'columnsAliases' => array( + 'PersonId', + ucfirst($this->p->t('person', 'vorname')) , + ucfirst($this->p->t('person', 'nachname')), + ucfirst($this->p->t('global', 'sperrdatum')), + ucfirst($this->p->t('global', 'gesperrtVon')), + ucfirst($this->p->t('infocenter', 'rueckstelldatum')), + ucfirst($this->p->t('infocenter', 'rueckstellgrund')), + ), + + 'formatRow' => function($datasetRaw) { + /* NOTE: Dont use $this here for PHP Version compatibility */ + $datasetRaw->{'Details'} = sprintf( + 'Details', + site_url('system/infocenter/InfoCenter/showDetails'), + $datasetRaw->{'PersonId'}, + 'onboarding', + (isset($_GET['fhc_controller_id']) ? $_GET['fhc_controller_id'] : ''), + (isset($_GET['filter_id']) ? $_GET['filter_id'] : '') + ); + + if ($datasetRaw->{'LockDate'} == null) + { + $datasetRaw->{'LockDate'} = '-'; + } + + if ($datasetRaw->{'LockUser'} == null) + { + $datasetRaw->{'LockUser'} = '-'; + } + + if ($datasetRaw->{'HoldDate'} == null) + { + $datasetRaw->{'HoldDate'} = '-'; + } + else + { + $datasetRaw->{'HoldDate'} = date_format(date_create($datasetRaw->{'HoldDate'}), 'Y-m-d H:i'); + } + + if ($datasetRaw->{'Rueckstellgrund'} === null) + { + $datasetRaw->{'Rueckstellgrund'} = '-'; + } + + return $datasetRaw; + }, + + 'markRow' => function($datasetRaw) { + + if ($datasetRaw->LockDate != null) + { + return FilterWidget::DEFAULT_MARK_ROW_CLASS; + } + } + + + + ); + + echo $this->widgetlib->widget('FilterWidget', $filterWidgetArray); +?> diff --git a/include/File/CSV.php b/include/File/CSV.php index c4c4d44ad..ea67181f1 100644 --- a/include/File/CSV.php +++ b/include/File/CSV.php @@ -178,7 +178,7 @@ class File_CSV return $field; } - if ($quote && $field{0} == $quote && $field{strlen($field)-1} == $quote) { + if ($quote && $field[0] == $quote && $field[strlen($field) - 1] == $quote) { return substr($field, 1, -1); } return $field; @@ -230,7 +230,7 @@ class File_CSV } elseif ($c == "\n" || $c == "\r") { $sub = ($prev == "\r") ? 2 : 1; if ((strlen($buff) >= $sub) && - ($buff{strlen($buff) - $sub} == $quote)) + ($buff[strlen($buff) - $sub] == $quote)) { $in_quote = false; } @@ -312,9 +312,9 @@ class File_CSV $last =& $fields[count($fields) - 1]; // Fallback to read the line with readQuoted when guess // that the simple explode won't work right - if (($last{strlen($last) - 1} == "\n" - && $last{0} == $conf['quote'] - && $last{strlen(rtrim($last)) - 1} != $conf['quote']) + if (($last[strlen($last) - 1] == "\n" + && $last[0] == $conf['quote'] + && $last[strlen(rtrim($last)) - 1] != $conf['quote']) || (count($fields) != $conf['fields']) // XXX perhaps there is a separator inside a quoted field @@ -511,4 +511,4 @@ class File_CSV return true; } } -?> \ No newline at end of file +?> diff --git a/include/File/Util.php b/include/File/Util.php index 941c61441..5474bc2a7 100644 --- a/include/File/Util.php +++ b/include/File/Util.php @@ -96,7 +96,7 @@ class File_Util { if (File_Util::isAbsolute($path)) { if (FILE_WIN32) { - return substr($path, $path{3} == '\\' ? 4 : 3); + return substr($path, $path[3] == '\\' ? 4 : 3); } return ltrim($path, '/'); } @@ -182,7 +182,7 @@ class File_Util if (FILE_WIN32) { return preg_match('/^[a-zA-Z]:(\\\|\/)/', $path); } - return ($path{0} == '/') || ($path{0} == '~'); + return ($path[0] == '/') || ($path[0] == '~'); } /** @@ -244,11 +244,11 @@ class File_Util } else { $cwd = getcwd(); $drive = substr($cwd, 0, 2); - if ($path{0} !== $separator{0}) { + if ($path[0] !== $separator[0]) { $path = substr($cwd, 3) . $separator . $path; } } - } elseif ($path{0} !== $separator) { + } elseif ($path[0] !== $separator) { $path = getcwd() . $separator . $path; } @@ -323,7 +323,7 @@ class File_Util $entries = array(); for ($dir = dir($path); false !== $entry = $dir->read(); ) { - if ($list & FILE_LIST_DOTS || $entry{0} !== '.') { + if ($list & FILE_LIST_DOTS || $entry[0] !== '.') { $isRef = ($entry === '.' || $entry === '..'); $isDir = $isRef || is_dir($path .'/'. $entry); if ( ((!$isDir && $list & FILE_LIST_FILES) || diff --git a/include/filter.class.php b/include/filter.class.php index c3d1d6ac1..7100e6562 100644 --- a/include/filter.class.php +++ b/include/filter.class.php @@ -240,7 +240,7 @@ class filter extends basis_db { //$value->value = preg_replace('/(.*?)selected=.selected./', '$1', $value->value); //$value->value = preg_replace('/(.*?)\s*[selected=?selected?]/', '$1', $value->value); - //$value->value = preg_replace('/(.*?)\s*selected="selected"\s*/', '${1}', $value->value); + //$value->value = preg_replace('/(.*?)\s*selected="selected"\s*/', '$[1]', $value->value); //$value->value = preg_replace('/^\s*selected=.*?selected.*?\s*/', ' ', $value->value); //$value->value = str_replace('selected=', '', $value->value); diff --git a/include/securimage/WavFile.php b/include/securimage/WavFile.php index 6d84fc725..d56dbd942 100644 --- a/include/securimage/WavFile.php +++ b/include/securimage/WavFile.php @@ -1532,7 +1532,7 @@ class WavFile } else { // replace for ($i = 0; $i < $sampleBytes; ++$i) { - $this->_samples{$offset + $i} = $sampleBinary{$i}; + $this->_samples[$offset + $i] = $sampleBinary[$i]; } } diff --git a/include/securimage/securimage.php b/include/securimage/securimage.php index 51d876672..820e8b92f 100644 --- a/include/securimage/securimage.php +++ b/include/securimage/securimage.php @@ -1435,7 +1435,7 @@ class Securimage $length = strlen($code['display']); for($i = 0; $i < $length; ++$i) { - $letter = $code['display']{$i}; + $letter = $code['display'][$i]; $letters[] = $letter; } } diff --git a/public/css/Cis4/Cis.css b/public/css/Cis4/Cis.css index ff1b181dd..2bb467048 100644 --- a/public/css/Cis4/Cis.css +++ b/public/css/Cis4/Cis.css @@ -407,6 +407,7 @@ 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 { @@ -854,4 +855,4 @@ html { #cis-main .modal-footer { background-color: var(--fhc-secondary); -} \ No newline at end of file +} diff --git a/public/js/components/Stv/Studentenverwaltung.js b/public/js/components/Stv/Studentenverwaltung.js index 03f84f75e..e3a750e0c 100644 --- a/public/js/components/Stv/Studentenverwaltung.js +++ b/public/js/components/Stv/Studentenverwaltung.js @@ -155,7 +155,7 @@ export default { extraItems.push({ link: FHC_JS_DATA_STORAGE_OBJECT.app_root - + 'content/statistik/notenspiegel.php?type=xls' + + 'content/statistik/notenspiegel.php?typ=xls' + '&studiengang_kz=' + studiengang_kz + '&semester=' + semester + '&studiensemester=' + this.studiensemesterKurzbz @@ -173,7 +173,7 @@ export default { }); extraItems.push({ link: FHC_JS_DATA_STORAGE_OBJECT.app_root - + 'content/statistik/notenspiegel.php?type=html' + + 'content/statistik/notenspiegel.php?typ=html' + '&studiengang_kz=' + studiengang_kz + '&semester=' + semester + '&studiensemester=' + this.studiensemesterKurzbz diff --git a/public/js/components/Stv/Studentenverwaltung/List.js b/public/js/components/Stv/Studentenverwaltung/List.js index 11b80efd0..953462a74 100644 --- a/public/js/components/Stv/Studentenverwaltung/List.js +++ b/public/js/components/Stv/Studentenverwaltung/List.js @@ -140,7 +140,12 @@ export default { * we need to get the params from elsewhere. * @see https://github.com/olifolkerd/tabulator/issues/4318 */ - return this.$api.call({...config, url, params: this.tabulatorOptions.ajaxParams}); + const apiconfig = { + ...this.tabulatorOptions.ajaxConfig, + url: this.tabulatorOptions.ajaxURL, + params: this.tabulatorOptions.ajaxParams + }; + return this.$api.call(apiconfig); }, ajaxResponse: (url, params, response) => { return response?.data; @@ -182,7 +187,7 @@ export default { count: 0, filteredcount: 0, selectedcount: 0, - currentEndpointRawUrl: '' + currentEndpoint: null } }, computed: { @@ -357,16 +362,20 @@ export default { updateUrl(endpoint, first) { this.lastSelected = first ? undefined : this.selected; - if( endpoint === undefined ) + console.log('function param endpoint: ' + JSON.stringify(endpoint)); + console.log('current endpoint: ' + JSON.stringify(this.currentEndpoint)); + + if( endpoint === undefined && this.currentEndpoint === null) { - endpoint = {url: this.currentEndpointRawUrl}; - } - else if( endpoint.url === undefined ) + endpoint = { url: '' }; + } + else if( endpoint === undefined ) { - endpoint.url = this.currentEndpointRawUrl; - } else + endpoint = JSON.parse(JSON.stringify(this.currentEndpoint)); + } + else { - this.currentEndpointRawUrl = endpoint.url; + this.currentEndpoint = JSON.parse(JSON.stringify(endpoint)); } endpoint.url = endpoint.url.replace( @@ -375,13 +384,16 @@ export default { ); const params = (endpoint?.params !== undefined) ? endpoint.params : {}; - const method = (endpoint?.method !== undefined) ? endpoint.method : 'get'; - if (this.filter.length) + let method = (endpoint?.method !== undefined) ? endpoint.method : 'get'; + if (this.filter.length && !endpoint.url.match(/\/search\//)) + { params.filter = this.filter; + method = 'post'; + } this.tabulatorOptions.ajaxURL = endpoint.url; this.tabulatorOptions.ajaxParams = { ...params }; - this.tabulatorOptions.ajaxConfig = method; + this.tabulatorOptions.ajaxConfig = {method}; if (!this.$refs.table.tableBuilt) { if (this.$refs.table.tabulator) { this.$refs.table.tabulator.on("tableBuilt", () => { diff --git a/system/filtersupdate.php b/system/filtersupdate.php index 9e3c62a33..ef8b72d8b 100644 --- a/system/filtersupdate.php +++ b/system/filtersupdate.php @@ -529,6 +529,29 @@ $filters = array( ', 'oe_kurzbz' => null, ), + array( + 'app' => 'infocenter', + 'dataset_name' => 'onboarding', + 'filter_kurzbz' => 'InfoCenterOnboarding', + 'description' => '{Alle}', + 'sort' => 1, + 'default_filter' => true, + 'filter' => ' + { + "name": "Electronic Onboarding - Alle", + "columns": [ + {"name": "PersonId"}, + {"name": "Vorname"}, + {"name": "Nachname"}, + {"name": "LockUser"}, + {"name": "HoldDate"}, + {"name": "Rueckstellgrund"} + ], + "filters": [] + } + ', + 'oe_kurzbz' => null, + ), array( 'app' => 'infocenter', 'dataset_name' => 'aufgenommen', diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 6c5db0b32..39ff6c2e5 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -38928,7 +38928,7 @@ array( 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Anzahl angezeigter vergangender Studiensemester', + 'text' => 'Anzahl angezeigter vergangener Studiensemester', 'description' => '', 'insertvon' => 'system' ),