From 1b49ea2a20469bac37567eda86d0e1f16d8a0c37 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Tue, 11 Oct 2022 08:23:49 +0200 Subject: [PATCH 01/66] - rt job angepasst --- .../controllers/jobs/ReihungstestJob.php | 44 +++++++++---------- 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/application/controllers/jobs/ReihungstestJob.php b/application/controllers/jobs/ReihungstestJob.php index ab6c429a0..58f84f830 100644 --- a/application/controllers/jobs/ReihungstestJob.php +++ b/application/controllers/jobs/ReihungstestJob.php @@ -727,33 +727,27 @@ class ReihungstestJob extends JOB_Controller tbl_reihungstest.reihungstest_id, tbl_studienplan.studienplan_id, tbl_reihungstest.studiensemester_kurzbz, - tbl_studienordnung.studiengang_kz + tbl_studienordnung.studiengang_kz, + tbl_studienplan.orgform_kurzbz FROM public.tbl_reihungstest - JOIN public.tbl_rt_studienplan ON(tbl_rt_studienplan.reihungstest_id=tbl_reihungstest.reihungstest_id) - JOIN lehre.tbl_studienplan USING(studienplan_id) - JOIN lehre.tbl_studienordnung USING(studienordnung_id) + JOIN public.tbl_rt_studienplan ON(tbl_rt_studienplan.reihungstest_id=tbl_reihungstest.reihungstest_id) + JOIN lehre.tbl_studienplan USING(studienplan_id) + JOIN lehre.tbl_studienordnung USING(studienordnung_id) WHERE - NOT EXISTS( - SELECT 1 FROM lehre.tbl_studienplan_semester - WHERE studienplan_id=tbl_rt_studienplan.studienplan_id - AND tbl_studienplan_semester.studiensemester_kurzbz=tbl_reihungstest.studiensemester_kurzbz - ) + EXISTS ( + SELECT studienplan_id + FROM lehre.tbl_studienordnung sordnung + JOIN lehre.tbl_studienplan USING (studienordnung_id) + JOIN lehre.tbl_studienplan_semester USING (studienplan_id) + WHERE sordnung.studiengang_kz = tbl_studienordnung.studiengang_kz + AND tbl_studienplan_semester.studiensemester_kurzbz = tbl_reihungstest.studiensemester_kurzbz + AND tbl_studienplan.studienplan_id NOT IN + ( + SELECT studienplan_id FROM tbl_rt_studienplan WHERE reihungstest_id = tbl_reihungstest.reihungstest_id + ) AND tbl_reihungstest.datum >= now() - AND NOT EXISTS( - SELECT - 1 - FROM - public.tbl_rt_studienplan rtstp - JOIN lehre.tbl_studienplan stp USING(studienplan_id) - JOIN lehre.tbl_studienordnung sto USING(studienordnung_id) - JOIN lehre.tbl_studienplan_semester stpsem USING(studienplan_id) - WHERE - sto.studiengang_kz=tbl_studienordnung.studiengang_kz - AND rtstp.reihungstest_id=tbl_reihungstest.reihungstest_id - AND stpsem.studiensemester_kurzbz=tbl_reihungstest.studiensemester_kurzbz - ) - "; + )"; $db = new DB_Model(); $result_rt = $db->execReadOnlyQuery($qry); @@ -763,7 +757,9 @@ class ReihungstestJob extends JOB_Controller // find an active studyplan for the same degree program with is valid in this semester $result_stpl = $this->StudienplanModel->getStudienplaeneBySemester( $row_rt->studiengang_kz, - $row_rt->studiensemester_kurzbz + $row_rt->studiensemester_kurzbz, + null, + $row_rt->orgform_kurzbz ); if (hasData($result_stpl)) { From a2c2eddf0dc8633eb7399b33d24de9f34be9d6b1 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Wed, 12 Oct 2022 11:18:05 +0200 Subject: [PATCH 02/66] - sql angepasst --- application/controllers/jobs/ReihungstestJob.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/controllers/jobs/ReihungstestJob.php b/application/controllers/jobs/ReihungstestJob.php index 58f84f830..97a78fc41 100644 --- a/application/controllers/jobs/ReihungstestJob.php +++ b/application/controllers/jobs/ReihungstestJob.php @@ -746,8 +746,8 @@ class ReihungstestJob extends JOB_Controller ( SELECT studienplan_id FROM tbl_rt_studienplan WHERE reihungstest_id = tbl_reihungstest.reihungstest_id ) - AND tbl_reihungstest.datum >= now() - )"; + ) + AND tbl_reihungstest.datum >= now()"; $db = new DB_Model(); $result_rt = $db->execReadOnlyQuery($qry); From 9c0d70fe890d234aa2b44086fcfec4be0074a714 Mon Sep 17 00:00:00 2001 From: Paolo Date: Tue, 8 Nov 2022 12:01:05 +0100 Subject: [PATCH 03/66] Removed version 4 of tinymce --- composer.json | 12 -- composer.lock | 424 +++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 386 insertions(+), 50 deletions(-) diff --git a/composer.json b/composer.json index 825ed5625..46f4edc39 100644 --- a/composer.json +++ b/composer.json @@ -270,17 +270,6 @@ } } }, - { - "type": "package", - "package": { - "name": "tinymce/tinymce4", - "version": "4.9.11", - "dist": { - "url": "https://github.com/tinymce/tinymce-dist/archive/refs/tags/4.9.11.zip", - "type": "zip" - } - } - }, { "type": "package", "package": { @@ -413,7 +402,6 @@ "scottjehl/respond": "1.4.2", "tapmodo/jcrop": "2.0.4", - "tinymce/tinymce4": "4.9.*", "tinymce/tinymce5": "5.10.*", "tomazdragar/simplecropper": "1.0", "twbs/bootstrap3": "3.4.*", diff --git a/composer.lock b/composer.lock index 72f13c76f..ce909eccc 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d530cc4d7bd81812535eb64e87ba04f4", + "content-hash": "269157583af475d4c8cd307400c7b248", "packages": [ { "name": "afarkas/html5shiv", @@ -35,6 +35,10 @@ ], "description": "Defacto way to enable use of HTML5 sectioning elements in legacy Internet Explorer.", "homepage": "http://paulirish.com/2011/the-history-of-the-html5-shiv/", + "support": { + "issues": "https://github.com/aFarkas/html5shiv/issues", + "source": "https://github.com/aFarkas/html5shiv/tree/3.7.3" + }, "time": "2015-07-20T20:04:00+00:00" }, { @@ -130,6 +134,16 @@ "keywords": [ "qr code" ], + "support": { + "issues": "https://github.com/chillerlan/php-qrcode/issues", + "source": "https://github.com/chillerlan/php-qrcode/tree/v2.0.x" + }, + "funding": [ + { + "url": "https://ko-fi.com/codemasher", + "type": "ko_fi" + } + ], "time": "2020-04-12T07:38:35+00:00" }, { @@ -178,6 +192,10 @@ "helper", "trait" ], + "support": { + "issues": "https://github.com/chillerlan/php-traits/issues", + "source": "https://github.com/chillerlan/php-traits" + }, "abandoned": true, "time": "2018-06-22T00:30:47+00:00" }, @@ -218,6 +236,10 @@ ], "description": "REST Server for the CodeIgniter framework", "homepage": "https://github.com/chriskacerguis/codeigniter-restserver", + "support": { + "issues": "https://github.com/chriskacerguis/codeigniter-restserver/issues", + "source": "https://github.com/chriskacerguis/codeigniter-restserver" + }, "time": "2017-09-23T16:44:55+00:00" }, { @@ -236,6 +258,10 @@ }, "type": "library", "notification-url": "https://packagist.org/downloads/", + "support": { + "issues": "https://github.com/akiyatkin/tablesorter/issues", + "source": "https://github.com/akiyatkin/tablesorter/tree/master" + }, "time": "2016-09-02T11:31:54+00:00" }, { @@ -269,6 +295,13 @@ ], "description": "The CodeIgniter framework", "homepage": "https://codeigniter.com", + "support": { + "forum": "http://forum.codeigniter.com/", + "issues": "https://github.com/bcit-ci/CodeIgniter/issues", + "slack": "https://codeigniterchat.slack.com", + "source": "https://github.com/bcit-ci/CodeIgniter", + "wiki": "https://github.com/bcit-ci/CodeIgniter/wiki" + }, "time": "2022-03-03T13:21:49+00:00" }, { @@ -573,6 +606,10 @@ ], "description": "Shim repository for Angular.js", "homepage": "http://angularjs.org", + "support": { + "issues": "https://github.com/components/angular.js/issues", + "source": "https://github.com/components/angular.js/tree/master" + }, "time": "2015-06-07T20:10:38+00:00" }, { @@ -615,6 +652,13 @@ ], "description": "jQuery JavaScript Library", "homepage": "http://jquery.com", + "support": { + "forum": "http://forum.jquery.com", + "irc": "irc://irc.freenode.org/jquery", + "issues": "https://github.com/jquery/jquery/issues", + "source": "https://github.com/jquery/jquery", + "wiki": "http://docs.jquery.com/" + }, "time": "2021-03-20T19:13:42+00:00" }, { @@ -700,6 +744,10 @@ } ], "description": "jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library. Whether you're building highly interactive web applications or you just need to add a date picker to a form control, jQuery UI is the perfect choice.", + "support": { + "issues": "https://github.com/components/jqueryui/issues", + "source": "https://github.com/components/jqueryui/tree/master" + }, "time": "2016-09-16T05:47:55+00:00" }, { @@ -749,6 +797,10 @@ "captcha", "security" ], + "support": { + "issues": "https://github.com/dapphp/securimage/issues", + "source": "https://github.com/dapphp/securimage/tree/master" + }, "abandoned": true, "time": "2018-03-09T06:07:41+00:00" }, @@ -812,6 +864,12 @@ "rdfa", "sparql" ], + "support": { + "forum": "http://groups.google.com/group/easyrdf/", + "irc": "irc://chat.freenode.net/easyrdf", + "issues": "http://github.com/njh/easyrdf/issues", + "source": "https://github.com/easyrdf/easyrdf/tree/0.9.1" + }, "time": "2015-02-27T09:45:49+00:00" }, { @@ -890,6 +948,10 @@ "faker", "fixtures" ], + "support": { + "issues": "https://github.com/fzaninotto/Faker/issues", + "source": "https://github.com/fzaninotto/Faker/tree/v1.9.2" + }, "abandoned": true, "time": "2020-12-11T09:56:16+00:00" }, @@ -1012,6 +1074,10 @@ "json", "schema" ], + "support": { + "issues": "https://github.com/justinrainbow/json-schema/issues", + "source": "https://github.com/justinrainbow/json-schema/tree/master" + }, "time": "2014-08-25T02:48:14+00:00" }, { @@ -1046,6 +1112,10 @@ } ], "description": "A framework-agnostic PHP Implementation for generating simple forms based on json-schema", + "support": { + "issues": "https://github.com/kingsquare/json-schema-form/issues", + "source": "https://github.com/kingsquare/json-schema-form/tree/master" + }, "time": "2014-07-10T12:27:19+00:00" }, { @@ -1106,6 +1176,10 @@ "keywords": [ "markdown" ], + "support": { + "issues": "https://github.com/michelf/php-markdown/issues", + "source": "https://github.com/michelf/php-markdown/tree/lib" + }, "time": "2015-03-01T12:03:08+00:00" }, { @@ -1153,20 +1227,24 @@ "uri", "url" ], + "support": { + "issues": "https://github.com/lanthaler/IRI/issues", + "source": "https://github.com/lanthaler/IRI/tree/master" + }, "time": "2014-01-21T13:43:39+00:00" }, { "name": "ml/json-ld", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/lanthaler/JsonLD.git", - "reference": "c74a1aed5979ed1cfb1be35a55a305fd30e30b93" + "reference": "537e68e87a6bce23e57c575cd5dcac1f67ce25d8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lanthaler/JsonLD/zipball/c74a1aed5979ed1cfb1be35a55a305fd30e30b93", - "reference": "c74a1aed5979ed1cfb1be35a55a305fd30e30b93", + "url": "https://api.github.com/repos/lanthaler/JsonLD/zipball/537e68e87a6bce23e57c575cd5dcac1f67ce25d8", + "reference": "537e68e87a6bce23e57c575cd5dcac1f67ce25d8", "shasum": "" }, "require": { @@ -1202,7 +1280,11 @@ "JSON-LD", "jsonld" ], - "time": "2020-06-16T17:45:06+00:00" + "support": { + "issues": "https://github.com/lanthaler/JsonLD/issues", + "source": "https://github.com/lanthaler/JsonLD/tree/1.2.1" + }, + "time": "2022-09-29T08:45:17+00:00" }, { "name": "moment/momentjs", @@ -1262,6 +1344,14 @@ "sorting", "table" ], + "support": { + "docs": "https://mottie.github.io/tablesorter/docs/index.html", + "email": "wowmotty@gmail.com", + "irc": "irc://irc.freenode.org/tablesorter", + "issues": "https://github.com/Mottie/tablesorter/issues", + "source": "https://github.com/Mottie/tablesorter", + "wiki": "https://github.com/Mottie/tablesorter/wiki" + }, "time": "2020-03-03T13:46:03+00:00" }, { @@ -1312,6 +1402,10 @@ "rest", "restful" ], + "support": { + "issues": "https://github.com/nategood/httpful/issues", + "source": "https://github.com/nategood/httpful/tree/v0.2.20" + }, "time": "2015-10-26T16:11:30+00:00" }, { @@ -1365,6 +1459,12 @@ "plaintext", "textile" ], + "support": { + "irc": "irc://irc.freenode.net/textile", + "issues": "https://github.com/textile/php-textile/issues", + "source": "https://github.com/textile/php-textile", + "wiki": "https://github.com/textile/php-textile/wiki" + }, "time": "2022-05-01T17:05:16+00:00" }, { @@ -1420,16 +1520,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "2.0.37", + "version": "2.0.39", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "c812fbb4d6b4d7f30235ab7298a12f09ba13b37c" + "reference": "f3a0e2b715c40cf1fd270d444901b63311725d63" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/c812fbb4d6b4d7f30235ab7298a12f09ba13b37c", - "reference": "c812fbb4d6b4d7f30235ab7298a12f09ba13b37c", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/f3a0e2b715c40cf1fd270d444901b63311725d63", + "reference": "f3a0e2b715c40cf1fd270d444901b63311725d63", "shasum": "" }, "require": { @@ -1444,7 +1544,8 @@ "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.", "ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.", "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.", - "ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations." + "ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations.", + "ext-xml": "Install the XML extension to load XML formatted public keys." }, "type": "library", "autoload": { @@ -1507,7 +1608,25 @@ "x.509", "x509" ], - "time": "2022-04-04T04:57:45+00:00" + "support": { + "issues": "https://github.com/phpseclib/phpseclib/issues", + "source": "https://github.com/phpseclib/phpseclib/tree/2.0.39" + }, + "funding": [ + { + "url": "https://github.com/terrafrost", + "type": "github" + }, + { + "url": "https://www.patreon.com/phpseclib", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib", + "type": "tidelift" + } + ], + "time": "2022-10-24T10:49:03+00:00" }, { "name": "rmariuzzo/jquery-checkboxes", @@ -1587,6 +1706,23 @@ "polyfill", "portable" ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.19.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], "time": "2020-10-23T09:01:57+00:00" }, { @@ -1598,15 +1734,6 @@ }, "type": "library" }, - { - "name": "tinymce/tinymce4", - "version": "4.9.11", - "dist": { - "type": "zip", - "url": "https://github.com/tinymce/tinymce-dist/archive/refs/tags/4.9.11.zip" - }, - "type": "library" - }, { "name": "tinymce/tinymce5", "version": "5.10.3", @@ -1706,6 +1833,10 @@ "keywords": [ "templating" ], + "support": { + "issues": "https://github.com/twigphp/Twig/issues", + "source": "https://github.com/twigphp/Twig/tree/1.x" + }, "time": "2020-02-11T05:59:23+00:00" }, { @@ -1779,6 +1910,24 @@ "regex", "regular expression" ], + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/1.0.1" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], "time": "2022-01-21T20:24:37+00:00" }, { @@ -1826,20 +1975,39 @@ "Xdebug", "performance" ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/2.0.5" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], "time": "2022-02-24T20:20:32+00:00" }, { "name": "nikic/php-parser", - "version": "v4.14.0", + "version": "v4.15.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1" + "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/34bea19b6e03d8153165d8f30bba4c3be86184c1", - "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/0ef6c55a3f47f89d7a374e6f835197a0b5fcf900", + "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900", "shasum": "" }, "require": { @@ -1878,20 +2046,24 @@ "parser", "php" ], - "time": "2022-05-31T20:59:12+00:00" + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.1" + }, + "time": "2022-09-04T07:30:47+00:00" }, { "name": "pdepend/pdepend", - "version": "2.10.3", + "version": "2.12.1", "source": { "type": "git", "url": "https://github.com/pdepend/pdepend.git", - "reference": "da3166a06b4a89915920a42444f707122a1584c9" + "reference": "7a892d56ceafd804b4a2ecc85184640937ce9e84" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pdepend/pdepend/zipball/da3166a06b4a89915920a42444f707122a1584c9", - "reference": "da3166a06b4a89915920a42444f707122a1584c9", + "url": "https://api.github.com/repos/pdepend/pdepend/zipball/7a892d56ceafd804b4a2ecc85184640937ce9e84", + "reference": "7a892d56ceafd804b4a2ecc85184640937ce9e84", "shasum": "" }, "require": { @@ -1925,26 +2097,36 @@ "BSD-3-Clause" ], "description": "Official version of pdepend to be handled with Composer", - "time": "2022-02-23T07:53:09+00:00" + "support": { + "issues": "https://github.com/pdepend/pdepend/issues", + "source": "https://github.com/pdepend/pdepend/tree/2.12.1" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/pdepend/pdepend", + "type": "tidelift" + } + ], + "time": "2022-09-08T19:30:37+00:00" }, { "name": "phpmd/phpmd", - "version": "2.12.0", + "version": "2.13.0", "source": { "type": "git", "url": "https://github.com/phpmd/phpmd.git", - "reference": "c0b678ba71902f539c27c14332aa0ddcf14388ec" + "reference": "dad0228156856b3ad959992f9748514fa943f3e3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpmd/phpmd/zipball/c0b678ba71902f539c27c14332aa0ddcf14388ec", - "reference": "c0b678ba71902f539c27c14332aa0ddcf14388ec", + "url": "https://api.github.com/repos/phpmd/phpmd/zipball/dad0228156856b3ad959992f9748514fa943f3e3", + "reference": "dad0228156856b3ad959992f9748514fa943f3e3", "shasum": "" }, "require": { "composer/xdebug-handler": "^1.0 || ^2.0 || ^3.0", "ext-xml": "*", - "pdepend/pdepend": "^2.10.3", + "pdepend/pdepend": "^2.12.1", "php": ">=5.3.9" }, "require-dev": { @@ -1997,7 +2179,18 @@ "phpmd", "pmd" ], - "time": "2022-03-24T13:33:01+00:00" + "support": { + "irc": "irc://irc.freenode.org/phpmd", + "issues": "https://github.com/phpmd/phpmd/issues", + "source": "https://github.com/phpmd/phpmd/tree/2.13.0" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/phpmd/phpmd", + "type": "tidelift" + } + ], + "time": "2022-09-10T08:44:15+00:00" }, { "name": "phpmetrics/phpmetrics", @@ -2061,6 +2254,10 @@ "quality", "testing" ], + "support": { + "issues": "https://github.com/PhpMetrics/PhpMetrics/issues", + "source": "https://github.com/phpmetrics/PhpMetrics/tree/v2.8.1" + }, "time": "2022-03-24T10:19:51+00:00" }, { @@ -2110,6 +2307,10 @@ "keywords": [ "timer" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/master" + }, "time": "2017-02-26T11:10:40+00:00" }, { @@ -2159,6 +2360,10 @@ "container-interop", "psr" ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/master" + }, "time": "2017-02-14T16:28:37+00:00" }, { @@ -2206,6 +2411,9 @@ "psr", "psr-3" ], + "support": { + "source": "https://github.com/php-fig/log/tree/1.1.4" + }, "time": "2021-05-03T11:20:27+00:00" }, { @@ -2245,6 +2453,10 @@ ], "description": "FinderFacade is a convenience wrapper for Symfony's Finder component.", "homepage": "https://github.com/sebastianbergmann/finder-facade", + "support": { + "issues": "https://github.com/sebastianbergmann/finder-facade/issues", + "source": "https://github.com/sebastianbergmann/finder-facade/tree/master" + }, "abandoned": true, "time": "2017-11-18T17:31:49+00:00" }, @@ -2296,6 +2508,10 @@ ], "description": "Copy/Paste Detector (CPD) for PHP code.", "homepage": "https://github.com/sebastianbergmann/phpcpd", + "support": { + "issues": "https://github.com/sebastianbergmann/phpcpd/issues", + "source": "https://github.com/sebastianbergmann/phpcpd/tree/master" + }, "time": "2017-11-16T08:49:28+00:00" }, { @@ -2339,6 +2555,10 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/master" + }, "time": "2016-10-03T07:35:21+00:00" }, { @@ -2390,6 +2610,11 @@ "phpcs", "standards" ], + "support": { + "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", + "source": "https://github.com/squizlabs/PHP_CodeSniffer", + "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + }, "time": "2021-12-12T21:44:58+00:00" }, { @@ -2449,6 +2674,23 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/config/tree/v3.4.47" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], "time": "2020-10-24T10:57:07+00:00" }, { @@ -2516,6 +2758,23 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/console/tree/v3.4.47" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], "time": "2020-10-24T10:57:07+00:00" }, { @@ -2567,6 +2826,23 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/debug/tree/v3.4.47" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], "abandoned": "symfony/error-handler", "time": "2020-10-24T10:57:07+00:00" }, @@ -2634,6 +2910,23 @@ ], "description": "Symfony DependencyInjection Component", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/dependency-injection/tree/v3.4.47" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], "time": "2020-10-24T10:57:07+00:00" }, { @@ -2679,6 +2972,23 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v3.4.47" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], "time": "2020-10-24T10:57:07+00:00" }, { @@ -2723,6 +3033,23 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/v3.4.47" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], "time": "2020-11-16T17:02:08+00:00" }, { @@ -2786,6 +3113,23 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.19.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], "time": "2020-10-23T09:01:57+00:00" }, { @@ -2829,6 +3173,10 @@ ], "description": "The classes contained within this repository extend the standard DOM to use exceptions at all occasions of errors instead of PHP warnings or notices. They also add various custom methods and shortcuts for convenience and to simplify the usage of DOM.", "homepage": "https://github.com/theseer/fDOMDocument", + "support": { + "issues": "https://github.com/theseer/fDOMDocument/issues", + "source": "https://github.com/theseer/fDOMDocument/tree/1.6.7" + }, "abandoned": true, "time": "2022-01-25T23:10:35+00:00" } @@ -2842,5 +3190,5 @@ "php": ">=5.6.40" }, "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.2.0" } From ac1df7691a72d95e33b48e33426ffdb3da03870e Mon Sep 17 00:00:00 2001 From: Paolo Date: Fri, 11 Nov 2022 13:54:25 +0100 Subject: [PATCH 04/66] - Added new view application/views/system/messages/FAShtmlWriteTemplate.php to be used with FAS/SeaMonkey and TinyMCE3 - Replaced TinyMCE V4 with V5 - Dropped TinyMCE V4 - Added new JS public/js/messaging/fasMessageWrite.js to be included by application/views/system/messages/FAShtmlWriteTemplate.php --- .../system/messages/FASMessages.php | 4 +- application/views/person/bpk/bpkDetails.php | 1 - .../system/infocenter/infocenterDetails.php | 2 +- .../infocenter/infocenterZgvDetails.php | 2 +- .../system/messages/FAShtmlWriteTemplate.php | 197 ++++++++++++++++++ .../views/system/messages/ajaxRead.php | 2 +- .../views/system/messages/ajaxWrite.php | 2 +- .../views/system/messages/ajaxWriteReply.php | 2 +- .../views/system/messages/htmlWriteReply.php | 2 +- .../system/messages/htmlWriteTemplate.php | 2 +- .../views/system/vorlage/templatetextEdit.php | 2 +- application/views/templates/FHC-Common.php | 2 +- application/views/templates/FHC-Footer.php | 4 +- application/views/templates/FHC-Header.php | 3 - application/views/templates/header.php | 2 +- application/views/widgets/tinymce.php | 5 +- public/css/{TinyMCE.css => TinyMCE5.css} | 0 public/js/messaging/fasMessageWrite.js | 140 +++++++++++++ public/js/messaging/messageWrite.js | 11 +- public/js/messaging/write.js | 2 +- 20 files changed, 363 insertions(+), 24 deletions(-) create mode 100644 application/views/system/messages/FAShtmlWriteTemplate.php rename public/css/{TinyMCE.css => TinyMCE5.css} (100%) create mode 100644 public/js/messaging/fasMessageWrite.js diff --git a/application/controllers/system/messages/FASMessages.php b/application/controllers/system/messages/FASMessages.php index 55d1da25f..e2169af9b 100644 --- a/application/controllers/system/messages/FASMessages.php +++ b/application/controllers/system/messages/FASMessages.php @@ -37,7 +37,7 @@ class FASMessages extends Auth_Controller // Loads the view to write a new message with a template $this->load->view( - 'system/messages/htmlWriteTemplate', + 'system/messages/FAShtmlWriteTemplate', $this->CLMessagesModel->prepareHtmlWriteTemplatePrestudents($prestudents) ); } @@ -53,7 +53,7 @@ class FASMessages extends Auth_Controller // Loads the view to write a new message with a template $this->load->view( - 'system/messages/htmlWriteTemplate', + 'system/messages/FAShtmlWriteTemplate', $this->CLMessagesModel->prepareHtmlWriteTemplatePrestudents($prestudents, $message_id, $recipient_id) ); } diff --git a/application/views/person/bpk/bpkDetails.php b/application/views/person/bpk/bpkDetails.php index 198065c24..6b7d4430d 100644 --- a/application/views/person/bpk/bpkDetails.php +++ b/application/views/person/bpk/bpkDetails.php @@ -9,7 +9,6 @@ 'jqueryui1' => true, 'ajaxlib' => true, 'tablesorter2' => true, - 'tinymce4' => true, 'sbadmintemplate3' => true, 'addons' => true, 'navigationwidget' => true, diff --git a/application/views/system/infocenter/infocenterDetails.php b/application/views/system/infocenter/infocenterDetails.php index 158feeb2c..15eca90c2 100644 --- a/application/views/system/infocenter/infocenterDetails.php +++ b/application/views/system/infocenter/infocenterDetails.php @@ -8,7 +8,7 @@ 'dialoglib' => true, 'ajaxlib' => true, 'tablesorter2' => true, - 'tinymce4' => true, + 'tinymce5' => true, 'sbadmintemplate3' => true, 'addons' => true, 'navigationwidget' => true, diff --git a/application/views/system/infocenter/infocenterZgvDetails.php b/application/views/system/infocenter/infocenterZgvDetails.php index cf3ffad8b..bf9f69e18 100644 --- a/application/views/system/infocenter/infocenterZgvDetails.php +++ b/application/views/system/infocenter/infocenterZgvDetails.php @@ -10,7 +10,7 @@ 'dialoglib' => true, 'ajaxlib' => true, 'tablesorter2' => true, - 'tinymce4' => true, + 'tinymce5' => true, 'sbadmintemplate3' => true, 'addons' => true, 'navigationwidget' => true, diff --git a/application/views/system/messages/FAShtmlWriteTemplate.php b/application/views/system/messages/FAShtmlWriteTemplate.php new file mode 100644 index 000000000..691629c10 --- /dev/null +++ b/application/views/system/messages/FAShtmlWriteTemplate.php @@ -0,0 +1,197 @@ +load->view( + 'templates/FHC-Header', + array( + 'title' => 'Write a new message or reply using templates', + 'jquery3' => true, + 'jqueryui1' => true, + 'bootstrap3' => true, + 'ajaxlib' => true, + 'fontawesome4' => true, + 'tinymce3' => true, + 'sbadmintemplate3' => true, + 'dialoglib' => true, + 'widgets' => true, + 'customCSSs' => array('public/css/sbadmin2/admintemplate_contentonly.css', 'public/css/messaging/message.css'), + 'customJSs' => array('public/js/bootstrapper.js', 'public/js/messaging/fasMessageWrite.js') + ) + ); +?> + +
+
+
+
+
+ +
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+   +
+ +
+
+
+
+
+
+ + +
+
+
+ + + 19 ? 19 : count($variables); + echo $this->widgetlib->widget( + 'MultipleDropdown_widget', + array('elements' => success($variables)), + array( + 'name' => 'variables[]', + 'id' => 'variables', + 'size' => $size, + 'multiple' => true + ) + ); + ?> +
+
+
+ + + 5 ? 5 : count($user_fields); + echo $this->widgetlib->widget( + 'MultipleDropdown_widget', + array('elements' => success($user_fields)), + array( + 'name' => 'user_fields[]', + 'id' => 'user_fields', + 'size' => $size, + 'multiple' => true + ) + ); + ?> +
+
+
+
+
+
+ + widgetlib->widget( + 'Vorlage_widget', + array('oe_kurzbz' => $organisationUnits, 'isAdmin' => $senderIsAdmin), + array('name' => 'vorlage', 'id' => 'vorlageDnD') + ); + ?> + +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+
+ widgetlib->widget( + 'Dropdown_widget', + array( + 'elements' => success($recipientsArray), + 'emptyElement' => ucfirst($this->p->t('global', 'empfaenger')).'...' + ), + array( + 'name' => 'recipients[]', + 'id' => 'recipients' + ) + ); + ?> + + + p->t('ui', 'refresh')); ?> + + +
+
+
+
+
+ +
+ + + + + +
+
+
+
+ + +load->view("templates/FHC-Footer"); ?> + diff --git a/application/views/system/messages/ajaxRead.php b/application/views/system/messages/ajaxRead.php index 2cb88708e..4c1a77deb 100644 --- a/application/views/system/messages/ajaxRead.php +++ b/application/views/system/messages/ajaxRead.php @@ -12,7 +12,7 @@ 'tabulator4' => true, 'ajaxlib' => true, 'dialoglib' => true, - 'tinymce4' => true, + 'tinymce5' => true, 'phrases' => array('global', 'ui'), 'customCSSs' => array('public/css/sbadmin2/admintemplate_contentonly.css', 'public/css/messaging/message.css'), 'customJSs' => array('public/js/bootstrapper.js', 'public/js/messaging/read.js') diff --git a/application/views/system/messages/ajaxWrite.php b/application/views/system/messages/ajaxWrite.php index 3b1582f22..b3a598506 100644 --- a/application/views/system/messages/ajaxWrite.php +++ b/application/views/system/messages/ajaxWrite.php @@ -10,7 +10,7 @@ 'sbadmintemplate3' => true, 'ajaxlib' => true, 'dialoglib' => true, - 'tinymce4' => true, + 'tinymce5' => true, 'phrases' => array('global', 'ui'), 'customCSSs' => array('public/css/sbadmin2/admintemplate_contentonly.css', 'public/css/messaging/message.css'), 'customJSs' => array('public/js/bootstrapper.js', 'public/js/messaging/write.js') diff --git a/application/views/system/messages/ajaxWriteReply.php b/application/views/system/messages/ajaxWriteReply.php index 0a496c93e..08dc188fa 100644 --- a/application/views/system/messages/ajaxWriteReply.php +++ b/application/views/system/messages/ajaxWriteReply.php @@ -10,7 +10,7 @@ 'sbadmintemplate3' => true, 'ajaxlib' => true, 'dialoglib' => true, - 'tinymce4' => true, + 'tinymce5' => true, 'phrases' => array('global', 'ui'), 'customCSSs' => array('public/css/sbadmin2/admintemplate_contentonly.css', 'public/css/messaging/message.css'), 'customJSs' => array('public/js/bootstrapper.js', 'public/js/messaging/writeReply.js') diff --git a/application/views/system/messages/htmlWriteReply.php b/application/views/system/messages/htmlWriteReply.php index 9106d802b..d2150c1fb 100644 --- a/application/views/system/messages/htmlWriteReply.php +++ b/application/views/system/messages/htmlWriteReply.php @@ -6,7 +6,7 @@ 'jquery3' => true, 'bootstrap3' => true, 'fontawesome4' => true, - 'tinymce4' => true, + 'tinymce5' => true, 'sbadmintemplate3' => true, 'customCSSs' => array('public/css/sbadmin2/admintemplate_contentonly.css', 'public/css/messaging/message.css'), 'customJSs' => array('public/js/bootstrapper.js', 'public/js/messaging/messageWriteReply.js') diff --git a/application/views/system/messages/htmlWriteTemplate.php b/application/views/system/messages/htmlWriteTemplate.php index 761e05f96..42a31f374 100644 --- a/application/views/system/messages/htmlWriteTemplate.php +++ b/application/views/system/messages/htmlWriteTemplate.php @@ -8,7 +8,7 @@ 'bootstrap3' => true, 'ajaxlib' => true, 'fontawesome4' => true, - 'tinymce4' => true, + 'tinymce5' => true, 'sbadmintemplate3' => true, 'dialoglib' => true, 'widgets' => true, diff --git a/application/views/system/vorlage/templatetextEdit.php b/application/views/system/vorlage/templatetextEdit.php index 42efc1519..cc2487959 100644 --- a/application/views/system/vorlage/templatetextEdit.php +++ b/application/views/system/vorlage/templatetextEdit.php @@ -1,5 +1,5 @@ load->view('templates/header', array('title' => 'VorlageEdit', 'tinymce4' => true, 'jsonforms' => true)); + $this->load->view('templates/header', array('title' => 'VorlageEdit', 'tinymce5' => true, 'jsonforms' => true)); ?>
diff --git a/application/views/templates/FHC-Common.php b/application/views/templates/FHC-Common.php index dd1d8ae1c..27282bc11 100644 --- a/application/views/templates/FHC-Common.php +++ b/application/views/templates/FHC-Common.php @@ -23,7 +23,7 @@ $tablesorter2 = isset($tablesorter2) ? $tablesorter2 : false; $tabulator4 = isset($tabulator4) ? $tabulator4 : false; $tabulator5 = isset($tabulator5) ? $tabulator5 : false; - $tinymce4 = isset($tinymce4) ? $tinymce4 : false; + $tinymce3 = isset($tinymce3) ? $tinymce3 : false; $tinymce5 = isset($tinymce5) ? $tinymce5 : false; $vue3 = isset($vue3) ? $vue3 : false; $primevue3 = isset($primevue3) ? $primevue3 : false; diff --git a/application/views/templates/FHC-Footer.php b/application/views/templates/FHC-Footer.php index 0c3782fea..ee13c69d2 100644 --- a/application/views/templates/FHC-Footer.php +++ b/application/views/templates/FHC-Footer.php @@ -100,8 +100,8 @@ // Tabulator 5 JS if ($tabulator5 === true) generateJSsInclude('vendor/olifolkerd/tabulator5/dist/js/tabulator.min.js'); - // Tinymce 4 JS - if ($tinymce4 === true) generateJSsInclude('vendor/tinymce/tinymce4/tinymce.min.js'); + // Tinymce 3 JS + if ($tinymce3 === true) generateJSsInclude('include/tiny_mce/tiny_mce.js'); // Tinymce 5 JS if ($tinymce5 === true) generateJSsInclude('vendor/tinymce/tinymce5/tinymce.min.js'); diff --git a/application/views/templates/FHC-Header.php b/application/views/templates/FHC-Header.php index aa63541c5..47eea34ec 100644 --- a/application/views/templates/FHC-Header.php +++ b/application/views/templates/FHC-Header.php @@ -79,9 +79,6 @@ // Tabulator 5 CSS if ($tabulator5 === true) generateCSSsInclude('vendor/olifolkerd/tabulator5/dist/css/tabulator_bootstrap5.min.css'); - // Tinymce 4 CSS - if ($tinymce4 === true) generateCSSsInclude('public/css/TinyMCE4.css'); - // Tinymce 5 CSS if ($tinymce5 === true) generateCSSsInclude('public/css/TinyMCE5.css'); diff --git a/application/views/templates/header.php b/application/views/templates/header.php index 637eb3c7a..e75acca4f 100644 --- a/application/views/templates/header.php +++ b/application/views/templates/header.php @@ -95,7 +95,7 @@ if($jqueryV1 && $jqueryV2) show_error("Two JQuery versions used: composer and in - + diff --git a/application/views/widgets/tinymce.php b/application/views/widgets/tinymce.php index 3e2093e55..618cb4836 100644 --- a/application/views/widgets/tinymce.php +++ b/application/views/widgets/tinymce.php @@ -5,5 +5,6 @@ plugins: [], toolbar: "" }); - - < name="" style="">> + +< name="" style="">> + diff --git a/public/css/TinyMCE.css b/public/css/TinyMCE5.css similarity index 100% rename from public/css/TinyMCE.css rename to public/css/TinyMCE5.css diff --git a/public/js/messaging/fasMessageWrite.js b/public/js/messaging/fasMessageWrite.js new file mode 100644 index 000000000..d32f80fac --- /dev/null +++ b/public/js/messaging/fasMessageWrite.js @@ -0,0 +1,140 @@ +// ******************************************************** +// JS used by view system/messages/htmlWriteTemplate +// ******************************************************** + +function tinymcePreviewSetContent() +{ + if ($("#tinymcePreview")) + { + if ($("#recipients").children(":selected").val() > -1) + { + parseMessageText($("#recipients").children(":selected").val(), tinyMCE.get("bodyTextArea").getContent()); + } + else + { + tinyMCE.get("tinymcePreview").setContent(""); + } + } +} + +function parseMessageText(receiver_id, text) +{ + FHC_AjaxClient.ajaxCallPost( + "system/messages/Messages/parseMessageText", + { + receiver_id: receiver_id, + text: text, + type: $("#type").val() + }, + { + successCallback: function(data, textStatus, jqXHR) { + + if (FHC_AjaxClient.hasData(data)) + { + tinyMCE.get("tinymcePreview").setContent(FHC_AjaxClient.getData(data)); + } + else if (FHC_AjaxClient.isError(data)) + { + FHC_DialogLib.alertError(data.retval); + } + } + } + ); +} + +$(document).ready(function () +{ + + tinymce.init({ + theme : "advanced", + mode : "textareas" + }); + + if ($("#variables")) + { + $("#variables").dblclick(function () + { + if ($("#bodyTextArea")) + { + //if editor active add at cursor position, otherwise at end + if (tinymce.activeEditor.id === "bodyTextArea") + tinymce.activeEditor.execCommand('mceInsertContent', false, $(this).children(":selected").val()); + else + tinyMCE.get("bodyTextArea").setContent(tinyMCE.get("bodyTextArea").getContent() + $(this).children(":selected").val()); + } + }); + } + + if ($("#user_fields")) + { + $("#user_fields").dblclick(function () + { + if ($("#bodyTextArea")) + { + //if editor active add at cursor position, otherwise at end + if (tinymce.activeEditor.id === "bodyTextArea") + tinymce.activeEditor.execCommand('mceInsertContent', false, $(this).children(":selected").val()); + else + tinyMCE.get("bodyTextArea").setContent(tinyMCE.get("bodyTextArea").getContent() + $(this).children(":selected").val()); + } + }); + } + + if ($("#recipients")) + { + $("#recipients").change(tinymcePreviewSetContent); + } + + if ($("#refresh")) + { + $("#refresh").click(tinymcePreviewSetContent); + } + + if ($("#sendButton") && $("#sendForm")) + { + $("#sendButton").click(function () + { + if ($("#subject") && $("#subject").val() != '' && tinyMCE.get("bodyTextArea").getContent() != '') + { + $("#sendForm").submit(); + } + else + { + FHC_DialogLib.alertInfo("Subject and text are required fields!"); + } + }); + } + + if ($("#vorlageDnD")) + { + $("#vorlageDnD").change(function () + { + var vorlage_kurzbz = this.value; + + if (vorlage_kurzbz != '') + { + FHC_AjaxClient.ajaxCallGet( + "system/messages/Messages/getVorlage", + { + vorlage_kurzbz: vorlage_kurzbz + }, + { + successCallback: function(data, textStatus, jqXHR) { + + if (FHC_AjaxClient.hasData(data)) + { + var msg = FHC_AjaxClient.getData(data); + + tinyMCE.get("bodyTextArea").setContent(msg[0].text); + $("#subject").val(msg[0].subject); + } + } + } + ); + } + }); + } + + $("#subject").focus(); + +}); diff --git a/public/js/messaging/messageWrite.js b/public/js/messaging/messageWrite.js index 8b1d73bdf..382e79948 100644 --- a/public/js/messaging/messageWrite.js +++ b/public/js/messaging/messageWrite.js @@ -42,8 +42,8 @@ function parseMessageText(receiver_id, text) ); } -$(document).ready(function () -{ +$(document).ready(function () { + tinymce.init({ selector: "#bodyTextArea", plugins: "autoresize", @@ -60,7 +60,12 @@ $(document).ready(function () menubar: false, toolbar: false, statusbar: false, - readonly: 1 + readonly: 1, + autoresize_on_init: false, + autoresize_min_height: 400, + autoresize_max_height: 700, + autoresize_bottom_margin: 10, + auto_focus: "bodyTextArea" }); if ($("#variables")) diff --git a/public/js/messaging/write.js b/public/js/messaging/write.js index 1370fb2e0..bff451c2e 100644 --- a/public/js/messaging/write.js +++ b/public/js/messaging/write.js @@ -63,7 +63,7 @@ $(document).ready(function () { tinymce.init({ selector: "#body", plugins: "autoresize", - autoresize_min_height: 150, + autoresize_min_height: 300, autoresize_max_height: 600, autoresize_bottom_margin: 10 }); From 25313a8f527cd7d8964cab01fbb8f5a75298a551 Mon Sep 17 00:00:00 2001 From: Paolo Date: Thu, 23 Mar 2023 14:34:37 +0100 Subject: [PATCH 05/66] Code quality check fixes --- application/views/person/bpk/bpkDetails.php | 12 ++++++++++-- .../views/system/infocenter/infocenterZgvDetails.php | 6 +++++- application/views/templates/FHC-Footer.php | 2 +- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/application/views/person/bpk/bpkDetails.php b/application/views/person/bpk/bpkDetails.php index 6b7d4430d..bd6191c6a 100644 --- a/application/views/person/bpk/bpkDetails.php +++ b/application/views/person/bpk/bpkDetails.php @@ -125,10 +125,18 @@
-
+ - +
diff --git a/application/views/system/infocenter/infocenterZgvDetails.php b/application/views/system/infocenter/infocenterZgvDetails.php index bf9f69e18..3a254b16a 100644 --- a/application/views/system/infocenter/infocenterZgvDetails.php +++ b/application/views/system/infocenter/infocenterZgvDetails.php @@ -130,7 +130,11 @@ p->t('infocenter', 'zgvNichtErfuellt') ?> - diff --git a/application/views/templates/FHC-Footer.php b/application/views/templates/FHC-Footer.php index ee13c69d2..a9a44b978 100644 --- a/application/views/templates/FHC-Footer.php +++ b/application/views/templates/FHC-Footer.php @@ -107,7 +107,7 @@ if ($tinymce5 === true) generateJSsInclude('vendor/tinymce/tinymce5/tinymce.min.js'); // Vue 3 JS - if ($vue3 === true) + if ($vue3 === true) { generateJSsInclude('vendor/vuejs/vuejs3/vue.global.prod.js'); generateJSsInclude('vendor/vuejs/vuerouter4/vue-router.global.js'); From f6f2defc8c6fa9587dbbc1680bae95965d5595e1 Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Tue, 23 May 2023 18:48:18 +0200 Subject: [PATCH 06/66] Bismeldestichtag: added table --- system/dbupdate_3.4.php | 2 + ...student_status_nach_bismeldung_sperren.php | 39 +++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 system/dbupdate_3.4/29144_prestudent_status_nach_bismeldung_sperren.php diff --git a/system/dbupdate_3.4.php b/system/dbupdate_3.4.php index 679c21b87..01dd9ea8f 100644 --- a/system/dbupdate_3.4.php +++ b/system/dbupdate_3.4.php @@ -37,6 +37,7 @@ require_once('dbupdate_3.4/10001_tempus_mitarbeiter_kurzbz_bei_reservierungen_an require_once('dbupdate_3.4/27949_infocenter_zurueckstellen_mit_grund.php'); require_once('dbupdate_3.4/27107_vilesci_erfassung_abwesenheiten_reinigung.php'); require_once('dbupdate_3.4/24913_tabelle_raumtyp_neues_attribut_aktiv.php'); +require_once('dbupdate_3.4/29144_prestudent_status_nach_bismeldung_sperren.php'); // *** Pruefung und hinzufuegen der neuen Attribute und Tabellen echo '

Pruefe Tabellen und Attribute!

'; @@ -55,6 +56,7 @@ $tabellen=array( "bis.tbl_bisfunktion" => array("bisverwendung_id","studiengang_kz","sws","updateamum","updatevon","insertamum","insertvon","ext_id"), "bis.tbl_bisio" => array("bisio_id","mobilitaetsprogramm_code","nation_code","von","bis","zweck_code","student_uid","updateamum","updatevon","insertamum","insertvon","ext_id","ort","universitaet","lehreinheit_id","ects_erworben","ects_angerechnet","herkunftsland_code"), "bis.tbl_bisio_zweck" => array("bisio_id","zweck_code"), + "bis.tbl_bismeldestichtag" => array("studiensemester_kurzbz","meldestichtag"), "bis.tbl_bisstandort" => array("standort_code","bezeichnung","aktiv","insertamum","insertvon","updateamum","updatevon"), "bis.tbl_bisverwendung" => array("bisverwendung_id","ba1code","ba2code","vertragsstunden","beschausmasscode","verwendung_code","mitarbeiter_uid","hauptberufcode","hauptberuflich","habilitation","beginn","ende","updateamum","updatevon","insertamum","insertvon","ext_id","dv_art","inkludierte_lehre","zeitaufzeichnungspflichtig","azgrelevant", "homeoffice"), "bis.tbl_bundesland" => array("bundesland_code","kurzbz","bezeichnung"), diff --git a/system/dbupdate_3.4/29144_prestudent_status_nach_bismeldung_sperren.php b/system/dbupdate_3.4/29144_prestudent_status_nach_bismeldung_sperren.php new file mode 100644 index 000000000..0d5819c49 --- /dev/null +++ b/system/dbupdate_3.4/29144_prestudent_status_nach_bismeldung_sperren.php @@ -0,0 +1,39 @@ +db_query('SELECT 1 FROM bis.tbl_bismeldestichtag LIMIT 1')) +{ + $qry = 'CREATE TABLE bis.tbl_bismeldestichtag ( + studiensemester_kurzbz varchar(16), + meldestichtag date NOT NULL, + insertamum timestamp DEFAULT NOW(), + insertvon varchar(32), + updateamum timestamp, + updatevon varchar(32) + ); + + COMMENT ON TABLE bis.tbl_bismeldestichtag IS \'Deadline Dates for BIS reporting\'; + + ALTER TABLE bis.tbl_bismeldestichtag ADD CONSTRAINT pk_bismeldestichtag PRIMARY KEY (studiensemester_kurzbz); + + ALTER TABLE bis.tbl_bismeldestichtag ADD CONSTRAINT fk_bismeldestichtag_studiensemester_kurzbz FOREIGN KEY (studiensemester_kurzbz) REFERENCES public.tbl_studiensemester(studiensemester_kurzbz) ON UPDATE CASCADE ON DELETE RESTRICT;'; + + if (!$db->db_query($qry)) + echo 'bis.tbl_bismeldestichtag: '.$db->db_last_error().'
'; + else + echo '
bis.tbl_bismeldestichtag table created'; + + $qry = 'GRANT SELECT, UPDATE, INSERT, DELETE ON TABLE bis.tbl_bismeldestichtag TO web;'; + if (!$db->db_query($qry)) + echo 'bis.tbl_bismeldestichtag: '.$db->db_last_error().'
'; + else + echo '
Granted privileges to web on bis.tbl_bismeldestichtag'; + + $qry = 'GRANT SELECT, UPDATE, INSERT, DELETE ON TABLE bis.tbl_bismeldestichtag TO vilesci;'; + if (!$db->db_query($qry)) + echo 'bis.tbl_bismeldestichtag: '.$db->db_last_error().'
'; + else + echo '
Granted privileges to vilesci on bis.tbl_bismeldestichtag'; +} From 0a179c963f6a77af978432baaf2f432e50cf4e2a Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Thu, 25 May 2023 16:35:44 +0200 Subject: [PATCH 07/66] bismeldestichtag: added meldestichtag_id to table, created bismeldestichtag class, improved comment for prestudentstatuschecks in studentDBML --- content/student/studentDBDML.php | 7 +- include/bismeldestichtag.class.php | 144 ++++++++++++++++++ system/dbupdate_3.4.php | 2 +- ...student_status_nach_bismeldung_sperren.php | 25 ++- 4 files changed, 172 insertions(+), 6 deletions(-) create mode 100644 include/bismeldestichtag.class.php diff --git a/content/student/studentDBDML.php b/content/student/studentDBDML.php index 2d5c9e0b8..c5818ebb3 100644 --- a/content/student/studentDBDML.php +++ b/content/student/studentDBDML.php @@ -74,6 +74,7 @@ require_once('../../include/reihungstest.class.php'); require_once('../../include/studienplan.class.php'); require_once('../../include/mobilitaet.class.php'); require_once('../../include/studienordnung.class.php'); +require_once('../../include/bismeldestichtag.class.php'); $user = get_uid(); $db = new basis_db(); @@ -383,7 +384,7 @@ function isBuchungAllowedToChange($buchung_obj) * @param $new_status_ausbildungssemester Ausbildungssemester des neuen/zu ändernen Status * @param $old_status_studiensemester Studiensemester des alten Status, leer wenn neuer Status * @param $old_status_ausbildungssemester Ausbildungssemester des alten Status, leer wenn neuer Status - * @return array + * @return array mit error = true und Fehlerbeschreibung wenn ungültig, andernfalls error = false */ function checkStatusaenderung( $prestudent_id, $status_kurzbz, $new_status_studiensemester, $new_status_datum, $new_status_ausbildungssemester, @@ -417,7 +418,7 @@ function checkStatusaenderung( $studiensemester->load($new_status_studiensemester); $new_status_semesterstart = new DateTime($studiensemester->start); - // Alle bisherigen prestudentstatus nach Datum sortiert + // Alle prestudentstatus nach Datum sortiert $qry = "SELECT status_kurzbz, studiensemester_kurzbz, ausbildungssemester, datum, sem.start AS studiensemester_start FROM public.tbl_prestudentstatus pss JOIN public.tbl_studiensemester sem USING (studiensemester_kurzbz) @@ -464,7 +465,7 @@ function checkStatusaenderung( // Gültige Zeitabfolge, bestehenden Status hinzufügen $statusArr[] = $row; } - // oder Neuer/editierter Statuseintrag nach bestehendem Statuseintrag + // oder Neuer/editierter Statuseintrag vor bestehendem Statuseintrag elseif ($new_status_datum <= $status_datum && $new_status_semesterstart <= $studiensemester_start) { // Gültige Zeitabfolge, bestehenden Status hinzufügen diff --git a/include/bismeldestichtag.class.php b/include/bismeldestichtag.class.php new file mode 100644 index 000000000..e4b3746a6 --- /dev/null +++ b/include/bismeldestichtag.class.php @@ -0,0 +1,144 @@ +, + */ +require_once(dirname(__FILE__).'/basis_db.class.php'); + +class bismeldestichtag extends basis_db +{ + //Tabellenspalten + public $meldestichtag_id; // integer + public $meldestichtag; // date + public $studiensemester_kurzbz; // varchar(16) + public $insertamum; // timestamp + public $insertvon; // varchar(16) + public $updateamum; // timestamp + public $updatevon; // varchar(16) + + // ErgebnisArray + public $result=array(); + + /** + * Konstruktor - Uebergibt die Connection und laedt optional einen Meldestichtag + * @param $meldestichtag_id Stichtag der geladen werden soll (default=null) + */ + public function __construct($meldestichtag_id=null) + { + parent::__construct(); + + if(!is_null($meldestichtag_id)) + $this->load($meldestichtag_id); + } + + /** + * Laedt Meldestichtag mit der uebergebenen ID + * @param $meldestichtag_id ID des Stichtags der geladen werden soll + */ + public function load($meldestichtag_id) + { + $qry = "SELECT * FROM bis.tbl_meldestichtag WHERE meldestichtag_id=".$this->db_add_param($meldestichtag_id, FHC_INTEGER); + + if($this->db_query($qry)) + { + if($row = $this->db_fetch_object()) + { + $this->meldestichtag_id = $row->meldestichtag_id; + $this->meldestichtag = $row->meldestichtag; + $this->studiensemester_kurzbz = $row->studiensemester_kurzbz; + $this->insertamum = $row->insertamum; + $this->insertvon = $row->insertvon; + $this->updateamum = $row->updateamum; + $this->updatevon = $row->updatevon; + return true; + } + else + { + $this->errormsg = 'Kein Eintrag gefunden'; + return false; + } + } + else + { + $this->errormsg = "Fehler beim Laden des Stichtags"; + return false; + } + } + + /** + * Prueft die Variablen vor dem Speichern + * auf Gueltigkeit. + * @return true wenn ok, false im Fehlerfall + */ + protected function validate() + { + return true; + } + + /** + * Liefert die Antwort eines Pruefling zu einer Frage + * + * @param $pruefling_id + * @param $frage_id + * @return boolean + */ + public function getLastMeldestichtag($studiensemester_kurzbz = null) + { + $qry = "SELECT + meldestichtag, studiensemester_kurzbz + FROM + bis.tbl_meldestichtag"; + + if (isset($studiensemester_kurzbz)) + { + $qry .= " + WHERE + studiensemester_kurzbz=".$this->db_add_param($studiensemester_kurzbz); + } + + $qry .= " + ORDER BY + meldestichtag DESC + LIMIT 1;" + + if($this->db_query($qry)) + { + while($row = $this->db_fetch_object()) + { + $obj = new antwort(); + + $obj->meldestichtag_id = $row->meldestichtag_id; + $obj->meldestichtag = $row->meldestichtag; + $obj->studiensemester_kurzbz = $row->studiensemester_kurzbz; + $obj->insertamum = $row->insertamum; + $obj->insertvon = $row->insertvon; + $obj->updateamum = $row->updateamum; + $obj->updatevon = $row->updatevon; + + $this->result[] = $obj; + } + + return true; + } + else + { + $this->errormsg = 'Meldestichtag konnte nicht geladen werden'; + return false; + } + } +} +?> diff --git a/system/dbupdate_3.4.php b/system/dbupdate_3.4.php index 01dd9ea8f..f9920900b 100644 --- a/system/dbupdate_3.4.php +++ b/system/dbupdate_3.4.php @@ -56,7 +56,7 @@ $tabellen=array( "bis.tbl_bisfunktion" => array("bisverwendung_id","studiengang_kz","sws","updateamum","updatevon","insertamum","insertvon","ext_id"), "bis.tbl_bisio" => array("bisio_id","mobilitaetsprogramm_code","nation_code","von","bis","zweck_code","student_uid","updateamum","updatevon","insertamum","insertvon","ext_id","ort","universitaet","lehreinheit_id","ects_erworben","ects_angerechnet","herkunftsland_code"), "bis.tbl_bisio_zweck" => array("bisio_id","zweck_code"), - "bis.tbl_bismeldestichtag" => array("studiensemester_kurzbz","meldestichtag"), + "bis.tbl_bismeldestichtag" => array("meldestichtag_id", "meldestichtag", "studiensemester_kurzbz"), "bis.tbl_bisstandort" => array("standort_code","bezeichnung","aktiv","insertamum","insertvon","updateamum","updatevon"), "bis.tbl_bisverwendung" => array("bisverwendung_id","ba1code","ba2code","vertragsstunden","beschausmasscode","verwendung_code","mitarbeiter_uid","hauptberufcode","hauptberuflich","habilitation","beginn","ende","updateamum","updatevon","insertamum","insertvon","ext_id","dv_art","inkludierte_lehre","zeitaufzeichnungspflichtig","azgrelevant", "homeoffice"), "bis.tbl_bundesland" => array("bundesland_code","kurzbz","bezeichnung"), diff --git a/system/dbupdate_3.4/29144_prestudent_status_nach_bismeldung_sperren.php b/system/dbupdate_3.4/29144_prestudent_status_nach_bismeldung_sperren.php index 0d5819c49..b3e2eed7c 100644 --- a/system/dbupdate_3.4/29144_prestudent_status_nach_bismeldung_sperren.php +++ b/system/dbupdate_3.4/29144_prestudent_status_nach_bismeldung_sperren.php @@ -6,8 +6,9 @@ if (! defined('DB_NAME')) exit('No direct script access allowed'); if (!$result = @$db->db_query('SELECT 1 FROM bis.tbl_bismeldestichtag LIMIT 1')) { $qry = 'CREATE TABLE bis.tbl_bismeldestichtag ( - studiensemester_kurzbz varchar(16), + meldestichtag_id integer, meldestichtag date NOT NULL, + studiensemester_kurzbz varchar(16) NOT NULL, insertamum timestamp DEFAULT NOW(), insertvon varchar(32), updateamum timestamp, @@ -16,7 +17,15 @@ if (!$result = @$db->db_query('SELECT 1 FROM bis.tbl_bismeldestichtag LIMIT 1')) COMMENT ON TABLE bis.tbl_bismeldestichtag IS \'Deadline Dates for BIS reporting\'; - ALTER TABLE bis.tbl_bismeldestichtag ADD CONSTRAINT pk_bismeldestichtag PRIMARY KEY (studiensemester_kurzbz); + ALTER TABLE bis.tbl_bismeldestichtag ADD CONSTRAINT pk_bismeldestichtag PRIMARY KEY (meldestichtag_id); + + CREATE SEQUENCE bis.tbl_meldestichtag_meldestichtag_id_seq + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; + + ALTER TABLE bis.tbl_bismeldestichtag ALTER COLUMN meldestichtag_id SET DEFAULT nextval(\'tbl_meldestichtag_meldestichtag_id_seq\'); ALTER TABLE bis.tbl_bismeldestichtag ADD CONSTRAINT fk_bismeldestichtag_studiensemester_kurzbz FOREIGN KEY (studiensemester_kurzbz) REFERENCES public.tbl_studiensemester(studiensemester_kurzbz) ON UPDATE CASCADE ON DELETE RESTRICT;'; @@ -36,4 +45,16 @@ if (!$result = @$db->db_query('SELECT 1 FROM bis.tbl_bismeldestichtag LIMIT 1')) echo 'bis.tbl_bismeldestichtag: '.$db->db_last_error().'
'; else echo '
Granted privileges to vilesci on bis.tbl_bismeldestichtag'; + + $qry = 'GRANT SELECT, UPDATE ON SEQUENCE bis.tbl_meldestichtag_meldestichtag_id_seq TO web;'; + if (!$db->db_query($qry)) + echo 'bis.tbl_meldestichtag_meldestichtag_id_seq: '.$db->db_last_error().'
'; + else + echo '
Granted privileges to web on bis.tbl_meldestichtag_meldestichtag_id_seq'; + + $qry = 'GRANT SELECT, UPDATE ON SEQUENCE bis.tbl_meldestichtag_meldestichtag_id_seq TO vilesci;'; + if (!$db->db_query($qry)) + echo 'bis.tbl_meldestichtag_meldestichtag_id_seq: '.$db->db_last_error().'
'; + else + echo '
Granted privileges to vilesci on bis.tbl_meldestichtag_meldestichtag_id_seq'; } From 42197c39ed188cb2f6b74972b9d627e83b2c3899 Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Sat, 3 Jun 2023 15:18:06 +0200 Subject: [PATCH 08/66] FAS prestudents status: check is Meldestichtag is reached and disable input if it is, bismeldestichtag table: added sequence primary key --- content/student/studentDBDML.php | 38 +++++++++++++++- content/student/studentoverlay.js.php | 8 +++- content/student/studentrolledialog.xul.php | 30 ++++++++----- include/bismeldestichtag.class.php | 45 ++++++++++++++++--- ...student_status_nach_bismeldung_sperren.php | 9 ++-- 5 files changed, 104 insertions(+), 26 deletions(-) diff --git a/content/student/studentDBDML.php b/content/student/studentDBDML.php index c5818ebb3..b08d977e8 100644 --- a/content/student/studentDBDML.php +++ b/content/student/studentDBDML.php @@ -995,6 +995,18 @@ if(!$error) { $new_status_datum = isset($_POST['datum']) ? $_POST['datum'] : date('Y-m-d'); + $bismeldestichtag = new bismeldestichtag(); + + $meldestichtag_erreicht = $bismeldestichtag->checkMeldestichtagErreicht($studiensemester, $new_status_datum); + + if ($meldestichtag_erreicht === true) + { + $return = false; + $error = true; + $errormsg .= 'Studentstatus mit Datum oder Semesterende vor erreichtem Meldestichtag können nicht hinzugefügt werden.'; + $anzahl_fehler++; + } + $check_statusaenderung_result = checkStatusaenderung( $prestudent_id, $_POST['status_kurzbz'], @@ -1205,13 +1217,24 @@ if(!$error) if(isset($_POST['studiensemester_kurzbz']) && isset($_POST['status_kurzbz']) && isset($_POST['prestudent_id']) && is_numeric($_POST['prestudent_id']) && - isset($_POST['ausbildungssemester']) && is_numeric($_POST['ausbildungssemester'])) + isset($_POST['ausbildungssemester']) && is_numeric($_POST['ausbildungssemester']) && + isset($_POST['datum'])) { - if($_POST['status_kurzbz']=='Student' && !$rechte->isBerechtigt('admin', null, 'suid') && !$rechte->isBerechtigt('student/keine_studstatuspruefung', null, 'suid')) + $erweiterteBerechtigungen = $rechte->isBerechtigt('admin', null, 'suid') || $rechte->isBerechtigt('student/keine_studstatuspruefung', null, 'suid'); + + $bismeldestichtag = new bismeldestichtag(); + $meldestichtag_erreicht = $bismeldestichtag->checkMeldestichtagErreicht($_POST['studiensemester_kurzbz'], $_POST['datum']); + + if($_POST['status_kurzbz']=='Student' && !$erweiterteBerechtigungen) { $return = false; $errormsg = 'Studentenrolle kann nur durch den Administrator geloescht werden'; } + elseif ($meldestichtag_erreicht && !$erweiterteBerechtigungen) + { + $return = false; + $errormsg = 'Studentstatus mit Datum oder Semesterende vor erreichtem Meldestichtag können nicht gelöscht werden.'; + } else { $qry = "SELECT count(*) as anzahl FROM public.tbl_prestudentstatus WHERE prestudent_id=".$db->db_add_param($_POST['prestudent_id'], FHC_INTEGER); @@ -1531,6 +1554,17 @@ if(!$error) $error = true; $errormsg = isset($check_statusaenderung_result['errormsg']) ? $check_statusaenderung_result['errormsg'] : ''; } + + // Prüfung, ob Meldestichtag erreicht ist + $bismeldestichtag = new bismeldestichtag(); + $meldestichtag_erreicht = $bismeldestichtag->checkMeldestichtagErreicht($_POST['studiensemester_kurzbz'], $_POST['datum']); + + if ($meldestichtag_erreicht === true) + { + $return = false; + $error = true; + $errormsg = 'Studentstatus mit Datum oder Semesterende vor erreichtem Meldestichtag können nicht hinzugefügt werden.'; + } } if(!$error) diff --git a/content/student/studentoverlay.js.php b/content/student/studentoverlay.js.php index d9686d5e3..f2dffc041 100644 --- a/content/student/studentoverlay.js.php +++ b/content/student/studentoverlay.js.php @@ -2000,6 +2000,7 @@ function StudentPrestudentRolleDelete() var studiensemester_kurzbz = getTreeCellText(tree, 'student-prestudent-tree-rolle-studiensemester_kurzbz', tree.currentIndex); var prestudent_id = getTreeCellText(tree, 'student-prestudent-tree-rolle-prestudent_id', tree.currentIndex); var ausbildungssemester = getTreeCellText(tree, 'student-prestudent-tree-rolle-ausbildungssemester', tree.currentIndex); + var datum = getTreeCellText(tree, 'student-prestudent-tree-rolle-datum', tree.currentIndex); studiengang_kz = document.getElementById('student-prestudent-menulist-studiengang_kz').value; if(confirm('Diese Rolle wirklich loeschen?')) @@ -2028,6 +2029,7 @@ function StudentPrestudentRolleDelete() req.add('studiensemester_kurzbz', studiensemester_kurzbz); req.add('ausbildungssemester', ausbildungssemester); req.add('studiengang_kz', studiengang_kz); + req.add('datum', datum); var response = req.executePOST(); @@ -2059,6 +2061,7 @@ function StudentPrestudentRolleDelete() req.add('studiensemester_kurzbz', studiensemester_kurzbz); req.add('ausbildungssemester', ausbildungssemester); req.add('studiengang_kz', studiengang_kz); + req.add('datum', datum); var response = req.executePOST(); @@ -2151,8 +2154,9 @@ function StudentRolleBearbeiten() var studiensemester_kurzbz = getTreeCellText(tree, 'student-prestudent-tree-rolle-studiensemester_kurzbz', tree.currentIndex); var prestudent_id = getTreeCellText(tree, 'student-prestudent-tree-rolle-prestudent_id', tree.currentIndex); var ausbildungssemester = getTreeCellText(tree, 'student-prestudent-tree-rolle-ausbildungssemester', tree.currentIndex); + var datum = getTreeCellText(tree, 'student-prestudent-tree-rolle-datum', tree.currentIndex); - window.open('content/student/studentrolledialog.xul.php?prestudent_id='+prestudent_id+'&status_kurzbz='+status_kurzbz+'&studiensemester_kurzbz='+studiensemester_kurzbz+'&ausbildungssemester='+ausbildungssemester,"Status","status=no, width=500, height=450, centerscreen, resizable"); + window.open('content/student/studentrolledialog.xul.php?prestudent_id='+prestudent_id+'&status_kurzbz='+status_kurzbz+'&studiensemester_kurzbz='+studiensemester_kurzbz+'&ausbildungssemester='+ausbildungssemester+'&datum='+datum,"Status","status=no, width=500, height=450, centerscreen, resizable"); } // **** @@ -2210,7 +2214,7 @@ function StudentRolleSpeichern(dialog, studiensemester_old, ausbildungssemester_ timepart_arr[i] = '00'; } } - + arr = datepart.split('.'); if(arr[0].length==1) diff --git a/content/student/studentrolledialog.xul.php b/content/student/studentrolledialog.xul.php index ef2c0919a..37ec0e983 100644 --- a/content/student/studentrolledialog.xul.php +++ b/content/student/studentrolledialog.xul.php @@ -31,6 +31,7 @@ require_once('../../include/person.class.php'); require_once('../../include/prestudent.class.php'); require_once('../../include/studienplan.class.php'); require_once('../../include/benutzerberechtigung.class.php'); +require_once('../../include/bismeldestichtag.class.php'); echo ''."\n"; @@ -58,6 +59,11 @@ if(isset($_GET['ausbildungssemester'])) else $ausbildungssemester=''; +if(isset($_GET['datum'])) + $datum=$_GET['datum']; +else + $datum=''; + $vorname = ''; $nachname = ''; if($prestudent_id!='') @@ -67,6 +73,10 @@ if($prestudent_id!='') $vorname = $prestudent->vorname; $nachname = $prestudent->nachname; + + // Prüfen, ob Studnetrolle vor dem aktuellen Meldestichtag ist. In diesem Fall darf die Rolle nicht mehr bearbeitet werden. + $bismeldestichtag = new bismeldestichtag(); + $disabled = $bismeldestichtag->checkMeldestichtagErreicht($studiensemester_kurzbz, $datum) ? ' disabled="true"' : ''; } $db = new basis_db(); $user=get_uid(); @@ -112,7 +122,7 @@ $user=get_uid();