From ab59c265d46a2373f6a54abd62924b2ae9b5195c Mon Sep 17 00:00:00 2001 From: Paolo Date: Mon, 4 Oct 2021 14:05:10 +0200 Subject: [PATCH 001/646] First commit --- include/Docsbox.php | 112 ++++++++++++++++++++++++++++++ include/dokument_export.class.php | 71 +++++++++---------- 2 files changed, 148 insertions(+), 35 deletions(-) create mode 100644 include/Docsbox.php diff --git a/include/Docsbox.php b/include/Docsbox.php new file mode 100644 index 000000000..08b04f71b --- /dev/null +++ b/include/Docsbox.php @@ -0,0 +1,112 @@ +attach(array('file' => $inputFileName)) + ->expectsJson() + ->send(); + + var_dump($response);exit; + } + catch(\Httpful\Exception\ConnectionErrorException $cee) + { + // Error + } + catch (Exception $e) + { + // Error + } + + if (is_object($response) && isset($response->id) && isset($response->status)) + { + $status = null; + $result_url = null; + + while ($status == null) + { + try + { + $response = \Httpful\Request::get('http://docconverter.technikum-wien.at/api/v1/'.$response->id) + ->expectsJson() + ->send(); + + var_dump($response); + } + catch(\Httpful\Exception\ConnectionErrorException $cee) + { + // Error + } + catch (Exception $e) + { + // Error + } + + if (is_object($response) && isset($response->id) && isset($response->status)) + { + if ($response->status == 'finished' && isset($response->result_url)) + { + $status = $response->status; + $result_url = $response->result_url; + } + else + { + // Error + } + } + else + { + // Error + } + } + + try + { + $response = \Httpful\Request::get($result_url)->send(); + + var_dump($response); + } + catch(\Httpful\Exception\ConnectionErrorException $cee) + { + // Error + } + catch (Exception $e) + { + // Error + } + + var_dump($response);exit; + } + else + { + // Error + } + } +} + diff --git a/include/dokument_export.class.php b/include/dokument_export.class.php index 4f23a7dcd..30af55ac6 100644 --- a/include/dokument_export.class.php +++ b/include/dokument_export.class.php @@ -37,7 +37,6 @@ class dokument_export private $images=array(); private $sourceDir; public $errormsg; - private $unoconv_version; private $sign; private $sign_user; private $sign_profile; @@ -50,18 +49,6 @@ class dokument_export if(!isset($vorlage)) return; - exec('unoconv --version',$ret_arr); - if(isset($ret_arr[0])) - { - $hlp = explode(' ',$ret_arr[0]); - if(isset($hlp[1])) - $this->unoconv_version = $hlp[1]; - else - die('Could not get Unoconv Version'); - } - else - die('Unoconv not found'); - //Vorlage aus der Datenbank holen $this->vorlage = new vorlage(); if(!$this->vorlage->getAktuelleVorlage($oe_kurzbz, $vorlage, $version)) @@ -281,20 +268,27 @@ class dokument_export // Unoconv Version 0.6 hat eine Bug wodurch die Berechtigungen des PDF/Doc nicht korrekt gesetzt // werden. Deshalb wird dies hier speziell behandelt. // Die 2. Variante hat den Vorteil dass hier eine bessere Fehlerbehandlung moeglich ist - if($this->unoconv_version=='0.6') - $command = 'unoconv -e IsSkipEmptyPages=false -f ' . $this->outputformat . ' %2$s > %1$s'; - else - $command = 'unoconv -e IsSkipEmptyPages=false -f ' . $this->outputformat . ' --output %s %s 2>&1'; + //if($this->unoconv_version=='0.6') + // $command = 'unoconv -e IsSkipEmptyPages=false -f ' . $this->outputformat . ' %2$s > %1$s'; + //else + // $command = 'unoconv -e IsSkipEmptyPages=false -f ' . $this->outputformat . ' --output %s %s 2>&1'; - $command = sprintf($command, $this->temp_filename, $tempname_zip); + //$command = sprintf($command, $this->temp_filename, $tempname_zip); - exec($command, $out, $ret); + //exec($command, $out, $ret); - if($ret!=0) - { - $this->errormsg = 'Dokumentenkonvertierung ist derzeit nicht möglich. Bitte versuchen Sie es in einer Minute erneut oder kontaktieren Sie einen Administrator'; - return false; - } + require_once('Docsbox.php'); + + var_dump($tempname_zip); + var_dump($this->temp_filename); + + Docsbox::convert($tempname_zip, $this->temp_filename); + + //if($ret!=0) + //{ + // $this->errormsg = 'Dokumentenkonvertierung ist derzeit nicht möglich. Bitte versuchen Sie es in einer Minute erneut oder kontaktieren Sie einen Administrator'; + // return false; + //} break; case 'odt': default: @@ -455,19 +449,26 @@ class dokument_export */ public function convert($inFile, $outFile, $format = "pdf") { - if($this->unoconv_version=='0.6') - $command = 'unoconv -f %1$s %3$s > %2$s'; - else - $command = 'unoconv -f %s --output %s %s 2>&1'; - $command = sprintf($command, $format, $outFile, $inFile); + //require_once('Docsbox.php'); - exec($command, $out, $ret); + //var_dump($inFile); + //var_dump($outFile); - if($ret!=0) - { - $this->errormsg = 'Dokumentenkonvertierung ist derzeit nicht möglich. Bitte versuchen Sie es in einer Minute erneut oder kontaktieren Sie einen Administrator'; - return false; - } + //Docsbox::convert(); + + //if($this->unoconv_version=='0.6') + // $command = 'unoconv -f %1$s %3$s > %2$s'; + //else + // $command = 'unoconv -f %s --output %s %s 2>&1'; + //$command = sprintf($command, $format, $outFile, $inFile); + + //exec($command, $out, $ret); + + //if($ret!=0) + //{ + // $this->errormsg = 'Dokumentenkonvertierung ist derzeit nicht möglich. Bitte versuchen Sie es in einer Minute erneut oder kontaktieren Sie einen Administrator'; + // return false; + //} return true; } From 2fb4be0e5548b662085b56a4eedbfc0d5622d153 Mon Sep 17 00:00:00 2001 From: Paolo Date: Thu, 14 Oct 2021 11:34:27 +0200 Subject: [PATCH 002/646] - Added new config entry DOCSBOX_ENABLED to config/global.config-default.inc.php - Added new library application/libraries/DocsboxLib.php to manage document conversion using docsbox - Added new config file application/config/docsbox.php - Integrated DocsboxLib into include/dokument_export.class.php --- application/config/docsbox.php | 7 + application/libraries/DocsboxLib.php | 297 +++++++++++++++++++++++++++ config/global.config-default.inc.php | 3 + include/Docsbox.php | 112 ---------- include/dokument_export.class.php | 101 +++++---- 5 files changed, 372 insertions(+), 148 deletions(-) create mode 100644 application/config/docsbox.php create mode 100644 application/libraries/DocsboxLib.php delete mode 100644 include/Docsbox.php diff --git a/application/config/docsbox.php b/application/config/docsbox.php new file mode 100644 index 000000000..ca64698f9 --- /dev/null +++ b/application/config/docsbox.php @@ -0,0 +1,7 @@ +attach(array('file' => $inputFileName)) + ->expectsJson() + ->send(); + + // Checks that: + // - the response is not empty + // - the reponse body has the property id + // - the property id is a valid string + // - the reponse body has the property status + // - docsbox queued the conversion of the posted file + if (is_object($postFileResponse) + && isset($postFileResponse->body) + && isset($postFileResponse->body->id) + && $postFileResponse->body->id != '' && $postFileResponse->body->id != null + && isset($postFileResponse->body->status) + && $postFileResponse->body->status == self::STATUS_QUEUED) + { + $queueId = $postFileResponse->body->id; + } + else + { + // If docsbox refused to convert the posted file + if (isset($postFileResponse->body->status) + && $postFileResponse->body->status != self::STATUS_QUEUED) + { + error_log( + 'Docsbox did not queue the posted file. Returned status: '. + $postFileResponse->body->status + ); + } + else // any other generic error + { + error_log( + 'An error occurred while posting to docsbox. Response: '. + print_r($postFileResponse, 1) + ); + } + } + } + catch(\Httpful\Exception\ConnectionErrorException $cee) // Httpful exception + { + error_log($cee->getMessage()); + } + catch (Exception $e) // any other exception + { + error_log($e->getMessage()); + } + + return $queueId; + } + + /** + * Check the status of the file convertion identified by the given queue element id + * A URL is returned with the path where it is possible to download the converted file + * If an error occurred then a null value is returned + */ + private static function _checkConvertion($queueId) + { + $resultUrl = null; + $startConvertionsTime = time(); // time when the file conversion has started + + // Until a timeout has occurred + while (time() - $startConvertionsTime <= DOCSBOX_CONVERSION_TIMEOUT) + { + sleep(DOCSBOX_WAITING_SLEEP_TIME); // takes a nap on every round + + try + { + // Calls the docsbox server to check the status of the + // file conversion using the provided queue id + // it expects a response in JSON format + $getStatusResponse = \Httpful\Request::get(DOCSBOX_SERVER.DOCSBOX_PATH_API.$queueId) + ->expectsJson() + ->send(); + + // Checks that: + // - the response is not empty + // - the reponse body has the property id + // - the property id is a valid string + // - the reponse body has the property status + // - docsbox is working the conversion of the posted file + if (is_object($getStatusResponse) + && isset($getStatusResponse->body->id) + && $getStatusResponse->body->id != '' && $getStatusResponse->body->id != null + && isset($getStatusResponse->body->status)) + { + // Checks that docsbox has finished working on the file conversion + // and that there is a valid resultUrl property + if ($getStatusResponse->body->status == self::STATUS_FINISHED + && isset($getStatusResponse->body->result_url) + && $getStatusResponse->body->result_url != '' + && $getStatusResponse->body->result_url != null) + { + $resultUrl = $getStatusResponse->body->result_url; + break; + } + // Just started or still working on it + elseif ($getStatusResponse->body->status == self::STATUS_WORKING + || $getStatusResponse->body->status == self::STATUS_STARTED) + { + // go on! + } + else // any other status is abnormal + { + error_log( + 'Not valid status for queue element: '.$queueId.'. Response: '. + print_r($getStatusResponse, 1) + ); + break; // interrupt the loop on error + } + } + else // if the response from the docsbox server is not valid + { + error_log( + 'An error occurred while checking the docsbox activity. Response: '. + print_r($getStatusResponse, 1) + ); + break; // interrupt the loop on error + } + } + catch(\Httpful\Exception\ConnectionErrorException $cee) // Httpful exception + { + error_log($cee->getMessage()); + break; // interrupt the loop on error + } + catch (Exception $e) // any other exception + { + error_log($e->getMessage()); + break; // interrupt the loop on error + } + } + + return $resultUrl; + } + + /** + * Download the converted file using the provided URL, unzip it, and renames it into the provided file name + */ + private static function _downloadFile($resultUrl, $outputFileName) + { + $downloaded = false; // pessimistic assumption + + try + { + // Download the file + $getFileResponse = \Httpful\Request::get(DOCSBOX_SERVER.$resultUrl)->send(); + + // If the downloaded file content is valid and not empty + if (isset($getFileResponse->body) + && $getFileResponse->body != null + && $getFileResponse->body != '') + { + // Output directory where to unzip the downloaded zip file + $outputDirectory = dirname($outputFileName); + // The path and name of the downloaded zip file + $temporaryDownloadedZip = sys_get_temp_dir().'/'.basename($resultUrl); + + // Write the file content into a temporary directory and file + if (file_put_contents($temporaryDownloadedZip, $getFileResponse->body) != false) + { + $zipArchive = new ZipArchive; + + // Open and extract the dowloaded zip file into the directory of the output file + if ($zipArchive->open($temporaryDownloadedZip) === true + && $zipArchive->extractTo($outputDirectory) === true + && $zipArchive->close() === true) + { + // Opened, extracted and closed! + + // Rename the extracted file to the given output file name + if (rename($outputDirectory.'/'.self::OUTPUT_FILENAME, $outputFileName)) + { + $downloaded = true; + } + else + { + error_log( + 'An error occurred while renaming the extracted file: '. + $outputDirectory.'/'.self::OUTPUT_FILENAME.' into: '. + $outputFileName + ); + } + } + else + { + error_log( + 'An error occurred while working the dowloaded zip file: '. + $temporaryDownloadedZip + ); + } + } + else // if an error occurred while writing + { + error_log( + 'An error occurred while writing the file content to: '. + $temporaryDownloadedZip + ); + } + } + else // if the downloaded file is not valid + { + error_log( + 'An error occurred while downloading the file from the docsbox server: '. + print_r($getFileResponse, 1) + ); + } + } + catch(\Httpful\Exception\ConnectionErrorException $cee) + { + error_log($cee->getMessage()); + } + catch (Exception $e) + { + error_log($e->getMessage()); + } + + return $downloaded; + } +} + diff --git a/config/global.config-default.inc.php b/config/global.config-default.inc.php index b31447994..f4909ba5c 100644 --- a/config/global.config-default.inc.php +++ b/config/global.config-default.inc.php @@ -310,4 +310,7 @@ define ('ZAHLUNGSBESTAETIGUNG_ANZEIGEN_FUER_LEHRGAENGE', true); // Gibt an, ob im CIS die Zahlungsreferenz angezeigt wird define ('ZAHLUNGSBESTAETIGUNG_ZAHLUNGSREFERENZ_ANZEIGEN', false); + +define('DOCSBOX_ENABLED', false); + ?> diff --git a/include/Docsbox.php b/include/Docsbox.php deleted file mode 100644 index 08b04f71b..000000000 --- a/include/Docsbox.php +++ /dev/null @@ -1,112 +0,0 @@ -attach(array('file' => $inputFileName)) - ->expectsJson() - ->send(); - - var_dump($response);exit; - } - catch(\Httpful\Exception\ConnectionErrorException $cee) - { - // Error - } - catch (Exception $e) - { - // Error - } - - if (is_object($response) && isset($response->id) && isset($response->status)) - { - $status = null; - $result_url = null; - - while ($status == null) - { - try - { - $response = \Httpful\Request::get('http://docconverter.technikum-wien.at/api/v1/'.$response->id) - ->expectsJson() - ->send(); - - var_dump($response); - } - catch(\Httpful\Exception\ConnectionErrorException $cee) - { - // Error - } - catch (Exception $e) - { - // Error - } - - if (is_object($response) && isset($response->id) && isset($response->status)) - { - if ($response->status == 'finished' && isset($response->result_url)) - { - $status = $response->status; - $result_url = $response->result_url; - } - else - { - // Error - } - } - else - { - // Error - } - } - - try - { - $response = \Httpful\Request::get($result_url)->send(); - - var_dump($response); - } - catch(\Httpful\Exception\ConnectionErrorException $cee) - { - // Error - } - catch (Exception $e) - { - // Error - } - - var_dump($response);exit; - } - else - { - // Error - } - } -} - diff --git a/include/dokument_export.class.php b/include/dokument_export.class.php index 30af55ac6..c6c609ce9 100644 --- a/include/dokument_export.class.php +++ b/include/dokument_export.class.php @@ -37,6 +37,7 @@ class dokument_export private $images=array(); private $sourceDir; public $errormsg; + private $unoconv_version; private $sign; private $sign_user; private $sign_profile; @@ -49,6 +50,25 @@ class dokument_export if(!isset($vorlage)) return; + if (defined('DOCSBOX_ENABLED') && DOCSBOX_ENABLED === true) + { + // Use docsbox!! + } + else + { + exec('unoconv --version',$ret_arr); + if(isset($ret_arr[0])) + { + $hlp = explode(' ',$ret_arr[0]); + if(isset($hlp[1])) + $this->unoconv_version = $hlp[1]; + else + die('Could not get Unoconv Version'); + } + else + die('Unoconv not found'); + } + //Vorlage aus der Datenbank holen $this->vorlage = new vorlage(); if(!$this->vorlage->getAktuelleVorlage($oe_kurzbz, $vorlage, $version)) @@ -263,32 +283,36 @@ class dokument_export { case 'pdf': case 'doc': + $ret = 0; $this->temp_filename = $this->temp_folder . '/out.' . $this->outputformat; - // Unoconv Version 0.6 hat eine Bug wodurch die Berechtigungen des PDF/Doc nicht korrekt gesetzt - // werden. Deshalb wird dies hier speziell behandelt. - // Die 2. Variante hat den Vorteil dass hier eine bessere Fehlerbehandlung moeglich ist - //if($this->unoconv_version=='0.6') - // $command = 'unoconv -e IsSkipEmptyPages=false -f ' . $this->outputformat . ' %2$s > %1$s'; - //else - // $command = 'unoconv -e IsSkipEmptyPages=false -f ' . $this->outputformat . ' --output %s %s 2>&1'; + // If it is set to use docsbox + if (defined('DOCSBOX_ENABLED') && DOCSBOX_ENABLED === true) + { + require_once(dirname(__FILE__).'/../application/libraries/DocsboxLib.php'); - //$command = sprintf($command, $this->temp_filename, $tempname_zip); + $ret = DocsboxLib::convert($tempname_zip, $this->temp_filename); + } + else // otherwise use unoconv + { + // Unoconv Version 0.6 hat eine Bug wodurch die Berechtigungen des PDF/Doc nicht korrekt gesetzt + // werden. Deshalb wird dies hier speziell behandelt. + // Die 2. Variante hat den Vorteil dass hier eine bessere Fehlerbehandlung moeglich ist + if ($this->unoconv_version == '0.6') + $command = 'unoconv -e IsSkipEmptyPages=false -f ' . $this->outputformat . ' %2$s > %1$s'; + else + $command = 'unoconv -e IsSkipEmptyPages=false -f ' . $this->outputformat . ' --output %s %s 2>&1'; - //exec($command, $out, $ret); + $command = sprintf($command, $this->temp_filename, $tempname_zip); - require_once('Docsbox.php'); + exec($command, $out, $ret); + } - var_dump($tempname_zip); - var_dump($this->temp_filename); - - Docsbox::convert($tempname_zip, $this->temp_filename); - - //if($ret!=0) - //{ - // $this->errormsg = 'Dokumentenkonvertierung ist derzeit nicht möglich. Bitte versuchen Sie es in einer Minute erneut oder kontaktieren Sie einen Administrator'; - // return false; - //} + if ($ret != 0) + { + $this->errormsg = 'Dokumentenkonvertierung ist derzeit nicht möglich. Bitte versuchen Sie es in einer Minute erneut oder kontaktieren Sie einen Administrator'; + return false; + } break; case 'odt': default: @@ -449,26 +473,31 @@ class dokument_export */ public function convert($inFile, $outFile, $format = "pdf") { - //require_once('Docsbox.php'); + $ret = 0; - //var_dump($inFile); - //var_dump($outFile); + // If it is set to use DOCSBOX + if (defined('DOCSBOX_ENABLED') && DOCSBOX_ENABLED === true) + { + require_once(dirname(__FILE__).'/../application/libraries/DocsboxLib.php'); - //Docsbox::convert(); + $ret = DocsboxLib::convert($inFile, $outFile); + } + else // fallback to unoconv + { + if($this->unoconv_version=='0.6') + $command = 'unoconv -f %1$s %3$s > %2$s'; + else + $command = 'unoconv -f %s --output %s %s 2>&1'; + $command = sprintf($command, $format, $outFile, $inFile); - //if($this->unoconv_version=='0.6') - // $command = 'unoconv -f %1$s %3$s > %2$s'; - //else - // $command = 'unoconv -f %s --output %s %s 2>&1'; - //$command = sprintf($command, $format, $outFile, $inFile); + exec($command, $out, $ret); + } - //exec($command, $out, $ret); - - //if($ret!=0) - //{ - // $this->errormsg = 'Dokumentenkonvertierung ist derzeit nicht möglich. Bitte versuchen Sie es in einer Minute erneut oder kontaktieren Sie einen Administrator'; - // return false; - //} + if ($ret != 0) + { + $this->errormsg = 'Dokumentenkonvertierung ist derzeit nicht möglich. Bitte versuchen Sie es in einer Minute erneut oder kontaktieren Sie einen Administrator'; + return false; + } return true; } From 6f14b5cec599f881a75d35c85ce9c6079c24009d Mon Sep 17 00:00:00 2001 From: Paolo Date: Thu, 14 Oct 2021 14:25:35 +0200 Subject: [PATCH 003/646] - Changed DocsboxLib->convert, not it accepts a new optional parameter called format - Integrated the DocsboxLib into the application/libraries/DocumentLib.php --- application/libraries/DocsboxLib.php | 3 +- application/libraries/DocumentLib.php | 66 +++++++++++++++++++-------- 2 files changed, 48 insertions(+), 21 deletions(-) diff --git a/application/libraries/DocsboxLib.php b/application/libraries/DocsboxLib.php index 2b0715513..ce43f1bc5 100644 --- a/application/libraries/DocsboxLib.php +++ b/application/libraries/DocsboxLib.php @@ -39,8 +39,9 @@ class DocsboxLib /** * Static method used to convert a document using a Docsbox installation (local/remote) over the network * It return 0 on success and any other integer on error + * NOTE: currently format is not supported */ - public static function convert($inputFileName, $outputFileName) + public static function convert($inputFileName, $outputFileName, $format = 'pdf') { // Posts the file to docsbox $queueId = self::_postFile($inputFileName); diff --git a/application/libraries/DocumentLib.php b/application/libraries/DocumentLib.php index 98e546b4e..d78a9c0df 100644 --- a/application/libraries/DocumentLib.php +++ b/application/libraries/DocumentLib.php @@ -14,20 +14,27 @@ class DocumentLib // Gets CI instance $this->ci =& get_instance(); - exec('unoconv --version', $ret_arr); - - if(isset($ret_arr[0])) + if (defined('DOCSBOX_ENABLED') && DOCSBOX_ENABLED === true) { - $hlp = explode(' ', $ret_arr[0]); - if(isset($hlp[1])) - { - $this->unoconv_version = $hlp[1]; - } - else - show_error('Could not get Unoconv Version'); + // Use docsbox!! } else - show_error('Unoconv not found - Please install Unoconv'); + { + exec('unoconv --version', $ret_arr); + + if(isset($ret_arr[0])) + { + $hlp = explode(' ', $ret_arr[0]); + if(isset($hlp[1])) + { + $this->unoconv_version = $hlp[1]; + } + else + show_error('Could not get Unoconv Version'); + } + else + show_error('Unoconv not found - Please install Unoconv'); + } } /** @@ -57,9 +64,16 @@ class DocumentLib case 'application/vnd.ms-word': case 'application/vnd.oasis.opendocument.text': case 'text/plain': - // Unoconv Version 0.6 seems to fail on converting TXT Files - if ($this->unoconv_version == '0.6') - return error(); + if (defined('DOCSBOX_ENABLED') && DOCSBOX_ENABLED === true) + { + // Use docsbox + } + else + { + // 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)) @@ -123,13 +137,25 @@ class DocumentLib */ public function convert($inFile, $outFile, $format) { - if ($this->unoconv_version == '0.6') - $command = 'unoconv -f %1$s %3$s > %2$s'; - else - $command = 'unoconv -f %s --output %s %s 2>&1'; - $command = sprintf($command, $format, $outFile, $inFile); + $ret = 0; - exec($command, $out, $ret); + // If it is set to use docsbox + if (defined('DOCSBOX_ENABLED') && DOCSBOX_ENABLED === true) + { + require_once(dirname(__FILE__).'/../application/libraries/DocsboxLib.php'); + + $ret = DocsboxLib::convert($inFile, $outFile, $format); + } + else // otherwise use unoconv + { + if ($this->unoconv_version == '0.6') + $command = 'unoconv -f %1$s %3$s > %2$s'; + else + $command = 'unoconv -f %s --output %s %s 2>&1'; + $command = sprintf($command, $format, $outFile, $inFile); + + exec($command, $out, $ret); + } if ($ret != 0) { From db49f2b1e77248328388213bea238a0b5956966f Mon Sep 17 00:00:00 2001 From: Paolo Date: Fri, 4 Mar 2022 19:47:32 +0100 Subject: [PATCH 004/646] - libraries/DocsboxLib: - Added new constant DEFAULT_FORMAT - ERROR and SUCCESS constant values are the same of EXIT_ERROR and EXIT_SUCCESS - public method convert parameter format does not have a default value anymore - Added use import of ZipArchive - libraries/DocumentLib: removed unused variables --- application/libraries/DocsboxLib.php | 23 +++++++++++++++-------- application/libraries/DocumentLib.php | 7 ++++--- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/application/libraries/DocsboxLib.php b/application/libraries/DocsboxLib.php index ce43f1bc5..5ec028a49 100644 --- a/application/libraries/DocsboxLib.php +++ b/application/libraries/DocsboxLib.php @@ -1,11 +1,11 @@ body != '') { // Output directory where to unzip the downloaded zip file - $outputDirectory = dirname($outputFileName); + $outputDirectory = dirname($outputFileName); // The path and name of the downloaded zip file $temporaryDownloadedZip = sys_get_temp_dir().'/'.basename($resultUrl); diff --git a/application/libraries/DocumentLib.php b/application/libraries/DocumentLib.php index d78a9c0df..eec3b6938 100644 --- a/application/libraries/DocumentLib.php +++ b/application/libraries/DocumentLib.php @@ -14,6 +14,7 @@ class DocumentLib // Gets CI instance $this->ci =& get_instance(); + // Which document converter has to be used if (defined('DOCSBOX_ENABLED') && DOCSBOX_ENABLED === true) { // Use docsbox!! @@ -119,7 +120,7 @@ class DocumentLib finfo_close($finfo); - exec($cmd, $out, $ret); + exec($cmd, null, $ret); if ($ret != 0) { return error('PDF-zusammenfuegung ist derzeit nicht möglich. Bitte informieren Sie den Administrator'); @@ -154,7 +155,7 @@ class DocumentLib $command = 'unoconv -f %s --output %s %s 2>&1'; $command = sprintf($command, $format, $outFile, $inFile); - exec($command, $out, $ret); + exec($command, null, $ret); } if ($ret != 0) @@ -217,7 +218,7 @@ class DocumentLib $cmd .= '/countspaces { [ exch { dup 32 ne { pop } if } forall ] length } bind def >> '; $cmd .= 'setpagedevice viewJPEG"'; - exec($cmd, $out, $ret); + exec($cmd, null, $ret); if ($ret != 0) { $this->errormsg = 'jpegToPdf ist derzeit nicht möglich. Bitte informieren Sie den Administrator'; From e50cc27a89f4bbdfc7d9192f215504d4e50b6068 Mon Sep 17 00:00:00 2001 From: Paolo Date: Fri, 4 Mar 2022 20:13:03 +0100 Subject: [PATCH 005/646] Fixed exec second parameter value --- application/libraries/DocumentLib.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/application/libraries/DocumentLib.php b/application/libraries/DocumentLib.php index eec3b6938..c1dd21c29 100644 --- a/application/libraries/DocumentLib.php +++ b/application/libraries/DocumentLib.php @@ -120,7 +120,8 @@ class DocumentLib finfo_close($finfo); - exec($cmd, null, $ret); + $out = null; + exec($cmd, $out, $ret); if ($ret != 0) { return error('PDF-zusammenfuegung ist derzeit nicht möglich. Bitte informieren Sie den Administrator'); @@ -155,7 +156,8 @@ class DocumentLib $command = 'unoconv -f %s --output %s %s 2>&1'; $command = sprintf($command, $format, $outFile, $inFile); - exec($command, null, $ret); + $out = null; + exec($command, $out, $ret); } if ($ret != 0) @@ -218,7 +220,8 @@ class DocumentLib $cmd .= '/countspaces { [ exch { dup 32 ne { pop } if } forall ] length } bind def >> '; $cmd .= 'setpagedevice viewJPEG"'; - exec($cmd, null, $ret); + $out = null; + exec($cmd, $out, $ret); if ($ret != 0) { $this->errormsg = 'jpegToPdf ist derzeit nicht möglich. Bitte informieren Sie den Administrator'; From 6d1c926ec0eb22d7cea95e20b508a98d9b8018d8 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Tue, 29 Mar 2022 13:56:00 +0200 Subject: [PATCH 006/646] Anzeige AllinSaldo in Zeitaufzeichnung --- cis/private/tools/zeitaufzeichnung.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cis/private/tools/zeitaufzeichnung.php b/cis/private/tools/zeitaufzeichnung.php index ba57b442f..74c2678bc 100644 --- a/cis/private/tools/zeitaufzeichnung.php +++ b/cis/private/tools/zeitaufzeichnung.php @@ -1379,7 +1379,8 @@ if ($projekt->getProjekteMitarbeiter($user, true)) } } echo ''; - echo '

'; + echo '
'; + echo '

'; if (!$adminView) { From 9bf20dd7a41d4667bb208cfa501bd660e6a0efcb Mon Sep 17 00:00:00 2001 From: ma0068 Date: Thu, 28 Apr 2022 07:54:43 +0200 Subject: [PATCH 007/646] neue Funktion: getLastVerwendungZapflicht --- include/bisverwendung.class.php | 63 +++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/include/bisverwendung.class.php b/include/bisverwendung.class.php index ce6a557b1..afcc271f8 100644 --- a/include/bisverwendung.class.php +++ b/include/bisverwendung.class.php @@ -865,5 +865,68 @@ class bisverwendung extends basis_db return false; } } + + /** + * Lädt die letzte zeitaufzeichnungspflichtige Bisverwendung + * @param $uid UID des Mitarbeiters + * @return true wenn ok, false wenn Fehler + */ + public function getLastBisZAPflicht($uid) + { + $datetime = new DateTime($stichtag); + $stichtag = $datetime->format('Y-m-d'); + $bismeldung_jahr = $datetime->format('Y'); + + $qry = ' + SELECT + * + FROM + bis.tbl_bisverwendung + WHERE + mitarbeiter_uid = '. $this->db_add_param($uid).' + AND + zeitaufzeichnungspflichtig = true + ORDER BY ende DESC NULLS FIRST LIMIT 1 + '; + + if($this->db_query($qry)) + { + while($row = $this->db_fetch_object()) + { + + $obj = new bisverwendung(); + + $obj->bisverwendung_id = $row->bisverwendung_id; + $obj->ba1code = $row->ba1code; + $obj->ba2code = $row->ba2code; + $obj->beschausmasscode = $row->beschausmasscode; + $obj->verwendung_code = $row->verwendung_code; + $obj->hauptberufcode = $row->hauptberufcode; + $obj->hauptberuflich = $row->hauptberuflich; + $obj->habilitation = $row->habilitation; + $obj->beginn = $row->beginn; + $obj->ende = $row->ende; + $obj->updatevon = $row->updatevon; + $obj->updateamum = $row->updateamum; + $obj->insertamum = $row->insertamum; + $obj->insertvon = $row->insertvon; + $obj->vertragsstunden = $row->vertragsstunden; + $obj->dv_art = $row->dv_art; + $obj->inkludierte_lehre = $row->inkludierte_lehre; + $obj->azgrelevant = $row->azgrelevant; + $obj->homeoffice = $row->homeoffice; + + $this->result[] = $obj; + } + return true; + } + else + { + $this->errormsg = 'Fehler bei der Datenbankabfrage'; + return false; + } + } + + } ?> From b6cc084799e0bf6fd2fdcc55019b4963e6683365 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Thu, 28 Apr 2022 11:46:45 +0200 Subject: [PATCH 008/646] Adaptierung Funktion getLastBisZAPflicht() --- include/bisverwendung.class.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/include/bisverwendung.class.php b/include/bisverwendung.class.php index afcc271f8..e5314963b 100644 --- a/include/bisverwendung.class.php +++ b/include/bisverwendung.class.php @@ -873,10 +873,6 @@ class bisverwendung extends basis_db */ public function getLastBisZAPflicht($uid) { - $datetime = new DateTime($stichtag); - $stichtag = $datetime->format('Y-m-d'); - $bismeldung_jahr = $datetime->format('Y'); - $qry = ' SELECT * From d7e4d7ebde5f0eeedb89ea56183b6ea45ffe093a Mon Sep 17 00:00:00 2001 From: Paolo Date: Tue, 3 May 2022 10:58:46 +0200 Subject: [PATCH 009/646] Moved config entries from application/config/docsbox.php to config/cis.config-default.inc.php and config/vilesci.config-default.inc.php --- application/config/docsbox.php | 7 ------- application/libraries/DocsboxLib.php | 3 +-- config/cis.config-default.inc.php | 8 ++++++++ config/vilesci.config-default.inc.php | 8 ++++++++ 4 files changed, 17 insertions(+), 9 deletions(-) delete mode 100644 application/config/docsbox.php diff --git a/application/config/docsbox.php b/application/config/docsbox.php deleted file mode 100644 index ca64698f9..000000000 --- a/application/config/docsbox.php +++ /dev/null @@ -1,7 +0,0 @@ - + diff --git a/config/vilesci.config-default.inc.php b/config/vilesci.config-default.inc.php index cd45e6979..b1340fbfb 100644 --- a/config/vilesci.config-default.inc.php +++ b/config/vilesci.config-default.inc.php @@ -254,4 +254,12 @@ define('BIS_STANDORTCODE_LEHRGAENGE', '0'); // bPk Abfrage define('BPK_FUER_ALLE_BENUTZER_ABFRAGEN', false); + +// Docsbox configs +define('DOCSBOX_SERVER', 'http://docconverter.technikum-wien.at/'); +define('DOCSBOX_PATH_API', 'api/v1/'); +define('DOCSBOX_CONVERSION_TIMEOUT', 30); // seconds +define('DOCSBOX_WAITING_SLEEP_TIME', 1); + ?> + From 58d252b5b7d2e5a87c4b1db7a6fa8e00c4472eeb Mon Sep 17 00:00:00 2001 From: Paolo Date: Fri, 6 May 2022 09:57:55 +0200 Subject: [PATCH 010/646] Added 3rd parameter to Docsbox::convert call were missing --- include/dokument_export.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/dokument_export.class.php b/include/dokument_export.class.php index c6c609ce9..0d4f2c660 100644 --- a/include/dokument_export.class.php +++ b/include/dokument_export.class.php @@ -291,7 +291,7 @@ class dokument_export { require_once(dirname(__FILE__).'/../application/libraries/DocsboxLib.php'); - $ret = DocsboxLib::convert($tempname_zip, $this->temp_filename); + $ret = DocsboxLib::convert($tempname_zip, $this->temp_filename, $this->outputformat); } else // otherwise use unoconv { @@ -480,7 +480,7 @@ class dokument_export { require_once(dirname(__FILE__).'/../application/libraries/DocsboxLib.php'); - $ret = DocsboxLib::convert($inFile, $outFile); + $ret = DocsboxLib::convert($inFile, $outFile, $format); } else // fallback to unoconv { From 704b32c76c4aba195389561cb8255c592ba2c1d7 Mon Sep 17 00:00:00 2001 From: Paolo Date: Wed, 11 May 2022 11:06:53 +0200 Subject: [PATCH 011/646] Fixed constant values in application/libraries/DocsboxLib.php --- application/libraries/DocsboxLib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/libraries/DocsboxLib.php b/application/libraries/DocsboxLib.php index 7d5af7106..f9167c379 100644 --- a/application/libraries/DocsboxLib.php +++ b/application/libraries/DocsboxLib.php @@ -26,8 +26,8 @@ use \ZipArchive as ZipArchive; */ class DocsboxLib { - const ERROR = EXIT_ERROR; - const SUCCESS = EXIT_SUCCESS; + const ERROR = 1; + const SUCCESS = 0; const STATUS_FINISHED = 'finished'; // Docsbox status when a document conversion ended const STATUS_QUEUED = 'queued'; // Docsbox status when a file has been queued for the conversion const STATUS_STARTED = 'started'; // Docsbox status when a file has started being worked From 2a8b61c07fe60d031d0af852c045b52dbbfbeac7 Mon Sep 17 00:00:00 2001 From: Paolo Date: Wed, 11 May 2022 18:29:10 +0200 Subject: [PATCH 012/646] - Added new library application/libraries/SignatureLib.php - Changed configs for the signature server in config/vilesci.config-default.inc.php - Changed include/dokument_export.class.php to make use of the new configs --- application/libraries/SignatureLib.php | 76 ++++++++++++++++++++++++++ config/vilesci.config-default.inc.php | 11 +++- include/dokument_export.class.php | 2 +- 3 files changed, 85 insertions(+), 4 deletions(-) create mode 100644 application/libraries/SignatureLib.php diff --git a/application/libraries/SignatureLib.php b/application/libraries/SignatureLib.php new file mode 100644 index 000000000..b8c4374a3 --- /dev/null +++ b/application/libraries/SignatureLib.php @@ -0,0 +1,76 @@ +sendsJson() + ->authenticateWith(SIGNATUR_USER, SIGNATUR_PASSWORD) + ->body('{"filename": "'.basename($inputFileName).'", "content": "'.base64_encode($inputFileContent).'"}') + ->expectsJson() + ->send(); + } + } + catch(\Httpful\Exception\ConnectionErrorException $cee) // Httpful exception + { + $resultList = $cee->getMessage(); + } + catch (Exception $e) // any other exception + { + $resultList = $e->getMessage(); + } + + // If the response is fine + if (isset($resultPost->body) && is_object($resultPost->body) && isset($resultPost->body->retval)) + { + return $resultPost->body->retval; + } + + return $resultList; + } +} + diff --git a/config/vilesci.config-default.inc.php b/config/vilesci.config-default.inc.php index 5285eef3b..a3e4cbece 100644 --- a/config/vilesci.config-default.inc.php +++ b/config/vilesci.config-default.inc.php @@ -186,11 +186,16 @@ define('FHC_REST_PASSWORD', 'password'); * Signatur * DEFAULT: https://signatur.example.com/api/sign */ -define('SIGNATUR_URL', 'https://signatur.example.com/api/sign'); +// Generic URL +define('SIGNATUR_URL', 'https://signatur.dev.technikum-wien.at/api'); +// Sign API +define('SIGNATUR_SIGN_API', 'sign'); +// List API +define('SIGNATUR_LIST_API', 'list'); // User für Zugriff auf Signaturserver -define('SIGNATUR_USER', 'username'); +define('SIGNATUR_USER', 'fhcomplete'); // Passwort für Zugriff auf Signaturserver -define('SIGNATUR_PASSWORD', 'password'); +define('SIGNATUR_PASSWORD', 'Fhcomplet3Signature!'); // Signaturprofil das verwendet werden soll define('SIGNATUR_DEFAULT_PROFILE', 'FHC_AMT_GROSS_DE'); diff --git a/include/dokument_export.class.php b/include/dokument_export.class.php index 4f23a7dcd..3a6e57657 100644 --- a/include/dokument_export.class.php +++ b/include/dokument_export.class.php @@ -527,7 +527,7 @@ class dokument_export $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, SIGNATUR_URL); + curl_setopt($ch, CURLOPT_URL, SIGNATUR_URL.'/'.SIGNATUR_SIGN_API); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 7); curl_setopt($ch, CURLOPT_USERAGENT, "FH-Complete"); From d4042228d9114502fd0151510df15effa43b21e2 Mon Sep 17 00:00:00 2001 From: Paolo Date: Fri, 13 May 2022 20:11:31 +0200 Subject: [PATCH 013/646] - Better code and comments in application/libraries/SignatureLib->list - cis/private/lehre/abgabe_lektor_details.php and cis/private/lehre/abgabe_student_details.php check if the uploaded document contains digital signares and display a phrase - Added new phrase to locale/de-AT/abgabetool.php and locale/en-US/abgabetool.php --- application/libraries/SignatureLib.php | 15 +++--- cis/private/lehre/abgabe_lektor_details.php | 25 +++++++++- cis/private/lehre/abgabe_student_details.php | 49 ++++++++++++++++---- locale/de-AT/abgabetool.php | 1 + locale/en-US/abgabetool.php | 1 + 5 files changed, 73 insertions(+), 18 deletions(-) diff --git a/application/libraries/SignatureLib.php b/application/libraries/SignatureLib.php index b8c4374a3..132545219 100644 --- a/application/libraries/SignatureLib.php +++ b/application/libraries/SignatureLib.php @@ -33,16 +33,13 @@ class SignatureLib */ public static function list($inputFileName) { - // Generic error occurred - $resultList = 'Generic error occurred'; - try { // Get the content of the given file $inputFileContent = file_get_contents($inputFileName); if ($inputFileContent === false) // if failed { - $resultList = 'An error occurred while getting the content from: '.$inputFileName; + error_log('An error occurred while getting the content from: '.$inputFileName); } else { @@ -57,20 +54,22 @@ class SignatureLib } catch(\Httpful\Exception\ConnectionErrorException $cee) // Httpful exception { - $resultList = $cee->getMessage(); + error_log($cee->getMessage()); } catch (Exception $e) // any other exception { - $resultList = $e->getMessage(); + error_log($e->getMessage()); } // If the response is fine - if (isset($resultPost->body) && is_object($resultPost->body) && isset($resultPost->body->retval)) + if (isset($resultPost->body) && is_object($resultPost->body) + && isset($resultPost->body->retval) && is_array($resultPost->body->retval)) { return $resultPost->body->retval; } - return $resultList; + // Otherwise return a null as error + return null; } } diff --git a/cis/private/lehre/abgabe_lektor_details.php b/cis/private/lehre/abgabe_lektor_details.php index a508de098..e1b47369d 100644 --- a/cis/private/lehre/abgabe_lektor_details.php +++ b/cis/private/lehre/abgabe_lektor_details.php @@ -37,6 +37,7 @@ require_once('../../../include/phrasen.class.php'); require_once('../../../include/projektarbeit.class.php'); require_once('../../../include/projektbetreuer.class.php'); require_once('../../../include/sancho.inc.php'); +require_once('../../../application/libraries/SignatureLib.php'); if (!$db = new basis_db()) $db=false; @@ -642,7 +643,29 @@ $result=@$db->db_query($qry); } if(file_exists(PAABGABE_PATH.$row->paabgabe_id.'_'.$uid.'.pdf')) { - $htmlstr .= " PDF"; + $uploadedDocumentSigned = null; + + // Check if the document is signed + $signList = SignatureLib::list(PAABGABE_PATH.$row->paabgabe_id.'_'.$uid.'.pdf'); + if (is_array($signList) && count($signList) > 0) + { + // The document is signed + } + elseif ($signList === null) + { + $uploadedDocumentSigned = 'WARNING: signature server error'; + } + else + { + $uploadedDocumentSigned = $p->t('abgabetool/uploadedDocumentNotSigned'); + } + + $htmlstr .= " + + PDF + + ".$uploadedDocumentSigned." + "; } else { diff --git a/cis/private/lehre/abgabe_student_details.php b/cis/private/lehre/abgabe_student_details.php index 29d74ab66..b8a8f158e 100644 --- a/cis/private/lehre/abgabe_student_details.php +++ b/cis/private/lehre/abgabe_student_details.php @@ -36,6 +36,7 @@ require_once('../../../include/phrasen.class.php'); require_once('../../../include/projektarbeit.class.php'); require_once('../../../include/projektbetreuer.class.php'); require_once('../../../include/sancho.inc.php'); +require_once('../../../application/libraries/SignatureLib.php'); $anzeigesprache = getSprache(); $p = new phrasen($anzeigesprache); @@ -111,6 +112,7 @@ $titel = $projektarbeit_obj->titel; $person = new person(); $person->load($bid); $betreuer = $person->titelpre.' '.$person->vorname.' '.$person->nachname.' '.$person->titelpost; +$uploadedDocumentSigned = null; if($uid!=$user) { @@ -286,15 +288,20 @@ if($command=="update" && $error!=true) move_uploaded_file($_FILES['datei']['tmp_name'], PAABGABE_PATH.$paabgabe_id.'_'.$uid.'.pdf'); if(file_exists(PAABGABE_PATH.$paabgabe_id.'_'.$uid.'.pdf')) { - exec('chmod 640 "'.PAABGABE_PATH.$paabgabe_id.'_'.$uid.'.pdf'.'"'); - - $qry="UPDATE campus.tbl_paabgabe SET - abgabedatum = now(), - updatevon = ".$db->db_add_param($user).", - updateamum = now() - WHERE paabgabe_id=".$db->db_add_param($paabgabe_id, FHC_INTEGER); - $result=$db->db_query($qry); - echo $p->t('global/dateiErfolgreichHochgeladen'); + // Check if the document is signed + $signList = SignatureLib::list(PAABGABE_PATH.$paabgabe_id.'_'.$uid.'.pdf'); + if (is_array($signList) && count($signList) > 0) + { + // The document is signed + } + elseif ($signList === null) + { + $uploadedDocumentSigned = 'WARNING: signature server error'; + } + else + { + $uploadedDocumentSigned = $p->t('abgabetool/uploadedDocumentNotSigned'); + } } else { @@ -311,6 +318,21 @@ if($command=="update" && $error!=true) } if(file_exists(PAABGABE_PATH.$paabgabe_id.'_'.$uid.'.pdf')) { + // Check if the document is signed + $signList = SignatureLib::list(PAABGABE_PATH.$paabgabe_id.'_'.$uid.'.pdf'); + if (is_array($signList) && count($signList) > 0) + { + // The document is signed + } + elseif ($signList === null) + { + $uploadedDocumentSigned = 'WARNING: signature server error'; + } + else + { + $uploadedDocumentSigned = $p->t('abgabetool/uploadedDocumentNotSigned'); + } + /*$qry="UPDATE campus.tbl_paabgabe SET abgabedatum = now(), updatevon = '".$user."', @@ -339,6 +361,15 @@ if($command=="update" && $error!=true) $htmlstr .= ''."\n"; $htmlstr .= ''."\n"; $htmlstr .= ''."\n"; + + // If there are info about the signed document + if ($uploadedDocumentSigned != null) + { + $htmlstr .= "\n"; + $htmlstr .= "".$uploadedDocumentSigned.""; + $htmlstr .= "\n"; + } + $htmlstr .= "\n"; $htmlstr .= "".$p->t('abgabetool/spracheDerArbeit').":"; $sprache = @$db->db_query("SELECT sprache FROM public.tbl_sprache"); diff --git a/locale/de-AT/abgabetool.php b/locale/de-AT/abgabetool.php index c4b17318b..6d1eb923f 100644 --- a/locale/de-AT/abgabetool.php +++ b/locale/de-AT/abgabetool.php @@ -91,4 +91,5 @@ $this->phrasen['abgabetool/projektbeurteilungDownload']='Projektbeurteilung heru $this->phrasen['abgabetool/projektbeurteilungErstDownload']='Erst-/Begutachter'; $this->phrasen['abgabetool/projektbeurteilungZweitDownload']='Zweitbegutachter'; $this->phrasen['abgabetool/fehlerErmittelnEndabgabeProjektarbeit']='Fehler beim Ermitteln des Enduplaods der Projektarbeit'; +$this->phrasen['abgabetool/uploadedDocumentNotSigned']='The uploaded document is not signed DE'; ?> diff --git a/locale/en-US/abgabetool.php b/locale/en-US/abgabetool.php index b05456faa..c782dedcc 100644 --- a/locale/en-US/abgabetool.php +++ b/locale/en-US/abgabetool.php @@ -91,4 +91,5 @@ $this->phrasen['abgabetool/projektbeurteilungDownload']='Thesis-Assessment downl $this->phrasen['abgabetool/projektbeurteilungErstDownload']='First-/Assessor'; $this->phrasen['abgabetool/projektbeurteilungZweitDownload']='Second Assessor'; $this->phrasen['abgabetool/fehlerErmittelnEndabgabeProjektarbeit']='Error when getting endupload of project work'; +$this->phrasen['abgabetool/uploadedDocumentNotSigned']='The uploaded document is not signed EN'; ?> From 22bba685ffcacdbb0ee1b2847cea3eab8b3c8a65 Mon Sep 17 00:00:00 2001 From: Paolo Date: Mon, 16 May 2022 16:15:48 +0200 Subject: [PATCH 014/646] Added new style to the warning --- cis/private/lehre/abgabe_lektor_details.php | 27 ++++++++++++-------- cis/private/lehre/abgabe_student_details.php | 24 ++++++++++------- locale/de-AT/abgabetool.php | 2 +- locale/en-US/abgabetool.php | 2 +- 4 files changed, 33 insertions(+), 22 deletions(-) diff --git a/cis/private/lehre/abgabe_lektor_details.php b/cis/private/lehre/abgabe_lektor_details.php index e1b47369d..29a1221af 100644 --- a/cis/private/lehre/abgabe_lektor_details.php +++ b/cis/private/lehre/abgabe_lektor_details.php @@ -641,6 +641,14 @@ $result=@$db->db_query($qry); { $htmlstr .= "               "; } + if($row->abgabedatum && $row->paabgabetyp_kurzbz=="end") + { + $htmlstr .= " zusätzliche Daten"; + } + else + { + $htmlstr .= "     "; + } if(file_exists(PAABGABE_PATH.$row->paabgabe_id.'_'.$uid.'.pdf')) { $uploadedDocumentSigned = null; @@ -663,17 +671,14 @@ $result=@$db->db_query($qry); $htmlstr .= " PDF - - ".$uploadedDocumentSigned." - "; - } - else - { - $htmlstr .= "     "; - } - if($row->abgabedatum && $row->paabgabetyp_kurzbz=="end") - { - $htmlstr .= " zusätzliche Daten"; + "; + if ($uploadedDocumentSigned != null) + { + $htmlstr .= '
+ '.$uploadedDocumentSigned.' +
'; + } + $htmlstr .= ""; } else { diff --git a/cis/private/lehre/abgabe_student_details.php b/cis/private/lehre/abgabe_student_details.php index b8a8f158e..949749a3b 100644 --- a/cis/private/lehre/abgabe_student_details.php +++ b/cis/private/lehre/abgabe_student_details.php @@ -361,15 +361,6 @@ if($command=="update" && $error!=true) $htmlstr .= ''."\n"; $htmlstr .= ''."\n"; $htmlstr .= ''."\n"; - - // If there are info about the signed document - if ($uploadedDocumentSigned != null) - { - $htmlstr .= "\n"; - $htmlstr .= "".$uploadedDocumentSigned.""; - $htmlstr .= "\n"; - } - $htmlstr .= "\n"; $htmlstr .= "".$p->t('abgabetool/spracheDerArbeit').":"; $sprache = @$db->db_query("SELECT sprache FROM public.tbl_sprache"); @@ -403,6 +394,21 @@ if($command=="update" && $error!=true) $htmlstr .= ''.$p->t('abgabetool/seitenanzahl').':* '."\n"; $htmlstr .=" \n"; + + // If there are info about the signed document + if ($uploadedDocumentSigned != null) + { + $htmlstr .= "\n"; + $htmlstr .= ""; + $htmlstr .= '
+ + '.$uploadedDocumentSigned.' +
'; + $htmlstr .= ""; + $htmlstr .= "\n"; + } + + $htmlstr .=" \n"; $htmlstr .="

".$p->t('abgabetool/eidesstattlicheErklaerung')."

\n"; $htmlstr .= "".$p->t('abgabetool/gelesenUndAkzeptiert').":* "; $htmlstr .=" * ".$p->t('abgabetool/pflichtfeld')." diff --git a/locale/de-AT/abgabetool.php b/locale/de-AT/abgabetool.php index 6d1eb923f..093b56255 100644 --- a/locale/de-AT/abgabetool.php +++ b/locale/de-AT/abgabetool.php @@ -91,5 +91,5 @@ $this->phrasen['abgabetool/projektbeurteilungDownload']='Projektbeurteilung heru $this->phrasen['abgabetool/projektbeurteilungErstDownload']='Erst-/Begutachter'; $this->phrasen['abgabetool/projektbeurteilungZweitDownload']='Zweitbegutachter'; $this->phrasen['abgabetool/fehlerErmittelnEndabgabeProjektarbeit']='Fehler beim Ermitteln des Enduplaods der Projektarbeit'; -$this->phrasen['abgabetool/uploadedDocumentNotSigned']='The uploaded document is not signed DE'; +$this->phrasen['abgabetool/uploadedDocumentNotSigned']='Warning! The uploaded document is not signed DE'; ?> diff --git a/locale/en-US/abgabetool.php b/locale/en-US/abgabetool.php index c782dedcc..333e21272 100644 --- a/locale/en-US/abgabetool.php +++ b/locale/en-US/abgabetool.php @@ -91,5 +91,5 @@ $this->phrasen['abgabetool/projektbeurteilungDownload']='Thesis-Assessment downl $this->phrasen['abgabetool/projektbeurteilungErstDownload']='First-/Assessor'; $this->phrasen['abgabetool/projektbeurteilungZweitDownload']='Second Assessor'; $this->phrasen['abgabetool/fehlerErmittelnEndabgabeProjektarbeit']='Error when getting endupload of project work'; -$this->phrasen['abgabetool/uploadedDocumentNotSigned']='The uploaded document is not signed EN'; +$this->phrasen['abgabetool/uploadedDocumentNotSigned']='Warning! The uploaded document is not signed'; ?> From 2d2383639617fe349f8263927d607556afb7d6e7 Mon Sep 17 00:00:00 2001 From: Paolo Date: Mon, 16 May 2022 16:23:15 +0200 Subject: [PATCH 015/646] Translated german phrase --- locale/de-AT/abgabetool.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locale/de-AT/abgabetool.php b/locale/de-AT/abgabetool.php index 093b56255..378544811 100644 --- a/locale/de-AT/abgabetool.php +++ b/locale/de-AT/abgabetool.php @@ -91,5 +91,5 @@ $this->phrasen['abgabetool/projektbeurteilungDownload']='Projektbeurteilung heru $this->phrasen['abgabetool/projektbeurteilungErstDownload']='Erst-/Begutachter'; $this->phrasen['abgabetool/projektbeurteilungZweitDownload']='Zweitbegutachter'; $this->phrasen['abgabetool/fehlerErmittelnEndabgabeProjektarbeit']='Fehler beim Ermitteln des Enduplaods der Projektarbeit'; -$this->phrasen['abgabetool/uploadedDocumentNotSigned']='Warning! The uploaded document is not signed DE'; +$this->phrasen['abgabetool/uploadedDocumentNotSigned']='Warnung! Das hochgeladene Dokument ist nicht signiert'; ?> From 94a1534c14e3ec3781adef1be5db921b0e29c68e Mon Sep 17 00:00:00 2001 From: Paolo Date: Mon, 23 May 2022 14:42:59 +0200 Subject: [PATCH 016/646] - Warning Wrap on small Screens in Leturer side - Perform Signatur Check only on Files from Type Endupload --- cis/private/lehre/abgabe_lektor_details.php | 57 ++++++++++++-------- cis/private/lehre/abgabe_student_details.php | 28 +++------- 2 files changed, 40 insertions(+), 45 deletions(-) diff --git a/cis/private/lehre/abgabe_lektor_details.php b/cis/private/lehre/abgabe_lektor_details.php index 29a1221af..f0a19c89a 100644 --- a/cis/private/lehre/abgabe_lektor_details.php +++ b/cis/private/lehre/abgabe_lektor_details.php @@ -548,6 +548,8 @@ $htmlstr .= " $result=@$db->db_query($qry); while ($row=@$db->db_fetch_object($result)) { + $uploadedDocumentSigned = null; + $htmlstr .= "
\n"; $htmlstr .= "\n"; $htmlstr .= "\n"; @@ -649,43 +651,52 @@ $result=@$db->db_query($qry); { $htmlstr .= "     "; } - if(file_exists(PAABGABE_PATH.$row->paabgabe_id.'_'.$uid.'.pdf')) - { - $uploadedDocumentSigned = null; - // Check if the document is signed - $signList = SignatureLib::list(PAABGABE_PATH.$row->paabgabe_id.'_'.$uid.'.pdf'); - if (is_array($signList) && count($signList) > 0) + if (file_exists(PAABGABE_PATH.$row->paabgabe_id.'_'.$uid.'.pdf')) + { + if ($row->paabgabetyp_kurzbz == 'end') { - // The document is signed - } - elseif ($signList === null) - { - $uploadedDocumentSigned = 'WARNING: signature server error'; - } - else - { - $uploadedDocumentSigned = $p->t('abgabetool/uploadedDocumentNotSigned'); + // Check if the document is signed + $signList = SignatureLib::list(PAABGABE_PATH.$row->paabgabe_id.'_'.$uid.'.pdf'); + if (is_array($signList) && count($signList) > 0) + { + // The document is signed + } + elseif ($signList === null) + { + $uploadedDocumentSigned = 'WARNING: signature server error'; + } + else + { + $uploadedDocumentSigned = $p->t('abgabetool/uploadedDocumentNotSigned'); + } } $htmlstr .= " PDF - "; - if ($uploadedDocumentSigned != null) - { - $htmlstr .= '
- '.$uploadedDocumentSigned.' -
'; - } - $htmlstr .= ""; + + "; } else { $htmlstr .= "     "; } + $htmlstr .= " \n"; + if ($uploadedDocumentSigned != null) + { + $htmlstr .= ' + + + +
+ '.$uploadedDocumentSigned.' +
+ + '; + } $htmlstr .= "
\n"; } diff --git a/cis/private/lehre/abgabe_student_details.php b/cis/private/lehre/abgabe_student_details.php index 949749a3b..ed29519ff 100644 --- a/cis/private/lehre/abgabe_student_details.php +++ b/cis/private/lehre/abgabe_student_details.php @@ -282,41 +282,25 @@ if($command=="update" && $error!=true) $extensions = explode(".", $_FILES['datei']['name']); if(strtoupper(end($extensions))=='PDF') { - if($paabgabetyp_kurzbz!='end') + if ($paabgabetyp_kurzbz != 'end') { //"normaler" Upload move_uploaded_file($_FILES['datei']['tmp_name'], PAABGABE_PATH.$paabgabe_id.'_'.$uid.'.pdf'); - if(file_exists(PAABGABE_PATH.$paabgabe_id.'_'.$uid.'.pdf')) - { - // Check if the document is signed - $signList = SignatureLib::list(PAABGABE_PATH.$paabgabe_id.'_'.$uid.'.pdf'); - if (is_array($signList) && count($signList) > 0) - { - // The document is signed - } - elseif ($signList === null) - { - $uploadedDocumentSigned = 'WARNING: signature server error'; - } - else - { - $uploadedDocumentSigned = $p->t('abgabetool/uploadedDocumentNotSigned'); - } - } - else + if (!file_exists(PAABGABE_PATH.$paabgabe_id.'_'.$uid.'.pdf')) { echo $p->t('global/dateiNichtErfolgreichHochgeladen'); } } - else + else // endupload type { //Upload der Endabgabe - Eingabe der Zusatzdaten $command='add'; - if(!$error) + if (!$error) { move_uploaded_file($_FILES['datei']['tmp_name'], PAABGABE_PATH.$paabgabe_id.'_'.$uid.'.pdf'); } - if(file_exists(PAABGABE_PATH.$paabgabe_id.'_'.$uid.'.pdf')) + + if (file_exists(PAABGABE_PATH.$paabgabe_id.'_'.$uid.'.pdf')) { // Check if the document is signed $signList = SignatureLib::list(PAABGABE_PATH.$paabgabe_id.'_'.$uid.'.pdf'); From c354c69e212be33093bf27000ca9efa54a891e44 Mon Sep 17 00:00:00 2001 From: Paolo Date: Tue, 24 May 2022 11:23:48 +0200 Subject: [PATCH 017/646] Fixed Zwischenabgabe file upload --- cis/private/lehre/abgabe_student_details.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/cis/private/lehre/abgabe_student_details.php b/cis/private/lehre/abgabe_student_details.php index ed29519ff..f91f410ab 100644 --- a/cis/private/lehre/abgabe_student_details.php +++ b/cis/private/lehre/abgabe_student_details.php @@ -286,7 +286,19 @@ if($command=="update" && $error!=true) { //"normaler" Upload move_uploaded_file($_FILES['datei']['tmp_name'], PAABGABE_PATH.$paabgabe_id.'_'.$uid.'.pdf'); - if (!file_exists(PAABGABE_PATH.$paabgabe_id.'_'.$uid.'.pdf')) + if (file_exists(PAABGABE_PATH.$paabgabe_id.'_'.$uid.'.pdf')) + { + exec('chmod 640 "'.PAABGABE_PATH.$paabgabe_id.'_'.$uid.'.pdf'.'"'); + + $qry="UPDATE campus.tbl_paabgabe SET + abgabedatum = now(), + updatevon = ".$db->db_add_param($user).", + updateamum = now() + WHERE paabgabe_id=".$db->db_add_param($paabgabe_id, FHC_INTEGER); + $result=$db->db_query($qry); + echo $p->t('global/dateiErfolgreichHochgeladen'); + } + else { echo $p->t('global/dateiNichtErfolgreichHochgeladen'); } From 7f2025c41405f261fa103ea4a242730c056f1c0f Mon Sep 17 00:00:00 2001 From: Paolo Date: Tue, 24 May 2022 11:27:24 +0200 Subject: [PATCH 018/646] Added signature config entries to config/cis.config-default.inc.php --- config/cis.config-default.inc.php | 17 +++++++++++++++++ config/vilesci.config-default.inc.php | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/config/cis.config-default.inc.php b/config/cis.config-default.inc.php index 9d31548f6..d6f920259 100644 --- a/config/cis.config-default.inc.php +++ b/config/cis.config-default.inc.php @@ -204,6 +204,23 @@ define('TABLE_ID','_id'); define('TABLE_BEGIN','tbl_'); define('VIEW_BEGIN','vw_'); +/** + * Signatur + * DEFAULT: https://signatur.example.com/api/sign + */ +// Generic URL +define('SIGNATUR_URL', 'https://signatur.dev.technikum-wien.at/api'); +// Sign API +define('SIGNATUR_SIGN_API', 'sign'); +// List API +define('SIGNATUR_LIST_API', 'list'); +// User für Zugriff auf Signaturserver +define('SIGNATUR_USER', 'fhcomplete'); +// Passwort für Zugriff auf Signaturserver +define('SIGNATUR_PASSWORD', 'supersecretpassword'); +// Signaturprofil das verwendet werden soll +define('SIGNATUR_DEFAULT_PROFILE', 'FHC_AMT_GROSS_DE'); + //Gibt an, ob das Studienbuchblatt im CIS gedruckt werden kann define('CIS_DOKUMENTE_STUDIENBUCHLBATT_DRUCKEN',true); diff --git a/config/vilesci.config-default.inc.php b/config/vilesci.config-default.inc.php index a3e4cbece..c4232b020 100644 --- a/config/vilesci.config-default.inc.php +++ b/config/vilesci.config-default.inc.php @@ -195,7 +195,7 @@ define('SIGNATUR_LIST_API', 'list'); // User für Zugriff auf Signaturserver define('SIGNATUR_USER', 'fhcomplete'); // Passwort für Zugriff auf Signaturserver -define('SIGNATUR_PASSWORD', 'Fhcomplet3Signature!'); +define('SIGNATUR_PASSWORD', 'supersecretpassword'); // Signaturprofil das verwendet werden soll define('SIGNATUR_DEFAULT_PROFILE', 'FHC_AMT_GROSS_DE'); From 8880e07bf20d1332455a4a598e5cd44a4d42be8d Mon Sep 17 00:00:00 2001 From: Paolo Date: Tue, 24 May 2022 12:22:30 +0200 Subject: [PATCH 019/646] include/dokument_export.class.php now checks the new signature server response structure --- include/dokument_export.class.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/include/dokument_export.class.php b/include/dokument_export.class.php index 3a6e57657..7d797cb21 100644 --- a/include/dokument_export.class.php +++ b/include/dokument_export.class.php @@ -559,18 +559,19 @@ class dokument_export curl_close($ch); $resultdata = json_decode($result); - if (isset($resultdata->success) && $resultdata->success == 'true') + // If it is success + if (isset($resultdata->error) && $resultdata->error == 0) { $this->signed_filename = $this->temp_folder .'/signed.pdf'; - file_put_contents($this->signed_filename, base64_decode($resultdata->document)); + file_put_contents($this->signed_filename, base64_decode($resultdata->retval)); return true; } - else + else // otherwise if it is an error { - if(isset($resultdata->errormsg)) - $this->errormsg = $resultdata->errormsg; + if(isset($resultdata->retval)) + $this->errormsg = $resultdata->retval; else - $this->errormsg = 'Unknown Error:'.print_r($resultdata,true); + $this->errormsg = 'Unknown Error:'.print_r($resultdata, true); return false; } } From c87aee0ddf226a6f91ae842c603eb9e007b0ec22 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Fri, 24 Jun 2022 08:10:51 +0200 Subject: [PATCH 020/646] Zeitsperre Umbau Mail auf Sanchomail, Anzeige Zeitsaldo in Sanchomail, Adpatierungen Urlaub --- cis/private/profile/zeitsperre_resturlaub.php | 210 ++++++++++++++++-- include/zeitsperre.class.php | 49 +++- locale/de-AT/urlaubstool.php | 7 +- locale/en-US/urlaubstool.php | 7 + 4 files changed, 249 insertions(+), 24 deletions(-) diff --git a/cis/private/profile/zeitsperre_resturlaub.php b/cis/private/profile/zeitsperre_resturlaub.php index 8e449b12d..b5118dce4 100644 --- a/cis/private/profile/zeitsperre_resturlaub.php +++ b/cis/private/profile/zeitsperre_resturlaub.php @@ -31,6 +31,7 @@ require_once('../../../include/person.class.php'); require_once('../../../include/benutzer.class.php'); require_once('../../../include/mitarbeiter.class.php'); require_once('../../../include/mail.class.php'); +require_once('../../../include/sancho.inc.php'); require_once('../../../include/benutzerberechtigung.class.php'); require_once('../../../include/phrasen.class.php'); require_once('../../../include/zeitaufzeichnung.class.php'); @@ -65,6 +66,7 @@ if(isset($_GET['uid'])) die($p->t('global/FuerDieseAktionBenoetigenSieAdministrationsrechte')); } } + $datum_obj = new datum(); $ma= new mitarbeiter(); @@ -119,7 +121,8 @@ $( document ).ready(function() { for(i in addon) { - addon[i].init("cis/private/profile/zeitsperre_resturlaub.php", {uid:\''.$uid.'\', holiDays: holiDays}); + + addon[i].init("cis/private/profile/zeitsperre_resturlaub.php", {uid:\''.$uid.'\', holiDays: holiDays}); } } @@ -158,6 +161,63 @@ $( document ).ready(function() } return [true, ""]; } + +function AddonCaseTimeLoadZeitsaldo(uid) +{ + $.ajax({ + type: "GET", + dataType: "json", + url: "'.APP_ROOT.'/addons/casetime/vilesci/zeitsaldo.php?uid="+uid, + success: function (result) + { + if (result===false) + { + $("#zeitsaldo").html("error"); + } + else + { + var DatumAktuell = new Date(); + //var DatumAktuell = new Date(2016,0,11); + var MonatAktuell = DatumAktuell.getMonth()+1; + var MonatLetztes = MonatAktuell - 1; + var JahrAktuell = DatumAktuell.getFullYear(); + var JahrLetztes = DatumAktuell.getFullYear(); + var VorJahr = JahrAktuell -1; + if (MonatLetztes == 0) + { + MonatLetztes = 12; + JahrLetztes = JahrAktuell - 1; + } + var MonatVorLetztes = MonatLetztes -1; + var JahrVorLetztes = JahrLetztes; + if (MonatVorLetztes == 0) + { + MonatVorLetztes = 12; + JahrVorLetztes = JahrLetztes -1; + } + + + var zahl = parseFloat(result); + if (zahl > 0) + var faktor = 1; + else + var faktor = -1; + zahl = zahl * faktor; + var std = Math.floor(zahl); + var min = (zahl-Math.floor(zahl))*60; + min = Math.round(min); + var std_anzeigealt = std+"h:"+min+"m"; + + $(\'input[name="zeitsaldo"]\').val("Aktueller Stundensaldo: "+result +" Stunden ("+std_anzeigealt+")"); + + } + }, + error: function(){ + alert("Error Casetime Load"); + } + }); +} + '; ?> @@ -339,12 +399,16 @@ function showHideStudeDropDown() updateamum = date('Y-m-d H:i:s'); $zeitsperre->updatevon = $uid; + // Zeitsperretyp Beschreibung + $zeitsperre->loadZeitsperretyp($zeitsperre->zeitsperretyp_kurzbz); + $zeitsperre->beschreibung = $zeitsperre->result[0]->beschreibung; + if($zeitsperre->save()) { echo "

".$p->t('global/erfolgreichgespeichert')."

"; if(URLAUB_TOOLS) { - if($zeitsperre->new && $zeitsperre->zeitsperretyp_kurzbz=='Urlaub') + //Beim Anlegen von neuen Urlauben oder neuem Zeitausgleich wird ein Mail an den Vorgesetzten versendet + if($zeitsperre->new && ($zeitsperre->zeitsperretyp_kurzbz=='Urlaub' || $zeitsperre->zeitsperretyp_kurzbz == 'ZA') + || !$zeitsperre->new && $zeitsperre->zeitsperretyp_kurzbz == 'ZA') { //Beim Anlegen von neuen Urlauben wird ein Mail an den Vorgesetzten versendet um diesen Freizugeben $prsn = new person(); - $vorgesetzter = $ma->getVorgesetzte($uid); + $vorgesetzter = $ma->getVorgesetzte($uid); + if($vorgesetzter) { $to=''; @@ -536,16 +607,73 @@ if(isset($_GET['type']) && ($_GET['type']=='edit_sperre' || $_GET['type']=='new_ else $jahr = $datum_obj->formatDatum($zeitsperre->vondatum, 'Y'); - $message = "Dies ist eine automatische Mail! \n". - "$benutzer->nachname $benutzer->vorname hat einen neuen Urlaub eingetragen:\n". - "$zeitsperre->bezeichnung von ".$datum_obj->formatDatum($zeitsperre->vondatum,'d.m.Y')." bis ".$datum_obj->formatDatum($zeitsperre->bisdatum,'d.m.Y')."\n\n". - "Sie können diesen unter folgender Adresse freigeben:\n". - APP_ROOT."cis/private/profile/urlaubsfreigabe.php?uid=$uid&year=".$jahr; - $from='vilesci@'.DOMAIN; - $mail = new mail($to, $from, 'Freigabeansuchen', $message); - if($mail->send()) + // Wenn ein neuer Urlaub eingetragen wurde, Freigabemail-Text + if ($zeitsperre->zeitsperretyp_kurzbz=='Urlaub') { - echo "
".$p->t('urlaubstool/freigabemailWurdeVersandt',array($fullName)).""; + if ($zeitsperre->new) + { + $mailSancho = " $benutzer->nachname $benutzer->vorname hat einen neuen Urlaub eingetragen:
"; + + $mailSancho.= (!empty($zeitsperre->bezeichnung) ? $zeitsperre->bezeichnung : $zeitsperre->beschreibung). + " von ".$datum_obj->formatDatum($zeitsperre->vondatum,'d.m.Y'). + " bis ".$datum_obj->formatDatum($zeitsperre->bisdatum,'d.m.Y'). + ".
Sie können diesen unter folgender Adresse freigeben:

". + " Link Urlaubstool "; + + $subject = "Freigabeansuchen"; + + $zeitsaldo = ''; + } + + } + + // Wenn ein Zeitausgleich eingetragen wurde... + if ($zeitsperre->zeitsperretyp_kurzbz == 'ZA') + { + // ...Mail-Text für neuen Zeitausgleich + if ($zeitsperre->new) + { + $mailSancho = " $benutzer->nachname $benutzer->vorname hat einen neuen Zeitausgleich eingetragen:
"; + + $mailSancho.= (!empty($zeitsperre->bezeichnung) ? $zeitsperre->bezeichnung : $zeitsperre->beschreibung). + " von ".$datum_obj->formatDatum($zeitsperre->vondatum,'d.m.Y'). + " bis ".$datum_obj->formatDatum($zeitsperre->bisdatum,'d.m.Y'); + + $subject = $p->t('urlaubstool/zeitausgleichNeu'); + } + // ...Mail-Text für geaenderten Zeitausgleich + else + { + $mailSancho = " $benutzer->nachname $benutzer->vorname hat den Zeitausgleich wie folgt geändert:
" ; + + $mailSancho.= (!empty($zeitsperre->bezeichnung) ? $zeitsperre->bezeichnung : $zeitsperre->beschreibung). + " von ".$datum_obj->formatDatum($zeitsperre->vondatum,'d.m.Y'). + " bis ".$datum_obj->formatDatum($zeitsperre->bisdatum,'d.m.Y'); + + $subject = $subject = $p->t('urlaubstool/zeitausgleichGeaendert'); + } + } + + $from='vilesci@'.DOMAIN; + + //Sanchomail mit Vorlage Sancho Mail Zeitausgleich + $template_data = array( + 'vorgesetzter' => $fullName, + 'textZeitausgleich' => $mailSancho, + 'Saldo'=> $zeitsaldo + ); + + if (sendSanchoMail('Sancho_Content_Zeitausgleich', $template_data, $to, $subject)) + { + if ($zeitsperre->zeitsperretyp_kurzbz=='Urlaub') + { + echo "
". $p->t('urlaubstool/freigabemailWurdeVersandt', array($fullName)). ""; + } + + if ($zeitsperre->zeitsperretyp_kurzbz == 'ZA') + { + echo "
". $p->t('urlaubstool/VorgesetzteInformiert', array($fullName)). ""; + } } else { @@ -572,9 +700,13 @@ if((isset($_GET['type']) && $_GET['type']=='delete_sperre' && isset($_GET['infor $zeitsperre = new zeitsperre(); $zeitsperre->load($_GET['id']); + $zeitsperre->loadZeitsperretyp($zeitsperre->zeitsperretyp_kurzbz); + $zeitsperre->beschreibung = $zeitsperre->result[0]->beschreibung; + $vondatum = $zeitsperre->getVonDatum(); $bisdatum = $zeitsperre->getBisDatum(); + if(!$zeitsperre->delete($_GET['id'])) echo $zeitsperre->errormsg; @@ -604,16 +736,43 @@ if((isset($_GET['type']) && $_GET['type']=='delete_sperre' && isset($_GET['infor $benutzer = new benutzer(); $benutzer->load($uid); - $message = $p->t('urlaubstool/diesIstEineAutomatischeMail')."\n". - $p->t('urlaubstool/xHatUrlaubGeloescht',array($benutzer->nachname,$benutzer->vorname)).":\n"; + + if ($zeitsperre->zeitsperretyp_kurzbz == 'Urlaub') + { + $mailSancho = $p->t('urlaubstool/xHatUrlaubGeloescht', array($benutzer->nachname, $benutzer->vorname)).":
"; + + $mailSancho.= (!empty($zeitsperre->bezeichnung) ? $zeitsperre->bezeichnung : $zeitsperre->beschreibung). + " von ".$datum_obj->formatDatum($zeitsperre->vondatum,'d.m.Y'). + " bis ".$datum_obj->formatDatum($zeitsperre->bisdatum,'d.m.Y'); + + // $subject = $p->t('urlaubstool/freigegebenerUrlaubGeloescht'); + $subject = $p->t('urlaubstool/UrlaubGeloescht'); - $message.= $p->t('urlaubstool/von')." ".date("d.m.Y", strtotime($vondatum))." ".$p->t('urlaubstool/bis')." ".date("d.m.Y", strtotime($bisdatum))."\n"; + } + + if ($zeitsperre->zeitsperretyp_kurzbz == 'ZA') + { + $mailSancho = $p->t('urlaubstool/xHatZeitausgleichGeloescht', array($benutzer->nachname, $benutzer->vorname)) . ":
"; + + $mailSancho.= (!empty($zeitsperre->bezeichnung) ? $zeitsperre->bezeichnung : $zeitsperre->beschreibung). + " von ".$datum_obj->formatDatum($zeitsperre->vondatum,'d.m.Y'). + " bis ".$datum_obj->formatDatum($zeitsperre->bisdatum,'d.m.Y'); + + $subject = $p->t('urlaubstool/zeitausgleichGeloescht'); + + } + + $template_data = array( + 'vorgesetzter' => $fullName, + 'textZeitausgleich' => $mailSancho, + 'Saldo' => '' + ); - $mail = new mail($to, 'vilesci@'.DOMAIN,$p->t('urlaubstool/freigegebenerUrlaubGeloescht'), $message); - if($mail->send()) + if (sendSanchoMail('Sancho_Content_Zeitausgleich', $template_data, $to, $subject)) { + echo "" . $p->t('global/erfolgreichgelöscht') . '
'; echo "
".$p->t('urlaubstool/VorgesetzteInformiert',array($fullName)).""; } else @@ -621,6 +780,7 @@ if((isset($_GET['type']) && $_GET['type']=='delete_sperre' && isset($_GET['infor echo "
".$p->t('urlaubstool/fehlerBeimSendenAufgetreten',array($fullName))."!"; } } + else { $vgmail="
".$p->t('urlaubstool/konnteKeinFreigabemailVersendetWerden').""; @@ -632,6 +792,7 @@ if(isset($_GET['type']) && $_GET['type']=='delete_sperre' && !isset($_GET['infor { $zeit = new zeitsperre(); $zeit->load($_GET['id']); + //pruefen ob die person die den datensatz loeschen will auch der //besitzer dieses datensatzes ist if($zeit->mitarbeiter_uid==$uid) @@ -698,7 +859,7 @@ if(count($zeit->result)>0) $content_table.="".$p->t('zeitsperre/edit').""; if ($row->vondatum < $gesperrt_bis AND in_array($row->zeitsperretyp_kurzbz,$typen_arr)) $content_table .= ' '; - else if($row->vondatum>=date("Y-m-d",time()) && $row->zeitsperretyp_kurzbz=='Urlaub') + else if($row->vondatum>=date("Y-m-d",time()) && ($row->zeitsperretyp_kurzbz=='Urlaub' || $row->zeitsperretyp_kurzbz == 'ZA')) { $content_table.="\n".$p->t('zeitsperre/loeschen').""; } @@ -836,6 +997,12 @@ if($result = $db->db_query($qry)) } $content_form.= ''; +//visible field für Zeitsaldo in Mail ZA +$content_form.= ''; + +//$content_form.= ''.$p->t('global/bezeichnung').' +//'; + $content_form.= "".$p->t('urlaubstool/erreichbarkeit')."'; + + $content_form.= ''; + + if(isset($_GET['type']) && $_GET['type']=='edit') $content_form.= ""; @@ -875,6 +1046,7 @@ echo ''; ?> + showHideStudeDropDown();'; ?> diff --git a/include/zeitsperre.class.php b/include/zeitsperre.class.php index 0e737eaf0..efae1c91d 100644 --- a/include/zeitsperre.class.php +++ b/include/zeitsperre.class.php @@ -551,13 +551,13 @@ class zeitsperre extends basis_db public function getVonBis($uid, $von, $bis, $zeitsperretyp_kurzbz = null) { $qry = ' - SELECT + SELECT zeitsperre_id, zeitsperretyp_kurzbz, vondatum, vonstunde, bisdatum, bisstunde - FROM + FROM campus.tbl_zeitsperre LEFT JOIN campus.tbl_zeitsperretyp USING (zeitsperretyp_kurzbz) - WHERE - mitarbeiter_uid = '. $this->db_add_param($uid). ' + WHERE + mitarbeiter_uid = '. $this->db_add_param($uid). ' AND ( (vondatum BETWEEN '.$this->db_add_param($von).' AND '.$this->db_add_param($bis).') OR @@ -592,5 +592,46 @@ class zeitsperre extends basis_db return true; } } + + /** + * Laedt einen Zeitsperretyp. + * + * @param $zeitsperretyp_kurzbz + * @return Gibt Zeitsperretyp als Objekt zurück. True wenn ok, false im Fehlerfall. + */ + public function loadZeitsperretyp($zeitsperretyp_kurzbz) + { + if(!is_string($zeitsperretyp_kurzbz)) + { + $this->errormsg = 'zeitsperretyp muß ein String sein'; + return false; + } + + $qry = "SELECT * FROM campus.tbl_zeitsperretyp WHERE zeitsperretyp_kurzbz = ". $this->db_add_param($zeitsperretyp_kurzbz); + + if(!$this->db_query($qry)) + { + $this->errormsg = 'Fehler beim Laden des Datensatzes'; + return false; + } + + if($row = $this->db_fetch_object()) + { + $obj = new StdClass(); + $obj->zeitsperretyp_kurzbz = $row->zeitsperretyp_kurzbz; + $obj->beschreibung = $row->beschreibung; + $obj->farbe = $row->farbe; + + $this->result[]= $obj; + } + else + { + $this->errormsg = 'Zeitsperretyp konnte nicht geladen werden'; + return false; + } + + return true; + } + } ?> diff --git a/locale/de-AT/urlaubstool.php b/locale/de-AT/urlaubstool.php index 6d6edde09..5001ed725 100644 --- a/locale/de-AT/urlaubstool.php +++ b/locale/de-AT/urlaubstool.php @@ -37,9 +37,14 @@ $this->phrasen['urlaubstool/sieKoennenDiesenUnterFolgenderAdresseFreigeben']='Si $this->phrasen['urlaubstool/freigabeansuchenUrlaub']='Freigabeansuchen Urlaub'; $this->phrasen['urlaubstool/freigabeFehlt']='Urlaub wurde noch nicht freigegeben'; $this->phrasen['urlaubstool/freigegebenerUrlaubGeloescht']='Bereits Freigegebener Urlaub wurde gelöscht'; +$this->phrasen['urlaubstool/UrlaubGeloescht']='Urlaub wurde gelöscht'; +$this->phrasen['urlaubstool/zeitausgleichNeu']='Zeitausgleich wurde neu eingetragen'; +$this->phrasen['urlaubstool/zeitausgleichGeaendert']='Zeitausgleich wurde geändert'; +$this->phrasen['urlaubstool/zeitausgleichGeloescht']='Zeitausgleich wurde gelöscht'; +$this->phrasen['urlaubstool/xHatZeitausgleichGeloescht']='%s %s hat einen eingetragenen Zeitausgleich gelöscht'; $this->phrasen['urlaubstool/VorgesetzteInformiert']='Email wurde an %s versandt'; $this->phrasen['urlaubstool/konnteKeinInformationsemailVersendetWerden']='Es konnte kein Email versendet werden, da kein Vorgesetzter eingetragen ist!'; -$this->phrasen['urlaubstool/xHatUrlaubGeloescht']='%s %s hat bereits freigegebenen Urlaub gelöscht'; +$this->phrasen['urlaubstool/xHatUrlaubGeloescht']='%s %s hat Urlaub gelöscht'; $this->phrasen['urlaubstool/urlaubsfreigabe']='Freigabe Urlaub: '; $this->phrasen['urlaubstool/bestaetigungsmailWurdeVersandt']='Bestätigungsmail an %s versandt'; $this->phrasen['urlaubstool/urlaubVon']='Ihr angefragter Urlaub von'; diff --git a/locale/en-US/urlaubstool.php b/locale/en-US/urlaubstool.php index 697117c34..17a31c986 100644 --- a/locale/en-US/urlaubstool.php +++ b/locale/en-US/urlaubstool.php @@ -36,6 +36,13 @@ $this->phrasen['urlaubstool/meineZeitsperren']='My Planned Absences'; $this->phrasen['urlaubstool/sieKoennenDiesenUnterFolgenderAdresseFreigeben']='Sie können diesen unter folgender Adresse freigeben'; //Nur übersetzen, wenn die eMail in der eingestellten Sprache versandt werden soll $this->phrasen['urlaubstool/freigabeansuchenUrlaub']='Freigabeansuchen Urlaub'; //Nur übersetzen, wenn die eMail in der eingestellten Sprache versandt werden soll $this->phrasen['urlaubstool/freigabeFehlt']='Vacation has not been approved yet'; +$this->phrasen['urlaubstool/zeitausgleichNeu']='Compensatory time was entered'; +$this->phrasen['urlaubstool/zeitausgleichGeaendert']='Compensatory time was changed'; +$this->phrasen['urlaubstool/zeitausgleichGeloescht']='Compensatory time was deleted'; +$this->phrasen['urlaubstool/xHatZeitausgleichGeloescht']='Compensatory time was deleted by %s %s'; +$this->phrasen['urlaubstool/xHatUrlaubGeloescht']='Vacation was deleted by %s %s'; +$this->phrasen['urlaubstool/UrlaubGeloescht']='Urlaub wurde gelöscht'; +$this->phrasen['urlaubstool/freigegebenerUrlaubGeloescht']='Approved Vacation was deleted by %s %s'; $this->phrasen['urlaubstool/urlaubsfreigabe']='Vacation approval: '; $this->phrasen['urlaubstool/bestaetigungsmailWurdeVersandt']='Confirmation mail to %s sent'; $this->phrasen['urlaubstool/urlaubVon']='Ihr angefragter Urlaub von'; //Nur übersetzen, wenn die eMail in der eingestellten Sprache versandt werden soll From 797cabccb969843cc9afcbd998e4923a7ffda37b Mon Sep 17 00:00:00 2001 From: ma0068 Date: Wed, 29 Jun 2022 08:46:01 +0200 Subject: [PATCH 021/646] neue Mailvorlagen Sancho fuer Zeitausgleich und Urlaub --- cis/private/profile/zeitsperre_resturlaub.php | 169 ++++++------------ 1 file changed, 51 insertions(+), 118 deletions(-) diff --git a/cis/private/profile/zeitsperre_resturlaub.php b/cis/private/profile/zeitsperre_resturlaub.php index b5118dce4..12f9dfa97 100644 --- a/cis/private/profile/zeitsperre_resturlaub.php +++ b/cis/private/profile/zeitsperre_resturlaub.php @@ -108,7 +108,12 @@ $addon_obj->loadAddons(); foreach($addon_obj->result as $addon) { if(file_exists('../../../addons/'.$addon->kurzbz.'/cis/init.js.php')) + { echo ''; + $addoncasetime = true; + require_once('../../../addons/casetime/include/functions.inc.php'); + } + } // Wenn Seite fertig geladen ist Addons aufrufen @@ -162,62 +167,6 @@ $( document ).ready(function() return [true, ""]; } -function AddonCaseTimeLoadZeitsaldo(uid) -{ - $.ajax({ - type: "GET", - dataType: "json", - url: "'.APP_ROOT.'/addons/casetime/vilesci/zeitsaldo.php?uid="+uid, - success: function (result) - { - if (result===false) - { - $("#zeitsaldo").html("error"); - } - else - { - var DatumAktuell = new Date(); - //var DatumAktuell = new Date(2016,0,11); - var MonatAktuell = DatumAktuell.getMonth()+1; - var MonatLetztes = MonatAktuell - 1; - var JahrAktuell = DatumAktuell.getFullYear(); - var JahrLetztes = DatumAktuell.getFullYear(); - var VorJahr = JahrAktuell -1; - if (MonatLetztes == 0) - { - MonatLetztes = 12; - JahrLetztes = JahrAktuell - 1; - } - var MonatVorLetztes = MonatLetztes -1; - var JahrVorLetztes = JahrLetztes; - if (MonatVorLetztes == 0) - { - MonatVorLetztes = 12; - JahrVorLetztes = JahrLetztes -1; - } - - - var zahl = parseFloat(result); - if (zahl > 0) - var faktor = 1; - else - var faktor = -1; - zahl = zahl * faktor; - var std = Math.floor(zahl); - var min = (zahl-Math.floor(zahl))*60; - min = Math.round(min); - var std_anzeigealt = std+"h:"+min+"m"; - - $(\'input[name="zeitsaldo"]\').val("Aktueller Stundensaldo: "+result +" Stunden ("+std_anzeigealt+")"); - - } - }, - error: function(){ - alert("Error Casetime Load"); - } - }); -} - '; ?> @@ -399,16 +348,20 @@ function showHideStudeDropDown() load($uid); + $nameMitarbeiter = $benutzer->vorname. " ". $benutzer->nachname; + $beschreibung = (!empty($zeitsperre->bezeichnung) ? $zeitsperre->bezeichnung : $zeitsperre->beschreibung); + if($datum_obj->formatDatum($zeitsperre->vondatum, 'm')>=9) $jahr = $datum_obj->formatDatum($zeitsperre->vondatum, 'Y')+1; else $jahr = $datum_obj->formatDatum($zeitsperre->vondatum, 'Y'); + $von = $datum_obj->formatDatum($zeitsperre->vondatum,'d.m.Y'); + $bis = $datum_obj->formatDatum($zeitsperre->bisdatum,'d.m.Y'); + // Wenn ein neuer Urlaub eingetragen wurde, Freigabemail-Text if ($zeitsperre->zeitsperretyp_kurzbz=='Urlaub') { - if ($zeitsperre->new) - { - $mailSancho = " $benutzer->nachname $benutzer->vorname hat einen neuen Urlaub eingetragen:
"; - - $mailSancho.= (!empty($zeitsperre->bezeichnung) ? $zeitsperre->bezeichnung : $zeitsperre->beschreibung). - " von ".$datum_obj->formatDatum($zeitsperre->vondatum,'d.m.Y'). - " bis ".$datum_obj->formatDatum($zeitsperre->bisdatum,'d.m.Y'). - ".
Sie können diesen unter folgender Adresse freigeben:

". - " Link Urlaubstool "; + $zeitsaldo = " Link Urlaubstool "; $subject = "Freigabeansuchen"; - - $zeitsaldo = ''; - } - + $mailvorlage = 'Sancho_Mail_Urlaub_Neu'; } // Wenn ein Zeitausgleich eingetragen wurde... + //manu zeitsperre neu if ($zeitsperre->zeitsperretyp_kurzbz == 'ZA') { // ...Mail-Text für neuen Zeitausgleich if ($zeitsperre->new) { - $mailSancho = " $benutzer->nachname $benutzer->vorname hat einen neuen Zeitausgleich eingetragen:
"; - - $mailSancho.= (!empty($zeitsperre->bezeichnung) ? $zeitsperre->bezeichnung : $zeitsperre->beschreibung). - " von ".$datum_obj->formatDatum($zeitsperre->vondatum,'d.m.Y'). - " bis ".$datum_obj->formatDatum($zeitsperre->bisdatum,'d.m.Y'); - $subject = $p->t('urlaubstool/zeitausgleichNeu'); + $mailvorlage = 'Sancho_Content_Zeitausgleich'; } // ...Mail-Text für geaenderten Zeitausgleich else { - $mailSancho = " $benutzer->nachname $benutzer->vorname hat den Zeitausgleich wie folgt geändert:
" ; - - $mailSancho.= (!empty($zeitsperre->bezeichnung) ? $zeitsperre->bezeichnung : $zeitsperre->beschreibung). - " von ".$datum_obj->formatDatum($zeitsperre->vondatum,'d.m.Y'). - " bis ".$datum_obj->formatDatum($zeitsperre->bisdatum,'d.m.Y'); - $subject = $subject = $p->t('urlaubstool/zeitausgleichGeaendert'); + $mailvorlage = 'Sancho_Content_ZA_Aendern'; } } @@ -659,11 +598,15 @@ if(isset($_GET['type']) && ($_GET['type']=='edit_sperre' || $_GET['type']=='new_ //Sanchomail mit Vorlage Sancho Mail Zeitausgleich $template_data = array( 'vorgesetzter' => $fullName, - 'textZeitausgleich' => $mailSancho, + 'nameMitarbeiter' => $nameMitarbeiter, + 'beschreibung' =>$beschreibung, + 'vonDatum' => $von, + 'bisDatum' => $bis, 'Saldo'=> $zeitsaldo ); - if (sendSanchoMail('Sancho_Content_Zeitausgleich', $template_data, $to, $subject)) + + if (sendSanchoMail($mailvorlage, $template_data, $to, $subject)) { if ($zeitsperre->zeitsperretyp_kurzbz=='Urlaub') { @@ -703,8 +646,11 @@ if((isset($_GET['type']) && $_GET['type']=='delete_sperre' && isset($_GET['infor $zeitsperre->loadZeitsperretyp($zeitsperre->zeitsperretyp_kurzbz); $zeitsperre->beschreibung = $zeitsperre->result[0]->beschreibung; - $vondatum = $zeitsperre->getVonDatum(); - $bisdatum = $zeitsperre->getBisDatum(); + $vonDatum = $zeitsperre->getVonDatum(); + $bisDatum = $zeitsperre->getBisDatum(); + + $vonDatum = $datum_obj->formatDatum($vonDatum ,'d.m.Y'); + $bisDatum = $datum_obj->formatDatum($bisDatum,'d.m.Y'); if(!$zeitsperre->delete($_GET['id'])) @@ -736,41 +682,30 @@ if((isset($_GET['type']) && $_GET['type']=='delete_sperre' && isset($_GET['infor $benutzer = new benutzer(); $benutzer->load($uid); + $nameMitarbeiter = $benutzer->vorname. " ". $benutzer->nachname; + $beschreibung = (!empty($zeitsperre->bezeichnung) ? $zeitsperre->bezeichnung : $zeitsperre->beschreibung); - if ($zeitsperre->zeitsperretyp_kurzbz == 'Urlaub') - { - $mailSancho = $p->t('urlaubstool/xHatUrlaubGeloescht', array($benutzer->nachname, $benutzer->vorname)).":
"; - - $mailSancho.= (!empty($zeitsperre->bezeichnung) ? $zeitsperre->bezeichnung : $zeitsperre->beschreibung). - " von ".$datum_obj->formatDatum($zeitsperre->vondatum,'d.m.Y'). - " bis ".$datum_obj->formatDatum($zeitsperre->bisdatum,'d.m.Y'); - - // $subject = $p->t('urlaubstool/freigegebenerUrlaubGeloescht'); + if ($zeitsperre->zeitsperretyp_kurzbz == 'Urlaub') + { $subject = $p->t('urlaubstool/UrlaubGeloescht'); - - + $mailvorlage = 'Sancho_Mail_Urlaub_Loeschen'; } - if ($zeitsperre->zeitsperretyp_kurzbz == 'ZA') - { - $mailSancho = $p->t('urlaubstool/xHatZeitausgleichGeloescht', array($benutzer->nachname, $benutzer->vorname)) . ":
"; - - $mailSancho.= (!empty($zeitsperre->bezeichnung) ? $zeitsperre->bezeichnung : $zeitsperre->beschreibung). - " von ".$datum_obj->formatDatum($zeitsperre->vondatum,'d.m.Y'). - " bis ".$datum_obj->formatDatum($zeitsperre->bisdatum,'d.m.Y'); - - $subject = $p->t('urlaubstool/zeitausgleichGeloescht'); - - } + if ($zeitsperre->zeitsperretyp_kurzbz == 'ZA') + { + $subject = $p->t('urlaubstool/zeitausgleichGeloescht'); + $mailvorlage = 'Sancho_Mail_ZA_loeschen'; + } $template_data = array( 'vorgesetzter' => $fullName, - 'textZeitausgleich' => $mailSancho, - 'Saldo' => '' + 'nameMitarbeiter' => $nameMitarbeiter, + 'beschreibung' =>$beschreibung, + 'vonDatum' => $vonDatum, + 'bisDatum' => $bisDatum ); - - if (sendSanchoMail('Sancho_Content_Zeitausgleich', $template_data, $to, $subject)) + if (sendSanchoMail($mailvorlage, $template_data, $to, $subject)) { echo "" . $p->t('global/erfolgreichgelöscht') . '
'; echo "
".$p->t('urlaubstool/VorgesetzteInformiert',array($fullName)).""; @@ -997,12 +932,10 @@ if($result = $db->db_query($qry)) } $content_form.= ''; -//visible field für Zeitsaldo in Mail ZA -$content_form.= ''; - //$content_form.= ''.$p->t('global/bezeichnung').' //'; + $content_form.= "".$p->t('urlaubstool/erreichbarkeit')."'; } else { - echo ''; } } diff --git a/cis/private/profile/zeitsperre_resturlaub.php b/cis/private/profile/zeitsperre_resturlaub.php index 12f9dfa97..f18a4b2cc 100644 --- a/cis/private/profile/zeitsperre_resturlaub.php +++ b/cis/private/profile/zeitsperre_resturlaub.php @@ -102,20 +102,20 @@ $num_rows_stunde=$db->db_num_rows($result_stunde); loadAddons(); foreach($addon_obj->result as $addon) { if(file_exists('../../../addons/'.$addon->kurzbz.'/cis/init.js.php')) - { echo ''; - $addoncasetime = true; - require_once('../../../addons/casetime/include/functions.inc.php'); - } - } +// Überprüfen, ob addon casetime aktiv ist +$addoncasetime = $addon_obj->checkActiveAddon("casetime"); +echo $addon_obj->checkActiveAddon("asterisk"); + // Wenn Seite fertig geladen ist Addons aufrufen echo ' '; - $addoncasetime = true; - require_once('../../addons/casetime/include/functions.inc.php'); - } + require_once('../../addons/casetime/include/functions.inc.php'); } + //Kopfzeile echo ' @@ -96,7 +91,7 @@ echo ' "); +if (!in_array($gebiet_id, $_SESSION['alleGebiete'])) + die($p->t('testtool/dasGebietIstNichtFuerSieBestimmt')); + $gebiet = new gebiet($gebiet_id); if($gebiet->level_start!='') diff --git a/cis/testtool/menu.php b/cis/testtool/menu.php index e4b0a82fe..1e39885d8 100644 --- a/cis/testtool/menu.php +++ b/cis/testtool/menu.php @@ -277,6 +277,7 @@ if (isset($_SESSION['pruefling_id'])) $anzahlGebiete = $db->db_num_rows($result); $lastsemester = ''; $quereinsteiger_stg = ''; + $_SESSION['alleGebiete']= []; while($row = $db->db_fetch_object($result)) { //Jedes Semester in einer eigenen Tabelle anzeigen @@ -385,6 +386,7 @@ if (isset($_SESSION['pruefling_id'])) '; + $_SESSION['alleGebiete'][] = $row->gebiet_id; } else { diff --git a/locale/de-AT/testtool.php b/locale/de-AT/testtool.php index dbafe21e9..81a2ca1ca 100644 --- a/locale/de-AT/testtool.php +++ b/locale/de-AT/testtool.php @@ -45,6 +45,7 @@ $this->phrasen['testtool/beiDiesemGebietMuessenSieJedeFrageBeantworten']='Bei di $this->phrasen['testtool/bearbeitungszeit']='Bearbeitungszeit'; $this->phrasen['testtool/dieZeitIstAbgelaufen']='Die Zeit ist abgelaufen!
Bitte aktivieren Sie Javascript in Ihrem Browser!'; $this->phrasen['testtool/dieseFrageIstNichtFuerSieBestimmt']='Diese Frage ist nicht für Sie bestimmt'; +$this->phrasen['testtool/dasGebietIstNichtFuerSieBestimmt']='Das Gebiet ist nicht für Sie bestimmt'; $this->phrasen['testtool/fehlerBeimSpeichernDerErstansicht']='Fehler beim Speichern der Erstansicht'; $this->phrasen['testtool/startDrueckenUmZuBeginnen']='Um dieses Teilgebiet zu starten, drücken Sie bitte links oben auf Gebiet starten.'; $this->phrasen['testtool/keinPrueflingseintragVorhanden']='Kein Prüflingseintrag vorhanden'; diff --git a/locale/en-US/testtool.php b/locale/en-US/testtool.php index 473ac1e0d..87b818062 100644 --- a/locale/en-US/testtool.php +++ b/locale/en-US/testtool.php @@ -45,6 +45,7 @@ $this->phrasen['testtool/beiDiesemGebietMuessenSieJedeFrageBeantworten']='In thi $this->phrasen['testtool/bearbeitungszeit']='Time'; $this->phrasen['testtool/dieZeitIstAbgelaufen']='The time has run out!
Please enable JavaScript in your browser!'; $this->phrasen['testtool/dieseFrageIstNichtFuerSieBestimmt']='This question is not intended for you'; +$this->phrasen['testtool/dasGebietIstNichtFuerSieBestimmt']='This section is not intended for you'; $this->phrasen['testtool/fehlerBeimSpeichernDerErstansicht']='Error in saving the initial view'; $this->phrasen['testtool/startDrueckenUmZuBeginnen']='To start this section, please click on Start section in the top left corner.'; $this->phrasen['testtool/keinPrueflingseintragVorhanden']='No candidate entry available.'; diff --git a/locale/it-IT/testtool.php b/locale/it-IT/testtool.php index 0f64986a9..9a3553efe 100644 --- a/locale/it-IT/testtool.php +++ b/locale/it-IT/testtool.php @@ -7,6 +7,7 @@ $this->phrasen['testtool/bitteZuerstAnmelden']=''; $this->phrasen['testtool/blaettern']=''; $this->phrasen['testtool/demo']=''; $this->phrasen['testtool/dieseFrageIstNichtFuerSieBestimmt']=''; +$this->phrasen['testtool/dasGebietIstNichtFuerSieBestimmt']=''; $this->phrasen['testtool/dieZeitIstAbgelaufen']=''; $this->phrasen['testtool/einleitung']=''; $this->phrasen['testtool/esWurdeKeineFrageGefunden']=''; From 282b46d54e22a918b87b3779221bd4f989826eb8 Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Tue, 23 Aug 2022 15:26:13 +0200 Subject: [PATCH 031/646] =?UTF-8?q?Added=20betreuerart=20Senatsvorsitz=20a?= =?UTF-8?q?nd=20Senatspr=C3=BCfer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- system/dbupdate_3.3.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/system/dbupdate_3.3.php b/system/dbupdate_3.3.php index 6824d350f..515a80bf5 100644 --- a/system/dbupdate_3.3.php +++ b/system/dbupdate_3.3.php @@ -6273,6 +6273,34 @@ if($result = @$db->db_query("SELECT * FROM information_schema.role_table_grants } } +// lehre.tbl_betreuerart: add type Senatsvorsitz +if($result = $db->db_query("SELECT 1 FROM lehre.tbl_betreuerart WHERE betreuerart_kurzbz='Senatsvorsitz'")) +{ + if($db->db_num_rows($result)==0) + { + $qry = "INSERT INTO lehre.tbl_betreuerart(betreuerart_kurzbz, beschreibung) VALUES('Senatsvorsitz', 'Senatsvorsitz kommissionelle Prüfung');"; + + if(!$db->db_query($qry)) + echo 'Betreuerart: '.$db->db_last_error().'
'; + else + echo '
Neue Betreuerart Senatsvorsitz in lehre.tbl_betreuerart hinzugefügt'; + } +} + +// lehre.tbl_betreuerart: add type Senatsprüfer +if($result = $db->db_query("SELECT 1 FROM lehre.tbl_betreuerart WHERE betreuerart_kurzbz='Senatspruefer'")) +{ + if($db->db_num_rows($result)==0) + { + $qry = "INSERT INTO lehre.tbl_betreuerart(betreuerart_kurzbz, beschreibung) VALUES('Senatspruefer', 'Senatsprüfer kommissionelle Prüfung');"; + + if(!$db->db_query($qry)) + echo 'Betreuerart: '.$db->db_last_error().'
'; + else + echo '
Neue Betreuerart Senatspruefer in lehre.tbl_betreuerart hinzugefügt'; + } +} + // *** Pruefung und hinzufuegen der neuen Attribute und Tabellen echo '

Pruefe Tabellen und Attribute!

'; From 82d7891f3c81d4abdf33c2be5a04de7412b9ed0f Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Tue, 23 Aug 2022 17:45:12 +0200 Subject: [PATCH 032/646] =?UTF-8?q?Projektarbeitsbeurteilung=20possible=20?= =?UTF-8?q?for=20Pr=C3=BCfungssenat.=20Mails=20are=20sent=20to=20Senat=20m?= =?UTF-8?q?embers,=20Senat=20members=20are=20displayed=20with=20correct=20?= =?UTF-8?q?labels,=20external=20Pr=C3=BCfer=20can=20get=20login=20token?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../education/Projektbetreuer_model.php | 36 +- cis/private/lehre/abgabe_lektor.php | 3 +- cis/private/lehre/abgabe_lektor_details.php | 336 +++++++----- cis/private/lehre/abgabe_student.php | 518 +++++++++--------- cis/private/lehre/abgabe_student_details.php | 95 ++-- include/projektbetreuer.class.php | 68 ++- locale/de-AT/abgabetool.php | 9 +- locale/en-US/abgabetool.php | 7 +- system/phrasesupdate.php | 20 + vilesci/lehre/abgabe_assistenz.php | 6 +- 10 files changed, 611 insertions(+), 487 deletions(-) diff --git a/application/models/education/Projektbetreuer_model.php b/application/models/education/Projektbetreuer_model.php index 0200f6468..f6205f67f 100644 --- a/application/models/education/Projektbetreuer_model.php +++ b/application/models/education/Projektbetreuer_model.php @@ -54,18 +54,28 @@ class Projektbetreuer_model extends DB_Model $qry = "SELECT DISTINCT ON (pers.person_id) pers.person_id, betreuerart_kurzbz, vorname, nachname, trim(COALESCE(titelpre,'')||' '||COALESCE(vorname,'')||' '||COALESCE(nachname,'')||' '||COALESCE(titelpost,'')) as voller_name, anrede, titelpre, titelpost, gebdatum, geschlecht, pa.projekttyp_kurzbz, - ben.uid, ben.alias, ma.personalnummer, mitarbeiter_uid, student_uid - FROM lehre.tbl_projektarbeit pa - JOIN lehre.tbl_projektbetreuer USING (projektarbeit_id) - JOIN public.tbl_person pers USING (person_id) - LEFT JOIN public.tbl_benutzer ben USING (person_id) - LEFT JOIN public.tbl_mitarbeiter ma ON ben.uid = ma.mitarbeiter_uid - WHERE ben.aktiv - AND projektarbeit_id = ? - AND betreuerart_kurzbz = ? - ORDER BY pers.person_id, CASE WHEN ma.mitarbeiter_uid IS NULL THEN 1 ELSE 0 END, /*Mitarbeiter account first*/ - CASE WHEN ben.uid IS NULL THEN 1 ELSE 0 END, /*user with account first*/ - ben.insertamum"; + ben.uid, ben.alias, ma.personalnummer, mitarbeiter_uid, student_uid, + ( + SELECT kontakt + FROM public.tbl_kontakt + WHERE kontakttyp = 'email' + AND person_id = pers.person_id + ORDER BY + CASE WHEN zustellung THEN 0 ELSE 1 END, + insertamum DESC NULLS LAST + LIMIT 1 + ) AS private_email + FROM lehre.tbl_projektarbeit pa + JOIN lehre.tbl_projektbetreuer USING (projektarbeit_id) + JOIN public.tbl_person pers USING (person_id) + LEFT JOIN public.tbl_benutzer ben USING (person_id) + LEFT JOIN public.tbl_mitarbeiter ma ON ben.uid = ma.mitarbeiter_uid + WHERE (ben.aktiv OR ben.aktiv IS NULL) + AND projektarbeit_id = ? + AND betreuerart_kurzbz = ? + ORDER BY pers.person_id, CASE WHEN ma.mitarbeiter_uid IS NULL THEN 1 ELSE 0 END, /*Mitarbeiter account first*/ + CASE WHEN ben.uid IS NULL THEN 1 ELSE 0 END, /*user with account first*/ + ben.insertamum"; return $this->execQuery($qry, array($projektarbeit_id, $betreuerart_kurzbz)); } @@ -102,7 +112,7 @@ class Projektbetreuer_model extends DB_Model trim(COALESCE(titelpre,'')||' '||COALESCE(vorname,'')||' '||COALESCE(nachname,'')||' '||COALESCE(titelpost,'')) as voller_name, CASE WHEN tbl_benutzer.uid IS NULL THEN kontakt ELSE tbl_benutzer.uid || '@".DOMAIN."' END AS email, abg.abgabedatum FROM lehre.tbl_projektbetreuer betr - JOIN lehre.tbl_projektarbeit parb ON betr.projektarbeit_id = parb.projektarbeit_id + JOIN lehre.tbl_projektarbeit parb ON betr.projektarbeit_id = parb.projektarbeit_id JOIN public.tbl_person pers ON betr.person_id = pers.person_id LEFT JOIN public.tbl_kontakt ON pers.person_id = tbl_kontakt.person_id AND kontakttyp = 'email' AND zustellung = true LEFT JOIN public.tbl_benutzer ON pers.person_id = tbl_benutzer.person_id diff --git a/cis/private/lehre/abgabe_lektor.php b/cis/private/lehre/abgabe_lektor.php index 414c5e423..069f3caf3 100644 --- a/cis/private/lehre/abgabe_lektor.php +++ b/cis/private/lehre/abgabe_lektor.php @@ -75,8 +75,7 @@ $sql_query = "SELECT WHERE public.tbl_benutzer.person_id=lehre.tbl_projektbetreuer.person_id AND public.tbl_benutzer.uid=".$db->db_add_param($getuid).") ".($showall?'':' AND public.tbl_benutzer.aktiv AND lehre.tbl_projektarbeit.note IS NULL ')." - AND (betreuerart_kurzbz='Betreuer' OR betreuerart_kurzbz='Begutachter' OR betreuerart_kurzbz='Erstbegutachter' - OR betreuerart_kurzbz='Zweitbegutachter' OR betreuerart_kurzbz='Erstbetreuer') + AND betreuerart_kurzbz IN ('Betreuer', 'Begutachter', 'Erstbegutachter', 'Zweitbegutachter', 'Erstbetreuer', 'Senatsvorsitz', 'Senatspruefer') ORDER BY tbl_projektarbeit.projektarbeit_id, betreuerart_kurzbz desc) as xy ORDER BY nachname"; diff --git a/cis/private/lehre/abgabe_lektor_details.php b/cis/private/lehre/abgabe_lektor_details.php index a508de098..ed33add27 100644 --- a/cis/private/lehre/abgabe_lektor_details.php +++ b/cis/private/lehre/abgabe_lektor_details.php @@ -121,9 +121,9 @@ $titel = $projektarbeit_obj->titel; $student_uid = $projektarbeit_obj->student_uid; // paarbeit sollte nur ab bestimmten Zeitpunkt online bewertet werden -$num_rows_sem = $projektarbeit_obj->projektarbeitIsCurrent($projektarbeit_id); +$paIsCurrent = $projektarbeit_obj->projektarbeitIsCurrent($projektarbeit_id); -if(!is_numeric($num_rows_sem) || $num_rows_sem < 0) +if(!is_numeric($paIsCurrent) || $paIsCurrent < 0) { echo "".$p->t('abgabetool/fehlerAktualitaetProjektarbeit')."
 "; } @@ -143,27 +143,28 @@ if($num_rows_endupload < 0) } // Zweitbegutachter holen -if($betreuerart=="Erstbegutachter") +if(in_array($betreuerart, array('Erstbegutacher', 'Senatsvorsitz'))) { - $projektbetreuer = new projektbetreuer(); - $alleBegutachter = $projektbetreuer->getProjektbetreuer($projektarbeit_id); + $alleBegutachter = new projektbetreuer(); + $alleBegutachterRes = $alleBegutachter->getProjektbetreuer($projektarbeit_id); - if ($alleBegutachter) + if ($alleBegutachterRes) { - $alleBegutachterResults = $projektbetreuer->result; - - foreach ($alleBegutachterResults as $begutachter) + $zweitbetreuerArr = array(); + foreach ($alleBegutachter->result as $begutachter) { - if ($begutachter->betreuerart_kurzbz == "Erstbegutachter") + if (in_array($begutachter->betreuerart_kurzbz, array('Erstbegutacher', 'Senatsvorsitz'))) { + // dem Erstbetreuer zugewiesene Zweitbetreuer holen $erstbetreuer_id = $begutachter->person_id; - $zweitbegutachter = $projektbetreuer->getZweitbegutachterWithToken($erstbetreuer_id, $projektarbeit_id, $student_uid); - break; + $zweitbegutachter = new projektbetreuer(); + $zweitbegutachterRes = $zweitbegutachter->getZweitbegutachterWithToken($erstbetreuer_id, $projektarbeit_id, $student_uid); + if ($zweitbegutachterRes) $zweitbetreuerArr = array_merge($zweitbetreuerArr, $zweitbegutachter->result); } } // Mail mit Token an Zweitbegutachter senden - if ($zweitbegutachter && $num_rows_sem >= 1 && isset($_GET['zweitbegutachtertoken'])) + if ($zweitbegutachterRes && $paIsCurrent >= 1 && isset($_GET['zweitbegutachtertoken']) && isset($_GET['zweitbetreuer_person_id'])) { $qry_std="SELECT * FROM campus.vw_benutzer where uid=".$db->db_add_param($uid); if(!$result_std=$db->db_query($qry_std)) @@ -173,15 +174,24 @@ if($betreuerart=="Erstbegutachter") else { $row_std=@$db->db_fetch_object($result_std); - $mailres = sendZweitbegutachterMail($zweitbegutachter, $erstbetreuer_id, $row_std); + foreach ($zweitbetreuerArr as $zbg) + { + // if Zweitbetreuer is the one for which token was requested, send mail + if ($zbg->person_id == $_GET['zweitbetreuer_person_id']) + { + $mailres = sendZweitbegutachterMail($zbg, $erstbetreuer_id, $row_std); - if ($mailres) - { - echo "
".$p->t('abgabetool/zweitbegutachterMailGesendet', $zweitbegutachter->email)."
 "; - } - else - { - echo "".$p->t('abgabetool/fehlerMailZweitBegutachter')." Mail: ".$zweitbegutachter->email."
 "; + if ($mailres) + { + echo "
" + .$p->t('abgabetool/zweitbegutachterMailGesendet', array($zbg->voller_name, $zbg->email)) + ."
 "; + } + else + { + echo "".$p->t('abgabetool/fehlerMailZweitBegutachter')." Mail: ".$zbg->email."
 "; + } + } } } } @@ -465,7 +475,7 @@ $htmlstr .= "\n"; $htmlstr .= ""; $htmlstr .= ""; $htmlstr .= "\n"; -if (isset($zweitbegutachter) && $zweitbegutachter) // wenn es Zweitbegutachter gibt + +if (isset($zweitbetreuerArr) && is_array($zweitbetreuerArr)) // wenn es Zweitbetreuer gibt { - // Zweitbegutachter anzeigen + // Zweitbetreuer anzeigen $htmlstr .= "\n"; - $htmlstr .= "\n"; $htmlstr .= "\n"; $htmlstr .= "\n"; @@ -545,122 +571,122 @@ $htmlstr .= "\n"; $result=@$db->db_query($qry); - while ($row=@$db->db_fetch_object($result)) +while ($row=@$db->db_fetch_object($result)) +{ + $htmlstr .= "\n"; + $htmlstr .= "\n"; + $htmlstr .= "\n"; + $htmlstr .= "\n"; + $htmlstr .= "\n"; + $htmlstr .= "\n"; + $htmlstr .= "\n"; + if(!$row->abgabedatum) { - $htmlstr .= "\n"; - $htmlstr .= "\n"; - $htmlstr .= "\n"; - $htmlstr .= "\n"; - $htmlstr .= "\n"; - $htmlstr .= "\n"; - $htmlstr .= "\n"; + if ($row->datumdatum>=date('Y-m-d')) && ($row->datumabgabedatum>$row->datum) + { + //Abgabe nach Termin - weiß auf hellrot + $bgcol='#EA7B7B'; + $fcol='#FFFFFF'; + } + else + { + //Abgabe vor Termin - schwarz auf grün + $bgcol='#00FF00'; + $fcol='#000000'; + } + } + //$htmlstr .= ""; + } + else + { + $htmlstr .= ""; + } + $htmlstr .= " \n"; + $htmlstr .= " \n"; + $htmlstr .= " \n"; + $htmlstr .= " \n"; + $htmlstr .= " \n"; + if($user==$row->insertvon && $betreuerart!="Zweitbegutachter") + { + $htmlstr .= " "; + if(!$row->abgabedatum) { - if ($row->datumdatum>=date('Y-m-d')) && ($row->datumt('global/loeschen')."' onclick='return confdel()' title='".$p->t('abgabetool/terminLoeschen')."'>"; } else { - if($row->abgabedatum>$row->datum) - { - //Abgabe nach Termin - weiß auf hellrot - $bgcol='#EA7B7B'; - $fcol='#FFFFFF'; - } - else - { - //Abgabe vor Termin - schwarz auf grün - $bgcol='#00FF00'; - $fcol='#000000'; - } + $htmlstr .= " "; } - //$htmlstr .= ""; - } - else - { - $htmlstr .= ""; - } - $htmlstr .= " \n"; - $htmlstr .= " \n"; - $htmlstr .= " \n"; - $htmlstr .= " \n"; - $htmlstr .= " \n"; - if($user==$row->insertvon && $betreuerart!="Zweitbegutachter") - { - $htmlstr .= " "; - - if(!$row->abgabedatum) - { - $htmlstr .= " "; - } - else - { - $htmlstr .= " "; - } - } - else - { - $htmlstr .= " "; - } - if(file_exists(PAABGABE_PATH.$row->paabgabe_id.'_'.$uid.'.pdf')) - { - $htmlstr .= " "; - } - else - { - $htmlstr .= " "; - } - if($row->abgabedatum && $row->paabgabetyp_kurzbz=="end") - { - $htmlstr .= " "; - } - else - { - $htmlstr .= " "; - } - $htmlstr .= " \n"; - - - $htmlstr .= "\n"; } + else + { + $htmlstr .= " "; + } + if(file_exists(PAABGABE_PATH.$row->paabgabe_id.'_'.$uid.'.pdf')) + { + $htmlstr .= " "; + } + else + { + $htmlstr .= " "; + } + if($row->abgabedatum && $row->paabgabetyp_kurzbz=="end") + { + $htmlstr .= " "; + } + else + { + $htmlstr .= " "; + } + $htmlstr .= " \n"; + + + $htmlstr .= "\n"; +} //Eingabezeile fuer neuen Termin $htmlstr .= ''."\n"; @@ -721,10 +747,16 @@ function sendZweitbegutachterMail($zweitbegutachter, $erstbegutachter_person_id, if (!$projektbetreuer) return $projektbetreuer; - $zweitbetr = $projektbetreuer->getZweitbegutachterWithToken($erstbegutachter_person_id, $zweitbegutachter->projektarbeit_id, $student->uid); + $zweitbetrRes = $projektbetreuer->getZweitbegutachterWithToken( + $erstbegutachter_person_id, + $zweitbegutachter->projektarbeit_id, + $student->uid, + $zweitbegutachter->person_id + ); - if ($zweitbetr) + if ($zweitbetrRes && isset($projektbetreuer->result[0])) { + $zweitbetr = $projektbetreuer->result[0]; $intern = isset($zweitbetr->uid); $mail_baselink = APP_ROOT."index.ci.php/extensions/FHC-Core-Projektarbeitsbeurteilung/Projektarbeitsbeurteilung"; $mail_fulllink = "$mail_baselink?projektarbeit_id=".$zweitbegutachter->projektarbeit_id."&uid=".$student->uid; diff --git a/cis/private/lehre/abgabe_student.php b/cis/private/lehre/abgabe_student.php index 2a328dd35..8782c84c1 100644 --- a/cis/private/lehre/abgabe_student.php +++ b/cis/private/lehre/abgabe_student.php @@ -1,248 +1,270 @@ - - * Andreas Oesterreicher < andreas.oesterreicher@technikum-wien.at > - * Rudolf Hangl < rudolf.hangl@technikum-wien.at > - * Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at > - */ - -require_once('../../../config/cis.config.inc.php'); -require_once('../../../include/functions.inc.php'); -require_once('../../../include/datum.class.php'); -require_once('../../../include/person.class.php'); -require_once('../../../include/benutzer.class.php'); -require_once('../../../include/student.class.php'); -require_once('../../../include/studiengang.class.php'); -require_once('../../../include/benutzerberechtigung.class.php'); -require_once('../../../include/phrasen.class.php'); - -$sprache = getSprache(); -$p = new phrasen($sprache); - -if (!$db = new basis_db()) - die($p->t('global/fehlerBeimOeffnenDerDatenbankverbindung')); - -$getuid=get_uid(); -$uid=$getuid; - -if(isset($_GET['uid'])) -{ - //Studentenansicht - $uid = $_GET['uid']; - //Rechte Pruefen - $allowed=false; - - $student = new student(); - if(!$student->load($uid)) - die($p->t('global/fehlerBeimErmittelnDerUID')); - - $stg_obj = new studiengang(); - if(!$stg_obj->load($student->studiengang_kz)) - die($p->t('global/fehlerBeimLesenAusDatenbank')); - - //Berechtigung ueber das Berechtigungssystem - $rechte = new benutzerberechtigung(); - $rechte->getBerechtigungen($getuid); - if($rechte->isBerechtigt('lehre/abgabetool',$stg_obj->oe_kurzbz,'s')) - $allowed=true; - - //oder Lektor mit Betreuung dieses Studenten - $qry = "SELECT 1 - FROM - lehre.tbl_projektarbeit - JOIN lehre.tbl_projektbetreuer USING(projektarbeit_id) - JOIN campus.vw_benutzer on(vw_benutzer.person_id=tbl_projektbetreuer.person_id) - WHERE - tbl_projektarbeit.student_uid=".$db->db_add_param($uid)." AND - vw_benutzer.uid=".$db->db_add_param($getuid).";"; - - if($result = $db->db_query($qry)) - { - if($db->db_num_rows($result)>0) - { - $allowed=true; - } - } - - if(!$allowed) - { - die($p->t('abgabetool/keineBerechtigungStudentenansicht')); - } -} -$htmlstr = ''; -$htmlstr1 = ''; -$vorname=''; -$nachname=''; -$zweitbetreuer = ''; - -$sql_query = "SELECT (SELECT nachname FROM public.tbl_person WHERE person_id=tbl_projektbetreuer.person_id) AS bnachname, - (SELECT vorname FROM public.tbl_person WHERE person_id=tbl_projektbetreuer.person_id) AS bvorname, - (SELECT titelpre FROM public.tbl_person WHERE person_id=tbl_projektbetreuer.person_id) AS btitelpre, - (SELECT titelpost FROM public.tbl_person WHERE person_id=tbl_projektbetreuer.person_id) AS btitelpost, - (SELECT person_id FROM lehre.tbl_projektbetreuer WHERE projektarbeit_id=tbl_projektarbeit.projektarbeit_id - AND betreuerart_kurzbz IN ('Zweitbetreuer', 'Zweitbegutachter') LIMIT 1) AS zweitbetreuer_person_id, - (SELECT betreuerart_kurzbz FROM lehre.tbl_projektbetreuer WHERE projektarbeit_id=tbl_projektarbeit.projektarbeit_id - AND betreuerart_kurzbz IN ('Zweitbetreuer', 'Zweitbegutachter') LIMIT 1) AS zweitbetreuer_betreuerart_kurzbz, - tbl_projektbetreuer.person_id AS betreuer_person_id, - tbl_projekttyp.bezeichnung AS prjbez, *, - lehre.tbl_projektbetreuer.note as note, - public.tbl_benutzer.aktiv as aktiv, - (SELECT abgeschicktvon FROM extension.tbl_projektarbeitsbeurteilung WHERE projektarbeit_id = tbl_projektarbeit.projektarbeit_id AND betreuer_person_id = tbl_projektbetreuer.person_id) AS babgeschickt, - (SELECT abgeschicktvon FROM extension.tbl_projektarbeitsbeurteilung WHERE projektarbeit_id = tbl_projektarbeit.projektarbeit_id AND betreuerart_kurzbz IN ('Zweitbetreuer', 'Zweitbegutachter') LIMIT 1) AS zweitbetreuer_abgeschickt - FROM lehre.tbl_projektarbeit - LEFT JOIN lehre.tbl_projektbetreuer USING(projektarbeit_id) - LEFT JOIN public.tbl_benutzer ON(uid=student_uid) - LEFT JOIN public.tbl_person ON(tbl_benutzer.person_id=tbl_person.person_id) - LEFT JOIN lehre.tbl_lehreinheit USING(lehreinheit_id) - LEFT JOIN lehre.tbl_lehrveranstaltung USING(lehrveranstaltung_id) - LEFT JOIN public.tbl_studiengang USING(studiengang_kz) - LEFT JOIN lehre.tbl_projekttyp USING (projekttyp_kurzbz) - WHERE (projekttyp_kurzbz='Bachelor' OR projekttyp_kurzbz='Diplom') - AND (tbl_projektbetreuer.betreuerart_kurzbz='Betreuer' - OR tbl_projektbetreuer.betreuerart_kurzbz='Begutachter' - OR tbl_projektbetreuer.betreuerart_kurzbz='Erstbetreuer' - OR tbl_projektbetreuer.betreuerart_kurzbz='Erstbegutachter') - AND tbl_projektarbeit.student_uid=".$db->db_add_param($uid)." - ORDER BY studiensemester_kurzbz desc, tbl_lehrveranstaltung.kurzbz"; - -//AND tbl_projektarbeit.student_uid='$getuid' 'ie07m102'; -if(!$erg=$db->db_query($sql_query)) -{ - $errormsg=$p->t('global/fehlerBeimLesenAusDatenbank'); -} -else -{ - $htmlstr .= "
".$p->t('abgabetool/student').": ".$db->convert_html_chars($studentenname).""; -$semester_benotbar = $num_rows_sem >= 1; +$semester_benotbar = $paIsCurrent >= 1; $endupload_vorhanden = $num_rows_endupload >= 1; if ($semester_benotbar && $endupload_vorhanden) @@ -498,30 +508,46 @@ else } $htmlstr .= "
" . $p->t('abgabetool/titel') . ": ".$db->convert_html_chars($titel)."".$p->t('abgabetool/studentenansicht')."
" . $p->t('abgabetool/zweitBegutachter') . ": " . $zweitbegutachter->voller_name . ""; - - // keine Mail -> Fehler anzeigen - if (!isset($zweitbegutachter->email)) - $htmlstr .= "  " . $p->t("; - - // Token senden button wenn Zweitbegutachter extern ist und Projektarbeit nicht für altes Semester ist - if (isset($zweitbegutachter->email) && !isset($zweitbegutachter->uid) && $num_rows_sem >= 1) + $htmlstr .= ""; + $bart = ''; + foreach($zweitbetreuerArr as $zweitbetreuer) { - $htmlstr .= "
\n"; - $htmlstr .= ""; - $htmlstr .= ""; - $htmlstr .= ""; - $htmlstr .= " email) . "' alt='" . $p->t('abgabetool/zweitbetreuerMailSenden', $zweitbegutachter->email) . "'/>\n"; - $htmlstr .= " \n"; - $htmlstr .= "
"; - } + if ($bart !== $zweitbetreuer->betreuerart_kurzbz) + { + $htmlstr .= ($zweitbetreuer->betreuerart_kurzbz == 'Senatspruefer' ? $p->t('abgabetool/senatsPruefer') : $p->t('abgabetool/zweitBegutachter')); + $htmlstr .= ": "; + $bart = $zweitbetreuer->betreuerart_kurzbz; + } + else + $htmlstr .= ", "; + $htmlstr .= "" . $zweitbetreuer->voller_name . ""; + + // keine Mail -> Fehler anzeigen + if (!isset($zweitbetreuer->email)) + $htmlstr .= "  " . $p->t("; + + // Token senden button wenn Zweitbegutachter extern ist und Projektarbeit nicht für altes Semester ist + if (isset($zweitbetreuer->email) && !isset($zweitbetreuer->uid) && $paIsCurrent >= 1) + { + $htmlstr .= "
\n"; + $htmlstr .= ""; + $htmlstr .= ""; + $htmlstr .= ""; + $htmlstr .= ""; + $htmlstr .= " voller_name, $zweitbetreuer->email)) . "' + alt='" . $p->t('abgabetool/zweitbetreuerMailSenden', array($zweitbetreuer->voller_name, $zweitbetreuer->email)) . "'/>\n"; + $htmlstr .= " "; + $htmlstr .= "
"; + } + } $htmlstr .= "
fixtermin=='t'?'checked=\"checked\"':'')." >"; + //$htmlstr .= "fixtermin=='t'?'checked="checked" style="background-color:#FF0000;"':'')." disabled>"; + if($row->fixtermin=='t') + { + $htmlstr .= "JN".($row->abgabedatum==''?' ':$datum_obj->formatDatum($row->abgabedatum,'d.m.Y'))."       fixtermin=='t'?'checked=\"checked\"':'')." >"; - //$htmlstr .= "fixtermin=='t'?'checked="checked" style="background-color:#FF0000;"':'')." disabled>"; - if($row->fixtermin=='t') - { - $htmlstr .= "JN".($row->abgabedatum==''?' ':$datum_obj->formatDatum($row->abgabedatum,'d.m.Y'))."                     PDF    zusätzliche Daten    
              PDF    zusätzliche Daten    
\n"; - $htmlstr .= "\n"; - $htmlstr .= " - - - - - - - - "; - $htmlstr .= "\n"; - $i = 0; - while($row=$db->db_fetch_object($erg)) - { - $htmlstr1 = ''; - $zweitbetreuer_obj = new person(); - if ($zweitbetreuer_obj->load($row->zweitbetreuer_person_id)) - { - $zweitbetreuer = ', '.$db->convert_html_chars($row->zweitbetreuer_betreuerart_kurzbz).': '.$zweitbetreuer_obj->titelpre.' '.$zweitbetreuer_obj->vorname.' '.$zweitbetreuer_obj->nachname.' '.$zweitbetreuer_obj->titelpost; - } - $htmlstr1 = ''.$db->convert_html_chars($row->betreuerart_kurzbz).': '; - $vorname=$row->vorname; - $nachname=$row->nachname; - $uid=$row->uid; - ($row->btitelpre!=''?$htmlstr1 .= $row->btitelpre.' ':$htmlstr1 .= ''); - $htmlstr1 .= $row->bvorname.' '.$row->bnachname; - ($row->btitelpost!=''?$htmlstr1 .= ' '.$row->btitelpost:$htmlstr1 .= ''); - $htmlstr1 .= $zweitbetreuer; - $htmlstr .= " \n"; //class='liste".($i%2)."' - - if (is_null($row->note) && $row->aktiv === 't') - $htmlstr .= " \n"; - elseif (!is_null($row->babgeschickt) || !is_null($row->zweitbetreuer_abgeschickt)) - { - $htmlstr .= ""; - } else - { - $htmlstr .= ""; - } - - - $htmlstr .= " \n"; - $htmlstr .= " \n"; - $htmlstr .= " "; - $htmlstr .= " \n"; - $htmlstr .= " \n"; - $htmlstr .= " \n"; -// $htmlstr .= " \n"; - $htmlstr .= " \n"; - $i++; - } - $htmlstr .= "
".$p->t('abgabetool/details')."".$p->t('lvplan/sem')."".$p->t('lvplan/stg')."".$p->t('global/mail')."".$p->t('abgabetool/betreuer')."".$p->t('abgabetool/typ')."".$p->t('abgabetool/titel')."
".$p->t('abgabetool/upload').""; - - if (!is_null($row->babgeschickt)) - $htmlstr .= "".$p->t('abgabetool/projektbeurteilungErstDownload').""; - - if (!is_null($row->babgeschickt) && !is_null($row->zweitbetreuer_abgeschickt)) - $htmlstr .= "/"; - - if (!is_null($row->zweitbetreuer_abgeschickt)) - $htmlstr .= "".$p->t('abgabetool/projektbeurteilungZweitDownload').""; - - $htmlstr .= "".$row->studiensemester_kurzbz."".strtoupper($row->typ.$row->kurzbz).""; - - $qry_betr="SELECT mitarbeiter_uid FROM public.tbl_person - JOIN public.tbl_benutzer USING(person_id) - JOIN public.tbl_mitarbeiter ON(uid=mitarbeiter_uid) - WHERE person_id=".$db->db_add_param($row->betreuer_person_id, FHC_INTEGER).";"; - if($result_betr=$db->db_query($qry_betr)) - { - if($row_betr=$db->db_fetch_object($result_betr)) - { - $htmlstr.="email"; - } - else - { - $htmlstr.="UID unknown!"; - } - } - $htmlstr .= " ".$htmlstr1." ".$db->convert_html_chars($row->prjbez)."".$db->convert_html_chars($row->titel)."".$db->convert_html_chars($row->betreuerart_kurzbz)."
\n"; -} -echo ' - - - - Abgabesystem_Studentensicht - - - - - - - - - - - - -'; - - echo '

'.$p->t('abgabetool/ueberschrift'); - if(trim($uid)!='') - echo " ($uid $vorname $nachname)
"; - echo '

'; - echo $htmlstr; - echo ' -'; -?> + + * Andreas Oesterreicher < andreas.oesterreicher@technikum-wien.at > + * Rudolf Hangl < rudolf.hangl@technikum-wien.at > + * Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at > + */ + +require_once('../../../config/cis.config.inc.php'); +require_once('../../../include/functions.inc.php'); +require_once('../../../include/datum.class.php'); +require_once('../../../include/person.class.php'); +require_once('../../../include/benutzer.class.php'); +require_once('../../../include/student.class.php'); +require_once('../../../include/studiengang.class.php'); +require_once('../../../include/projektbetreuer.class.php'); +require_once('../../../include/benutzerberechtigung.class.php'); +require_once('../../../include/phrasen.class.php'); + +$sprache = getSprache(); +$p = new phrasen($sprache); + +if (!$db = new basis_db()) + die($p->t('global/fehlerBeimOeffnenDerDatenbankverbindung')); + +$getuid=get_uid(); +$uid=$getuid; + +if(isset($_GET['uid'])) +{ + //Studentenansicht + $uid = $_GET['uid']; + //Rechte Pruefen + $allowed=false; + + $student = new student(); + if(!$student->load($uid)) + die($p->t('global/fehlerBeimErmittelnDerUID')); + + $stg_obj = new studiengang(); + if(!$stg_obj->load($student->studiengang_kz)) + die($p->t('global/fehlerBeimLesenAusDatenbank')); + + //Berechtigung ueber das Berechtigungssystem + $rechte = new benutzerberechtigung(); + $rechte->getBerechtigungen($getuid); + if($rechte->isBerechtigt('lehre/abgabetool',$stg_obj->oe_kurzbz,'s')) + $allowed=true; + + //oder Lektor mit Betreuung dieses Studenten + $qry = "SELECT 1 + FROM + lehre.tbl_projektarbeit + JOIN lehre.tbl_projektbetreuer USING(projektarbeit_id) + JOIN campus.vw_benutzer on(vw_benutzer.person_id=tbl_projektbetreuer.person_id) + WHERE + tbl_projektarbeit.student_uid=".$db->db_add_param($uid)." AND + vw_benutzer.uid=".$db->db_add_param($getuid).";"; + + if($result = $db->db_query($qry)) + { + if($db->db_num_rows($result)>0) + { + $allowed=true; + } + } + + if(!$allowed) + { + die($p->t('abgabetool/keineBerechtigungStudentenansicht')); + } +} +$htmlstr = ''; +$htmlstr1 = ''; +$vorname=''; +$nachname=''; +$zweitbetreuer = ''; +$senatspruefer = ''; + +$sql_query = "SELECT (SELECT nachname FROM public.tbl_person WHERE person_id=tbl_projektbetreuer.person_id) AS bnachname, + (SELECT vorname FROM public.tbl_person WHERE person_id=tbl_projektbetreuer.person_id) AS bvorname, + (SELECT titelpre FROM public.tbl_person WHERE person_id=tbl_projektbetreuer.person_id) AS btitelpre, + (SELECT titelpost FROM public.tbl_person WHERE person_id=tbl_projektbetreuer.person_id) AS btitelpost, + (SELECT person_id FROM lehre.tbl_projektbetreuer WHERE projektarbeit_id=tbl_projektarbeit.projektarbeit_id + AND betreuerart_kurzbz IN ('Zweitbetreuer', 'Zweitbegutachter') LIMIT 1) AS zweitbetreuer_person_id, + (SELECT betreuerart_kurzbz FROM lehre.tbl_projektbetreuer WHERE projektarbeit_id=tbl_projektarbeit.projektarbeit_id + AND betreuerart_kurzbz IN ('Zweitbetreuer', 'Zweitbegutachter') LIMIT 1) AS zweitbetreuer_betreuerart_kurzbz, + tbl_projektbetreuer.person_id AS betreuer_person_id, + tbl_projekttyp.bezeichnung AS prjbez, *, + lehre.tbl_projektbetreuer.note as note, + public.tbl_benutzer.aktiv as aktiv, + (SELECT abgeschicktvon FROM extension.tbl_projektarbeitsbeurteilung WHERE projektarbeit_id = tbl_projektarbeit.projektarbeit_id AND betreuer_person_id = tbl_projektbetreuer.person_id) AS babgeschickt, + (SELECT abgeschicktvon FROM extension.tbl_projektarbeitsbeurteilung WHERE projektarbeit_id = tbl_projektarbeit.projektarbeit_id AND betreuerart_kurzbz IN ('Zweitbetreuer', 'Zweitbegutachter') LIMIT 1) AS zweitbetreuer_abgeschickt + FROM lehre.tbl_projektarbeit + LEFT JOIN lehre.tbl_projektbetreuer USING(projektarbeit_id) + LEFT JOIN public.tbl_benutzer ON(uid=student_uid) + LEFT JOIN public.tbl_person ON(tbl_benutzer.person_id=tbl_person.person_id) + LEFT JOIN lehre.tbl_lehreinheit USING(lehreinheit_id) + LEFT JOIN lehre.tbl_lehrveranstaltung USING(lehrveranstaltung_id) + LEFT JOIN public.tbl_studiengang USING(studiengang_kz) + LEFT JOIN lehre.tbl_projekttyp USING (projekttyp_kurzbz) + WHERE (projekttyp_kurzbz='Bachelor' OR projekttyp_kurzbz='Diplom') + AND betreuerart_kurzbz IN ('Betreuer', 'Begutachter', 'Erstbegutachter', 'Senatsvorsitz') + AND tbl_projektarbeit.student_uid=".$db->db_add_param($uid)." + ORDER BY studiensemester_kurzbz desc, tbl_lehrveranstaltung.kurzbz"; + +//AND tbl_projektarbeit.student_uid='$getuid' 'ie07m102'; +if(!$erg=$db->db_query($sql_query)) +{ + $errormsg=$p->t('global/fehlerBeimLesenAusDatenbank'); +} +else +{ + $htmlstr .= "
\n"; + $htmlstr .= "\n"; + $htmlstr .= " + + + + + + + + "; + $htmlstr .= "\n"; + $i = 0; + while($row=$db->db_fetch_object($erg)) + { + // get zweitbetreuer, if any + $htmlstr1 = ''; + $zweitbetreuer_obj = new person(); + if ($zweitbetreuer_obj->load($row->zweitbetreuer_person_id)) + { + $zweitbetreuer = ', '.$db->convert_html_chars($row->zweitbetreuer_betreuerart_kurzbz).': '.$zweitbetreuer_obj->titelpre.' '.$zweitbetreuer_obj->vorname.' '.$zweitbetreuer_obj->nachname.' '.$zweitbetreuer_obj->titelpost; + } + $htmlstr1 = ''.$db->convert_html_chars($row->betreuerart_kurzbz).': '; + + // get senatspruefer, if any + if ($row->betreuerart_kurzbz == 'Senatsvorsitz') + { + $senatspruefer_obj = new projektbetreuer(); + $senatsprueferRes = $senatspruefer_obj->getZweitbegutachterWithToken($row->betreuer_person_id, $row->projektarbeit_id, $row->uid); + if ($senatsprueferRes) + { + $senatspruefer .= ', Senatsprüfer: '; + $first = true; + foreach($senatspruefer_obj->result as $spr) + { + if (!$first) + $senatspruefer .= ', '; + $senatspruefer .= $spr->voller_name; + $first = false; + } + } + } + + $vorname=$row->vorname; + $nachname=$row->nachname; + $uid=$row->uid; + + ($row->btitelpre!=''?$htmlstr1 .= $row->btitelpre.' ':$htmlstr1 .= ''); + $htmlstr1 .= $row->bvorname.' '.$row->bnachname; + ($row->btitelpost!=''?$htmlstr1 .= ' '.$row->btitelpost:$htmlstr1 .= ''); + $htmlstr1 .= $zweitbetreuer; + $htmlstr1 .= $senatspruefer; + $htmlstr .= " \n"; //class='liste".($i%2)."' + + if (is_null($row->note) && $row->aktiv === 't') + $htmlstr .= " \n"; + elseif (!is_null($row->babgeschickt) || !is_null($row->zweitbetreuer_abgeschickt)) + { + $htmlstr .= ""; + } else + { + $htmlstr .= ""; + } + + + $htmlstr .= " \n"; + $htmlstr .= " \n"; + $htmlstr .= " "; + $htmlstr .= " \n"; + $htmlstr .= " \n"; + $htmlstr .= " \n"; +// $htmlstr .= " \n"; + $htmlstr .= " \n"; + $i++; + } + $htmlstr .= "
".$p->t('abgabetool/details')."".$p->t('lvplan/sem')."".$p->t('lvplan/stg')."".$p->t('global/mail')."".$p->t('abgabetool/betreuer')."".$p->t('abgabetool/typ')."".$p->t('abgabetool/titel')."
".$p->t('abgabetool/upload').""; + + if (!is_null($row->babgeschickt)) + $htmlstr .= "".$p->t('abgabetool/projektbeurteilungErstDownload').""; + + if (!is_null($row->babgeschickt) && !is_null($row->zweitbetreuer_abgeschickt)) + $htmlstr .= "/"; + + if (!is_null($row->zweitbetreuer_abgeschickt)) + $htmlstr .= "".$p->t('abgabetool/projektbeurteilungZweitDownload').""; + + $htmlstr .= "".$row->note."".$row->studiensemester_kurzbz."".strtoupper($row->typ.$row->kurzbz).""; + + $qry_betr="SELECT mitarbeiter_uid FROM public.tbl_person + JOIN public.tbl_benutzer USING(person_id) + JOIN public.tbl_mitarbeiter ON(uid=mitarbeiter_uid) + WHERE person_id=".$db->db_add_param($row->betreuer_person_id, FHC_INTEGER).";"; + if($result_betr=$db->db_query($qry_betr)) + { + if($row_betr=$db->db_fetch_object($result_betr)) + { + $htmlstr.="email"; + } + else + { + $htmlstr.="UID unknown!"; + } + } + $htmlstr .= " ".$htmlstr1." ".$db->convert_html_chars($row->prjbez)."".$db->convert_html_chars($row->titel)."".$db->convert_html_chars($row->betreuerart_kurzbz)."
\n"; +} +echo ' + + + + Abgabesystem_Studentensicht + + + + + + + + + + + + +'; + + echo '

'.$p->t('abgabetool/ueberschrift'); + if(trim($uid)!='') + echo " ($uid $vorname $nachname)
"; + echo '

'; + echo $htmlstr; + echo ' +'; +?> diff --git a/cis/private/lehre/abgabe_student_details.php b/cis/private/lehre/abgabe_student_details.php index 29d74ab66..bead1a1e9 100644 --- a/cis/private/lehre/abgabe_student_details.php +++ b/cis/private/lehre/abgabe_student_details.php @@ -435,6 +435,8 @@ if($command=="update" && $error!=true) // 1. Begutachter mail ohne Token $mail_baselink = APP_ROOT."index.ci.php/extensions/FHC-Core-Projektarbeitsbeurteilung/Projektarbeitsbeurteilung"; $mail_fulllink = "$mail_baselink?projektarbeit_id=".$projektarbeit_id."&uid=".$row_std->uid; + $projekttyp_kurzbz = $projektarbeit_obj->projekttyp_kurzbz; + $subject = $projektarbeit_obj->projekttyp_kurzbz == 'Diplom' ? 'Masterarbeitsbetreuung' : 'Bachelorarbeitsbetreuung'; $abgabetyp = $paabgabetyp_kurzbz == 'end' ? 'Endabgabe' : 'Zwischenabgabe'; $maildata = array(); @@ -452,7 +454,7 @@ if($command=="update" && $error!=true) 'ParbeitsbeurteilungEndupload', $maildata, $row_betr->mitarbeiter_uid."@".DOMAIN, - "Bachelor-/Masterarbeitsbetreuung", + $subject, 'sancho_header_min_bw.jpg', 'sancho_footer_min_bw.jpg', $user."@".DOMAIN); @@ -465,48 +467,63 @@ if($command=="update" && $error!=true) // 2. Begutachter mail, wenn Endabgabe, mit Token wenn extern if ($paabgabetyp_kurzbz == 'end') { - $projektbetreuer = new projektbetreuer(); - $zweitbetr = $projektbetreuer->getZweitbegutachterWithToken($bid, $projektarbeit_id, $row_std->uid); + // Zweitbegutachter holen + $zweitbegutachter = new projektbetreuer(); + $zweitbegutachterRes = $zweitbegutachter->getZweitbegutachterWithToken($bid, $projektarbeit_id, $row_std->uid); - if ($zweitbetr) + if ($zweitbegutachterRes) { - $tokenGenRes = $projektbetreuer->generateZweitbegutachterToken($zweitbetr->person_id, $projektarbeit_id); + $zweitbegutachterResults = $zweitbegutachter->result; - if (!$tokenGenRes) - echo "" . $p->t('abgabetool/fehlerMailZweitBegutachter') . "
 "; - - $zweitbetr = $projektbetreuer->getZweitbegutachterWithToken($bid, $projektarbeit_id, $row_std->uid); - - if (!$zweitbetr) - echo "" . $p->t('abgabetool/fehlerMailZweitBegutachter') . "
 "; - - $intern = isset($zweitbetr->uid); - $mail_link = $intern ? $mail_fulllink : $mail_baselink; - - $zweitbetmaildata = array(); - $zweitbetmaildata['geehrt'] = "geehrte" . ($zweitbetr->anrede == "Herr" ? "r" : ""); - $zweitbetmaildata['anrede'] = $zweitbetr->anrede; - $zweitbetmaildata['betreuer_voller_name'] = $zweitbetr->voller_name; - $zweitbetmaildata['student_anrede'] = $maildata['student_anrede']; - $zweitbetmaildata['student_voller_name'] = $maildata['student_voller_name']; - $zweitbetmaildata['abgabetyp'] = $abgabetyp; - $zweitbetmaildata['parbeituebersichtlink'] = $intern ? $maildata['parbeituebersichtlink'] : ""; - $zweitbetmaildata['bewertunglink'] = $num_rows_sem >= 1 ? "

Zur Beurteilung der Arbeit

" : ""; - $zweitbetmaildata['token'] = $num_rows_sem >= 1 && isset($zweitbetr->zugangstoken) && !$intern ? "

Zugangstoken: " . $zweitbetr->zugangstoken . "

" : ""; - - $mailres = sendSanchoMail( - 'ParbeitsbeurteilungEndupload', - $zweitbetmaildata, - $zweitbetr->email, - "Masterarbeitsbetreuung", - 'sancho_header_min_bw.jpg', - 'sancho_footer_min_bw.jpg', - $user . "@" . DOMAIN - ); - - if (!$mailres) + foreach ($zweitbegutachterResults as $begutachter) { - echo "" . $p->t('abgabetool/fehlerMailZweitBegutachter') . "
 "; + // token generieren, wenn noch nicht vorhanden und notwendig (wird in methode überprüft) + $tokenGenRes = $zweitbegutachter->generateZweitbegutachterToken($begutachter->person_id, $projektarbeit_id); + + if (!$tokenGenRes) + echo "" . $p->t('abgabetool/fehlerMailZweitBegutachter') . "
 "; + + // Zweitbegutachter (evtl. mit Token) holen + $zweitbegutachterMitToken = new projektbetreuer(); + $begutachterMitTokenRes = $zweitbegutachterMitToken->getZweitbegutachterWithToken($bid, $projektarbeit_id, $row_std->uid, $begutachter->person_id); + + if (!$begutachterMitTokenRes) + echo "" . $p->t('abgabetool/fehlerMailZweitBegutachter') . "
 "; + + // Email an Zweitbegutachter senden + if (isset($zweitbegutachterMitToken->result[0])) + { + $begutachterMitToken = $zweitbegutachterMitToken->result[0]; + + $intern = isset($begutachterMitToken->uid); + $mail_link = $intern ? $mail_fulllink : $mail_baselink; + + $zweitbetmaildata = array(); + $zweitbetmaildata['geehrt'] = "geehrte" . ($begutachterMitToken->anrede == "Herr" ? "r" : ""); + $zweitbetmaildata['anrede'] = $begutachterMitToken->anrede; + $zweitbetmaildata['betreuer_voller_name'] = $begutachterMitToken->voller_name; + $zweitbetmaildata['student_anrede'] = $maildata['student_anrede']; + $zweitbetmaildata['student_voller_name'] = $maildata['student_voller_name']; + $zweitbetmaildata['abgabetyp'] = $abgabetyp; + $zweitbetmaildata['parbeituebersichtlink'] = $intern ? $maildata['parbeituebersichtlink'] : ""; + $zweitbetmaildata['bewertunglink'] = $num_rows_sem >= 1 ? "

Zur Beurteilung der Arbeit

" : ""; + $zweitbetmaildata['token'] = $num_rows_sem >= 1 && isset($begutachterMitToken->zugangstoken) && !$intern ? "

Zugangstoken: " . $begutachterMitToken->zugangstoken . "

" : ""; + + $mailres = sendSanchoMail( + 'ParbeitsbeurteilungEndupload', + $zweitbetmaildata, + $begutachterMitToken->email, + $subject, + 'sancho_header_min_bw.jpg', + 'sancho_footer_min_bw.jpg', + $user . "@" . DOMAIN + ); + + if (!$mailres) + { + echo "" . $p->t('abgabetool/fehlerMailZweitBegutachter') . "
 "; + } + } } } } diff --git a/include/projektbetreuer.class.php b/include/projektbetreuer.class.php index 04ba36b26..e55ad08d1 100644 --- a/include/projektbetreuer.class.php +++ b/include/projektbetreuer.class.php @@ -395,40 +395,66 @@ class projektbetreuer extends basis_db * @param $erstbegutachter_person_id int person_id des Erstbegutachters * @param $projektarbeit_id int * @param $student_uid string uid des Studenten der Arbeit abgibt + * @param $zweitbegutachter_person_id int person_id des Zweitbegutachters (wenn mehrere Zweitbetreuer zu einem Erstbegutachter erwartet werden) * @return object | bool */ - public function getZweitbegutachterWithToken($erstbegutachter_person_id, $projektarbeit_id, $student_uid) + public function getZweitbegutachterWithToken($erstbegutachter_person_id, $projektarbeit_id, $student_uid, $zweitbegutachter_person_id = null) { - $qry_betr="SELECT betr.person_id, betr.projektarbeit_id, pers.anrede, betr.zugangstoken, betr.zugangstoken_gueltigbis, tbl_benutzer.uid, kontakt, + $qry_betr="SELECT DISTINCT ON (betr.person_id) betr.person_id, betr.projektarbeit_id, pers.anrede, betr.zugangstoken, betr.zugangstoken_gueltigbis, + tbl_benutzer.uid, kontakt, betr.betreuerart_kurzbz, trim(COALESCE(titelpre,'')||' '||COALESCE(vorname,'')||' '||COALESCE(nachname,'')||' '||COALESCE(titelpost,'')) as voller_name, CASE WHEN tbl_benutzer.uid IS NULL THEN kontakt ELSE tbl_benutzer.uid || '@".DOMAIN."' END AS email, abg.abgabedatum FROM lehre.tbl_projektbetreuer betr - JOIN lehre.tbl_projektarbeit parb ON betr.projektarbeit_id = parb.projektarbeit_id + JOIN lehre.tbl_projektarbeit parb ON betr.projektarbeit_id = parb.projektarbeit_id JOIN public.tbl_person pers ON betr.person_id = pers.person_id LEFT JOIN public.tbl_kontakt ON pers.person_id = tbl_kontakt.person_id AND kontakttyp = 'email' AND zustellung = true LEFT JOIN public.tbl_benutzer ON pers.person_id = tbl_benutzer.person_id LEFT JOIN campus.tbl_paabgabe abg ON betr.projektarbeit_id = abg.projektarbeit_id AND abg.paabgabetyp_kurzbz = 'end' - WHERE betr.betreuerart_kurzbz = 'Zweitbegutachter' + WHERE + ( + ( + betr.betreuerart_kurzbz = 'Zweitbegutachter' + AND EXISTS ( + SELECT 1 FROM lehre.tbl_projektbetreuer + WHERE person_id = ".$this->db_add_param($erstbegutachter_person_id, FHC_INTEGER)." + AND betreuerart_kurzbz = 'Erstbegutachter' + AND projektarbeit_id = betr.projektarbeit_id + ) + ) + OR + ( + betr.betreuerart_kurzbz = 'Senatspruefer' + AND EXISTS ( + SELECT 1 FROM lehre.tbl_projektbetreuer + WHERE person_id = ".$this->db_add_param($erstbegutachter_person_id, FHC_INTEGER)." + AND betreuerart_kurzbz = 'Senatsvorsitz' + AND projektarbeit_id = betr.projektarbeit_id + ) + ) + ) AND betr.projektarbeit_id = ".$this->db_add_param($projektarbeit_id, FHC_INTEGER)." AND parb.student_uid = ".$this->db_add_param($student_uid)." - AND EXISTS ( - SELECT 1 FROM lehre.tbl_projektbetreuer - WHERE person_id = ".$this->db_add_param($erstbegutachter_person_id, FHC_INTEGER)." - AND betreuerart_kurzbz = 'Erstbegutachter' - AND projektarbeit_id = betr.projektarbeit_id - ) - AND (tbl_benutzer.aktiv OR tbl_benutzer.aktiv IS NULL) - ORDER BY betr.insertamum DESC - LIMIT 1"; + AND (tbl_benutzer.aktiv OR tbl_benutzer.aktiv IS NULL)"; + + if (isset($zweitbegutachter_person_id)) + { + $qry_betr .= " AND betr.person_id = ".$this->db_add_param($zweitbegutachter_person_id, FHC_INTEGER); + } + + $qry_betr .= " ORDER BY betr.person_id DESC, + (CASE WHEN EXISTS ( /* if multiple accounts, prioritize mitarbeiter */ + SELECT 1 FROM public.tbl_mitarbeiter ma + WHERE ma.mitarbeiter_uid = tbl_benutzer.uid + ) THEN 0 ELSE 1 END), betr.insertamum DESC"; if ($betr=$this->db_query($qry_betr)) { - $row_betr = $this->db_fetch_object($betr); - - if ($row_betr) - return $row_betr; - else - return false; + $result = array(); + while ($row_betr = $this->db_fetch_object()) + { + $this->result[] = $row_betr; + } + return true; } else { @@ -451,7 +477,7 @@ class projektbetreuer extends basis_db LEFT JOIN public.tbl_benutzer USING(person_id) WHERE projektarbeit_id = ".$this->db_add_param($projektarbeit_id, FHC_INTEGER)." AND tbl_projektbetreuer.person_id = ".$this->db_add_param($zweitbegutachter_person_id, FHC_INTEGER)." - AND betreuerart_kurzbz = 'Zweitbegutachter' + AND betreuerart_kurzbz IN ('Zweitbegutachter', 'Senatspruefer') LIMIT 1"; if ($betreueruidres = $this->db_query($betreuerUidQry)) @@ -494,7 +520,7 @@ class projektbetreuer extends basis_db zugangstoken_gueltigbis = CURRENT_DATE + interval '1 year' WHERE projektarbeit_id = " . $this->db_add_param($projektarbeit_id, FHC_INTEGER) . " AND person_id = " . $this->db_add_param($row_betr->person_id, FHC_INTEGER) . " - AND betreuerart_kurzbz = 'Zweitbegutachter'"; + AND betreuerart_kurzbz IN ('Zweitbegutachter', 'Senatspruefer')"; if ($this->db_query($qry_upd)) { diff --git a/locale/de-AT/abgabetool.php b/locale/de-AT/abgabetool.php index c4b17318b..e52b91c9a 100644 --- a/locale/de-AT/abgabetool.php +++ b/locale/de-AT/abgabetool.php @@ -83,12 +83,13 @@ $this->phrasen['abgabetool/gelesenUndAkzeptiert']='Gelesen und akzeptiert'; $this->phrasen['abgabetool/erklaerungNichtAkzeptiert']='Erklärung nicht akzeptiert'; $this->phrasen['abgabetool/downloadProjektarbeit']='Dokument herunterladen'; $this->phrasen['abgabetool/zweitBegutachter']='ZweitbegutachterIn'; -$this->phrasen['abgabetool/zweitbetreuerTokenMailSenden']='Zugangstoken an ZweitbegutachterIn noch einmal senden'; -$this->phrasen['abgabetool/zweitbegutachterMailGesendet']='Mail an ZweitbegutachterIn (%s) gesendet'; -$this->phrasen['abgabetool/zweitbetreuerMailSenden']='Mail an ZweitbegutachterIn (%s) senden'; -$this->phrasen['abgabetool/zweitBegutachterEmailFehlt']='keine Zustellmail für Zweitbegutachter vorhanden!'; +$this->phrasen['abgabetool/zweitbetreuerTokenMailSenden']='Zugangstoken noch einmal senden'; +$this->phrasen['abgabetool/zweitbegutachterMailGesendet']='Mail an %s (%s) gesendet'; +$this->phrasen['abgabetool/zweitbetreuerMailSenden']='Mail an %s (%s) senden'; +$this->phrasen['abgabetool/zweitBegutachterEmailFehlt']='keine Zustellmail vorhanden!'; $this->phrasen['abgabetool/projektbeurteilungDownload']='Projektbeurteilung herunterladen'; $this->phrasen['abgabetool/projektbeurteilungErstDownload']='Erst-/Begutachter'; $this->phrasen['abgabetool/projektbeurteilungZweitDownload']='Zweitbegutachter'; $this->phrasen['abgabetool/fehlerErmittelnEndabgabeProjektarbeit']='Fehler beim Ermitteln des Enduplaods der Projektarbeit'; +$this->phrasen['abgabetool/senatsPruefer']='Prüfer'; ?> diff --git a/locale/en-US/abgabetool.php b/locale/en-US/abgabetool.php index b05456faa..27a885a11 100644 --- a/locale/en-US/abgabetool.php +++ b/locale/en-US/abgabetool.php @@ -84,11 +84,12 @@ $this->phrasen['abgabetool/erklaerungNichtAkzeptiert']='Declaration not accepted $this->phrasen['abgabetool/downloadProjektarbeit']='Download File'; $this->phrasen['abgabetool/zweitBegutachter']='Second assessor'; $this->phrasen['abgabetool/zweitbetreuerTokenMailSenden']='Resend access token to second assessor'; -$this->phrasen['abgabetool/zweitbetreuerMailSenden']='Send mail to second assessor (%s)'; -$this->phrasen['abgabetool/zweitbegutachterMailGesendet']='Mail sent to second assessor (%s)'; -$this->phrasen['abgabetool/zweitBegutachterEmailFehlt']='Second assessor has no delivery mail adress!'; +$this->phrasen['abgabetool/zweitbetreuerMailSenden']='Send mail to assessor %s (%s)'; +$this->phrasen['abgabetool/zweitbegutachterMailGesendet']='Mail sent to assessor %s (%s)'; +$this->phrasen['abgabetool/zweitBegutachterEmailFehlt']='Assessor has no delivery mail adress!'; $this->phrasen['abgabetool/projektbeurteilungDownload']='Thesis-Assessment download'; $this->phrasen['abgabetool/projektbeurteilungErstDownload']='First-/Assessor'; $this->phrasen['abgabetool/projektbeurteilungZweitDownload']='Second Assessor'; $this->phrasen['abgabetool/fehlerErmittelnEndabgabeProjektarbeit']='Error when getting endupload of project work'; +$this->phrasen['abgabetool/senatsPruefer']='Examiner'; ?> diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index ca59997fa..7f051459d 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -10389,6 +10389,26 @@ Any unusual occurrences ) ) ), + array( + 'app' => 'projektarbeitsbeurteilung', + 'category' => 'projektarbeitsbeurteilung', + 'phrase' => 'senatsvorsitz', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Senatsvorsitz', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Assessor', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'core', 'category' => 'anrechnung', diff --git a/vilesci/lehre/abgabe_assistenz.php b/vilesci/lehre/abgabe_assistenz.php index 3c939a330..4de70fd31 100644 --- a/vilesci/lehre/abgabe_assistenz.php +++ b/vilesci/lehre/abgabe_assistenz.php @@ -149,11 +149,7 @@ else LEFT JOIN PUBLIC.tbl_benutzer ON (PUBLIC.tbl_benutzer.person_id = PUBLIC.tbl_person.person_id) LEFT JOIN PUBLIC.tbl_mitarbeiter ON (PUBLIC.tbl_benutzer.uid = PUBLIC.tbl_mitarbeiter.mitarbeiter_uid) WHERE projektarbeit_id = ".$db->db_add_param($row->projektarbeit_id, FHC_INTEGER)." - AND ( - tbl_projektbetreuer.betreuerart_kurzbz = 'Erstbegutachter' - OR tbl_projektbetreuer.betreuerart_kurzbz = 'Betreuer' - OR tbl_projektbetreuer.betreuerart_kurzbz = 'Begutachter' - ) + AND tbl_projektbetreuer.betreuerart_kurzbz IN ('Erstbegutachter', 'Betreuer', 'Begutachter', 'Senatsvorsitz') UNION From a1622d8b7473a1ab0f00b3ea5156405b0a9d142c Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Wed, 24 Aug 2022 17:05:30 +0200 Subject: [PATCH 033/646] made betreuert SenatsprueferIn gender neutral --- system/dbupdate_3.3.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/dbupdate_3.3.php b/system/dbupdate_3.3.php index 515a80bf5..e362bedba 100644 --- a/system/dbupdate_3.3.php +++ b/system/dbupdate_3.3.php @@ -6292,7 +6292,7 @@ if($result = $db->db_query("SELECT 1 FROM lehre.tbl_betreuerart WHERE betreuerar { if($db->db_num_rows($result)==0) { - $qry = "INSERT INTO lehre.tbl_betreuerart(betreuerart_kurzbz, beschreibung) VALUES('Senatspruefer', 'Senatsprüfer kommissionelle Prüfung');"; + $qry = "INSERT INTO lehre.tbl_betreuerart(betreuerart_kurzbz, beschreibung) VALUES('Senatspruefer', 'SenatsprüferIn kommissionelle Prüfung');"; if(!$db->db_query($qry)) echo 'Betreuerart: '.$db->db_last_error().'
'; From 1d5d5e4a84b575af9a98ae7f694cdc95d80972f8 Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Wed, 24 Aug 2022 18:07:34 +0200 Subject: [PATCH 034/646] added getEndabgabe method to Paabgabe model --- .../models/education/Paabgabe_model.php | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/application/models/education/Paabgabe_model.php b/application/models/education/Paabgabe_model.php index 087c27663..b876030a6 100644 --- a/application/models/education/Paabgabe_model.php +++ b/application/models/education/Paabgabe_model.php @@ -1,7 +1,6 @@ dbTable = 'campus.tbl_paabgabe'; $this->pk = 'paabgabe_id'; } + + /** + * Gets last Endabgabe of a Projektarbeit, including filename. + * @param int $projektarbeit_id + * @return object + */ + public function getEndabgabe($projektarbeit_id) + { + $qry = "SELECT paabgabe_id, student_uid, paabg.datum, paabg.abgabedatum, projekttyp_kurzbz, titel, titel_english, + paabgabe_id || '_' || student_uid || '.pdf' AS filename + FROM campus.tbl_paabgabe paabg + JOIN lehre.tbl_projektarbeit USING (projektarbeit_id) + WHERE projektarbeit_id = ? + AND paabgabetyp_kurzbz = 'end' + AND paabg.abgabedatum IS NOT NULL + ORDER BY paabg.abgabedatum, paabg.datum DESC + LIMIT 1"; + + return $this->execQuery($qry, array($projektarbeit_id)); + } } From 2125fdc21913ab563a3b3b4c444b65059b40c449 Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Wed, 24 Aug 2022 18:09:30 +0200 Subject: [PATCH 035/646] sending of zweitbetreuer mail with token: correct subject depending on projekttyp --- cis/private/lehre/abgabe_lektor_details.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cis/private/lehre/abgabe_lektor_details.php b/cis/private/lehre/abgabe_lektor_details.php index ed33add27..852529d53 100644 --- a/cis/private/lehre/abgabe_lektor_details.php +++ b/cis/private/lehre/abgabe_lektor_details.php @@ -119,6 +119,7 @@ if(!$projektarbeit_obj->load($projektarbeit_id)) die('Fehler beim Laden der Projektarbeit'); $titel = $projektarbeit_obj->titel; $student_uid = $projektarbeit_obj->student_uid; +$projekttyp_kurzbz = $projektarbeit_obj->projekttyp_kurzbz; // paarbeit sollte nur ab bestimmten Zeitpunkt online bewertet werden $paIsCurrent = $projektarbeit_obj->projektarbeitIsCurrent($projektarbeit_id); @@ -179,7 +180,7 @@ if(in_array($betreuerart, array('Erstbegutacher', 'Senatsvorsitz'))) // if Zweitbetreuer is the one for which token was requested, send mail if ($zbg->person_id == $_GET['zweitbetreuer_person_id']) { - $mailres = sendZweitbegutachterMail($zbg, $erstbetreuer_id, $row_std); + $mailres = sendZweitbegutachterMail($zbg, $erstbetreuer_id, $row_std, $projekttyp_kurzbz); if ($mailres) { @@ -734,7 +735,7 @@ echo $htmlstr; * @param object $student * @return bool|projektbetreuer|void|null */ -function sendZweitbegutachterMail($zweitbegutachter, $erstbegutachter_person_id, $student) +function sendZweitbegutachterMail($zweitbegutachter, $erstbegutachter_person_id, $student, $projekttyp_kurzbz) { if (!isset($zweitbegutachter->email) || $zweitbegutachter->email == '') return false; @@ -758,6 +759,7 @@ function sendZweitbegutachterMail($zweitbegutachter, $erstbegutachter_person_id, { $zweitbetr = $projektbetreuer->result[0]; $intern = isset($zweitbetr->uid); + $mail_subject = $projekttyp_kurzbz == 'Diplom' ? "Masterarbeitsbetreuung" : "Bachelorarbeitsbetreuung"; $mail_baselink = APP_ROOT."index.ci.php/extensions/FHC-Core-Projektarbeitsbeurteilung/Projektarbeitsbeurteilung"; $mail_fulllink = "$mail_baselink?projektarbeit_id=".$zweitbegutachter->projektarbeit_id."&uid=".$student->uid; $mail_link = $intern ? $mail_fulllink : $mail_baselink; @@ -777,7 +779,7 @@ function sendZweitbegutachterMail($zweitbegutachter, $erstbegutachter_person_id, 'ParbeitsbeurteilungEndupload', $maildata, $zweitbetr->email, - "Masterarbeitsbetreuung", + $mail_subject, 'sancho_header_min_bw.jpg', 'sancho_footer_min_bw.jpg' ); From 60d675f22b1a316d8bcb321dd08f5545c056d8d3 Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Wed, 24 Aug 2022 18:09:53 +0200 Subject: [PATCH 036/646] added parbeitDownload phrases for Projektarbeitsbeurteilung --- system/phrasesupdate.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 7f051459d..db9a33812 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -10409,6 +10409,26 @@ Any unusual occurrences ) ) ), + array( + 'app' => 'projektarbeitsbeurteilung', + 'category' => 'projektarbeitsbeurteilung', + 'phrase' => 'parbeitDownload', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Download Projektarbeit', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Download thesis', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'core', 'category' => 'anrechnung', From 1d408b9d65e475c2e3eeda9a79c48f0325b66474 Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Wed, 24 Aug 2022 19:39:31 +0200 Subject: [PATCH 037/646] added comment to getZweitbegutachterWithToken method in projektbetreuer class --- include/projektbetreuer.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/projektbetreuer.class.php b/include/projektbetreuer.class.php index e55ad08d1..1fe2a5e1a 100644 --- a/include/projektbetreuer.class.php +++ b/include/projektbetreuer.class.php @@ -421,7 +421,7 @@ class projektbetreuer extends basis_db AND projektarbeit_id = betr.projektarbeit_id ) ) - OR + OR /* either Zweitbegutachter of masterarbeit, or Kommissionsprüfer if Kommission */ ( betr.betreuerart_kurzbz = 'Senatspruefer' AND EXISTS ( From 2ff067193d868ca43b6919e14d17748f4d661e23 Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Wed, 24 Aug 2022 19:39:59 +0200 Subject: [PATCH 038/646] added Senatsvorsitz to betreuerart kurzbz in pdfExport --- cis/private/pdfExport.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cis/private/pdfExport.php b/cis/private/pdfExport.php index 99b5c94f0..2743205d1 100644 --- a/cis/private/pdfExport.php +++ b/cis/private/pdfExport.php @@ -150,14 +150,14 @@ if (isset($_GET['betreuerart_kurzbz'])) if (isset($_GET['xsl']) && $_GET['xsl'] == 'Zahlung') { $requestdata = $_SERVER['QUERY_STRING']; - + $log = new Webservicelog(); $log->webservicetyp_kurzbz = 'content'; $log->request_id = isset($_GET['buchungsnummern']) && !empty($_GET['buchungsnummern']) ? $_GET['buchungsnummern'] : NULL; $log->beschreibung = 'Zahlungsbestaetigungsdownload'; $log->request_data = $requestdata; $log->execute_user = get_uid(); - + $log->save(true); } @@ -207,6 +207,7 @@ if (isset($_GET['xsl']) && ($_GET['xsl'] === 'Projektbeurteilung')) switch ($_GET['betreuerart_kurzbz']) { case 'Begutachter' : + case 'Senatsvorsitz' : $xsl = 'ProjektBeurteilungBA'; break; case 'Erstbegutachter' : From 92762c5dc2ace2b6cf61c641f880c97719b64996 Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Sat, 27 Aug 2022 01:34:03 +0200 Subject: [PATCH 039/646] Projektarbeitsbeurteilung: - getZweitbegutachterWithToken: returns Zweitbegutachter (Senatspruefer) from Senatspruefungen as well - added phrase --- .../education/Projektbetreuer_model.php | 66 +++++++++++++------ system/phrasesupdate.php | 20 ++++++ 2 files changed, 67 insertions(+), 19 deletions(-) diff --git a/application/models/education/Projektbetreuer_model.php b/application/models/education/Projektbetreuer_model.php index f6205f67f..d23342c85 100644 --- a/application/models/education/Projektbetreuer_model.php +++ b/application/models/education/Projektbetreuer_model.php @@ -106,8 +106,10 @@ class Projektbetreuer_model extends DB_Model * @param $student_uid string uid des Studenten der Arbeit abgibt * @return object | bool */ - public function getZweitbegutachterWithToken($erstbegutachter_person_id, $projektarbeit_id, $student_uid) + public function getZweitbegutachterWithToken($erstbegutachter_person_id, $projektarbeit_id, $student_uid, $zweitbegutachter_person_id = null) { + $params = array($erstbegutachter_person_id, $erstbegutachter_person_id, $projektarbeit_id, $student_uid); + $qry_betr = "SELECT betr.person_id, betr.projektarbeit_id, pers.anrede, betr.zugangstoken, betr.zugangstoken_gueltigbis, tbl_benutzer.uid, kontakt, trim(COALESCE(titelpre,'')||' '||COALESCE(vorname,'')||' '||COALESCE(nachname,'')||' '||COALESCE(titelpost,'')) as voller_name, CASE WHEN tbl_benutzer.uid IS NULL THEN kontakt ELSE tbl_benutzer.uid || '@".DOMAIN."' END AS email, abg.abgabedatum @@ -117,20 +119,46 @@ class Projektbetreuer_model extends DB_Model LEFT JOIN public.tbl_kontakt ON pers.person_id = tbl_kontakt.person_id AND kontakttyp = 'email' AND zustellung = true LEFT JOIN public.tbl_benutzer ON pers.person_id = tbl_benutzer.person_id LEFT JOIN campus.tbl_paabgabe abg ON betr.projektarbeit_id = abg.projektarbeit_id AND abg.paabgabetyp_kurzbz = 'end' - WHERE betr.betreuerart_kurzbz = 'Zweitbegutachter' + WHERE + ( + ( + betr.betreuerart_kurzbz = 'Zweitbegutachter' + AND EXISTS ( + SELECT 1 FROM lehre.tbl_projektbetreuer + WHERE person_id = ? + AND betreuerart_kurzbz = 'Erstbegutachter' + AND projektarbeit_id = betr.projektarbeit_id + ) + ) + OR /* either Zweitbegutachter of masterarbeit, or Kommissionsprüfer if Kommission */ + ( + betr.betreuerart_kurzbz = 'Senatspruefer' + AND EXISTS ( + SELECT 1 FROM lehre.tbl_projektbetreuer + WHERE person_id = ? + AND betreuerart_kurzbz = 'Senatsvorsitz' + AND projektarbeit_id = betr.projektarbeit_id + ) + ) + ) AND betr.projektarbeit_id = ? AND parb.student_uid = ? - AND EXISTS ( - SELECT 1 FROM lehre.tbl_projektbetreuer - WHERE person_id = ? - AND betreuerart_kurzbz = 'Erstbegutachter' - AND projektarbeit_id = betr.projektarbeit_id - ) - AND (tbl_benutzer.aktiv OR tbl_benutzer.aktiv IS NULL) - ORDER BY betr.insertamum DESC + AND (tbl_benutzer.aktiv OR tbl_benutzer.aktiv IS NULL)"; + + if (isset($zweitbegutachter_person_id)) + { + $qry_betr .= " AND betr.person_id = ?"; + $params[] = $zweitbegutachter_person_id; + } + + $qry_betr .= " ORDER BY betr.person_id DESC, + (CASE WHEN EXISTS ( /* if multiple accounts, prioritize mitarbeiter */ + SELECT 1 FROM public.tbl_mitarbeiter ma + WHERE ma.mitarbeiter_uid = tbl_benutzer.uid + ) THEN 0 ELSE 1 END), betr.insertamum DESC LIMIT 1"; - return $this->execQuery($qry_betr, array($projektarbeit_id, $student_uid, $erstbegutachter_person_id)); + return $this->execQuery($qry_betr, $params); } /** @@ -141,23 +169,23 @@ class Projektbetreuer_model extends DB_Model */ public function generateZweitbegutachterToken($zweitbegutachter_person_id, $projektarbeit_id) { - $betreuerUidQry = "SELECT uid, zugangstoken, zugangstoken_gueltigbis, tbl_projektbetreuer.person_id + $betreuerUidQry = "SELECT uid, zugangstoken, zugangstoken_gueltigbis, tbl_projektbetreuer.person_id, betreuerart_kurzbz FROM lehre.tbl_projektbetreuer JOIN public.tbl_person USING(person_id) LEFT JOIN public.tbl_benutzer USING(person_id) WHERE projektarbeit_id = ? AND tbl_projektbetreuer.person_id = ? - AND betreuerart_kurzbz = 'Zweitbegutachter' + AND betreuerart_kurzbz IN ('Zweitbegutachter', 'Senatspruefer') LIMIT 1"; - $betreueruidres = $this->execQuery($betreuerUidQry, array($projektarbeit_id, $zweitbegutachter_person_id)); + $betreueruidRes = $this->execQuery($betreuerUidQry, array($projektarbeit_id, $zweitbegutachter_person_id)); - if (!hasData($betreueruidres)) + if (!hasData($betreueruidRes)) return error('Zweitbegutachter nicht gefunden'); - $row_betr = getData($betreueruidres)[0]; + $zweitbetreuer = getData($betreueruidRes)[0]; - if (!isset($row_betr->uid)) + if (!isset($zweitbetreuer->uid)) { do { $token = generateToken(16); @@ -166,8 +194,8 @@ class Projektbetreuer_model extends DB_Model $result = $this->update( array('projektarbeit_id' => $projektarbeit_id, - 'person_id' => $row_betr->person_id, - 'betreuerart_kurzbz' => 'Zweitbegutachter'), + 'person_id' => $zweitbetreuer->person_id, + 'betreuerart_kurzbz' => $zweitbetreuer->betreuerart_kurzbz), array('zugangstoken' => $token, 'zugangstoken_gueltigbis' => date('Y-m-d', strtotime('+1 year'))) ); diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index db9a33812..0c2bb0edf 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -10429,6 +10429,26 @@ Any unusual occurrences ) ) ), + array( + 'app' => 'projektarbeitsbeurteilung', + 'category' => 'projektarbeitsbeurteilung', + 'phrase' => 'betreuerart', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Betreuerart', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Assessor type', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'core', 'category' => 'anrechnung', From 824a148b92cb67ae84c1ba3bf5c088f8cb0861a5 Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Wed, 31 Aug 2022 13:38:38 +0200 Subject: [PATCH 040/646] adapted core to Projektarbeitsbeurteilung Zweitbegutachter/Erstbegutacher Controller split --- .../education/Projektbetreuer_model.php | 82 +++++++++---------- cis/private/lehre/abgabe_lektor_details.php | 13 +-- cis/private/lehre/abgabe_student_details.php | 5 +- 3 files changed, 52 insertions(+), 48 deletions(-) diff --git a/application/models/education/Projektbetreuer_model.php b/application/models/education/Projektbetreuer_model.php index d23342c85..8a333d47c 100644 --- a/application/models/education/Projektbetreuer_model.php +++ b/application/models/education/Projektbetreuer_model.php @@ -111,52 +111,52 @@ class Projektbetreuer_model extends DB_Model $params = array($erstbegutachter_person_id, $erstbegutachter_person_id, $projektarbeit_id, $student_uid); $qry_betr = "SELECT betr.person_id, betr.projektarbeit_id, pers.anrede, betr.zugangstoken, betr.zugangstoken_gueltigbis, tbl_benutzer.uid, kontakt, - trim(COALESCE(titelpre,'')||' '||COALESCE(vorname,'')||' '||COALESCE(nachname,'')||' '||COALESCE(titelpost,'')) as voller_name, - CASE WHEN tbl_benutzer.uid IS NULL THEN kontakt ELSE tbl_benutzer.uid || '@".DOMAIN."' END AS email, abg.abgabedatum - FROM lehre.tbl_projektbetreuer betr - JOIN lehre.tbl_projektarbeit parb ON betr.projektarbeit_id = parb.projektarbeit_id - JOIN public.tbl_person pers ON betr.person_id = pers.person_id - LEFT JOIN public.tbl_kontakt ON pers.person_id = tbl_kontakt.person_id AND kontakttyp = 'email' AND zustellung = true - LEFT JOIN public.tbl_benutzer ON pers.person_id = tbl_benutzer.person_id - LEFT JOIN campus.tbl_paabgabe abg ON betr.projektarbeit_id = abg.projektarbeit_id AND abg.paabgabetyp_kurzbz = 'end' - WHERE - ( + trim(COALESCE(titelpre,'')||' '||COALESCE(vorname,'')||' '||COALESCE(nachname,'')||' '||COALESCE(titelpost,'')) as voller_name, + CASE WHEN tbl_benutzer.uid IS NULL THEN kontakt ELSE tbl_benutzer.uid || '@".DOMAIN."' END AS email, abg.abgabedatum + FROM lehre.tbl_projektbetreuer betr + JOIN lehre.tbl_projektarbeit parb ON betr.projektarbeit_id = parb.projektarbeit_id + JOIN public.tbl_person pers ON betr.person_id = pers.person_id + LEFT JOIN public.tbl_kontakt ON pers.person_id = tbl_kontakt.person_id AND kontakttyp = 'email' AND zustellung = true + LEFT JOIN public.tbl_benutzer ON pers.person_id = tbl_benutzer.person_id + LEFT JOIN campus.tbl_paabgabe abg ON betr.projektarbeit_id = abg.projektarbeit_id AND abg.paabgabetyp_kurzbz = 'end' + WHERE ( - betr.betreuerart_kurzbz = 'Zweitbegutachter' - AND EXISTS ( - SELECT 1 FROM lehre.tbl_projektbetreuer - WHERE person_id = ? - AND betreuerart_kurzbz = 'Erstbegutachter' - AND projektarbeit_id = betr.projektarbeit_id + ( + betr.betreuerart_kurzbz = 'Zweitbegutachter' + AND EXISTS ( + SELECT 1 FROM lehre.tbl_projektbetreuer + WHERE person_id = ? + AND betreuerart_kurzbz = 'Erstbegutachter' + AND projektarbeit_id = betr.projektarbeit_id + ) + ) + OR /* either Zweitbegutachter of masterarbeit, or Kommissionsprüfer if Kommission */ + ( + betr.betreuerart_kurzbz = 'Senatspruefer' + AND EXISTS ( + SELECT 1 FROM lehre.tbl_projektbetreuer + WHERE person_id = ? + AND betreuerart_kurzbz = 'Senatsvorsitz' + AND projektarbeit_id = betr.projektarbeit_id + ) ) ) - OR /* either Zweitbegutachter of masterarbeit, or Kommissionsprüfer if Kommission */ - ( - betr.betreuerart_kurzbz = 'Senatspruefer' - AND EXISTS ( - SELECT 1 FROM lehre.tbl_projektbetreuer - WHERE person_id = ? - AND betreuerart_kurzbz = 'Senatsvorsitz' - AND projektarbeit_id = betr.projektarbeit_id - ) - ) - ) - AND betr.projektarbeit_id = ? - AND parb.student_uid = ? - AND (tbl_benutzer.aktiv OR tbl_benutzer.aktiv IS NULL)"; + AND betr.projektarbeit_id = ? + AND parb.student_uid = ? + AND (tbl_benutzer.aktiv OR tbl_benutzer.aktiv IS NULL)"; - if (isset($zweitbegutachter_person_id)) - { - $qry_betr .= " AND betr.person_id = ?"; - $params[] = $zweitbegutachter_person_id; - } + if (isset($zweitbegutachter_person_id)) + { + $qry_betr .= " AND betr.person_id = ?"; + $params[] = $zweitbegutachter_person_id; + } - $qry_betr .= " ORDER BY betr.person_id DESC, - (CASE WHEN EXISTS ( /* if multiple accounts, prioritize mitarbeiter */ - SELECT 1 FROM public.tbl_mitarbeiter ma - WHERE ma.mitarbeiter_uid = tbl_benutzer.uid - ) THEN 0 ELSE 1 END), betr.insertamum DESC - LIMIT 1"; + $qry_betr .= " ORDER BY betr.person_id DESC, + (CASE WHEN EXISTS ( /* if multiple accounts, prioritize mitarbeiter */ + SELECT 1 FROM public.tbl_mitarbeiter ma + WHERE ma.mitarbeiter_uid = tbl_benutzer.uid + ) THEN 0 ELSE 1 END), betr.insertamum DESC + LIMIT 1"; return $this->execQuery($qry_betr, $params); } diff --git a/cis/private/lehre/abgabe_lektor_details.php b/cis/private/lehre/abgabe_lektor_details.php index 852529d53..eb41620ce 100644 --- a/cis/private/lehre/abgabe_lektor_details.php +++ b/cis/private/lehre/abgabe_lektor_details.php @@ -144,7 +144,7 @@ if($num_rows_endupload < 0) } // Zweitbegutachter holen -if(in_array($betreuerart, array('Erstbegutacher', 'Senatsvorsitz'))) +if(in_array($betreuerart, array('Erstbegutachter', 'Senatsvorsitz'))) { $alleBegutachter = new projektbetreuer(); $alleBegutachterRes = $alleBegutachter->getProjektbetreuer($projektarbeit_id); @@ -154,7 +154,7 @@ if(in_array($betreuerart, array('Erstbegutacher', 'Senatsvorsitz'))) $zweitbetreuerArr = array(); foreach ($alleBegutachter->result as $begutachter) { - if (in_array($begutachter->betreuerart_kurzbz, array('Erstbegutacher', 'Senatsvorsitz'))) + if (in_array($begutachter->betreuerart_kurzbz, array('Erstbegutachter', 'Senatsvorsitz'))) { // dem Erstbetreuer zugewiesene Zweitbetreuer holen $erstbetreuer_id = $begutachter->person_id; @@ -165,7 +165,7 @@ if(in_array($betreuerart, array('Erstbegutacher', 'Senatsvorsitz'))) } // Mail mit Token an Zweitbegutachter senden - if ($zweitbegutachterRes && $paIsCurrent >= 1 && isset($_GET['zweitbegutachtertoken']) && isset($_GET['zweitbetreuer_person_id'])) + if (count($zweitbetreuerArr) > 0 && $paIsCurrent >= 1 && isset($_GET['zweitbegutachtertoken']) && isset($_GET['zweitbetreuer_person_id'])) { $qry_std="SELECT * FROM campus.vw_benutzer where uid=".$db->db_add_param($uid); if(!$result_std=$db->db_query($qry_std)) @@ -481,7 +481,8 @@ $endupload_vorhanden = $num_rows_endupload >= 1; if ($semester_benotbar && $endupload_vorhanden) { - $htmlstr .= "
"; + $beurtPfad = $betreuerart == 'Zweitbegutachter' ? 'ProjektarbeitsbeurteilungZweitbegutachter' : 'ProjektarbeitsbeurteilungErstbegutachter'; + $htmlstr .= ""; $htmlstr .= "\n"; $htmlstr .= "\n"; $htmlstr .= "
"; @@ -759,8 +760,8 @@ function sendZweitbegutachterMail($zweitbegutachter, $erstbegutachter_person_id, { $zweitbetr = $projektbetreuer->result[0]; $intern = isset($zweitbetr->uid); - $mail_subject = $projekttyp_kurzbz == 'Diplom' ? "Masterarbeitsbetreuung" : "Bachelorarbeitsbetreuung"; - $mail_baselink = APP_ROOT."index.ci.php/extensions/FHC-Core-Projektarbeitsbeurteilung/Projektarbeitsbeurteilung"; + $mail_subject = $projekttyp_kurzbz == 'Diplom' ? 'Masterarbeitsbetreuung' : 'Bachelorarbeitsbetreuung'; + $mail_baselink = APP_ROOT."index.ci.php/extensions/FHC-Core-Projektarbeitsbeurteilung/ProjektarbeitsbeurteilungZweitbegutachter"; $mail_fulllink = "$mail_baselink?projektarbeit_id=".$zweitbegutachter->projektarbeit_id."&uid=".$student->uid; $mail_link = $intern ? $mail_fulllink : $mail_baselink; diff --git a/cis/private/lehre/abgabe_student_details.php b/cis/private/lehre/abgabe_student_details.php index bead1a1e9..522e89dd3 100644 --- a/cis/private/lehre/abgabe_student_details.php +++ b/cis/private/lehre/abgabe_student_details.php @@ -433,7 +433,7 @@ if($command=="update" && $error!=true) $row_std=$db->db_fetch_object($result_std); // 1. Begutachter mail ohne Token - $mail_baselink = APP_ROOT."index.ci.php/extensions/FHC-Core-Projektarbeitsbeurteilung/Projektarbeitsbeurteilung"; + $mail_baselink = APP_ROOT."index.ci.php/extensions/FHC-Core-Projektarbeitsbeurteilung/ProjektarbeitsbeurteilungErstbegutachter"; $mail_fulllink = "$mail_baselink?projektarbeit_id=".$projektarbeit_id."&uid=".$row_std->uid; $projekttyp_kurzbz = $projektarbeit_obj->projekttyp_kurzbz; $subject = $projektarbeit_obj->projekttyp_kurzbz == 'Diplom' ? 'Masterarbeitsbetreuung' : 'Bachelorarbeitsbetreuung'; @@ -495,6 +495,9 @@ if($command=="update" && $error!=true) { $begutachterMitToken = $zweitbegutachterMitToken->result[0]; + $path = $begutachterMitToken->betreuerart_kurzbz == 'Zweitbegutachter' ? 'ProjektarbeitsbeurteilungZweitbegutachter' : 'ProjektarbeitsbeurteilungErstbegutachter'; + $mail_baselink = APP_ROOT."index.ci.php/extensions/FHC-Core-Projektarbeitsbeurteilung/$path"; + $mail_fulllink = "$mail_baselink?projektarbeit_id=".$projektarbeit_id."&uid=".$row_std->uid; $intern = isset($begutachterMitToken->uid); $mail_link = $intern ? $mail_fulllink : $mail_baselink; From cc33502ab3ad6ce31fd1819d62b8f768a80a19f9 Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Thu, 1 Sep 2022 02:23:32 +0200 Subject: [PATCH 041/646] adapted "resend token for Begutachter" mail to Projektarbeitsbeurteilung controller split --- application/models/education/Projektbetreuer_model.php | 5 +++-- cis/private/lehre/abgabe_lektor_details.php | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/application/models/education/Projektbetreuer_model.php b/application/models/education/Projektbetreuer_model.php index 8a333d47c..db9310eed 100644 --- a/application/models/education/Projektbetreuer_model.php +++ b/application/models/education/Projektbetreuer_model.php @@ -110,9 +110,10 @@ class Projektbetreuer_model extends DB_Model { $params = array($erstbegutachter_person_id, $erstbegutachter_person_id, $projektarbeit_id, $student_uid); - $qry_betr = "SELECT betr.person_id, betr.projektarbeit_id, pers.anrede, betr.zugangstoken, betr.zugangstoken_gueltigbis, tbl_benutzer.uid, kontakt, + $qry_betr = "SELECT betr.person_id, betr.projektarbeit_id, pers.anrede, betr.zugangstoken, betr.zugangstoken_gueltigbis, tbl_benutzer.uid, trim(COALESCE(titelpre,'')||' '||COALESCE(vorname,'')||' '||COALESCE(nachname,'')||' '||COALESCE(titelpost,'')) as voller_name, - CASE WHEN tbl_benutzer.uid IS NULL THEN kontakt ELSE tbl_benutzer.uid || '@".DOMAIN."' END AS email, abg.abgabedatum + CASE WHEN tbl_benutzer.uid IS NULL THEN kontakt ELSE tbl_benutzer.uid || '@".DOMAIN."' END AS email, kontakt, + abg.abgabedatum, betr.betreuerart_kurzbz FROM lehre.tbl_projektbetreuer betr JOIN lehre.tbl_projektarbeit parb ON betr.projektarbeit_id = parb.projektarbeit_id JOIN public.tbl_person pers ON betr.person_id = pers.person_id diff --git a/cis/private/lehre/abgabe_lektor_details.php b/cis/private/lehre/abgabe_lektor_details.php index eb41620ce..2bda94848 100644 --- a/cis/private/lehre/abgabe_lektor_details.php +++ b/cis/private/lehre/abgabe_lektor_details.php @@ -760,8 +760,9 @@ function sendZweitbegutachterMail($zweitbegutachter, $erstbegutachter_person_id, { $zweitbetr = $projektbetreuer->result[0]; $intern = isset($zweitbetr->uid); + $mail_link_path = $zweitbetr->betreuerart_kurzbz == 'Zweitbegutachter' ? 'ProjektarbeitsbeurteilungZweitbegutachter' : 'ProjektarbeitsbeurteilungErstbegutachter'; $mail_subject = $projekttyp_kurzbz == 'Diplom' ? 'Masterarbeitsbetreuung' : 'Bachelorarbeitsbetreuung'; - $mail_baselink = APP_ROOT."index.ci.php/extensions/FHC-Core-Projektarbeitsbeurteilung/ProjektarbeitsbeurteilungZweitbegutachter"; + $mail_baselink = APP_ROOT."index.ci.php/extensions/FHC-Core-Projektarbeitsbeurteilung/$mail_link_path"; $mail_fulllink = "$mail_baselink?projektarbeit_id=".$zweitbegutachter->projektarbeit_id."&uid=".$student->uid; $mail_link = $intern ? $mail_fulllink : $mail_baselink; From 8670ab18f80586454dc1eff6748500f8cfce5904 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Mon, 5 Sep 2022 11:27:33 +0200 Subject: [PATCH 042/646] =?UTF-8?q?Zeitaufzeichnung:=20Ber=C3=BCcksichtigu?= =?UTF-8?q?ng=20von=20Attribut=20Zeitaufzeichnung=20bei=20Projekt=20und=20?= =?UTF-8?q?Projektphase?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cis/private/tools/zeitaufzeichnung.php | 29 ++++++++++++++-- .../tools/zeitaufzeichnung_projektphasen.php | 1 + include/projektphase.class.php | 34 +++++++++++++++++++ 3 files changed, 62 insertions(+), 2 deletions(-) diff --git a/cis/private/tools/zeitaufzeichnung.php b/cis/private/tools/zeitaufzeichnung.php index ba57b442f..003eea434 100644 --- a/cis/private/tools/zeitaufzeichnung.php +++ b/cis/private/tools/zeitaufzeichnung.php @@ -605,9 +605,14 @@ echo ' { projphasenhtml += "'; + echo ''; } echo ''; } diff --git a/cis/private/tools/zeitaufzeichnung_projektphasen.php b/cis/private/tools/zeitaufzeichnung_projektphasen.php index 053f38b91..05df74443 100644 --- a/cis/private/tools/zeitaufzeichnung_projektphasen.php +++ b/cis/private/tools/zeitaufzeichnung_projektphasen.php @@ -86,6 +86,7 @@ if (isset($_GET['projekt_kurzbz'])) $item['bezeichnung'] = $row->bezeichnung; $item['start'] = $datum_obj->formatDatum($row->start, 'd.m.Y'); $item['ende'] = $datum_obj->formatDatum($row->ende, 'd.m.Y'); + $item['zeitaufzeichnung_erlaubt'] = $row->zeitaufzeichnung; $result_obj[] = $item; } } diff --git a/include/projektphase.class.php b/include/projektphase.class.php index 19bd85d6d..4e3c38b7c 100644 --- a/include/projektphase.class.php +++ b/include/projektphase.class.php @@ -829,5 +829,39 @@ class projektphase extends basis_db return false; } } + + /** + * Gibt zurück, ob für eine Projektphase Zeitaufzeichnungsbuchung erlaubt ist + * @param $projektphase_id die zu überprüfende Projektphase + * @return boolean true, wenn Buchung erlaubt + */ + public function getPhasenZA($projektphase_id) + { + $qry = " + SELECT + fue.tbl_projektphase.zeitaufzeichnung + FROM + fue.tbl_projektphase + WHERE + tbl_projektphase.projektphase_id = ".$this->db_add_param($projektphase_id); + + if ($this->db_query($qry)) + { + if ($row = $this->db_fetch_object()) + { + return $row->zeitaufzeichnung; + } + else + { + $this->errormsg = 'Fehler beim Laden der Daten'; + return false; + } + } + else + { + $this->errormsg = 'Fehler beim Laden der Daten'; + return false; + } + } } ?> From 625b3c74c42a6a2299156abeae0a13f52e4d3265 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Wed, 7 Sep 2022 09:22:06 +0200 Subject: [PATCH 043/646] =?UTF-8?q?Bewerbungstool:=20keine=20ZGV=20bei=20A?= =?UTF-8?q?bbrechern,=20Ber=C3=BCcksichtigung=20studentstatus=20f=C3=BCr?= =?UTF-8?q?=20Dokumenthandling?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/prestudent.class.php | 63 +++++++++++++++++++++++++++++++++--- 1 file changed, 59 insertions(+), 4 deletions(-) diff --git a/include/prestudent.class.php b/include/prestudent.class.php index a958120cb..f5d59fd73 100644 --- a/include/prestudent.class.php +++ b/include/prestudent.class.php @@ -588,7 +588,7 @@ class prestudent extends person AND status_kurzbz = 'Interessent' - AND + AND NOT EXISTS ( SELECT 1 FROM public.tbl_prestudentstatus WHERE prestudent_id=tbl_prestudent.prestudent_id AND status_kurzbz='Abgewiesener' )"; @@ -2335,15 +2335,18 @@ class prestudent extends person return false; } - - $qry = "SELECT count(*) as anzahl FROM public.tbl_prestudent + $qry = "SELECT count(*) as anzahl + FROM public.tbl_prestudent pt JOIN public.tbl_prestudentstatus USING (prestudent_id) JOIN public.tbl_studiengang USING (studiengang_kz) WHERE person_id = ".$this->db_add_param($person_id, FHC_INTEGER)." + AND NOT EXISTS + (SELECT * FROM public.tbl_prestudentstatus ps + WHERE ps.prestudent_id = pt.prestudent_id + AND status_kurzbz not in ('Abbrecher')) AND status_kurzbz in ('Absolvent','Diplomand','Unterbrecher','Student') AND typ in ('b','m','d')"; - if ($this->db_query($qry)) { if ($row = $this->db_fetch_object()) @@ -2372,6 +2375,58 @@ class prestudent extends person } } + /** + * Prueft, ob eine Person bereits einmal auf der FHTW Studierend war + * @param int $person_id ID der zu überprüfenden Person. + * @return true wenn vorhanden + * false wenn nicht vorhanden + * false und errormsg wenn Fehler aufgetreten ist + */ +public function isPastStudent($person_id) +{ + if (!is_numeric($person_id)) + { + $this->errormsg = 'Person_id muss eine gueltige Zahl sein'; + return false; + } + + $qry = "SELECT count(*) as anzahl + FROM public.tbl_prestudent pt + JOIN public.tbl_prestudentstatus USING (prestudent_id) + JOIN public.tbl_studiengang USING (studiengang_kz) + WHERE person_id = ".$this->db_add_param($person_id, FHC_INTEGER)." + AND status_kurzbz in ('Student') + AND typ in ('b','m','d') + "; + + if ($this->db_query($qry)) + { + if ($row = $this->db_fetch_object()) + { + if ($row->anzahl > 0) + { + $this->errormsg = ''; + return true; + } + else + { + $this->errormsg = ''; + return false; + } + } + else + { + $this->errormsg = 'Fehler beim Laden der Daten'; + return false; + } + } + else + { + $this->errormsg = 'Fehler beim Laden der Daten'; + return false; + } +} + /** * Befüllt MasterZGV-Felder: Nation mit Österreich und MasterZGV-code mit FH-Bachelor(I) * @param int $person_id Personenkennzeichen. From 604592cdd1d485498e6a0601b9cb2c1535dbf462 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Wed, 7 Sep 2022 15:27:47 +0200 Subject: [PATCH 044/646] Bewerbungstool: neue Funktion isPastAbbrecher() --- include/prestudent.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/prestudent.class.php b/include/prestudent.class.php index f5d59fd73..cc48cd17d 100644 --- a/include/prestudent.class.php +++ b/include/prestudent.class.php @@ -2376,13 +2376,13 @@ class prestudent extends person } /** - * Prueft, ob eine Person bereits einmal auf der FHTW Studierend war + * Prueft, ob eine Person Abbrecher war * @param int $person_id ID der zu überprüfenden Person. * @return true wenn vorhanden * false wenn nicht vorhanden * false und errormsg wenn Fehler aufgetreten ist */ -public function isPastStudent($person_id) +public function isPastAbbrecher($person_id) { if (!is_numeric($person_id)) { @@ -2395,7 +2395,7 @@ public function isPastStudent($person_id) JOIN public.tbl_prestudentstatus USING (prestudent_id) JOIN public.tbl_studiengang USING (studiengang_kz) WHERE person_id = ".$this->db_add_param($person_id, FHC_INTEGER)." - AND status_kurzbz in ('Student') + AND status_kurzbz in ('Abbrecher') AND typ in ('b','m','d') "; From 7252bc1e6f07e053bae5a4afc860cd757985e75a Mon Sep 17 00:00:00 2001 From: ma0068 Date: Fri, 9 Sep 2022 13:20:50 +0200 Subject: [PATCH 045/646] add config.file --- cis/private/profile/zeitsperre_resturlaub.php | 1 + 1 file changed, 1 insertion(+) diff --git a/cis/private/profile/zeitsperre_resturlaub.php b/cis/private/profile/zeitsperre_resturlaub.php index 04615ab66..351ebc29d 100644 --- a/cis/private/profile/zeitsperre_resturlaub.php +++ b/cis/private/profile/zeitsperre_resturlaub.php @@ -350,6 +350,7 @@ function showHideStudeDropDown() $zeitsaldo = ""; if($addoncasetime) { + require_once('../../../addons/casetime/config.inc.php'); require_once('../../../addons/casetime/include/functions.inc.php'); $zeitsaldo = getCaseTimeZeitsaldo($uid); $zeitsaldo = "Aktueller Zeitsaldo: ". $zeitsaldo . " (".formatZeitsaldo($zeitsaldo).")"; From 0d03689f570604b995ce0e147c2101141f6796da Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Wed, 14 Sep 2022 02:48:43 +0200 Subject: [PATCH 046/646] added IIssueExistsChecker and Issueload->model('system/Issue_model', 'IssueModel'); + + $this->load->library('IssuesLib'); + } + + /** + * Initializes issue resolution. + */ + public function run() + { + $this->logInfo("Issue producer job started"); + + foreach ($this->_codeLibMappings as $fehlercode => $library) + { + // add person id and oe kurzbz automatically as params, merge it with additional params + // decode bewerbung_parameter into assoc array + $params = array_merge( + array('issue_id' => $issue->issue_id, 'issue_person_id' => $issue->person_id, 'issue_oe_kurzbz' => $issue->oe_kurzbz), + isset($issue->behebung_parameter) ? json_decode($issue->behebung_parameter, true) : array() + ); + + // if called from extension (extension name set), path includes extension names, otherwise it is the core library folder + $libRootPath = isset($this->_extensionName) ? 'extensions/' . $this->_extensionName . '/' : ''; + $issuesLibPath = $libRootPath . self::ISSUES_FOLDER . '/'; + $issuesLibFilePath = DOC_ROOT . 'application/' . $libRootPath . 'libraries/' . self::ISSUES_FOLDER . '/' . $libName . '.php'; + + // check if library file exists + if (!file_exists($issuesLibFilePath)) + { + // log error and continue with next issue if not + $this->logError("Issue library file " . $issuesLibFilePath . " does not exist"); + continue; + } + + // load library connected to fehlercode + $this->load->library( + $issuesLibPath . $libName + ); + + $lowercaseLibName = mb_strtolower($libName); + + // check if method is defined in libary class + if (!is_callable(array($this->{$lowercaseLibName}, self::CHECK_ISSUE_EXISTS_METHOD_NAME))) + { + // log error and continue with next issue if not + $this->logError("Method " . self::CHECK_ISSUE_EXISTS_METHOD_NAME . " is not defined in library $lowercaseLibName"); + continue; + } + + // call the function for checking for issue resolution + $issueResolvedRes = $this->{$lowercaseLibName}->{self::CHECK_ISSUE_EXISTS_METHOD_NAME}($params); + + if (isError($issueResolvedRes)) + { + $this->logError(getError($issueResolvedRes)); + } + else + { + $issueResolvedData = getData($issueResolvedRes); + + if ($issueResolvedData === true) + { + // set issue to resolved if needed + $behobenRes = $this->issueslib->setBehoben($issue->issue_id, null); + + if (isError($behobenRes)) + $this->logError(getError($behobenRes)); + else + $this->logInfo("Issue " . $issue->issue_id . " successfully resolved"); + } + } + } + + $this->logInfo("Issue resolve job ended"); + } +} From 450b0b64339db9316e196676c474eccf981a1ea8 Mon Sep 17 00:00:00 2001 From: Manfred Date: Wed, 14 Sep 2022 15:55:07 +0200 Subject: [PATCH 047/646] Initial commit --- include/berechtigung.class.php | 37 + .../benutzerberechtigung_autocomplete.php | 116 ++ .../benutzerberechtigung_details.php | 1149 +++++++++++------ 3 files changed, 914 insertions(+), 388 deletions(-) create mode 100644 vilesci/stammdaten/benutzerberechtigung_autocomplete.php diff --git a/include/berechtigung.class.php b/include/berechtigung.class.php index 684ad4e81..ab224be4d 100644 --- a/include/berechtigung.class.php +++ b/include/berechtigung.class.php @@ -312,5 +312,42 @@ class berechtigung extends basis_db return false; } } + + /** + * Sucht nach Berechtigungen + * @param string $searchItem Suchbegriff + * @return boolean + */ + public function searchBerechtigungen($searchItem) + { + $this->result=array(); + $qry = 'SELECT * FROM system.tbl_berechtigung WHERE + ( + LOWER(berechtigung_kurzbz) LIKE LOWER(\'%'.$this->db_escape(($searchItem)).'%\') + OR + LOWER(beschreibung) LIKE LOWER(\'%'.$this->db_escape(($searchItem)).'%\') + )'; + + $qry .= ' ORDER BY berechtigung_kurzbz'; + + if($this->db_query($qry)) + { + while($row = $this->db_fetch_object()) + { + $obj = new berechtigung(); + + $obj->berechtigung_kurzbz = $row->berechtigung_kurzbz; + $obj->beschreibung = $row->beschreibung; + + $this->result[] = $obj; + } + return true; + } + else + { + $this->errormsg = 'Fehler beim Laden der Berechtigungen'; + return false; + } + } } ?> \ No newline at end of file diff --git a/vilesci/stammdaten/benutzerberechtigung_autocomplete.php b/vilesci/stammdaten/benutzerberechtigung_autocomplete.php new file mode 100644 index 000000000..07e57809e --- /dev/null +++ b/vilesci/stammdaten/benutzerberechtigung_autocomplete.php @@ -0,0 +1,116 @@ + + */ +require_once ('../../config/vilesci.config.inc.php'); +require_once ('../../include/functions.inc.php'); +require_once ('../../include/basis_db.class.php'); +require_once ('../../include/ort.class.php'); +require_once ('../../include/benutzer.class.php'); +require_once ('../../include/studiengang.class.php'); +require_once ('../../include/berechtigung.class.php'); +require_once ('../../include/organisationseinheit.class.php'); +require_once ('../../include/sprache.class.php'); + +if (! $db = new basis_db()) + die('Es konnte keine Verbindung zum Server aufgebaut werden.'); + +$uid = get_uid(); +$sprache = getSprache(); + +if (isset($_REQUEST['autocomplete']) && $_REQUEST['autocomplete'] == 'benutzer') +{ + $search = trim((isset($_REQUEST['term']) ? $_REQUEST['term'] : '')); + if (is_null($search) || $search == '') + exit(); + + $benutzer = new benutzer(); + + if ($benutzer->search(array( + $search + ))) + { + $result_obj = array(); + foreach ($benutzer->result as $row) + { + $item['vorname'] = html_entity_decode($row->vorname); + $item['nachname'] = html_entity_decode($row->nachname); + $item['uid'] = html_entity_decode($row->uid); + $result_obj[] = $item; + } + echo json_encode($result_obj); + } + exit(); +} + +if (isset($_REQUEST['autocomplete']) && $_REQUEST['autocomplete'] == 'berechtigung') +{ + $search = trim((isset($_REQUEST['term']) ? $_REQUEST['term'] : '')); + if (is_null($search) || $search == '') + exit(); + + $berechtigung = new berechtigung(); + + if ($berechtigung->searchBerechtigungen($search)) + { + $result_obj = array(); + foreach ($berechtigung->result as $row) + { + $item['berechtigung_kurzbz'] = html_entity_decode($row->berechtigung_kurzbz); + $item['beschreibung'] = html_entity_decode($row->beschreibung); + $result_obj[] = $item; + } + echo json_encode($result_obj); + } + exit(); +} + +if (isset($_REQUEST['autocomplete']) && $_REQUEST['autocomplete'] == 'oe_kurzbz') +{ + $search = trim((isset($_REQUEST['term']) ? $_REQUEST['term'] : '')); + if (is_null($search) || $search == '') + exit(); + + $search = array($search); + $oe = new organisationseinheit(); + $oe->search($search); + + $stg = new studiengang(); + $stg->search($search); + foreach($stg->result as $row) + { + if($row->aktiv===true) + $oe->result[] = new organisationseinheit($row->oe_kurzbz); + } + + if(is_array($oe->result) && count($oe->result) > 0) + { + $result_obj = array(); + foreach($oe->result as $row) + { + if($row->aktiv==true) + { + $item['oe_kurzbz'] = html_entity_decode($row->oe_kurzbz); + $item['organisationseinheittyp_kurzbz'] = html_entity_decode($row->organisationseinheittyp_kurzbz); + $item['bezeichnung'] = html_entity_decode($row->bezeichnung); + $result_obj[] = $item; + } + } + echo json_encode($result_obj); + } + exit(); +} + +?> diff --git a/vilesci/stammdaten/benutzerberechtigung_details.php b/vilesci/stammdaten/benutzerberechtigung_details.php index 83a9c34bb..03e7b15b9 100644 --- a/vilesci/stammdaten/benutzerberechtigung_details.php +++ b/vilesci/stammdaten/benutzerberechtigung_details.php @@ -37,7 +37,28 @@ require_once('../../include/person.class.php'); require_once('../../include/benutzer.class.php'); require_once('../../include/funktion.class.php'); require_once('../../include/wawi_kostenstelle.class.php'); +require_once('../../include/log.class.php'); +/* + * TODOs + * + +Checkbox-Range +Mehrfach-Löschen + + +Wawi und kostenstelle ausblenden +Checkbox markieren bei (doppel)klick auf Zeile + +---------------------- + +Nach übertragen gleich zu Person springen +Bug in Kopieren - Verdoppelt alle Einträge +Sortierreihenfolge. OE wird anscheinend nicht sortiert +ART prüfen auf schreibweise +BEschreibungstexte bestehender Rechte + + */ $user = get_uid(); $rechte = new benutzerberechtigung(); @@ -51,7 +72,8 @@ if(!$rechte->isBerechtigt('basis/berechtigung')) //$reloadstr = ''; // neuladen der liste im oberen frame $htmlstr = ''; -$errorstr = ''; //fehler beim insert +$errorstr = ''; +$successstr = ''; $sel = ''; $chk = ''; $oe_arr = array(); @@ -73,64 +95,161 @@ $neu = false; $negativ = false; $filter=(isset($_GET['filter'])?$_GET['filter']:'alle'); -if(isset($_POST['del'])) +if(isset($_POST['delete']) && $_POST['delete'] != '') { if(!$rechte->isBerechtigt('basis/berechtigung', null, 'suid')) - die('Sie haben keine Berechtigung fuer diese Aktion'); + die($rechte->errormsg); - $benutzerberechtigung_id = $_POST['benutzerberechtigung_id']; + $benutzerberechtigung_id = $_POST['delete']; $ber = new benutzerberechtigung(); if(!$ber->delete($benutzerberechtigung_id)) $errorstr .= 'Datensatz konnte nicht gelöscht werden!'; - //$reloadstr .= "\n"; + //$reloadstr .= ""; } -if(isset($_POST['kopieren'])) +if(isset($_POST['delete_multi']) && $_POST['delete_multi'] != '') { + if(!$rechte->isBerechtigt('basis/berechtigung', null, 'suid')) + die($rechte->errormsg); + + if (isset($_POST['dataset'])) + { + $i = 0; + foreach ($_POST['dataset'] AS $benutzerberechtigung_id => $value) + { + // Nur markierte Rechte kopieren + if (!isset($value['check'])) + { + continue; + } + + $ber = new benutzerberechtigung(); + if(!$ber->delete($benutzerberechtigung_id)) + { + $errorstr .= 'Datensatz konnte nicht gelöscht werden!'; + } + else + { + $i ++; + //Log schreiben + $log = new log(); + + $logdata = var_export((array) $ber, true); + $log->new = true; + $log->sql = $logdata; + $log->sqlundo = 'Kein Undo vorhanden'; + $log->executetime = date('Y-m-d H:i:s'); + $log->mitarbeiter_uid = $user; + $log->beschreibung = 'Berechtigung gelöscht'; + + if(!$log->save()) + { + $errorstr .= "Fehler beim schreiben des Log-Eintrags
"; + } + } + } + if ($errorstr == '') + { + $successstr .= "".$i." Rechte erfolgreich gelöscht
"; + } + } + + + + //$reloadstr .= ""; + +} + +if(isset($_POST['uebertragen']) && $_POST['uebertragen_nach'] != '') +{ + //echo '
', var_dump($_POST), '
';exit(); if($rechte->isBerechtigt('basis/berechtigung', null, 'suid')) { - $uid = $_POST['uid']; - $uid_von = $_POST['uid_von']; + $uidVon = $_POST['uid']; + $copyTo = $_POST['uebertragen_nach']; - $rechtevon = new benutzerberechtigung(); - if(!$rechtevon->loadBenutzerRollen($uid_von)) - die('Fehler beim Laden der Berechtigung von '.$uid_von); - - foreach($rechtevon->berechtigungen AS $row) + if (isset($_POST['dataset'])) { - //Nur aktive Berechtigungen kopieren - if(($row->start=='' || $row->start<=date('Y-m-d')) && ($row->ende=='' || $row->ende>=date('Y-m-d'))) + $i = 0; + foreach ($_POST['dataset'] AS $key => $value) { + // Nur markierte Rechte kopieren + if (!isset($value['check'])) + { + continue; + } + + $rolle_kurzbz = (isset($value['rolle_kurzbz']) ? $value['rolle_kurzbz'] : ''); + $berechtigung_kurzbz = (isset($value['berechtigung_kurzbz']) ? $value['berechtigung_kurzbz'] : ''); + $art = (isset($value['art']) ? $value['art'] : ''); + $oe_kurzbz = (isset($value['oe_kurzbz']) ? $value['oe_kurzbz'] : ''); + $kostenstelle_id = (isset($value['kostenstelle_id']) ? $value['kostenstelle_id'] : ''); + $start = (isset($value['start']) ? $value['start'] : ''); + $ende = (isset($value['ende']) ? $value['ende'] : ''); + $anmerkung = (isset($value['anmerkung']) ? $value['anmerkung'] : ''); + + $funktion_kurzbz = (isset($value['funktion_kurzbz']) ? $value['funktion_kurzbz'] : ''); + $studiensemester_kurzbz = null; + $ber = new benutzerberechtigung(); - $ber->new = true; - //$ber->benutzerberechtigung_id = $benutzerberechtigung_id; - $ber->art = $row->art; - $ber->oe_kurzbz = $row->oe_kurzbz; - $ber->berechtigung_kurzbz = $row->berechtigung_kurzbz; - $ber->rolle_kurzbz = $row->rolle_kurzbz; - $ber->uid = $uid; - $ber->funktion_kurzbz = $row->funktion_kurzbz; - $ber->studiensemester_kurzbz = $row->studiensemester_kurzbz; - $ber->start = $row->start; - $ber->ende = $row->ende; - $ber->negativ = $row->negativ; - $ber->insertamum=date('Y-m-d H:i:s'); + $ber->insertamum = date('Y-m-d H:i:s'); $ber->insertvon = $user; + $ber->new = true; + + if (isset($value['negativ'])) + $ber->negativ = true; + else + $ber->negativ = false; + + $ber->art = $art; + $ber->oe_kurzbz = $oe_kurzbz; + $ber->berechtigung_kurzbz = $berechtigung_kurzbz; + $ber->rolle_kurzbz = $rolle_kurzbz; + $ber->uid = $copyTo; + $ber->funktion_kurzbz = $funktion_kurzbz; + $ber->studiensemester_kurzbz = $studiensemester_kurzbz; + $ber->start = $start; + $ber->ende = $ende; $ber->updateamum = date('Y-m-d H:i:s'); $ber->updatevon = $user; - $ber->kostenstelle_id = $row->kostenstelle_id; - $ber->anmerkung = 'Kopiert von UID '.$uid_von.($row->anmerkung!=''?'. Anmerkung von UID '.$uid_von.': '.$row->anmerkung:''); + $ber->kostenstelle_id = $kostenstelle_id; + $ber->anmerkung = 'Kopiert von UID '.$uidVon.($anmerkung!=''?'. Anmerkung von UID '.$uidVon.': '.$anmerkung:''); if(!$ber->save()) { - if (!$ber->new) - $errorstr .= "Datensatz konnte nicht gespeichert werden!".$ber->errormsg; + $errorstr .= "Datensatz konnte nicht gespeichert werden!".$ber->errormsg; } + else + { + $i ++; + //Log schreiben + $log = new log(); + + $logdata = var_export((array) $ber, true); + $log->new = true; + $log->sql = $logdata; + $log->sqlundo = 'Kein Undo vorhanden'; + $log->executetime = date('Y-m-d H:i:s'); + $log->mitarbeiter_uid = $user; + $log->beschreibung = 'Berechtigung übertragen von '.$uidVon.' nach '.$copyTo; + + if(!$log->save()) + { + $errorstr .= "Fehler beim schreiben des Log-Eintrags
"; + } + } + } + if ($errorstr == '') + { + $successstr .= "".$i." Rechte erfolgreich kopiert
"; + echo ""; } } } @@ -140,71 +259,137 @@ if(isset($_POST['kopieren'])) } } -if(isset($_POST['schick']) || isset($_POST['copy'])) +if(isset($_POST['schick'])) { if($rechte->isBerechtigt('basis/berechtigung', null, 'suid')) { - $benutzerberechtigung_id = $_POST['benutzerberechtigung_id']; - $art = $_POST['art']; - $oe_kurzbz = (isset($_POST['oe_kurzbz'])?$_POST['oe_kurzbz']:''); - $berechtigung_kurzbz = (isset($_POST['berechtigung_kurzbz'])?$_POST['berechtigung_kurzbz']:''); - $rolle_kurzbz = (isset($_POST['rolle_kurzbz'])?$_POST['rolle_kurzbz']:''); - $uid = $_POST['uid']; - $funktion_kurzbz = $_POST['funktion_kurzbz']; - $studiensemester_kurzbz = null;//$_POST['studiensemester_kurzbz']; - $start = $_POST['start']; - $ende = $_POST['ende']; - $kostenstelle_id = (isset($_POST['kostenstelle_id'])?$_POST['kostenstelle_id']:''); - $anmerkung = (isset($_POST['anmerkung'])?$_POST['anmerkung']:''); + if (isset($_POST['dataset'])) + { + foreach ($_POST['dataset'] AS $benutzerberechtigung_id => $value) + { + $rolle_kurzbz = (isset($value['rolle_kurzbz']) ? $value['rolle_kurzbz'] : ''); + $berechtigung_kurzbz = (isset($value['berechtigung_kurzbz']) ? $value['berechtigung_kurzbz'] : ''); + $art = (isset($value['art']) ? $value['art'] : ''); + $oe_kurzbz = (isset($value['oe_kurzbz']) ? $value['oe_kurzbz'] : ''); + $kostenstelle_id = (isset($value['kostenstelle_id']) ? $value['kostenstelle_id'] : ''); + $start = (isset($value['start']) ? $value['start'] : ''); + $ende = (isset($value['ende']) ? $value['ende'] : ''); + $uid = $_POST['uid']; + $anmerkung = (isset($value['anmerkung']) ? $value['anmerkung'] : ''); + $funktion_kurzbz = (isset($_POST['funktion_kurzbz']) ? $_POST['funktion_kurzbz'] : ''); + $studiensemester_kurzbz = null; + + $ber = new benutzerberechtigung(); + if (isset($_POST['neu'])) + { + $ber->insertamum = date('Y-m-d H:i:s'); + $ber->insertvon = $user; + $ber->new = true; + } + else + { + if(!$ber->load($benutzerberechtigung_id)) + die('Fehler beim Laden der Berechtigung'); + } + if (isset($value['negativ'])) + $ber->negativ = true; + else + $ber->negativ = false; + + $ber->benutzerberechtigung_id = $benutzerberechtigung_id; + $ber->art = $art; + $ber->oe_kurzbz = $oe_kurzbz; + $ber->berechtigung_kurzbz = $berechtigung_kurzbz; + $ber->rolle_kurzbz = $rolle_kurzbz; + $ber->uid = $uid; + $ber->funktion_kurzbz = $funktion_kurzbz; + $ber->studiensemester_kurzbz = $studiensemester_kurzbz; + $ber->start = $start; + $ber->ende = $ende; + $ber->updateamum = date('Y-m-d H:i:s'); + $ber->updatevon = $user; + $ber->kostenstelle_id = $kostenstelle_id; + $ber->anmerkung = $anmerkung; + + if(!$ber->save()) + { + if (!$ber->new) + $errorstr .= "Datensatz konnte nicht upgedatet werden!".$ber->errormsg; + else + $errorstr .= "Datensatz konnte nicht gespeichert werden!".$ber->errormsg; + } + else + { + //Log schreiben + $log = new log(); + + $logdata = var_export((array) $ber, true); + $log->new = true; + $log->sql = $logdata; + $log->sqlundo = 'Kein Undo vorhanden'; + $log->executetime = date('Y-m-d H:i:s'); + $log->mitarbeiter_uid = $user; + if (isset($_POST['neu'])) + $log->beschreibung = 'Neue Berechtigung für '.$uid.' angelegt'; + else + $log->beschreibung = 'Berechtigung für '.$uid.' aktualisiert'; + + if(!$log->save()) + { + $errorstr .= "Fehler beim schreiben des Log-Eintrags
"; + } + } + } + } + } + else + { + $errorstr.='Fehler beim Speichern: '.$rechte->errormsg; + } +} + +if(isset($_POST['copy']) && $_POST['copy'] != '') +{ + if($rechte->isBerechtigt('basis/berechtigung', null, 'suid')) + { $ber = new benutzerberechtigung(); - if (isset($_POST['neu']) || isset($_POST['copy'])) - { - $ber->insertamum=date('Y-m-d H:i:s'); - $ber->insertvon = $user; - $ber->new = true; - } - else - { - if(!$ber->load($benutzerberechtigung_id)) - die('Fehler beim Laden der Berechtigung'); - } - if (isset($_POST['negativ'])) - $ber->negativ = true; - else - $ber->negativ = false; + if(!$ber->load($_POST['copy'])) + die('Fehler beim Laden der Berechtigung'); - $ber->benutzerberechtigung_id = $benutzerberechtigung_id; - $ber->art = $art; - $ber->oe_kurzbz = $oe_kurzbz; - $ber->berechtigung_kurzbz = $berechtigung_kurzbz; - $ber->rolle_kurzbz = $rolle_kurzbz; - $ber->uid = $uid; - $ber->funktion_kurzbz = $funktion_kurzbz; - $ber->studiensemester_kurzbz = $studiensemester_kurzbz; - $ber->start = $start; - $ber->ende = $ende; - $ber->updateamum = date('Y-m-d H:i:s'); - $ber->updatevon = $user; - $ber->kostenstelle_id = $kostenstelle_id; - $ber->anmerkung = $anmerkung; + $ber->new = true; + $ber->insertamum = date('Y-m-d H:i:s'); + $ber->insertvon = $user; - if(!$ber->save()){ + if(!$ber->save()) + { if (!$ber->new) $errorstr .= "Datensatz konnte nicht upgedatet werden!".$ber->errormsg; else $errorstr .= "Datensatz konnte nicht gespeichert werden!".$ber->errormsg; } - /*if ($ber->new) + else { - $reloadstr .= "\n"; - }*/ + //Log schreiben + $log = new log(); + + $logdata = var_export((array) $ber, true); + $log->new = true; + $log->sql = $logdata; + $log->sqlundo = 'Kein Undo vorhanden'; + $log->executetime = date('Y-m-d H:i:s'); + $log->mitarbeiter_uid = $user; + $log->beschreibung = 'Berechtigung für '.$uid.' kopiert'; + + if(!$log->save()) + { + $errorstr .= "Fehler beim schreiben des Log-Eintrags
"; + } + } } else { - $errorstr.='Fehler beim Speichern: Sie haben keine Berechtigung zum Speichern'; + $errorstr.='Fehler beim Speichern: '.$rechte->errormsg; } } @@ -220,10 +405,10 @@ sort($rolle_arr); $b->getBerechtigungen(); foreach($b->result as $berechtigung) { - $berechtigung_arr[] = $berechtigung->berechtigung_kurzbz; + $berechtigung_arr[$berechtigung->berechtigung_kurzbz] = $berechtigung->beschreibung; $berechtigung_beschreibung_arr[] = $berechtigung->beschreibung; } -//var_dump($berechtigung_arr); + $st = new studiensemester(); $st->getAll(); foreach($st->studiensemester as $studiensemester) @@ -233,6 +418,10 @@ foreach($st->studiensemester as $studiensemester) $oe = new organisationseinheit(); $oe->getAll(); +foreach ($oe->result AS $row) +{ + $oe_arr[$row->oe_kurzbz] = $row->organisationseinheittyp_kurzbz.' '.$row->bezeichnung; +} $kostenstelle = new wawi_kostenstelle(); $kostenstelle->getAll(); @@ -259,13 +448,16 @@ if (isset($_REQUEST['uid']) || isset($_REQUEST['funktion_kurzbz'])) $rights->loadBenutzerRollen($uid); $name = new benutzer(); $name->load($uid); - $htmlstr .= "Berechtigungen von ".$name->nachname." ".$name->vorname." (".$uid.")\n"; + + $htmlstr .= "Berechtigungen von ".$name->nachname." ".$name->vorname." (".$uid.")"; + $htmlstr .= "

".$errorstr."

".$successstr."

"; + //Formular zum Kopieren von Berechtigungen - $htmlstr .= "
\n"; - $htmlstr .= "Berechtigungen (aktive) kopieren von UID \n"; - $htmlstr .= "\n"; - $htmlstr .= "\n"; - $htmlstr .= "
\n"; + //$htmlstr .= "
"; + //$htmlstr .= "Berechtigungen (aktive) kopieren von UID "; + //$htmlstr .= ""; + //$htmlstr .= ""; + //$htmlstr .= "
"; $i = 0; // Zusätzlich jede Funktion mit einer gültigen Berechtigung anzeigen @@ -291,11 +483,13 @@ if (isset($_REQUEST['uid']) || isset($_REQUEST['funktion_kurzbz'])) $i++; if ($i==1) { - $htmlstr .= "Geerbte Berechtigungen aus Funktion\n"; + $htmlstr .= "

Geerbte Berechtigungen aus Funktion(en) "; } - $htmlstr .= ($i>1?", ":"").$funktion_bezeichnung->beschreibung.""; + $htmlstr .= ($i > 1 ? ", " : "").$funktion_bezeichnung->beschreibung; } } + if(!empty($funktionsrecht)) + $htmlstr .= '

'; } } elseif(isset($_REQUEST['funktion_kurzbz']) && $_REQUEST['funktion_kurzbz']!='') @@ -307,10 +501,10 @@ if (isset($_REQUEST['uid']) || isset($_REQUEST['funktion_kurzbz'])) die('Funktion existiert nicht'); $rights->loadBenutzerRollen(null, $funktion_kurzbz); - $htmlstr .= "Berechtigungen der Funktion ".$funktion->beschreibung."\n"; + $htmlstr .= "Berechtigungen der Funktion ".$funktion->beschreibung.""; } - //$htmlstr .= "Berechtigungen von ".$name->nachname." ".$name->vorname." (".$uid.")".$funktion_kurzbz."\n"; + //$htmlstr .= "Berechtigungen von ".$name->nachname." ".$name->vorname." (".$uid.")".$funktion_kurzbz.""; /*$htmlstr .= '      Filter: Alle | nur WaWi @@ -318,16 +512,19 @@ if (isset($_REQUEST['uid']) || isset($_REQUEST['funktion_kurzbz'])) ';*/ - $htmlstr .= "\n"; //Alternatives styling fuer Tablesorter um Platz zu sparen. - $htmlstr .= "\n"; + //////////////// + // Neue Berechtigung einfügen + //////////////// + + $htmlstr .= "
"; + $htmlstr .= ""; $htmlstr .= " - - - + + @@ -335,63 +532,52 @@ if (isset($_REQUEST['uid']) || isset($_REQUEST['funktion_kurzbz'])) - - \n"; + "; - $htmlstr .= "\n"; - $htmlstr .= "\n"; - $htmlstr .= "\n"; - $htmlstr .= "\n"; - $htmlstr .= "\n"; - $htmlstr .= "\n"; + $htmlstr .= ""; + $htmlstr .= ""; + $htmlstr .= ""; + $htmlstr .= ""; + $htmlstr .= ""; + $htmlstr .= ""; - //Status - $htmlstr .= " \n"; + $htmlstr .= ""; //Rolle - $htmlstr .= " \n"; + $htmlstr .= " "; //Berechtigung_kurzbz - $htmlstr .= " \n"; + $htmlstr .= " "; //Art - $htmlstr .= " \n"; + $htmlstr .= " "; //Organisationseinheit - if($funktion_kurzbz!='') - $htmlstr .= " \n"; + if($funktion_kurzbz != '') + { + $htmlstr .= " "; + } else { - $htmlstr .= " \n"; + $htmlstr .= " "; } //Kostenstelle - $htmlstr .= " \n"; + $htmlstr .= " "; - $htmlstr .= " \n"; - $htmlstr .= " \n"; - $htmlstr .= " \n"; + //Negativ + $htmlstr .= " "; + + //Start + $htmlstr .= " "; + + //Ende + $htmlstr .= " "; //Anmerkung - $htmlstr .= " \n"; + $htmlstr .= " "; - $htmlstr .= " "; - $htmlstr .= "\n"; - $htmlstr .= " \n"; + $htmlstr .= " "; + $htmlstr .= ""; + $htmlstr .= "
Rolle Berechtigung ArtOrganisationseinheitKostenstelleOrganisationseinheitKostenstelle Neg Gültig ab Gültig bisInfo
 Neu: "; + $htmlstr .= " "; + $htmlstr .= " "; + $htmlstr .= " "; + $htmlstr .= " OE aus MA-FunktionOE aus MA-Funktion"; + $htmlstr .= " "; + $htmlstr .= " "; + $htmlstr .= "
"; + + $htmlstr .= "
"; + + //////////////// + // Tabelle für bestehende Berechtigungen + //////////////// + + $htmlstr .= "
"; + + $htmlstr .= ""; + $htmlstr .= ""; + $htmlstr .= " + + + +
+ + +
+ "; + $htmlstr .= ""; + $htmlstr .= ""; + $htmlstr .= " + + + + + + + + + + + + + + + "; foreach($rights->berechtigungen as $b) { @@ -430,199 +659,139 @@ if (isset($_REQUEST['uid']) || isset($_REQUEST['funktion_kurzbz'])) break; default: break; } - if(isset($_POST['edit']) && $_POST['benutzerberechtigung_id']==$b->benutzerberechtigung_id) + + $htmlstr .= " "; + $heute = strtotime(date('Y-m-d')); + if ($b->ende!='' && strtotime($b->ende) < $heute) { - $htmlstr .= " \n"; - $htmlstr .= "\n"; - $htmlstr .= "\n"; - $htmlstr .= "\n"; - $htmlstr .= "\n"; - - $heute = strtotime(date('Y-m-d')); - if ($b->ende!='' && strtotime($b->ende)<$heute) - { - $status="ampel_rot.png"; - $titel="ccc"; - } - elseif ($b->start!='' && strtotime($b->start)>$heute) - { - $status="ampel_gelb.png"; - $titel="bbb"; - } - else - { - $status="ampel_gruen.png"; - $titel="aaa"; - } - //Status - $htmlstr .= " \n"; - //Rolle - $htmlstr .= " \n"; - - //Berechtigung - $htmlstr .= " \n"; - - //Art - $htmlstr .= " \n"; - - //Organisationseinheit - if($funktion_kurzbz!='') - $htmlstr .= " \n"; - else - { - $htmlstr .= " \n"; - } - - //Kostenstelle - $htmlstr .= " \n"; - - $htmlstr .= " \n"; - $htmlstr .= " \n"; - $htmlstr .= " \n"; - $htmlstr .= " \n"; - $htmlstr .= " \n"; - - $htmlstr .= " "; - $htmlstr .= " "; - $htmlstr .= "\n"; - $htmlstr .= " \n"; + $titel="ccc"; + $style = 'style="border-left: 10px solid tomato; border-right: 10px solid transparent; text-align: center; vertical-align: middle"'; + } + elseif ($b->start!='' && strtotime($b->start) > $heute) + { + $titel="bbb"; + $style = 'style="border-left: 10px solid gold; border-right: 10px solid transparent; text-align: center; vertical-align: middle"'; } else { - $htmlstr .= " \n"; - $htmlstr .= "\n"; - $htmlstr .= "\n"; - $htmlstr .= "\n"; - $htmlstr .= "\n"; + $titel="aaa"; + $style = 'style="border-left: 10px solid LightGreen; border-right: 10px solid transparent; text-align: center; vertical-align: middle"'; + } + // Auswahlcheckbox + $htmlstr .= " "; - $heute = strtotime(date('Y-m-d')); - if ($b->ende!='' && strtotime($b->ende)<$heute) + //Rolle + $htmlstr .= " \n"; - //Rolle - $htmlstr .= " \n"; + $sel = ""; + $htmlstr .= ""; + } + $htmlstr .= " "; + $htmlstr.=""; - //Berechtigung - $htmlstr .= " \n"; + //Berechtigung + $htmlstr .= " "; - //Art - $htmlstr .= " \n"; + //Art + $htmlstr .= " "; - //Organisationseinheit - $oekey = $oe->result; - $org = new organisationseinheit(); - $org->load($b->oe_kurzbz); - $htmlstr .= " \n"; - - //Kostenstelle - $kst = new wawi_kostenstelle(); - $kst->load($b->kostenstelle_id); - if(!$kst->aktiv) - $style='style="text-decoration:line-through;"'; - else - $style=''; - $htmlstr .= " \n"; - - - $htmlstr .= " \n"; - $htmlstr .= " \n"; - $htmlstr .= " \n"; - $htmlstr .= " \n"; - $htmlstr .= " \n"; - - $htmlstr .= " "; - $htmlstr .= " "; - $htmlstr .= "\n"; - $htmlstr .= " \n"; + //Organisationseinheit + if($funktion_kurzbz != '') + { + $htmlstr .= " "; + } + else + { + $htmlstr .= " "; } + //Kostenstelle + $htmlstr .= " "; + + //Negativ-Checkbox + $htmlstr .= " "; + + //Gültig ab + $htmlstr .= " "; + + // Gültig bis + $htmlstr .= " "; + + //Anmerkung + $htmlstr .= " "; + + //Info + $htmlstr .= " "; + + $htmlstr .= " "; + $htmlstr .= " "; } - - $htmlstr .= "
RolleBerechtigungArtOrganisationseinheitKostenstelleNegGültig abGültig bisAnmerkungInfo
aktiv"; - - // Wenn editiert wird, zu der Zeile Springen - $htmlstr.=" - - "; - $htmlstr.="OE aus MA-Funktionnegativ?'checked="checked"':'')." onchange='markier(\"td_".$b->benutzerberechtigung_id."\")'>anmerkung))."' size='30' maxlength='256' markier(\"td_".$b->benutzerberechtigung_id."\")'>information  
"; + $htmlstr .= " ".$titel.""; + $htmlstr .= " "; + $htmlstr .= " "; + $htmlstr .= " aktiv$b->rolle_kurzbz$b->berechtigung_kurzbz"; + $htmlstr .= " ".$b->berechtigung_kurzbz.""; + $htmlstr .= " berechtigung_kurzbz] : '')."'>"; + $htmlstr .= " ".$b->art.""; + $htmlstr .= " ".$b->art.""; + $htmlstr .= " "; + $htmlstr .= " ".$org->organisationseinheittyp_kurzbz." ".$org->bezeichnung."$kst->bezeichnungnegativ?'checked="checked"':'')." onchange='markier(\"td_".$b->benutzerberechtigung_id."\")' disabled>".$b->start."".$b->ende."".$b->anmerkung."information
OE aus MA-Funktion"; + $htmlstr .= " ".($b->oe_kurzbz != '' ? $oe_arr[$b->oe_kurzbz] : '').""; + $htmlstr .= " "; + $htmlstr .= " oe_kurzbz] : '')."'>"; + $htmlstr .= " "; + $htmlstr .= " "; + $htmlstr .= " negativ?'checked="checked"':'').">"; + $htmlstr .= " "; + $htmlstr .= " ".$b->start.""; + $htmlstr .= " "; + $htmlstr .= " "; + $htmlstr .= " ".$b->ende.""; + $htmlstr .= " "; + $htmlstr .= " "; + $htmlstr .= " anmerkung))."' size='30' maxlength='256'>"; + $htmlstr .= " information"; + $htmlstr .= " "; + $htmlstr .= " "; + $htmlstr .= "
\n"; + $htmlstr .= ""; + $htmlstr .= '
+
'; + $htmlstr .= ''; + $htmlstr .= ' + +
'; + $htmlstr .= ""; } -$htmlstr .= "
".$errorstr."
\n"; + ?> @@ -635,58 +804,19 @@ $htmlstr .= "
".$errorstr."
\n"; - - - + + + + + + '; + ?> @@ -1052,11 +1188,15 @@ $htmlstring .= "" . $p->t('benotungstool/punkte') . ' / ' . $p->t('benotungs if (defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN2') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN2) { - $htmlstring .= "" . $p->t('benotungstool/nachpruefung') . ""; + $htmlstring .= "
" . $p->t('benotungstool/nachpruefung') . "
+ + "; } if (defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN3') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN3) { - $htmlstring .= "" . $p->t('benotungstool/nachpruefung2') . ""; + $htmlstring .= "
" . $p->t('benotungstool/nachpruefung') . "
+ + "; } if (defined('CIS_GESAMTNOTE_PRUEFUNG_KOMMPRUEF') && CIS_GESAMTNOTE_PRUEFUNG_KOMMPRUEF) { diff --git a/cis/private/lehre/benotungstool/nachpruefungeintragen.php b/cis/private/lehre/benotungstool/nachpruefungeintragen.php index 0ad985e76..81545a7f6 100644 --- a/cis/private/lehre/benotungstool/nachpruefungeintragen.php +++ b/cis/private/lehre/benotungstool/nachpruefungeintragen.php @@ -41,10 +41,15 @@ require_once('../../../../include/benutzerfunktion.class.php'); require_once('../../../../include/benutzer.class.php'); require_once('../../../../include/student.class.php'); require_once('../../../../include/notenschluessel.class.php'); +require_once('../../../../include/phrasen.class.php'); + if (!$db = new basis_db()) die('Fehler beim Herstellen der Datenbankverbindung'); +$sprache = getSprache(); +$p = new phrasen($sprache); + $user = get_uid(); if(!check_lektor($user)) @@ -52,6 +57,7 @@ if(!check_lektor($user)) $lehreinheit_id=''; +$lehreinheit_id_pr=''; if(isset($_GET['lvid']) && is_numeric($_GET['lvid'])) //Lehrveranstaltung_id $lvid = $_GET['lvid']; @@ -62,60 +68,17 @@ if(isset($_GET['lehreinheit_id']) && is_numeric($_GET['lehreinheit_id'])) //Lehr $lehreinheit_id = $_GET['lehreinheit_id']; if(isset($_GET['lehreinheit_id_pr']) && is_numeric($_GET['lehreinheit_id_pr'])) //Lehreinheit_id der pruefung - $lehreinheit_id = $_GET['lehreinheit_id_pr']; - -if(isset($_GET['datum'])) -{ - $datum = $_GET['datum']; - $datum_obj = new datum(); - $datum = $datum_obj->checkformatDatum($datum, 'Y-m-d', true) OR die('Invalid date format'); -} -else - die('Fehlerhafte Parameteruebergabe'); - -//Laden der Lehrveranstaltung -$lv_obj = new lehrveranstaltung(); -if(!$lv_obj->load($lvid)) - die($lv_obj->errormsg); - -//Studiengang laden -$stg_obj = new studiengang($lv_obj->studiengang_kz); + $lehreinheit_id_pr = $_GET['lehreinheit_id_pr']; if(isset($_GET['stsem'])) $stsem = $_GET['stsem']; else $stsem = ''; - -$uebung_id = (isset($_GET['uebung_id'])?$_GET['uebung_id']:''); -$uid = (isset($_GET['uid'])?$_GET['uid']:''); - //Studiensemester laden $stsem_obj = new studiensemester(); if($stsem=='') $stsem = $stsem_obj->getaktorNext(); -$student_uid = $_REQUEST["student_uid"]; - -$note = $_REQUEST["note"]; -if(isset($_REQUEST['punkte'])) - $punkte = $_REQUEST['punkte']; -else - $punkte = ''; - -$punkte = str_replace(',','.',$punkte); - -if($punkte!='') -{ - // Bei Punkteeingabe wird die Note nochmals geprueft und ggf korrigiert - $notenschluessel = new notenschluessel(); - $note_pruef = $notenschluessel->getNote($punkte, $lvid, $stsem); - if($note_pruef!=$note) - { - $note = $note_pruef; - $note_dirty=true; - } -} - if(!isset($_GET['typ'])) { $typ='Termin2'; @@ -128,16 +91,151 @@ else die('Typ ist ungueltig'); } -if($note=='') - $note = 9; - -$old_note = $note; - -// lvgesamtnote für studenten speichern -if (isset($_REQUEST["submit"]) && ($_REQUEST["student_uid"] != '') ) +if (isset($_REQUEST['sammel']) && $_REQUEST["sammel"] == 1) +{ + foreach ($_POST as $row=>$val) + { + if(mb_strstr(mb_strtolower($row), 'student_uid_')) + { + $id=mb_substr($row, mb_strlen('student_uid_')); + + $student_uid = $_POST['student_uid_'.$id]; + $note = null; + $punkte = null; + $datum = null; + if(isset($_POST['note_'.$id])) + $note = $_POST['note_'.$id]; + elseif(isset($_POST['punkte_'.$id])) + $punkte = $_POST['punkte_'.$id]; + else + { + $response.="\nNote oder Punkte fehlen"; + continue; + } + $punkte=str_replace(',','.', $punkte); + + $datum = $_POST['datumNachp_'.$id]; + + // //check ob Matrikelnummer anstelle der student_uid übergeben wurde + // + // + // $student = new student(); + // + // + // $response2 = true; + // if (!$student->checkIfValidStudentUID($student_uid)) + // { + // //UID ermitteln + // if(!$student_uid = $student->getUidFromMatrikelnummer($student_uid)) + // { + // $response2 = false; + // $response2.="\n".$p->t('benotungstool/studentMitMatrikelnummerExistiertNicht',array($student_uid)); + // continue; + // } + // } + + + $lehreinheit_id = getLehreinheit($db, $lvid, $student_uid, $stsem); + + if(isset($_POST['student_uid_'.$id]) && (isset($_POST['note_'.$id]) || isset($_POST['punkte_'.$id])) && isset($_POST['datumNachp_'.$id])) + { + // echo "\ndb " . " lvid ". $lvid . " note " . $note . " student_uid " . $student_uid . " datum " . $datum . " studiensem " . + // $stsem . " lehreinheit_id_pr " . $lehreinheit_id . " typ " . $typ . "\n"; + + $response = savePruefung($lvid, $student_uid, $stsem, $lehreinheit_id, $datum, $typ, $note, $punkte); + + echo "\ndb " . " lvid ". $lvid . " note " . $note . " student_uid " . $student_uid . " datum " . $datum . " studiensem " . + $stsem . " lehreinheit_id_pr " . $lehreinheit_id . " typ " . $typ . " response" . $response . "\n"; + // echo $response; + + } + else + { + echo "\n fehlende oder fehlerhafte Inputparameter"; + } + } + } + +} +else +{ + // Einzelupdate + + if(isset($_GET['datum']) ) + { + $datum = $_GET['datum']; + $datum_obj = new datum(); + $datum = $datum_obj->checkformatDatum($datum, 'Y-m-d', true) OR die('Invalid date format'); + } + + // echo "Variante Einzel"; + else + die('Fehlerhafte Parameteruebergabe'); + + $student_uid = $_REQUEST["student_uid"]; + + $note = $_REQUEST["note"]; + if(isset($_REQUEST['punkte'])) + $punkte = $_REQUEST['punkte']; + else + $punkte = ''; + + $punkte = str_replace(',','.',$punkte); + + if($punkte!='') + { + // Bei Punkteeingabe wird die Note nochmals geprueft und ggf korrigiert + $notenschluessel = new notenschluessel(); + $note_pruef = $notenschluessel->getNote($punkte, $lvid, $stsem); + if($note_pruef!=$note) + { + $note = $note_pruef; + $note_dirty=true; + } + } + + if($note=='') + $note = 9; + + $old_note = $note; + + //Laden der Lehrveranstaltung + $lv_obj = new lehrveranstaltung(); + if(!$lv_obj->load($lvid)) + die($lv_obj->errormsg); + + //Studiengang laden + $stg_obj = new studiengang($lv_obj->studiengang_kz); + + $uebung_id = (isset($_GET['uebung_id'])?$_GET['uebung_id']:''); + $uid = (isset($_GET['uid'])?$_GET['uid']:''); + + // lvgesamtnote für studenten speichern + if (isset($_REQUEST["submit"]) && ($_REQUEST["student_uid"] != '') ) + { + // Die Pruefung muss einer Lehreinheit zugeordnet werden + // deshalb wird hier versucht eine passende Lehreinheit zu ermitteln. + + $lehreinheit_id = getLehreinheit($db, $lvid, $student_uid, $stsem); + + $response = savePruefung($lvid, $student_uid, $stsem, $lehreinheit_id, $datum, $typ, $note); + echo $response; + } + else + echo "Fehler beim Eintragen der Prüfungen"; + +} + +/** + * Berechnet Lehreinheit auf Basis LV-Daten + * @param string $db Datenbankvariable + * @param string $student_uid student_uid + * @param int $lvid Lehrveranstaltungsid + * @param string $stsem Studiensemester im Format 'WSYYYY' + * @return String LehreinheitId + */ +function getLehreinheit($db, $lvid, $student_uid, $stsem) { - // Die Pruefung muss einer Lehreinheit zugeordnet werden - // deshalb wird hier versucht eine passende Lehreinheit zu ermitteln. $le_arr = array(); $qry_stud = "SELECT lehreinheit_id, lehrform_kurzbz FROM @@ -158,104 +256,117 @@ if (isset($_REQUEST["submit"]) && ($_REQUEST["student_uid"] != '') ) } } - if (!in_array($lehreinheit_id,$le_arr)) + //if (!in_array($lehreinheit_id,$le_arr)) $lehreinheit_id = $le_arr[0]; + return $lehreinheit_id; +} + +/** + * Prüfung speichern + */ +function savePruefung($lvid, $student_uid, $stsem, $lehreinheit_id, $datum, $typ, $note, $punkte=null) +{ $jetzt = date("Y-m-d H:i:s"); + global $user; //, $note, $punkte, $datum; - $pr = new Pruefung(); - - // Wenn eine Pruefung angelegt wird, wird zuerst eine Pruefung mit 1. Termin angelegt - // und dort die Zeugnisnote gespeichert - if($pr->getPruefungen($student_uid, "Termin1", $lvid, $stsem)) + if ($typ == "Termin2") { - if ($pr->result) + $pr = new Pruefung(); + // Wenn eine Pruefung angelegt wird, wird zuerst eine Pruefung mit 1. Termin angelegt + // und dort die Zeugnisnote gespeichert + if($pr->getPruefungen($student_uid, "Termin1", $lvid, $stsem)) { - $termin1 = 1; - } - else - { - $lvnote = new lvgesamtnote(); - if ($lvnote->load($lvid, $student_uid, $stsem)) + if ($pr->result) { - $pr_note = $lvnote->note; - $pr_punkte = $lvnote->punkte; - $benotungsdatum = $lvnote->benotungsdatum; + $termin1 = 1; } else { - $pr_note = 9; - $pr_punkte = ''; - $benotungsdatum = $jetzt; + $lvnote = new lvgesamtnote(); + if ($lvnote->load($lvid, $student_uid, $stsem)) + { + $pr_note = $lvnote->note; + $pr_punkte = $lvnote->punkte; + $benotungsdatum = $lvnote->benotungsdatum; + } + else + { + $pr_note = 9; + $pr_punkte = ''; + $benotungsdatum = $jetzt; + } + + $pr_1 = new Pruefung(); + $pr_1->lehreinheit_id = $lehreinheit_id; + $pr_1->student_uid = $student_uid; + $pr_1->mitarbeiter_uid = $user; + $pr_1->note = $pr_note; + $pr_1->punkte = $pr_punkte; + $pr_1->pruefungstyp_kurzbz = "Termin1"; + $pr_1->datum = $benotungsdatum; + $pr_1->anmerkung = ""; + $pr_1->insertamum = $jetzt; + $pr_1->insertvon = $user; + $pr_1->updateamum = null; + $pr_1->updatevon = null; + $pr_1->ext_id = null; + $pr_1->new = true; + $pr_1->save(); + $response = "neu T1"; } - $pr_1 = new Pruefung(); - $pr_1->lehreinheit_id = $lehreinheit_id; - $pr_1->student_uid = $student_uid; - $pr_1->mitarbeiter_uid = $user; - $pr_1->note = $pr_note; - $pr_1->punkte = $pr_punkte; - $pr_1->pruefungstyp_kurzbz = "Termin1"; - $pr_1->datum = $benotungsdatum; - $pr_1->anmerkung = ""; - $pr_1->insertamum = $jetzt; - $pr_1->insertvon = $user; - $pr_1->updateamum = null; - $pr_1->updatevon = null; - $pr_1->ext_id = null; - $pr_1->new = true; - $pr_1->save(); + $prTermin2 = new Pruefung(); + $pr_2 = new Pruefung(); + + // Die Pruefung wird als Termin2 eingetragen + if ($prTermin2->getPruefungen($student_uid, 'Termin2', $lvid, $stsem)) + { + if ($prTermin2->result) + { + $pr_2->load($prTermin2->result[0]->pruefung_id); + $pr_2->new = null; + $pr_2->updateamum = $jetzt; + $pr_2->updatevon = $user; + $old_note = $pr_2->note; + $pr_2->note = $note; + $pr_2->punkte = $punkte; + $pr_2->datum = $datum; + $pr_2->anmerkung = ""; + $response = "update T2"; + } + else + { + $pr_2->lehreinheit_id = $lehreinheit_id; + $pr_2->student_uid = $student_uid; + $pr_2->mitarbeiter_uid = $user; + $pr_2->note = $note; + $pr_2->punkte = $punkte; + $pr_2->pruefungstyp_kurzbz = $typ; + $pr_2->datum = $datum; + $pr_2->anmerkung = ""; + $pr_2->insertamum = $jetzt; + $pr_2->insertvon = $user; + $pr_2->updateamum = null; + $pr_2->updatevon = null; + $pr_2->ext_id = null; + $pr_2->new = true; + $old_note = -1; + $response = "new T2"; + } + $pr_2->save(); + } } } - - - $prTermin2 = new Pruefung(); - $pr_2 = new Pruefung(); - - // Die Pruefung wird als Termin2 eingetragen - if ($prTermin2->getPruefungen($student_uid, $typ, $lvid, $stsem)) + else { - if ($prTermin2->result) - { - $pr_2->load($prTermin2->result[0]->pruefung_id); - $pr_2->new = null; - $pr_2->updateamum = $jetzt; - $pr_2->updatevon = $user; - $old_note = $pr_2->note; - $pr_2->note = $note; - $pr_2->punkte = $punkte; - $pr_2->datum = $datum; - $pr_2->anmerkung = ""; - } - else - { - $pr_2->lehreinheit_id = $lehreinheit_id; - $pr_2->student_uid = $student_uid; - $pr_2->mitarbeiter_uid = $user; - $pr_2->note = $note; - $pr_2->punkte = $punkte; - $pr_2->pruefungstyp_kurzbz = $typ; - $pr_2->datum = $datum; - $pr_2->anmerkung = ""; - $pr_2->insertamum = $jetzt; - $pr_2->insertvon = $user; - $pr_2->updateamum = null; - $pr_2->updatevon = null; - $pr_2->ext_id = null; - $pr_2->new = true; - $old_note = -1; - } - $pr_2->save(); + $response = "no existing T3"; } - - // Wenn eine Pruefung eingetragen wird, wird danach die LV-Note korrigiert - $jetzt = date("Y-m-d H:i:s"); - - $lvid = $_REQUEST["lvid"]; + //Gesamtnote updaten $lvgesamtnote = new lvgesamtnote(); - if (!$lvgesamtnote->load($lvid, $student_uid, $stsem)) - { + if (!$lvgesamtnote->load($lvid, $student_uid, $stsem)) + { $lvgesamtnote->student_uid = $student_uid; $lvgesamtnote->lehrveranstaltung_id = $lvid; $lvgesamtnote->studiensemester_kurzbz = $stsem; @@ -272,9 +383,9 @@ if (isset($_REQUEST["submit"]) && ($_REQUEST["student_uid"] != '') ) $lvgesamtnote->insertvon = $user; $new = true; $response = "neu"; - } - else - { + } + else + { $lvgesamtnote->note = $note; $lvgesamtnote->punkte = $punkte; $lvgesamtnote->benotungsdatum = $jetzt; @@ -286,12 +397,11 @@ if (isset($_REQUEST["submit"]) && ($_REQUEST["student_uid"] != '') ) else $response = "update"; } + if (!$lvgesamtnote->save($new)) - echo "".$lvgesamtnote->errormsg.""; + return $lvgesamtnote->errormsg; else - echo $response; + return $response; } -else - echo "Fehler beim Eintragen der Prüfungen"; ?> From 035d196ae5cb45b44a4f2f863e7bf5fd0ddbe872 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Thu, 13 Oct 2022 08:04:10 +0200 Subject: [PATCH 092/646] Logik Matrikelnummer StudentenId --- .../benotungstool/nachpruefungeintragen.php | 34 +++++++++---------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/cis/private/lehre/benotungstool/nachpruefungeintragen.php b/cis/private/lehre/benotungstool/nachpruefungeintragen.php index 81545a7f6..d1a7e2326 100644 --- a/cis/private/lehre/benotungstool/nachpruefungeintragen.php +++ b/cis/private/lehre/benotungstool/nachpruefungeintragen.php @@ -99,6 +99,8 @@ if (isset($_REQUEST['sammel']) && $_REQUEST["sammel"] == 1) { $id=mb_substr($row, mb_strlen('student_uid_')); + $response2 = ''; + $student_uid = $_POST['student_uid_'.$id]; $note = null; $punkte = null; @@ -115,24 +117,21 @@ if (isset($_REQUEST['sammel']) && $_REQUEST["sammel"] == 1) $punkte=str_replace(',','.', $punkte); $datum = $_POST['datumNachp_'.$id]; + $datum_obj = new datum(); + $datum = $datum_obj->checkformatDatum($datum, 'Y-m-d', true) OR die('Invalid date format'); // //check ob Matrikelnummer anstelle der student_uid übergeben wurde - // - // - // $student = new student(); - // - // - // $response2 = true; - // if (!$student->checkIfValidStudentUID($student_uid)) - // { - // //UID ermitteln - // if(!$student_uid = $student->getUidFromMatrikelnummer($student_uid)) - // { - // $response2 = false; - // $response2.="\n".$p->t('benotungstool/studentMitMatrikelnummerExistiertNicht',array($student_uid)); - // continue; - // } - // } + + $student = new student(); + if (!$student->checkIfValidStudentUID($student_uid)) + { + //UID ermitteln + if(!$student_uid = $student->getUidFromMatrikelnummer($student_uid)) + { + $response2.="\n".$p->t('benotungstool/studentMitMatrikelnummerExistiertNicht',array($student_uid)); + continue; + } + } $lehreinheit_id = getLehreinheit($db, $lvid, $student_uid, $stsem); @@ -146,7 +145,7 @@ if (isset($_REQUEST['sammel']) && $_REQUEST["sammel"] == 1) echo "\ndb " . " lvid ". $lvid . " note " . $note . " student_uid " . $student_uid . " datum " . $datum . " studiensem " . $stsem . " lehreinheit_id_pr " . $lehreinheit_id . " typ " . $typ . " response" . $response . "\n"; - // echo $response; + echo $response2; } else @@ -168,7 +167,6 @@ else $datum = $datum_obj->checkformatDatum($datum, 'Y-m-d', true) OR die('Invalid date format'); } - // echo "Variante Einzel"; else die('Fehlerhafte Parameteruebergabe'); From 29fc5181bf237ba65337de647f1180c4d9420b9d Mon Sep 17 00:00:00 2001 From: ma0068 Date: Thu, 13 Oct 2022 10:16:26 +0200 Subject: [PATCH 093/646] Importfunktion Termin3 --- .../benotungstool/lvgesamtnoteverwalten.php | 2 +- .../benotungstool/nachpruefungeintragen.php | 48 +++++++++++++++++-- 2 files changed, 44 insertions(+), 6 deletions(-) diff --git a/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php b/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php index 6a160c646..80bb7c5a5 100644 --- a/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php +++ b/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php @@ -1194,7 +1194,7 @@ if (defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN2') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN } if (defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN3') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN3) { - $htmlstring .= "
" . $p->t('benotungstool/nachpruefung') . "
+ $htmlstring .= "
" . $p->t('benotungstool/nachpruefung2') . "
"; } diff --git a/cis/private/lehre/benotungstool/nachpruefungeintragen.php b/cis/private/lehre/benotungstool/nachpruefungeintragen.php index d1a7e2326..e8553ce7b 100644 --- a/cis/private/lehre/benotungstool/nachpruefungeintragen.php +++ b/cis/private/lehre/benotungstool/nachpruefungeintragen.php @@ -120,8 +120,7 @@ if (isset($_REQUEST['sammel']) && $_REQUEST["sammel"] == 1) $datum_obj = new datum(); $datum = $datum_obj->checkformatDatum($datum, 'Y-m-d', true) OR die('Invalid date format'); - // //check ob Matrikelnummer anstelle der student_uid übergeben wurde - + //check ob Matrikelnummer anstelle der student_uid übergeben wurde $student = new student(); if (!$student->checkIfValidStudentUID($student_uid)) { @@ -138,9 +137,6 @@ if (isset($_REQUEST['sammel']) && $_REQUEST["sammel"] == 1) if(isset($_POST['student_uid_'.$id]) && (isset($_POST['note_'.$id]) || isset($_POST['punkte_'.$id])) && isset($_POST['datumNachp_'.$id])) { - // echo "\ndb " . " lvid ". $lvid . " note " . $note . " student_uid " . $student_uid . " datum " . $datum . " studiensem " . - // $stsem . " lehreinheit_id_pr " . $lehreinheit_id . " typ " . $typ . "\n"; - $response = savePruefung($lvid, $student_uid, $stsem, $lehreinheit_id, $datum, $typ, $note, $punkte); echo "\ndb " . " lvid ". $lvid . " note " . $note . " student_uid " . $student_uid . " datum " . $datum . " studiensem " . @@ -356,6 +352,48 @@ function savePruefung($lvid, $student_uid, $stsem, $lehreinheit_id, $datum, $typ } } } + elseif ($typ == "Termin3") + { + $prTermin3 = new Pruefung(); + $pr_3 = new Pruefung(); + + if ($prTermin3->getPruefungen($student_uid, 'Termin3', $lvid, $stsem)) + { + if ($prTermin3->result) + { + $pr_3->load($prTermin3->result[0]->pruefung_id); + $pr_3->new = null; + $pr_3->updateamum = $jetzt; + $pr_3->updatevon = $user; + $old_note = $pr_3->note; + $pr_3->note = $note; + $pr_3->punkte = $punkte; + $pr_3->datum = $datum; + $pr_3->anmerkung = ""; + $response = "Prüfung Termin3 aktualisiert"; + } + else + { + $pr_3->lehreinheit_id = $lehreinheit_id; + $pr_3->student_uid = $student_uid; + $pr_3->mitarbeiter_uid = $user; + $pr_3->note = $note; + $pr_3->punkte = $punkte; + $pr_3->pruefungstyp_kurzbz = $typ; + $pr_3->datum = $datum; + $pr_3->anmerkung = ""; + $pr_3->insertamum = $jetzt; + $pr_3->insertvon = $user; + $pr_3->updateamum = null; + $pr_3->updatevon = null; + $pr_3->ext_id = null; + $pr_3->new = true; + $old_note = -1; + $response = "neue Prüfung Termin3"; + } + $pr_3->save(); + } + } else { $response = "no existing T3"; From ce3cea5515721e933b621cf9f2902ddca5aecf21 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Thu, 13 Oct 2022 15:36:08 +0200 Subject: [PATCH 094/646] Validierungen Format Datum, Matrikelnr, StudentId, Note --- .../benotungstool/lvgesamtnoteverwalten.php | 61 +++++++++---------- .../benotungstool/nachpruefungeintragen.php | 51 +++++++--------- locale/de-AT/benotungstool.php | 4 +- locale/en-US/benotungstool.php | 1 + 4 files changed, 56 insertions(+), 61 deletions(-) diff --git a/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php b/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php index 80bb7c5a5..8a428ff2a 100644 --- a/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php +++ b/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php @@ -20,33 +20,33 @@ * Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at > * Manuela Thamer */ -require_once ('../../../../config/cis.config.inc.php'); -require_once ('../../../../config/global.config.inc.php'); -require_once ('../../../../include/functions.inc.php'); -require_once ('../../../../include/lehrveranstaltung.class.php'); -require_once ('../../../../include/studiengang.class.php'); -require_once ('../../../../include/studiensemester.class.php'); -require_once ('../../../../include/lehreinheit.class.php'); -require_once ('../../../../include/benutzerberechtigung.class.php'); -require_once ('../../../../include/uebung.class.php'); -require_once ('../../../../include/beispiel.class.php'); -require_once ('../../../../include/studentnote.class.php'); -require_once ('../../../../include/datum.class.php'); -require_once ('../../../../include/legesamtnote.class.php'); -require_once ('../../../../include/lvgesamtnote.class.php'); -require_once ('../../../../include/zeugnisnote.class.php'); -require_once ('../../../../include/pruefung.class.php'); -require_once ('../../../../include/person.class.php'); -require_once ('../../../../include/benutzer.class.php'); -require_once ('../../../../include/mitarbeiter.class.php'); -require_once ('../../../../include/mail.class.php'); -require_once ('../../../../include/phrasen.class.php'); -require_once ('../../../../include/note.class.php'); -require_once ('../../../../include/notenschluessel.class.php'); -require_once ('../../../../include/studienplan.class.php'); -require_once ('../../../../include/addon.class.php'); -require_once ('../../../../include/mobilitaet.class.php'); -require_once ('../../../../include/student.class.php'); +require_once('../../../../config/cis.config.inc.php'); +require_once('../../../../config/global.config.inc.php'); +require_once('../../../../include/functions.inc.php'); +require_once('../../../../include/lehrveranstaltung.class.php'); +require_once('../../../../include/studiengang.class.php'); +require_once('../../../../include/studiensemester.class.php'); +require_once('../../../../include/lehreinheit.class.php'); +require_once('../../../../include/benutzerberechtigung.class.php'); +require_once('../../../../include/uebung.class.php'); +require_once('../../../../include/beispiel.class.php'); +require_once('../../../../include/studentnote.class.php'); +require_once('../../../../include/datum.class.php'); +require_once('../../../../include/legesamtnote.class.php'); +require_once('../../../../include/lvgesamtnote.class.php'); +require_once('../../../../include/zeugnisnote.class.php'); +require_once('../../../../include/pruefung.class.php'); +require_once('../../../../include/person.class.php'); +require_once('../../../../include/benutzer.class.php'); +require_once('../../../../include/mitarbeiter.class.php'); +require_once('../../../../include/mail.class.php'); +require_once('../../../../include/phrasen.class.php'); +require_once('../../../../include/note.class.php'); +require_once('../../../../include/notenschluessel.class.php'); +require_once('../../../../include/studienplan.class.php'); +require_once('../../../../include/addon.class.php'); +require_once('../../../../include/mobilitaet.class.php'); +require_once('../../../../include/student.class.php'); $summe_stud = 0; $summe_t2 = 0; @@ -190,7 +190,7 @@ foreach ($noten_obj->result as $row) $noten_array[$row->note]['lehre'] = $row->lehre; $noten_array[$row->note]['lkt_ueberschreibbar'] = $row->lkt_ueberschreibbar; $noten_array[$row->note]['anmerkung'] = $row->anmerkung; - foreach ($sprachen->result AS $s) + foreach ($sprachen->result as $s) $noten_array[$row->note]['bezeichnung_mehrsprachig'][$s->sprache] = $row->bezeichnung_mehrsprachig[$s->sprache]; } @@ -376,7 +376,7 @@ foreach ($noten_obj->result as $row) var datum_test = datum.split("."); if (datum_test[0].length != 2 || datum_test[1].length != 2 || datum_test[2].length!=4 || isNaN(datum_test[2]) || datum_test[1]>12 || datum_test[1]<1 || datum_test[0]>31 || datum_test[0]<1) - alert("Invalid Date Format: DD.MM.YYYY"); + alert("Das Datum entspricht nicht dem Format TT.MM.JJJJ!"); else { var anlegendiv = document.getElementById("nachpruefung_div"); @@ -939,7 +939,6 @@ if (defined('CIS_ANWESENHEITSLISTE_NOTENLISTE_ANZEIGEN') && CIS_ANWESENHEITSLIST { $hrefpath = "../notenliste.xls.php?stg=$stg_obj->studiengang_kz&lvid=$lvid&stsem=$stsem"; echo "
" . $p->t('benotungstool/notenlisteImport') . ""; - } // eingetragene lv-gesamtnoten freigeben @@ -1333,7 +1332,6 @@ if (defined("CIS_GESAMTNOTE_PRUEFUNG_MOODLE_LE_NOTE") && CIS_GESAMTNOTE_PRUEFUNG foreach ($grades as $uid => $data) //Ausgabe Array { - $htmlstring .= ' ' . $db->convert_html_chars($uid) . ' @@ -1465,7 +1463,6 @@ if (defined("CIS_GESAMTNOTE_PRUEFUNG_MOODLE_LE_NOTE") && CIS_GESAMTNOTE_PRUEFUNG // Punkte if (CIS_GESAMTNOTE_PUNKTE) { - $htmlstring .= ' $val) + $errorMatrnr = ''; + $errorDatum = ''; + foreach ($_POST as $row => $val) { if(mb_strstr(mb_strtolower($row), 'student_uid_')) { $id=mb_substr($row, mb_strlen('student_uid_')); - $response2 = ''; - $student_uid = $_POST['student_uid_'.$id]; $note = null; $punkte = null; @@ -114,35 +114,36 @@ if (isset($_REQUEST['sammel']) && $_REQUEST["sammel"] == 1) $response.="\nNote oder Punkte fehlen"; continue; } - $punkte=str_replace(',','.', $punkte); + $punkte=str_replace(',', '.', $punkte); $datum = $_POST['datumNachp_'.$id]; + //check Datumsformat + $checkedDatum = $datum; $datum_obj = new datum(); - $datum = $datum_obj->checkformatDatum($datum, 'Y-m-d', true) OR die('Invalid date format'); + if(!$datum = $datum_obj->checkformatDatum($datum, 'Y-m-d', true)) + { + $errorDatum .="\n".$p->t('benotungstool/datumsformatUnzulaessig', array($checkedDatum)); + continue; + } //check ob Matrikelnummer anstelle der student_uid übergeben wurde $student = new student(); if (!$student->checkIfValidStudentUID($student_uid)) { + $checkedMatrnr = $student_uid; //UID ermitteln if(!$student_uid = $student->getUidFromMatrikelnummer($student_uid)) { - $response2.="\n".$p->t('benotungstool/studentMitMatrikelnummerExistiertNicht',array($student_uid)); + $errorMatrnr.="\n".$p->t('benotungstool/studentMitMatrikelnummerExistiertNicht', array($checkedMatrnr)); continue; } } - $lehreinheit_id = getLehreinheit($db, $lvid, $student_uid, $stsem); if(isset($_POST['student_uid_'.$id]) && (isset($_POST['note_'.$id]) || isset($_POST['punkte_'.$id])) && isset($_POST['datumNachp_'.$id])) { $response = savePruefung($lvid, $student_uid, $stsem, $lehreinheit_id, $datum, $typ, $note, $punkte); - - echo "\ndb " . " lvid ". $lvid . " note " . $note . " student_uid " . $student_uid . " datum " . $datum . " studiensem " . - $stsem . " lehreinheit_id_pr " . $lehreinheit_id . " typ " . $typ . " response" . $response . "\n"; - echo $response2; - } else { @@ -150,22 +151,18 @@ if (isset($_REQUEST['sammel']) && $_REQUEST["sammel"] == 1) } } } - + echo $errorMatrnr . $errorDatum; } else { // Einzelupdate - if(isset($_GET['datum']) ) + if(isset($_GET['datum'])) { $datum = $_GET['datum']; $datum_obj = new datum(); - $datum = $datum_obj->checkformatDatum($datum, 'Y-m-d', true) OR die('Invalid date format'); + $datum = $datum_obj->checkformatDatum($datum, 'Y-m-d', true) or die($p->t('benotungstool/datumsformatUnzulaessig', array($checkedDatum))); } - - else - die('Fehlerhafte Parameteruebergabe'); - $student_uid = $_REQUEST["student_uid"]; $note = $_REQUEST["note"]; @@ -174,7 +171,7 @@ else else $punkte = ''; - $punkte = str_replace(',','.',$punkte); + $punkte = str_replace(',', '.', $punkte); if($punkte!='') { @@ -205,11 +202,10 @@ else $uid = (isset($_GET['uid'])?$_GET['uid']:''); // lvgesamtnote für studenten speichern - if (isset($_REQUEST["submit"]) && ($_REQUEST["student_uid"] != '') ) + if (isset($_REQUEST["submit"]) && ($_REQUEST["student_uid"] != '')) { // Die Pruefung muss einer Lehreinheit zugeordnet werden // deshalb wird hier versucht eine passende Lehreinheit zu ermitteln. - $lehreinheit_id = getLehreinheit($db, $lvid, $student_uid, $stsem); $response = savePruefung($lvid, $student_uid, $stsem, $lehreinheit_id, $datum, $typ, $note); @@ -217,7 +213,6 @@ else } else echo "Fehler beim Eintragen der Prüfungen"; - } /** @@ -259,7 +254,7 @@ function getLehreinheit($db, $lvid, $student_uid, $stsem) /** * Prüfung speichern */ -function savePruefung($lvid, $student_uid, $stsem, $lehreinheit_id, $datum, $typ, $note, $punkte=null) +function savePruefung($lvid, $student_uid, $stsem, $lehreinheit_id, $datum, $typ, $note, $punkte = null) { $jetzt = date("Y-m-d H:i:s"); global $user; //, $note, $punkte, $datum; @@ -370,7 +365,7 @@ function savePruefung($lvid, $student_uid, $stsem, $lehreinheit_id, $datum, $typ $pr_3->punkte = $punkte; $pr_3->datum = $datum; $pr_3->anmerkung = ""; - $response = "Prüfung Termin3 aktualisiert"; + $response = "update T3"; } else { @@ -389,14 +384,14 @@ function savePruefung($lvid, $student_uid, $stsem, $lehreinheit_id, $datum, $typ $pr_3->ext_id = null; $pr_3->new = true; $old_note = -1; - $response = "neue Prüfung Termin3"; + $response = "new T3"; } $pr_3->save(); } } else { - $response = "no existing T3"; + $response = "fehlende oder fehlerhafte Inputparameter"; } //Gesamtnote updaten diff --git a/locale/de-AT/benotungstool.php b/locale/de-AT/benotungstool.php index a38aa31f3..b7c2af638 100644 --- a/locale/de-AT/benotungstool.php +++ b/locale/de-AT/benotungstool.php @@ -148,7 +148,9 @@ $this->phrasen['benotungstool/anzahlKommisionellePruefungen']='Anzahl kommission $this->phrasen['benotungstool/pruefungAnlegenFuer']='Prüfung anlegen für'; $this->phrasen['benotungstool/kreuzerltool']='Kreuzerltool'; $this->phrasen['benotungstool/studentIstLvNichtZugeordnet']='Der Student %s %s (%s) ist dieser Lehrveranstaltung nicht zugeordnet. Die Note wird nicht uebernommen!'; -$this->phrasen['benotungstool/studentMitMatrikelnummerExistiertNicht']='Student mit Matrikelnummer %s existiert nicht.'; +$this->phrasen['benotungstool/studentMitMatrikelnummerExistiertNicht']='Student*in mit Matrikelnummer %s existiert nicht.'; +$this->phrasen['benotungstool/datumsformatUnzulaessig']='Das Datum %s entspricht nicht dem Format TT.MM.JJJJ!'; +$this->phrasen['benotungstool/noteUnzulaessig']='Die Note %s ist nicht zulaessig. Die Zeile wurde uebersprungen.'; $this->phrasen['benotungstool/noteNichtUeberschreibbar']='Für Student mit Matrikelnummer %s eingetragene Zeugnisote %s ist nicht überschreibbar'; $this->phrasen['benotungstool/fehlerhafteNoteBeiStudent']='Fehlerhafte Note bei Student %s %s'; $this->phrasen['benotungstool/keineKreuzerllistenFuerDieseLehrveranstaltung']='Derzeit gibt es keine Kreuzerllisten für diese Lehrveranstaltung'; diff --git a/locale/en-US/benotungstool.php b/locale/en-US/benotungstool.php index 72f29256e..1f1dc89c6 100644 --- a/locale/en-US/benotungstool.php +++ b/locale/en-US/benotungstool.php @@ -148,6 +148,7 @@ $this->phrasen['benotungstool/pruefungAnlegenFuer']='Create an examination for ' $this->phrasen['benotungstool/kreuzerltool']='"Kreuzerl" tool'; $this->phrasen['benotungstool/studentIstLvNichtZugeordnet']='Student is not assigned to this course. The grade was not accepted!'; $this->phrasen['benotungstool/studentMitMatrikelnummerExistiertNicht']='Student with student ID number %s does not exist.'; +$this->phrasen['benotungstool/datumsformatUnzulaessig']='The date %s is not in valid format TT.MM.JJJJ.'; $this->phrasen['benotungstool/noteNichtUeberschreibbar']='Transcript grade %2$s for student with Personal identifier %1$s is not rewritable'; $this->phrasen['benotungstool/fehlerhafteNoteBeiStudent']='Incorrect grade for student %s %s'; $this->phrasen['benotungstool/keineKreuzerllistenFuerDieseLehrveranstaltung']='There are currently no checklists for this course'; From bfb24320d75edd21567c60de6dccb57440519b0e Mon Sep 17 00:00:00 2001 From: ma0048 Date: Fri, 14 Oct 2022 11:11:25 +0200 Subject: [PATCH 095/646] - editieren der ZGV Master nur noch mit eigenen Recht moeglich --- content/student/studentDBDML.php | 11 ++++++++++- content/student/studentoverlay.js.php | 14 ++++++++++++++ system/checksystem.php | 1 + 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/content/student/studentDBDML.php b/content/student/studentDBDML.php index 68348adbf..97b40073f 100644 --- a/content/student/studentDBDML.php +++ b/content/student/studentDBDML.php @@ -821,7 +821,16 @@ if(!$error) $prestudent->zgvdatum = $_POST['zgvdatum']; $prestudent->zgvnation = $_POST['zgvnation']; $prestudent->zgv_erfuellt = $_POST['zgv_erfuellt']; - $prestudent->zgvmas_code = $_POST['zgvmas_code']; + // Die Master-ZGV darf nur mit einem eigenen Recht geändert werden + if($rechte->isBerechtigt('student/editMakkZgv',$_POST['studiengang_kz'],'suid')) + { + $prestudent->zgvmas_code = $_POST['zgvmas_code']; + } + elseif ($prestudent->zgvmas_code != $_POST['zgvmas_code']) + { + $errormsg = 'Keine Berechtigung zum Ändern der ZGV'; + $error = true; + } $prestudent->zgvmaort = $_POST['zgvmaort']; $prestudent->zgvmadatum = $_POST['zgvmadatum']; $prestudent->zgvmanation = $_POST['zgvmanation']; diff --git a/content/student/studentoverlay.js.php b/content/student/studentoverlay.js.php index 3401c03d5..02b59890e 100644 --- a/content/student/studentoverlay.js.php +++ b/content/student/studentoverlay.js.php @@ -1829,6 +1829,20 @@ function StudentPrestudentDisableFields(val) document.getElementById('student-prestudent-menulist-zgvcode').disabled=true; } + getStgKz('student/editMakkZgv'); + // Anlegen eines Arrays mit allen berechtigten Stg-Kz + echo ' var berechtigte_master_studiengaenge = ['.implode(',',$studiengaengeMaster).'];'; + ?> + if (berechtigte_master_studiengaenge.indexOf(studiengang_kz) >= 0) + { + document.getElementById('student-prestudent-menulist-zgvmastercode').disabled=val; + } + else + { + document.getElementById('student-prestudent-menulist-zgvmastercode').disabled=true; + } + //Status Tree leeren rollentree = document.getElementById('student-prestudent-tree-rolle'); diff --git a/system/checksystem.php b/system/checksystem.php index a52fb2a6d..ce343cdca 100644 --- a/system/checksystem.php +++ b/system/checksystem.php @@ -205,6 +205,7 @@ $berechtigungen = array( array('student/anwesenheit','Anwesenheiten im FAS'), array('student/dokumente','Wenn SUID dann dürfen Dokumente auch wieder entfernt werden'), array('student/editBakkZgv','Bearbeiten der Bachelor ZGV eines PreStudenten'), + array('student/editMakkZgv','Bearbeiten der Master ZGV eines PreStudenten'), array('student/noten','Notenverwaltung'), array('student/stammdaten','Stammdaten der Studenten'), array('student/vorrueckung','Studentenvorrückung'), From 382da823e4e22f3464bca656c425eee0643850cd Mon Sep 17 00:00:00 2001 From: ma0068 Date: Fri, 14 Oct 2022 16:12:41 +0200 Subject: [PATCH 096/646] Erweiterung Funktion existsZGV um LastStatusPrestudent --- include/prestudent.class.php | 113 +++++++++++------------------------ 1 file changed, 34 insertions(+), 79 deletions(-) diff --git a/include/prestudent.class.php b/include/prestudent.class.php index 9ba52dccd..cd7eece35 100644 --- a/include/prestudent.class.php +++ b/include/prestudent.class.php @@ -2335,94 +2335,49 @@ class prestudent extends person return false; } - $qry = "SELECT count(*) as anzahl - FROM public.tbl_prestudent - JOIN public.tbl_prestudentstatus USING (prestudent_id) - JOIN public.tbl_studiengang USING (studiengang_kz) - WHERE person_id = ".$this->db_add_param($person_id, FHC_INTEGER)." - AND typ in ('b','m','d')"; - if ($this->db_query($qry)) - { - if ($row = $this->db_fetch_object()) - { - if ($row->anzahl > 0) + echo $qry = " + SELECT t.prestudent_id, t.status_kurzbz, t.bestaetigtam FROM + ( + SELECT prestudent_id, status_kurzbz, bestaetigtam, + RANK() OVER (PARTITION BY prestudent_id ORDER BY bestaetigtam DESC) stat_rank + FROM public.tbl_prestudent + JOIN public.tbl_prestudentstatus USING (prestudent_id) + WHERE person_id= ".$this->db_add_param($person_id, FHC_INTEGER)." + AND bestaetigtam is not NULL + AND status_kurzbz in ('Absolvent','Diplomand','Unterbrecher','Student','Abbrecher') + ) as t + WHERE stat_rank = 1"; + + $db = new basis_db(); + $arrayPrestudents = array(); + + if ($db->db_query($qry)) { - $this->errormsg = ''; - return true; + $num_rows = $db->db_num_rows(); + + if ($num_rows > 0) + { + while ($row = $db->db_fetch_object()) + { + if ($row->status_kurzbz != 'Abbrecher') + $arrayPrestudents[] = $row->status_kurzbz; + } + if ($arrayPrestudents) + { + return true; + } + } + else + return false; } else { - $this->errormsg = ''; + $this->errormsg = 'Fehler beim Laden der Daten'; return false; } - } - else - { - $this->errormsg = 'Fehler beim Laden der Daten'; - return false; - } - } - else - { - $this->errormsg = 'Fehler beim Laden der Daten'; - return false; - } } - /** - * Prueft, ob eine Person Abbrecher war - * @param int $person_id ID der zu überprüfenden Person. - * @return true wenn letzter Status Abbrecher und nicht Student ist - * false wenn nicht vorhanden - * false und errormsg wenn Fehler aufgetreten ist - */ -public function isAbbrecher($person_id) -{ - if (!is_numeric($person_id)) - { - $this->errormsg = 'Person_id muss eine gueltige Zahl sein'; - return false; - } - - $qry = "SELECT s.status_kurzbz - FROM public.tbl_prestudent - JOIN public.tbl_prestudentstatus s USING (prestudent_id) - JOIN public.tbl_studiengang USING (studiengang_kz) - WHERE person_id = ".$this->db_add_param($person_id)." - AND status_kurzbz in ('Abbrecher','Student') - AND typ in ('b','m','d') - ORDER BY s.bestaetigtam DESC NULLS LAST, s.insertamum DESC - LIMIT 1 - "; - - if ($this->db_query($qry)) - { - if ($row = $this->db_fetch_object()) - { - if ($row->status_kurzbz == 'Abbrecher') - { - $this->errormsg = ''; - return true; - } - else - { - $this->errormsg = ''; - return false; - } - } - else - { - $this->errormsg = 'Fehler beim Laden der Daten'; - return false; - } - } - else - { - $this->errormsg = 'Fehler beim Laden der Daten'; - return false; - } -} /** * Befüllt MasterZGV-Felder: Nation mit Österreich und MasterZGV-code mit FH-Bachelor(I) From 458117fced68fa5106f0025dd35fccf166ad1595 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Fri, 14 Oct 2022 16:24:45 +0200 Subject: [PATCH 097/646] =?UTF-8?q?Funktion=20existsZGV:=20prestudents=20m?= =?UTF-8?q?it=20Last=20Status=20Abbrecher=20werden=20nicht=20ber=C3=BCcksi?= =?UTF-8?q?chtigt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/prestudent.class.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/prestudent.class.php b/include/prestudent.class.php index cd7eece35..b9909306c 100644 --- a/include/prestudent.class.php +++ b/include/prestudent.class.php @@ -2345,7 +2345,7 @@ class prestudent extends person JOIN public.tbl_prestudentstatus USING (prestudent_id) WHERE person_id= ".$this->db_add_param($person_id, FHC_INTEGER)." AND bestaetigtam is not NULL - AND status_kurzbz in ('Absolvent','Diplomand','Unterbrecher','Student','Abbrecher') + AND status_kurzbz in ('Absolvent','Diplomand','Unterbrecher','Student') ) as t WHERE stat_rank = 1"; @@ -2360,7 +2360,6 @@ class prestudent extends person { while ($row = $db->db_fetch_object()) { - if ($row->status_kurzbz != 'Abbrecher') $arrayPrestudents[] = $row->status_kurzbz; } if ($arrayPrestudents) From 4f71a274e21d036a659da1796af3b7a619fcc6fe Mon Sep 17 00:00:00 2001 From: ma0068 Date: Mon, 17 Oct 2022 08:36:36 +0200 Subject: [PATCH 098/646] =?UTF-8?q?Update=20=C3=9Cberpr=C3=BCfungen=20ZGV?= =?UTF-8?q?=20mit=20get=5Frolle=5Fprestudent()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/prestudent.class.php | 88 +++++++++++++++++------------------- 1 file changed, 41 insertions(+), 47 deletions(-) diff --git a/include/prestudent.class.php b/include/prestudent.class.php index b9909306c..31d5f69ef 100644 --- a/include/prestudent.class.php +++ b/include/prestudent.class.php @@ -2327,55 +2327,49 @@ class prestudent extends person * false wenn nicht vorhanden * false und errormsg wenn Fehler aufgetreten ist */ - public function existsZGVIntern($person_id) - { - if (!is_numeric($person_id)) - { - $this->errormsg = 'Person_id muss eine gueltige Zahl sein'; - return false; - } + public function existsZGVIntern($person_id) + { + if (!is_numeric($person_id)) + { + $this->errormsg = 'Person_id muss eine gueltige Zahl sein'; + return false; + } + $qry = "SELECT count(*) as anzahl FROM public.tbl_prestudent + JOIN public.tbl_prestudentstatus USING (prestudent_id) + JOIN public.tbl_studiengang USING (studiengang_kz) + WHERE person_id = ".$this->db_add_param($person_id, FHC_INTEGER)." + AND status_kurzbz in ('Absolvent','Diplomand','Unterbrecher','Student') + AND typ = 'b' + AND get_rolle_prestudent(prestudent_id, null) != 'Abbrecher';"; - echo $qry = " - SELECT t.prestudent_id, t.status_kurzbz, t.bestaetigtam FROM - ( - SELECT prestudent_id, status_kurzbz, bestaetigtam, - RANK() OVER (PARTITION BY prestudent_id ORDER BY bestaetigtam DESC) stat_rank - FROM public.tbl_prestudent - JOIN public.tbl_prestudentstatus USING (prestudent_id) - WHERE person_id= ".$this->db_add_param($person_id, FHC_INTEGER)." - AND bestaetigtam is not NULL - AND status_kurzbz in ('Absolvent','Diplomand','Unterbrecher','Student') - ) as t - WHERE stat_rank = 1"; - - $db = new basis_db(); - $arrayPrestudents = array(); - - if ($db->db_query($qry)) - { - $num_rows = $db->db_num_rows(); - - if ($num_rows > 0) - { - while ($row = $db->db_fetch_object()) - { - $arrayPrestudents[] = $row->status_kurzbz; - } - if ($arrayPrestudents) - { - return true; - } - } - else - return false; - } - else - { - $this->errormsg = 'Fehler beim Laden der Daten'; - return false; - } - } + if ($this->db_query($qry)) + { + if ($row = $this->db_fetch_object()) + { + if ($row->anzahl > 0) + { + $this->errormsg = ''; + return true; + } + else + { + $this->errormsg = ''; + return false; + } + } + else + { + $this->errormsg = 'Fehler beim Laden der Daten'; + return false; + } + } + else + { + $this->errormsg = 'Fehler beim Laden der Daten'; + return false; + } + } /** From 8754c46575f53bccffdcb1ec2dd6d51923fd0b48 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Mon, 17 Oct 2022 14:34:11 +0200 Subject: [PATCH 099/646] Refactor Import Termin2 und Termin3 --- .../benotungstool/lvgesamtnoteverwalten.php | 27 ++++--------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php b/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php index 8a428ff2a..b7bb74d54 100644 --- a/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php +++ b/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php @@ -606,7 +606,7 @@ foreach ($noten_obj->result as $row) // **** // * Oeffnet ein Fenster fuer den Import von Noten für die Nachprüfung aus dem Excel // **** - function GradeImportNachp() + function GradeImportNachp(termin) { var str = "
"; str += ""; @@ -614,31 +614,14 @@ foreach ($noten_obj->result as $row) var y = getOffset('y'); y = y+50; anlegendiv.style.top = y+"px"; str += ''; str += ''; - str += "
X
t('benotungstool/importAnweisungNachp');?>:
' onclick='saveGradeBulkNachp(\"Termin2\");'>"; + + str += "
' onclick='saveGradeBulkNachp(\""+ termin +"\");'>"; str += "
"; anlegendiv.innerHTML = str; anlegendiv.style.visibility = "visible"; $('#noteimporttextareaNachp').focus(); } - // **** - // * Oeffnet ein Fenster fuer den Import von Noten für Termin3 aus dem Excel - // **** - function GradeImportTermin3() - { - var str = "
"; - str += ""; - var anlegendiv = document.getElementById("nachpruefung_div"); - var y = getOffset('y'); y = y+50; anlegendiv.style.top = y+"px"; - str += ''; - str += ''; - str += "
X
t('benotungstool/importAnweisungNachp');?>:
' onclick='saveGradeBulkNachp(\"Termin3\");'>"; - str += "
"; - anlegendiv.innerHTML = str; - anlegendiv.style.visibility = "visible"; - $('#noteimporttextareaTermin3').focus(); - } - // Speichert die Noten ueber den Import function saveGradeBulk() { @@ -1188,13 +1171,13 @@ $htmlstring .= "" . $p->t('benotungstool/punkte') . ' / ' . $p->t('benotungs if (defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN2') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN2) { $htmlstring .= "
" . $p->t('benotungstool/nachpruefung') . "
- + "; } if (defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN3') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN3) { $htmlstring .= "
" . $p->t('benotungstool/nachpruefung2') . "
- + "; } if (defined('CIS_GESAMTNOTE_PRUEFUNG_KOMMPRUEF') && CIS_GESAMTNOTE_PRUEFUNG_KOMMPRUEF) From 336f32bee072056653f3c0228c86d8426700e03e Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Mon, 17 Oct 2022 18:12:34 +0200 Subject: [PATCH 100/646] issues: removed unnecessary unique constraint on fehlercode and fehler_kurzbz, added NOT NULL constraint on fehler_kurzbz together with fehlercode_extern --- system/dbupdate_3.3.php | 51 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/system/dbupdate_3.3.php b/system/dbupdate_3.3.php index a1c7cfe1a..28ba9de0b 100644 --- a/system/dbupdate_3.3.php +++ b/system/dbupdate_3.3.php @@ -6783,6 +6783,57 @@ if (!$result = @$db->db_query("SELECT aktiv FROM bis.tbl_zgvdoktor LIMIT 1")) echo '
Spalte aktiv zu bis.tbl_zgvdoktor hinzugefügt'; } +// Remove UNIQUE constraint on fehlercode and fehler_kurzbz on system.tbl_fehler +if ($result = @$db->db_query("SELECT conname FROM pg_constraint WHERE conname = 'uk_tbl_fehler_fehlercode_fehler_kurzbz'")) +{ + if ($db->db_num_rows($result) > 0) + { + $qry = "ALTER TABLE system.tbl_fehler DROP CONSTRAINT uk_tbl_fehler_fehlercode_fehler_kurzbz;"; + + if (!$db->db_query($qry)) + echo 'system.tbl_fehler '.$db->db_last_error().'
'; + else + echo '
Removed UNIQUE constraint on "fehlercode" and "fehler_kurzbz" from system.tbl_fehler
'; + } +} + +// Add NOT NULL constraint on fehler_kurzbz and fehlercode_extern on system.tbl_fehler +if ($result = @$db->db_query("SELECT conname FROM pg_constraint WHERE conname = 'chk_tbl_fehler_fehler_kurzbz_fehlercode_extern'")) +{ + if ($db->db_num_rows($result) == 0) + { + $hasError = false; + $qry = "SELECT 1 FROM system.tbl_fehler WHERE fehler_kurzbz IS NULL AND fehlercode_extern IS NULL AND fehlercode = 'UNKNOWN_ERROR'"; + + $result = $db->db_query($qry); + if ($db->db_num_rows($result)>0) + { + // Add fehler_kurzbz TO UNKNOWN_ERROR to satisfy constraint + $qry = "UPDATE system.tbl_fehler SET fehler_kurzbz='unbekannterCoreFehler' WHERE fehlercode = 'UNKNOWN_ERROR';"; + + if(!$db->db_query($qry)) + { + echo 'system.tbl_fehler '.$db->db_last_error().'
'; + $hasError = true; + } + else + { + echo '
Add fehler_kurzbz to UNKNOWN_ERROR in system.tbl_fehler'; + } + } + + if (!$hasError) + { + $qry = "ALTER TABLE system.tbl_fehler ADD CONSTRAINT chk_tbl_fehler_fehler_kurzbz_fehlercode_extern CHECK (fehler_kurzbz IS NOT NULL OR fehlercode_extern IS NOT NULL);"; + + if (!$db->db_query($qry)) + echo 'system.tbl_fehler '.$db->db_last_error().'
'; + else + echo '
Added NOT NULL constraint on "fehlercode" and "fehler_kurzbz" from system.tbl_fehler
'; + } + } +} + // *** Pruefung und hinzufuegen der neuen Attribute und Tabellen echo '

Pruefe Tabellen und Attribute!

'; From 47d3ab33e78d0fbb68f5e484494a518c7e35033c Mon Sep 17 00:00:00 2001 From: ma0068 Date: Tue, 18 Oct 2022 09:17:07 +0200 Subject: [PATCH 101/646] =?UTF-8?q?Adaptierung=20Vorlage=20Notenliste.xls?= =?UTF-8?q?=20um=20Nachpr=C3=BCfung=20und=20Termin3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../benotungstool/lvgesamtnoteeintragen.php | 21 +++--- .../benotungstool/lvgesamtnoteverwalten.php | 4 +- .../benotungstool/nachpruefungeintragen.php | 1 + cis/private/lehre/notenliste.xls.php | 67 +++++++++++++++++++ locale/de-AT/benotungstool.php | 4 +- locale/en-US/benotungstool.php | 2 +- 6 files changed, 84 insertions(+), 15 deletions(-) diff --git a/cis/private/lehre/benotungstool/lvgesamtnoteeintragen.php b/cis/private/lehre/benotungstool/lvgesamtnoteeintragen.php index 73d0e6fca..8337b7c36 100644 --- a/cis/private/lehre/benotungstool/lvgesamtnoteeintragen.php +++ b/cis/private/lehre/benotungstool/lvgesamtnoteeintragen.php @@ -98,9 +98,9 @@ if($stsem=='') //$note = $_REQUEST["note"]; -if(!$rechte->isBerechtigt('admin',0) && - !$rechte->isBerechtigt('admin',$lv_obj->studiengang_kz) && - !$rechte->isBerechtigt('lehre',$lv_obj->studiengang_kz)) +if(!$rechte->isBerechtigt('admin', 0) && + !$rechte->isBerechtigt('admin', $lv_obj->studiengang_kz) && + !$rechte->isBerechtigt('lehre', $lv_obj->studiengang_kz)) { $qry = "SELECT lehreinheit_id FROM lehre.tbl_lehrveranstaltung JOIN lehre.tbl_lehreinheit USING(lehrveranstaltung_id) JOIN lehre.tbl_lehreinheitmitarbeiter USING(lehreinheit_id) @@ -117,11 +117,11 @@ if(!$rechte->isBerechtigt('admin',0) && } } -function savenote($db,$lvid, $student_uid, $note, $punkte=null) +function savenote($db, $lvid, $student_uid, $note, $punkte = null) { global $stsem, $user, $p, $noten_anmerkung; $jetzt = date("Y-m-d H:i:s"); - $punkte = str_replace(',','.',$punkte); + $punkte = str_replace(',', '.', $punkte); //Ermitteln ob der Student diesem Kurs zugeteilt ist $qry = "SELECT 1 FROM campus.vw_student_lehrveranstaltung WHERE uid=".$db->db_add_param($student_uid)." AND lehrveranstaltung_id=".$db->db_add_param($lvid, FHC_INTEGER); if($result = $db->db_query($qry)) @@ -207,13 +207,12 @@ if (isset($_REQUEST["submit"])) $note = $_REQUEST["note"]; $punkte = (isset($_REQUEST["punkte"])?$_REQUEST["punkte"]:''); - $response = savenote($db,$lvid, $student_uid, $note, $punkte); + $response = savenote($db, $lvid, $student_uid, $note, $punkte); echo $response; } else { - - foreach ($_POST as $row=>$val) + foreach ($_POST as $row => $val) { if(mb_strstr(mb_strtolower($row), 'matrikelnr_')) { @@ -232,7 +231,7 @@ if (isset($_REQUEST["submit"])) $response.="\nNote oder Punkte fehlen"; continue; } - $punkte=str_replace(',','.', $punkte); + $punkte=str_replace(',', '.', $punkte); //check ob statt Matrikelnummer nicht bereits student_uid (Moodle Grade Import) vorliegt.. $student = new student(); @@ -241,7 +240,7 @@ if (isset($_REQUEST["submit"])) //UID ermitteln if(!$student_uid = $student->getUidFromMatrikelnummer($matrikelnummer)) { - $response.="\n".$p->t('benotungstool/studentMitMatrikelnummerExistiertNicht',array($matrikelnummer)); + $response.="\n".$p->t('benotungstool/studentMitMatrikelnummerExistiertNicht', array($matrikelnummer)); continue; } } @@ -268,7 +267,7 @@ if (isset($_REQUEST["submit"])) } } - $val=savenote($db,$lvid, $student_uid, $note, $punkte); + $val=savenote($db, $lvid, $student_uid, $note, $punkte); if($val!='neu' && $val!='update' && $val!='update_f') $response.=$val; } diff --git a/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php b/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php index b7bb74d54..64179a3e9 100644 --- a/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php +++ b/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php @@ -749,6 +749,7 @@ foreach ($noten_obj->result as $row) } ?> + for(row in rows) { zeile = rows[row].split(" "); @@ -779,6 +780,7 @@ foreach ($noten_obj->result as $row) } } + if (alertMsg != "") alert(alertMsg); @@ -1306,7 +1308,7 @@ if (defined("CIS_GESAMTNOTE_PRUEFUNG_MOODLE_LE_NOTE") && CIS_GESAMTNOTE_PRUEFUNG foreach ($addon_obj->result as $row) { if (file_exists('../../../../addons/' . $row->kurzbz . '/cis/grades.inc.php')) - include ('../../../../addons/' . $row->kurzbz . '/cis/grades.inc.php'); + include('../../../../addons/' . $row->kurzbz . '/cis/grades.inc.php'); } } } diff --git a/cis/private/lehre/benotungstool/nachpruefungeintragen.php b/cis/private/lehre/benotungstool/nachpruefungeintragen.php index 307c0ca30..290113179 100644 --- a/cis/private/lehre/benotungstool/nachpruefungeintragen.php +++ b/cis/private/lehre/benotungstool/nachpruefungeintragen.php @@ -105,6 +105,7 @@ if (isset($_REQUEST['sammel']) && $_REQUEST["sammel"] == 1) $note = null; $punkte = null; $datum = null; + $response = ''; if(isset($_POST['note_'.$id])) $note = $_POST['note_'.$id]; elseif(isset($_POST['punkte_'.$id])) diff --git a/cis/private/lehre/notenliste.xls.php b/cis/private/lehre/notenliste.xls.php index 74cb7e7c1..4a6817a36 100644 --- a/cis/private/lehre/notenliste.xls.php +++ b/cis/private/lehre/notenliste.xls.php @@ -35,6 +35,7 @@ require_once('../../../include/note.class.php'); require_once('../../../include/notenschluessel.class.php'); require_once('../../../include/Excel/excel.php'); require_once('../../../include/phrasen.class.php'); +require_once('../../../include/pruefung.class.php'); $uid = get_uid(); @@ -191,6 +192,19 @@ else } //Studenten holen + + //Spaltengruppe für Nachprüfung + if (defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN2') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN2) + { + $worksheet->write($lines,8,$p->t('benotungstool/nachpruefung'),$format_bold); + } + + //Spaltengruppe für 2.Nebensprüfungstermin + if (defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN3') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN3) + { + $worksheet->write($lines,12,$p->t('benotungstool/nachpruefung2'),$format_bold); + } + $lines++; $worksheet->write($lines,1,$p->t('global/uid'),$format_border_bottom); $worksheet->write($lines,2,$p->t('global/nachname'),$format_border_bottom); @@ -203,6 +217,26 @@ else else $worksheet->write($lines,6,$p->t('benotungstool/note'),$format_border_bottom); + if (defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN2') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN2) + { + $worksheet->write($lines,8,$p->t('global/uid'),$format_border_bottom); + $worksheet->write($lines,9,$p->t('global/datum'),$format_border_bottom); + if(defined('CIS_GESAMTNOTE_PUNKTE') && CIS_GESAMTNOTE_PUNKTE) + $worksheet->write($lines,10,$p->t('benotungstool/punkte'),$format_border_bottom); + else + $worksheet->write($lines,10,$p->t('benotungstool/note'),$format_border_bottom); + } + + if (defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN3') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN3) +{ + $worksheet->write($lines,12,$p->t('global/uid'),$format_border_bottom); + $worksheet->write($lines,13,$p->t('global/uid'),$format_border_bottom); + if(defined('CIS_GESAMTNOTE_PUNKTE') && CIS_GESAMTNOTE_PUNKTE) + $worksheet->write($lines,14,$p->t('benotungstool/punkte'),$format_border_bottom); + else + $worksheet->write($lines,14,$p->t('benotungstool/note'),$format_border_bottom); +} + $stsem_obj = new studiensemester(); $stsem_obj->load($stsem); $stsemdatumvon = $stsem_obj->start; @@ -282,6 +316,39 @@ else $worksheet->write($lines,4,'="'.$elem->semester.$elem->verband.$elem->gruppe.'"'); $worksheet->write($lines,5,'="'.trim($elem->matrikelnr).'"',$format_highlight); $worksheet->write($lines,6, $note, $format_highlightright); + + // Nachprüfung + if (defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN2') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN2) + { + $worksheet->write($lines,8, $elem->uid, $format_highlightright); + $pr = new Pruefung(); + $pr->getPruefungen($elem->uid, "Termin2", $lvid, $sem); + $output2 = $pr->result; + + if ($output2) + { + $resultPr = $output2[0]; + $worksheet->write($lines,9, date('d.m.Y', strtotime($resultPr->datum)), $format_highlightright); + $worksheet->write($lines,10, $resultPr->note, $format_highlightright); + } + } + + // Nachprüfung + if (defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN3') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN3) + { + $worksheet->write($lines,12, $elem->uid, $format_highlightright); + $pr = new Pruefung(); + $pr->getPruefungen($elem->uid, "Termin3", $lvid, $sem); + $output3 = $pr->result; + + if ($output3) + { + $resultPr = $output3[0]; + $worksheet->write($lines,13, date('d.m.Y', strtotime($resultPr->datum)), $format_highlightright); + $worksheet->write($lines,14, $resultPr->note, $format_highlightright); + } + } + $i++; $lines++; } diff --git a/locale/de-AT/benotungstool.php b/locale/de-AT/benotungstool.php index b7c2af638..feac092f6 100644 --- a/locale/de-AT/benotungstool.php +++ b/locale/de-AT/benotungstool.php @@ -172,8 +172,8 @@ $this->phrasen['benotungstool/eingetrageneNoten']='Eingetragene Noten'; $this->phrasen['benotungstool/zeunis']='Zeugnis'; $this->phrasen['benotungstool/handbuch']='Handbuch'; $this->phrasen['benotungstool/punkte']='Punkte'; -$this->phrasen['benotungstool/importAnweisung']='Kopieren Sie die Spalten Personenkennzeichen und Note aus der Notenliste (bzw. StudentenUid und Note aus dem MoodleExport) und fügen Sie diese in folgendes Feld ein'; -$this->phrasen['benotungstool/importAnweisungNachp']='Kopieren Sie die Spalten Personenkennzeichen, Datum und Note aus der Notenliste (bzw. StudentenUid, Datum und Note aus dem MoodleExport) und fügen Sie diese in folgendes Feld ein'; +$this->phrasen['benotungstool/importAnweisung']='Kopieren Sie die Spalten StudentenUid und Note aus der Notenliste (bzw. StudentenUid und Note aus dem MoodleExport) und fügen Sie diese in folgendes Feld ein'; +$this->phrasen['benotungstool/importAnweisungNachp']='Kopieren Sie die Spalten StudentenUid (bzw. Personenkennzeichen), Datum und Note aus der Notenliste bzw. dem Moodle Export File und fügen Sie diese in folgendes Feld ein'; $this->phrasen['benotungstool/pruefung']='Prüfung'; $this->phrasen['benotungstool/notenlisteImport']='Notenliste für den LV-Noten-Import (Excel)'; $this->phrasen['benotungstool/bearbeitetvon']='Bearbeitet von'; diff --git a/locale/en-US/benotungstool.php b/locale/en-US/benotungstool.php index 1f1dc89c6..f482409d8 100644 --- a/locale/en-US/benotungstool.php +++ b/locale/en-US/benotungstool.php @@ -171,7 +171,7 @@ $this->phrasen['benotungstool/zeunis']='Transcript'; $this->phrasen['benotungstool/handbuch']='Handbook'; $this->phrasen['benotungstool/punkte']='Points'; $this->phrasen['benotungstool/importAnweisung']='Copy the columns "personal identifier" and "grade" from the grade list (or "student ID number" and "grade" from the moodle export file) and insert them in the following field'; -$this->phrasen['benotungstool/importAnweisungNachp']='Copy the columns "personal identifier", "date" and "grade" from the grade list (or "student ID number", "date" and "grade" from the moodle export file) and insert them in the following field'; +$this->phrasen['benotungstool/importAnweisungNachp']='Copy the columns "student ID number" (or "personal identifier"), "date" and "grade" from the grade list or from the moodle export file and insert them in the following field'; $this->phrasen['benotungstool/pruefung']='Examination'; $this->phrasen['benotungstool/notenlisteImport']='Grade list for the subject grade import (Excel)'; $this->phrasen['benotungstool/geaenderteNotenVorhanden']='There are changed grades. Please send the changes to the assistant by clicking "Approval"'; From 0bd7d6f7c651feb244f39aca5f610b0b49e5a3f1 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Tue, 18 Oct 2022 11:00:57 +0200 Subject: [PATCH 102/646] - editieren von stammdaten im infocentertool --- .../system/infocenter/InfoCenter.php | 86 +++++++++++++++++++ .../models/person/Geschlecht_model.php | 14 +++ .../views/system/infocenter/stammdaten.php | 86 ++++++++++++++----- public/js/infocenter/stammdaten.js | 84 ++++++++++++++++++ system/phrasesupdate.php | 22 ++++- 5 files changed, 271 insertions(+), 21 deletions(-) create mode 100644 application/models/person/Geschlecht_model.php create mode 100644 public/js/infocenter/stammdaten.js diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index 48c50bb4a..deaee0e10 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -121,6 +121,7 @@ class InfoCenter extends Auth_Controller 'unlockPerson' => 'infocenter:rw', 'saveFormalGeprueft' => 'infocenter:rw', 'saveDocTyp' => 'infocenter:rw', + 'updateStammdaten' => 'infocenter:rw', 'saveNachreichung' => 'infocenter:rw', 'getPrestudentData' => 'infocenter:r', 'getLastPrestudentWithZgvJson' => 'infocenter:r', @@ -172,6 +173,8 @@ class InfoCenter extends Auth_Controller $this->load->model('codex/Zgv_model', 'ZgvModel'); $this->load->model('codex/Zgvmaster_model', 'ZgvmasterModel'); $this->load->model('codex/Nation_model', 'NationModel'); + $this->load->model('person/Kontakt_model', 'KontaktModel'); + $this->load->model('person/Geschlecht_model', 'GeschlechtModel'); // Loads libraries $this->load->library('PersonLogLib'); @@ -1320,6 +1323,85 @@ class InfoCenter extends Auth_Controller $this->outputJsonSuccess('success'); } + public function updateStammdaten() + { + if (isEmptyString($this->input->post('nachname')) || + isEmptyString($this->input->post('geschlecht')) || + isEmptyString($this->input->post('gebdatum'))) + { + $this->terminateWithJsonError($this->p->t('infocenter', 'stammdatenFeldFehlt')); + } + + $datum = explode('.', $this->input->post('gebdatum')); + + if (!checkdate($datum[1], $datum[0], $datum[2])) + { + $this->terminateWithJsonError($this->p->t('infocenter', 'datumUngueltig')); + } + + $person_id = $this->input->post('personid'); + + $update = $this->PersonModel->update( + array + ( + 'person_id' => $person_id + ), + array + ( + 'titelpre' => isEmptyString($this->input->post('titelpre')) ? null : $this->input->post('titelpre'), + 'vorname' => isEmptyString($this->input->post('vorname')) ? null : $this->input->post('vorname'), + 'nachname' => $this->input->post('nachname'), + 'titelpost' => isEmptyString($this->input->post('titelpost')) ? null : $this->input->post('titelpost'), + 'gebdatum' => isEmptyString($this->input->post('gebdatum')) ? null : date("Y-m-d", strtotime($this->input->post('gebdatum'))), + 'svnr' => isEmptyString($this->input->post('svnr')) ? null : $this->input->post('svnr'), + 'staatsbuergerschaft' => isEmptyString($this->input->post('buergerschaft')) ? null : $this->input->post('buergerschaft'), + 'geschlecht' => $this->input->post('geschlecht'), + 'geburtsnation' => isEmptyString($this->input->post('gebnation')) ? null : $this->input->post('gebnation'), + 'gebort' => isEmptyString($this->input->post('gebort')) ? null : $this->input->post('gebort'), + 'updateamum' => date('Y-m-d H:i:s'), + 'updatevon' => $this->_uid + ) + ); + + if (isError($update)) + $this->terminateWithJsonError($this->p->t('ui', 'fehlerBeimSpeichern')); + + $kontakte = $this->input->post('kontakt'); + foreach($kontakte as $kontakt) + { + $kontaktExists = $this->KontaktModel->loadWhere(array( + 'kontakt_id' => $kontakt['id'], + 'person_id' => $person_id, + )); + + if (hasData($kontaktExists)) + { + $kontaktExists = getData($kontaktExists)[0]; + + if ($kontaktExists->kontakt === $kontakt['value']) + continue; + + $update = $this->KontaktModel->update( + array + ( + 'kontakt_id' => $kontakt['id'] + ), + array + ( + 'kontakt' => isEmptyString($kontakt['value']) ? null : $kontakt['value'], + 'updateamum' => date('Y-m-d H:i:s'), + 'updatevon' => $this->_uid + ) + ); + + if (isError($update)) + $this->terminateWithJsonError($this->p->t('ui', 'fehlerBeimSpeichern')); + } + } + + $this->outputJsonSuccess('Success'); + } + public function saveNachreichung($person_id) { $nachreichungAm = $this->input->post('nachreichungAm'); @@ -1996,6 +2078,9 @@ class InfoCenter extends Auth_Controller $this->NationModel->addOrder('langtext'); $allNations = getData($this->NationModel->load()); + $this->GeschlechtModel->addOrder('sort'); + $allGenders = getData($this->GeschlechtModel->load()); + $data = array ( 'zgvpruefungen' => $zgvpruefungen, 'abwstatusgruende' => $abwstatusgruende, @@ -2004,6 +2089,7 @@ class InfoCenter extends Auth_Controller 'all_zgvs' => $allZGVs, 'all_zgvs_master' => $allZGVsMaster, 'all_nations' => $allNations, + 'all_genders' => $allGenders ); return $data; diff --git a/application/models/person/Geschlecht_model.php b/application/models/person/Geschlecht_model.php new file mode 100644 index 000000000..60ac3ba15 --- /dev/null +++ b/application/models/person/Geschlecht_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_geschlecht'; + $this->pk = 'geschlecht'; + } +} diff --git a/application/views/system/infocenter/stammdaten.php b/application/views/system/infocenter/stammdaten.php index a80439bfe..595f86b1a 100644 --- a/application/views/system/infocenter/stammdaten.php +++ b/application/views/system/infocenter/stammdaten.php @@ -1,60 +1,93 @@
-
+
- titelpre)): ?> - + - + - + + + + + + - titelpost)): ?> - - - - - + + + + + + + + - +
p->t('person','titelpre')) ?>titelpre ?>
p->t('person','vorname')) ?>vorname ?>
p->t('person','nachname')) ?> - nachname ?>
p->t('person','titelpost')) ?>
p->t('person','titelpost')) ?>titelpost ?>
p->t('person','geburtsdatum')) ?> - gebdatum), 'd.m.Y') ?>
p->t('person','svnr')) ?> - svnr ?>
p->t('person','staatsbuergerschaft')) ?> - staatsbuergerschaft ?>
p->t('person','geschlecht')) ?> - geschlecht ?>
p->t('person','geburtsnation')) ?> - geburtsnation ?>
p->t('person','geburtsort')) ?>gebort ?>
- +
@@ -83,7 +116,10 @@ kontakt; endif; - echo $kontakt->kontakt; + if (($kontakt->kontakttyp === 'telefon' || $kontakt->kontakttyp === 'mobil')) + echo 'kontakt; if ($kontakt->kontakttyp === 'email'): ?> @@ -126,6 +162,16 @@ target='_blank'> p->t('infocenter','zugangBewerbung') ?> + diff --git a/public/js/infocenter/stammdaten.js b/public/js/infocenter/stammdaten.js new file mode 100644 index 000000000..d63df7b2f --- /dev/null +++ b/public/js/infocenter/stammdaten.js @@ -0,0 +1,84 @@ +$(document).ready(function () +{ + var personid = $("#hiddenpersonid").val(); + + $('.editStammdaten').click(function() + { + Stammdaten._show(); + }); + + $('.cancelStammdaten').click(function() + { + Stammdaten._hide(); + }); + + $('.saveStammdaten').click(function() + { + var kontakt = []; + $('.kontakt_nummer').each(function(){ + kontakt.push({ + id: $(this).data('value'), + value: $(this).val() + }); + }); + + var data = { + "personid" : personid, + "titelpre" : $('#titelpre').val(), + "vorname" : $('#vorname').val(), + "nachname" : $('#nachname').val(), + "titelpost" : $('#titelpost').val(), + "gebdatum" : $('#gebdatum').val(), + "svnr" : $('#svnr').val(), + "buergerschaft" : $('#buergerschaft').val(), + "geschlecht" : $('#geschlecht').val(), + "gebnation" : $('#gebnation').val(), + "gebort" : $('#gebort').val(), + "kontakt" : kontakt + + }; + Stammdaten.update(personid, data); + }); +}); + +var Stammdaten = { + update: function(personid, data) + { + FHC_AjaxClient.ajaxCallPost( + CALLED_PATH + "/updateStammdaten/", + data, + { + successCallback: function(data, textStatus, jqXHR) { + if (FHC_AjaxClient.isSuccess(data)) + { + FHC_DialogLib.alertSuccess("Done!"); + Stammdaten._hide(); + } + else + { + FHC_DialogLib.alertError(FHC_AjaxClient.getError(data)); + } + }, + errorCallback: function() { + FHC_DialogLib.alertWarning("Fehler beim Speichern!"); + } + } + ); + }, + + _hide: function() + { + $('.stammdaten_form').find('input, select').attr('readonly', true); + + $('.editActionStammdaten').hide(); + $('.editStammdaten').show(); + }, + + _show: function() + { + $('.stammdaten_form').find('input, select').attr('readonly', false); + + $('.editActionStammdaten').show(); + $('.editStammdaten').hide(); + } +} \ No newline at end of file diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 8ac09cee0..3151eb0f5 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -17137,7 +17137,27 @@ array( 'insertvon' => 'system' ) ) - ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'stammdatenFeldFehlt', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Bitte Nachname, Geschlecht und Geburtsdatum ausfüllen.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Please fill out the last name, gender and date of birth.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), ); From aadd6b0d926f12621e04c48ac458a5878ce63912 Mon Sep 17 00:00:00 2001 From: Manfred Date: Tue, 18 Oct 2022 16:48:27 +0200 Subject: [PATCH 103/646] =?UTF-8?q?Anzahl=20Rechte=20z=C3=A4hlen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vilesci/stammdaten/benutzerberechtigung_details.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vilesci/stammdaten/benutzerberechtigung_details.php b/vilesci/stammdaten/benutzerberechtigung_details.php index e3149cf66..4f43a915c 100644 --- a/vilesci/stammdaten/benutzerberechtigung_details.php +++ b/vilesci/stammdaten/benutzerberechtigung_details.php @@ -499,6 +499,7 @@ if (isset($_REQUEST['uid']) || isset($_REQUEST['funktion_kurzbz'])) $rechte_funktion = new benutzerberechtigung(); $rechte_funktion->loadBenutzerRollen(null, $recht); $funktionsrecht = $rechte_funktion->berechtigungen; // Hat die Funktion ein Recht? + $anzahlFunktionsrechte = count($funktionsrecht); $funktion_bezeichnung = new funktion(); $funktion_bezeichnung->load($recht); if(!empty($funktionsrecht)) @@ -515,6 +516,7 @@ if (isset($_REQUEST['uid']) || isset($_REQUEST['funktion_kurzbz'])) $htmlstr .= ""; $htmlstr .= $funktion_bezeichnung->beschreibung; + $htmlstr .= " (".$anzahlFunktionsrechte.")"; } } if(isset($funktionsrecht)) From 1609543a3128b98480dd42585e3a07269f6c1e20 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Thu, 20 Oct 2022 14:01:31 +0200 Subject: [PATCH 104/646] - lv evaluierung ubersichtsseite optimiert --- include/lehrveranstaltung.class.php | 85 +++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/include/lehrveranstaltung.class.php b/include/lehrveranstaltung.class.php index 16c7ba2fe..48edd9d0a 100644 --- a/include/lehrveranstaltung.class.php +++ b/include/lehrveranstaltung.class.php @@ -2776,5 +2776,90 @@ class lehrveranstaltung extends basis_db return null; } + /** + * Prueft ob die Lehrveranstaltungen in dem Studiensemestern angeboten wird. + * Dazu wird geprueft ob die LVs einem aktuellen Studienplan zugeordnet ist und ob ein Lehrauftrag vorhanden ist. + * + * @param $lehrveranstaltung_id + * @param $studiensemester_kurzbz + * @return array + */ + public function getOfferedSemester($lehrveranstaltung_id, $studiensemester_kurzbz) + { + $qry = "SELECT + DISTINCT(studiensemester_kurzbz) + FROM + lehre.tbl_lehreinheit + WHERE lehrveranstaltung_id = ".$this->db_add_param($lehrveranstaltung_id)." + AND studiensemester_kurzbz IN (".$this->db_implode4SQL($studiensemester_kurzbz).") + AND EXISTS ( + SELECT + * + FROM + lehre.tbl_studienplan_lehrveranstaltung + JOIN lehre.tbl_studienplan_semester USING(studienplan_id) + WHERE + lehrveranstaltung_id=".$this->db_add_param($lehrveranstaltung_id)." + AND studiensemester_kurzbz IN (".$this->db_implode4SQL($studiensemester_kurzbz).") + )"; + + $studiensemester = []; + if($result = $this->db_query($qry)) + { + while($row = $this->db_fetch_object($result)) + { + $studiensemester[] = $row; + } + return $studiensemester; + } + else + { + $this->errormsg = 'Fehler beim Laden der Daten'; + return false; + } + } + + /** + * Prueft ob die Lehrveranstaltungen in den gewaehlten Studiensemestern angeboten wird. + * Dazu wird geprueft ob die LVs einem aktuellen Studienplan zugeordnet ist, und ob ein Lehrauftrag vorhanden ist. + * + * @param $lehrveranstaltung_id + * @param $studiensemester_kurzbz + * @return array + */ + public function getOfferedLVs($lehrveranstaltung_id, $studiensemester_kurzbz) + { + $qry = "SELECT + DISTINCT(tbl_lehreinheit.lehrveranstaltung_id) + FROM + lehre.tbl_lehreinheit + WHERE tbl_lehreinheit.lehrveranstaltung_id IN (".$this->db_implode4SQL($lehrveranstaltung_id).") + AND tbl_lehreinheit.studiensemester_kurzbz IN (".$this->db_implode4SQL($studiensemester_kurzbz).") + AND EXISTS ( + SELECT + * + FROM + lehre.tbl_studienplan_lehrveranstaltung + JOIN lehre.tbl_studienplan_semester USING(studienplan_id) + WHERE + tbl_lehreinheit.lehrveranstaltung_id IN (".$this->db_implode4SQL($lehrveranstaltung_id).") + AND tbl_lehreinheit.studiensemester_kurzbz IN (".$this->db_implode4SQL($studiensemester_kurzbz).") + )"; + + $lehrveranstaltungen = []; + if($result = $this->db_query($qry)) + { + while($row = $this->db_fetch_object($result)) + { + $lehrveranstaltungen[] = $row; + } + return $lehrveranstaltungen; + } + else + { + $this->errormsg = 'Fehler beim Laden der Daten'; + return false; + } + } } ?> From 53dc6b3c631f708d995a8ba43979f421e2a51bb8 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Fri, 21 Oct 2022 11:07:52 +0200 Subject: [PATCH 105/646] - tag closed --- application/views/system/infocenter/stammdaten.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/views/system/infocenter/stammdaten.php b/application/views/system/infocenter/stammdaten.php index 595f86b1a..6dba795d9 100644 --- a/application/views/system/infocenter/stammdaten.php +++ b/application/views/system/infocenter/stammdaten.php @@ -117,7 +117,7 @@ kontakt; endif; if (($kontakt->kontakttyp === 'telefon' || $kontakt->kontakttyp === 'mobil')) - echo ''; else echo $kontakt->kontakt; if ($kontakt->kontakttyp === 'email'): From 7a1f36cb5ec8fb4db6233b32738d1548a3bcbeea Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Sun, 23 Oct 2022 18:02:59 +0200 Subject: [PATCH 106/646] issuesData Fehlermonitoring: changed order for issue display, first by error type, then by status --- application/views/system/issues/issuesData.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/application/views/system/issues/issuesData.php b/application/views/system/issues/issuesData.php index ce05ecf8a..501cf4b26 100644 --- a/application/views/system/issues/issuesData.php +++ b/application/views/system/issues/issuesData.php @@ -130,16 +130,17 @@ if (!isEmptyArray($all_oe_kurzbz_berechtigt)) )"; } -$query .= " ORDER BY CASE - WHEN iss.status_kurzbz = '".IssuesLib::STATUS_NEU."' THEN 0 - WHEN iss.status_kurzbz = '".IssuesLib::STATUS_IN_BEARBEITUNG."' THEN 1 - ELSE 2 - END, +$query .= " ORDER BY CASE WHEN fehlertyp_kurzbz = '".IssuesLib::ERRORTYPE_CODE."' THEN 0 WHEN fehlertyp_kurzbz = '".IssuesLib::WARNINGTYPE_CODE."' THEN 1 ELSE 2 END, + CASE + WHEN iss.status_kurzbz = '".IssuesLib::STATUS_NEU."' THEN 0 + WHEN iss.status_kurzbz = '".IssuesLib::STATUS_IN_BEARBEITUNG."' THEN 1 + ELSE 2 + END, datum DESC, fehlercode, issue_id DESC"; $filterWidgetArray = array( From bf8aa6c4ac89566c6861a3c8a77d5beafb99d556 Mon Sep 17 00:00:00 2001 From: Manfred Date: Mon, 24 Oct 2022 12:23:03 +0200 Subject: [PATCH 107/646] =?UTF-8?q?Student=20im=20Max-Semester=20nicht=20v?= =?UTF-8?q?orr=C3=BCcken?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vilesci/personen/student_vorrueckung.php | 46 +++++++++++++++++++++--- 1 file changed, 41 insertions(+), 5 deletions(-) diff --git a/vilesci/personen/student_vorrueckung.php b/vilesci/personen/student_vorrueckung.php index 8eb858f30..4a49cb436 100644 --- a/vilesci/personen/student_vorrueckung.php +++ b/vilesci/personen/student_vorrueckung.php @@ -212,6 +212,7 @@ if (isset($_POST['vorr'])) $statisticAdded = 0; $statisticUebersprungen = 0; $statisticStudienplanKorrektur = 0; + $errorMsg = array(); $stg_help = new studiengang(); if (!$stg_help->load($stg_kz)) @@ -306,13 +307,40 @@ if (isset($_POST['vorr'])) //auf statusgrund_kurzbz abfragen $statusgrundObj = new statusgrund($row_status->statusgrund_id); $statusgrundId = null; - if ($statusgrundObj->statusgrund_kurzbz === "prewiederholer" && $row_status->ausbildungssemester > 1) + if (isset($statusgrundObj->statusgrund_kurzbz) && $statusgrundObj->statusgrund_kurzbz === "prewiederholer" && $row_status->ausbildungssemester > 1) { $s = $row->semester_stlv - 1; $ausbildungssemester = $row_status->ausbildungssemester - 1; $statusgrundId = $statusgrundObj->getByStatusgrundKurzbz('wiederholer')->statusgrund_id; } + // Wenn VORRUECKUNG_STATUS_MAX_SEMESTER true ist und + // der Student kein Wiederholer ist und + // der aktuelle Status "Student" im Max-Semester des Studiengangs ist, wird übersprungen + if (VORRUECKUNG_STATUS_MAX_SEMESTER + && $statusgrundId == '' + && $row_status->ausbildungssemester == $max[$stg_kz] + && $row_status->status_kurzbz == 'Student') + { + $statisticUebersprungen++; + $errorMsg['Studenten im letzten Ausbildungssemester ohne Diplomandenstatus']++; + continue; + + /* + $sqlInsertDiplomand = "INSERT INTO public.tbl_prestudentstatus (prestudent_id, status_kurzbz, + studiensemester_kurzbz, ausbildungssemester, datum, insertamum, + insertvon, updateamum, updatevon, ext_id, orgform_kurzbz, studienplan_id, statusgrund_id) + VALUES (".$db->db_add_param($row->prestudent_id).", ". + $db->db_add_param($status_kurzbz).", ". + $db->db_add_param($next_ss).", ". + $db->db_add_param($ausbildungssemester).", now(), now(), ". + $db->db_add_param($user).", NULL, NULL, NULL, ". + $db->db_add_param($row_status->orgform_kurzbz).", ". + $db->db_add_param($studienplan_id).", ". + $db->db_add_param($statusgrundId).");"; + */ + } + $lvb = new lehrverband(); //Lehrverbandgruppe anlegen, wenn noch nicht vorhanden @@ -352,6 +380,7 @@ if (isset($_POST['vorr'])) $db->db_add_param($row->gruppe_stlv).",NULL,NULL,now(),". $db->db_add_param($user).",NULL);"; } + //Check, ob schon ein Status für das Zielsemester vorhanden ist $qry_chk = "SELECT * FROM @@ -360,7 +389,8 @@ if (isset($_POST['vorr'])) prestudent_id=".$db->db_add_param($row->prestudent_id)." AND studiensemester_kurzbz=".$db->db_add_param($next_ss).";"; - if ($db->db_num_rows($db->db_query($qry_chk)) < 1) + if ($db->db_num_rows($db->db_query($qry_chk)) < 1 + && $row_status->status_kurzbz != 'Absolvent') { // Pruefen ob der Studienplan fuer das vorgerueckte Semester noch gueltig ist // und GGf einen besseren Studienplan suchen @@ -405,9 +435,15 @@ if (isset($_POST['vorr'])) } } echo ''; - echo 'Vorgerückte Personen:'.$statisticAdded.'
'; - echo 'Übersprungene Personen:'.$statisticUebersprungen.'
'; - echo 'Studienplanzuordnung korrigiert:'.$statisticStudienplanKorrektur.'
'; + echo 'Vorgerückte Personen: '.$statisticAdded.'
'; + echo 'Übersprungene Personen: '.$statisticUebersprungen.'
'; + echo 'Studienplanzuordnung korrigiert: '.$statisticStudienplanKorrektur.'
'; + echo '
'; + echo ''; + foreach($errorMsg AS $key=>$value) + { + echo 'Fehler: '.$key.': '.$value; + } echo ''; } From 5e9b5b2ce51cac12bf26d7a8669fa6fa6abc7399 Mon Sep 17 00:00:00 2001 From: Manfred Date: Mon, 24 Oct 2022 14:27:34 +0200 Subject: [PATCH 108/646] Direktlink auf Rolle --- .../stammdaten/benutzerberechtigung_details.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/vilesci/stammdaten/benutzerberechtigung_details.php b/vilesci/stammdaten/benutzerberechtigung_details.php index 4f43a915c..c8dff5491 100644 --- a/vilesci/stammdaten/benutzerberechtigung_details.php +++ b/vilesci/stammdaten/benutzerberechtigung_details.php @@ -592,7 +592,7 @@ if (isset($_REQUEST['uid']) || isset($_REQUEST['funktion_kurzbz'])) //Art $htmlstr .= "
"; //Organisationseinheit @@ -727,7 +727,7 @@ if (isset($_REQUEST['uid']) || isset($_REQUEST['funktion_kurzbz'])) $htmlstr .= " "; //Rolle - $htmlstr .= " "; //Berechtigung @@ -756,7 +760,7 @@ if (isset($_REQUEST['uid']) || isset($_REQUEST['funktion_kurzbz'])) //Art $htmlstr .= " "; //Organisationseinheit @@ -930,10 +934,10 @@ if (isset($_REQUEST['uid']) || isset($_REQUEST['funktion_kurzbz'])) changeMonth: true, changeYear: true, dateFormat: 'yy-mm-dd', - showOn: "button", - buttonImage: "../../skin/images/date_edit.png", + showOn: "focus" + /*buttonImage: "../../skin/images/date_edit.png", buttonImageOnly: true, - buttonText: "Select date" + buttonText: "Select date"*/ }); $("#t1").tablesorter( From 73dd6e6dc1a202c70e61448c55ef0efa19a54405 Mon Sep 17 00:00:00 2001 From: Manfred Date: Mon, 24 Oct 2022 14:27:54 +0200 Subject: [PATCH 109/646] Autocomplete in Berechtigungrolle --- vilesci/stammdaten/berechtigungrolle.php | 122 +++++++++++++++++------ 1 file changed, 93 insertions(+), 29 deletions(-) diff --git a/vilesci/stammdaten/berechtigungrolle.php b/vilesci/stammdaten/berechtigungrolle.php index ecd7920e7..71df53d14 100644 --- a/vilesci/stammdaten/berechtigungrolle.php +++ b/vilesci/stammdaten/berechtigungrolle.php @@ -41,27 +41,59 @@ $delete = filter_input(INPUT_GET, 'delete', FILTER_VALIDATE_BOOLEAN); Berechtigungen Uebersicht - - - + + -

Berechtigung - Rolle - Übersicht

+

Berechtigung - Rolle -

deleteRolleBerechtigung($rolle_kurzbz, $berechtigung_kurzbz)): ?> Fehler beim Löschen: errormsg ?> - Berechtigung gelöscht! + Berechtigung gelöscht! -
- Zurück + Zurück zur Rollenübersicht -

RolleBerechtigung "":

- +

getBerechtigungen(); ?> + - - - + + + +
p->t('global','kontakt')) ?> "; - $htmlstr .= " "; + $htmlstr .= " "; $htmlstr .= " "; + $htmlstr .= " "; $htmlstr .= " "; + if ($b->rolle_kurzbz != '') + { + $htmlstr .= " "; + } $htmlstr.=""; $htmlstr .= " ".$b->art.""; - $htmlstr .= " "; + $htmlstr .= " "; $htmlstr .= "
@@ -154,6 +216,8 @@ $delete = filter_input(INPUT_GET, 'delete', FILTER_VALIDATE_BOOLEAN); getRolleBerechtigung($rolle_kurzbz); foreach($berechtigungen->result as $rolle): ?> @@ -161,7 +225,7 @@ $delete = filter_input(INPUT_GET, 'delete', FILTER_VALIDATE_BOOLEAN); From 572e53f554f2d290d8f3d2241dbbfb134634c7b8 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Tue, 25 Oct 2022 07:02:13 +0200 Subject: [PATCH 110/646] - addon angepassst fuer die stammdaten --- application/views/system/infocenter/stammdaten.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/views/system/infocenter/stammdaten.php b/application/views/system/infocenter/stammdaten.php index 6dba795d9..ac8f6347c 100644 --- a/application/views/system/infocenter/stammdaten.php +++ b/application/views/system/infocenter/stammdaten.php @@ -111,13 +111,13 @@ - @@ -100,7 +93,6 @@
art ?> beschreibung ?> - + entfernen kontakttyp) ?> - kontakttyp.'">';?> + kontakttyp.'" data-value="'. $kontakt->kontakt .'">';?> kontakttyp === 'email'): ?> kontakt; endif; if (($kontakt->kontakttyp === 'telefon' || $kontakt->kontakttyp === 'mobil')) - echo ''; + echo ''; else echo $kontakt->kontakt; if ($kontakt->kontakttyp === 'email'): From 9192befce1cf461f9474865b1f7bddf7dd685346 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Tue, 25 Oct 2022 07:08:29 +0200 Subject: [PATCH 111/646] - stammdaten include --- application/views/system/infocenter/infocenterZgvDetails.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/views/system/infocenter/infocenterZgvDetails.php b/application/views/system/infocenter/infocenterZgvDetails.php index 62fefbec8..5bfb6c603 100644 --- a/application/views/system/infocenter/infocenterZgvDetails.php +++ b/application/views/system/infocenter/infocenterZgvDetails.php @@ -26,7 +26,8 @@ 'public/js/tablesort/tablesort.js', 'public/js/infocenter/messageList.js', 'public/js/infocenter/infocenterDetails.js', - 'public/js/infocenter/zgvUeberpruefung.js' + 'public/js/infocenter/zgvUeberpruefung.js', + 'public/js/infocenter/stammdaten.js', ), 'phrases' => array( 'infocenter' => array( From 4518eab1a81a94697c8ee6b4293ba7a8a5dd8e2f Mon Sep 17 00:00:00 2001 From: ma0048 Date: Tue, 25 Oct 2022 07:14:47 +0200 Subject: [PATCH 112/646] - stammdaten include --- application/views/system/infocenter/infocenterDetails.php | 3 ++- application/views/system/infocenter/infocenterZgvDetails.php | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/application/views/system/infocenter/infocenterDetails.php b/application/views/system/infocenter/infocenterDetails.php index 76a371c11..c8b16a1c3 100644 --- a/application/views/system/infocenter/infocenterDetails.php +++ b/application/views/system/infocenter/infocenterDetails.php @@ -27,7 +27,8 @@ 'public/js/infocenter/messageList.js', 'public/js/infocenter/infocenterDetails.js', 'public/js/infocenter/zgvUeberpruefung.js', - 'public/js/infocenter/docUeberpruefung.js' + 'public/js/infocenter/docUeberpruefung.js', + 'public/js/infocenter/stammdaten.js' ), 'phrases' => array( 'infocenter' => array( diff --git a/application/views/system/infocenter/infocenterZgvDetails.php b/application/views/system/infocenter/infocenterZgvDetails.php index 5bfb6c603..62fefbec8 100644 --- a/application/views/system/infocenter/infocenterZgvDetails.php +++ b/application/views/system/infocenter/infocenterZgvDetails.php @@ -26,8 +26,7 @@ 'public/js/tablesort/tablesort.js', 'public/js/infocenter/messageList.js', 'public/js/infocenter/infocenterDetails.js', - 'public/js/infocenter/zgvUeberpruefung.js', - 'public/js/infocenter/stammdaten.js', + 'public/js/infocenter/zgvUeberpruefung.js' ), 'phrases' => array( 'infocenter' => array( From c7f477555c4e1aada684fde19b6068fbadd1daf7 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Thu, 27 Oct 2022 15:17:29 +0200 Subject: [PATCH 113/646] Adaptierungen DB und Dropdowns Fas Lehrveranstaltungen --- .../lehrveranstaltungdetailoverlay.xul.php | 50 +++++++++++++------ include/raumtyp.class.php | 8 ++- rdf/raumtyp.rdf.php | 3 +- system/dbupdate_3.3.php | 16 +++++- 4 files changed, 58 insertions(+), 19 deletions(-) diff --git a/content/lvplanung/lehrveranstaltungdetailoverlay.xul.php b/content/lvplanung/lehrveranstaltungdetailoverlay.xul.php index e18407e72..ed13e1e63 100644 --- a/content/lvplanung/lehrveranstaltungdetailoverlay.xul.php +++ b/content/lvplanung/lehrveranstaltungdetailoverlay.xul.php @@ -199,26 +199,46 @@ $p = new phrasen($sprache); kontakttyp) ?> - kontakttyp.'" data-value="'. $kontakt->kontakt .'">';?> + kontakttyp.'" data-id="'. $kontakt->kontakt_id .'" data-value="' . $kontakt->kontakt .'">';?> kontakttyp === 'email'): ?> kontakt; endif; - if (($kontakt->kontakttyp === 'telefon' || $kontakt->kontakttyp === 'mobil')) - echo ''; - else + /*if (($kontakt->kontakttyp === 'telefon' || $kontakt->kontakttyp === 'mobil')) + echo ''; + else*/ echo $kontakt->kontakt; if ($kontakt->kontakttyp === 'email'): ?> @@ -135,8 +154,33 @@ p->t('person','adresse')) ?> - strasse.', '.$adresse->plz.' '.$adresse->ort : '' ?> - nationkurztext) ? '
'.$adresse->nationkurztext : '' ?> + +
+
strasse ?>
+ + +
plz ?>
+ + +
ort ?>
+ + + nationkurztext)): ?> + +
+
+ +
heimatadresse === true ? 'Heimatadresse' : ''). diff --git a/public/js/infocenter/stammdaten.js b/public/js/infocenter/stammdaten.js index d63df7b2f..a8a15b23b 100644 --- a/public/js/infocenter/stammdaten.js +++ b/public/js/infocenter/stammdaten.js @@ -15,13 +15,27 @@ $(document).ready(function () $('.saveStammdaten').click(function() { var kontakt = []; - $('.kontakt_nummer').each(function(){ + $('.kontakt_input').each(function(){ kontakt.push({ - id: $(this).data('value'), + id: $(this).data('id'), value: $(this).val() }); }); + var adresse = []; + $('.adresse').each(function(){ + var id = $(this).data('value'); + adresse.push({ + id: id, + value: { + 'strasse': $('#input_strasse_' + id).val(), + 'plz': $('#input_plz_' + id).val(), + 'ort': $('#input_ort_' + id).val(), + 'nation': $('#nation_' + id).val(), + } + }); + }); + var data = { "personid" : personid, "titelpre" : $('#titelpre').val(), @@ -34,8 +48,8 @@ $(document).ready(function () "geschlecht" : $('#geschlecht').val(), "gebnation" : $('#gebnation').val(), "gebort" : $('#gebort').val(), - "kontakt" : kontakt - + "kontakt" : kontakt, + "adresse" : adresse, }; Stammdaten.update(personid, data); }); @@ -52,6 +66,8 @@ var Stammdaten = { if (FHC_AjaxClient.isSuccess(data)) { FHC_DialogLib.alertSuccess("Done!"); + Stammdaten._showKontakt(); + Stammdaten._showAdresse(); Stammdaten._hide(); } else @@ -66,9 +82,62 @@ var Stammdaten = { ); }, + _showKontakt: function() + { + $('.kontakt_input').each(function() { + var span = $(this).parent('td').children('span'); + var value = $(this).val(); + + var oldSpanValue = span.data('value'); + span.data('value', value); + var newhtml = span.html().replace(oldSpanValue, value); + span.html(newhtml); + if (span.hasClass('email')) + span.find('a').attr('href', 'mailto:' + value); + + span.show(); + $(this).remove(); + }); + }, + + _showAdresse: function() + { + $('.adresse').each(function() { + var adressenID = $(this).data('value'); + $(this).children('input').each(function() { + $(this).attr('id'); + var div = $(this).attr('id').replace('input_', ''); + $('#' + div).html($(this).val()) + $('#' + div).show(); + $(this).remove(); + }); + }); + + }, + _hide: function() { - $('.stammdaten_form').find('input, select').attr('readonly', true); + var stammdatenform = $('.stammdaten_form'); + stammdatenform.find('select').attr('disabled', true); + + $('.stammdaten').each(function(){ + var id = $(this).attr('id'); + var div = $('
'); + div.attr('id', id); + div.addClass('stammdaten'); + div.html($(this).val()); + $(this).parent('td').html(div); + }); + + $('.kontakt_input').each(function(){ + $(this).parent('td').children('span').show(); + $(this).remove(); + }); + + $('.adresse_input').each(function(){ + $(this).parent('div').children('div').show(); + $(this).remove(); + }); $('.editActionStammdaten').hide(); $('.editStammdaten').show(); @@ -76,9 +145,56 @@ var Stammdaten = { _show: function() { - $('.stammdaten_form').find('input, select').attr('readonly', false); + $('.stammdaten').each(function() { + var id = $(this).attr('id'); + var input = $(''); + input.attr('id', id); + input.addClass('form-control stammdaten'); + input.val($(this).html()); + $(this).parent('td').html(input); + }); + $('.kontakt').each(function() { + var id = $(this).data('id'); + var value = $(this).data('value'); + + $(this).hide(); + + var input = $(''); + input.attr('data-id', id); + input.attr('value', value); + input.addClass('form-control kontakt_input'); + input.val(value); + $(this).parent('td').append(input); + }); + + $('.adresse').each(function() { + var adressenID = $(this).data('value'); + $($(this).children('div').get().reverse()).each(function() { + $(this).hide(); + var id = $(this).attr('id'); + + var input = $(''); + var value = $(this).html(); + + input.attr('id', 'input_' + Stammdaten._getPlaceholder(id) + "_" + adressenID); + input.attr('value', value); + input.attr('placeholder', Stammdaten._getPlaceholder(id).toUpperCase()); + input.addClass('form-control adresse_input'); + input.val(value); + $(this).parent().prepend(input); + }); + }); + + var stammdatenform = $('.stammdaten_form'); + + stammdatenform.find('select').attr('disabled', false); $('.editActionStammdaten').show(); $('.editStammdaten').hide(); + }, + + _getPlaceholder(elementid) + { + return elementid.substr(0, elementid.indexOf("_")); } } \ No newline at end of file From ffec6a5422230a7fc8dde995f45e37dec19db966 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Thu, 3 Nov 2022 09:55:38 +0100 Subject: [PATCH 117/646] - stammdaten editierbar --- .../views/system/infocenter/stammdaten.php | 26 +--- public/js/infocenter/stammdaten.js | 139 +++++++++--------- 2 files changed, 73 insertions(+), 92 deletions(-) diff --git a/application/views/system/infocenter/stammdaten.php b/application/views/system/infocenter/stammdaten.php index 47cf7b253..f143c9c03 100644 --- a/application/views/system/infocenter/stammdaten.php +++ b/application/views/system/infocenter/stammdaten.php @@ -6,43 +6,36 @@
titelpre ?>
p->t('person','vorname')) ?>
vorname ?>
- -
p->t('person','nachname')) ?>
nachname ?>
-
p->t('person','titelpost')) ?>
titelpost ?>
-
p->t('person','geburtsdatum')) ?>
gebdatum), 'd.m.Y') ?>
-
p->t('person','svnr')) ?>
svnr ?>
-
p->t('person','geburtsort')) ?>
gebort ?>
-
@@ -135,10 +127,7 @@ kontakt; endif; - /*if (($kontakt->kontakttyp === 'telefon' || $kontakt->kontakttyp === 'mobil')) - echo ''; - else*/ - echo $kontakt->kontakt; + echo $kontakt->kontakt; if ($kontakt->kontakttyp === 'email'): ?> @@ -155,16 +144,13 @@ -
-
strasse ?>
- +
+
strasse ?>
-
plz ?>
- +
plz ?>
-
ort ?>
- - +
ort ?>
+ nationkurztext)): ?> '); - input.attr('id', id); - input.addClass('form-control stammdaten'); + input.attr('id', id + '_input'); + input.addClass('form-control stammdaten_input'); input.val($(this).html()); - $(this).parent('td').html(input); + $(this).hide(); + $(this).parent('td').append(input); }); $('.kontakt').each(function() { @@ -169,17 +125,17 @@ var Stammdaten = { }); $('.adresse').each(function() { - var adressenID = $(this).data('value'); + var adressenID = $(this).data('id'); $($(this).children('div').get().reverse()).each(function() { $(this).hide(); - var id = $(this).attr('id'); - + var type = $(this).data('type'); + var value = $(this).data('value'); var input = $(''); - var value = $(this).html(); - input.attr('id', 'input_' + Stammdaten._getPlaceholder(id) + "_" + adressenID); + input.attr('data-type', type); + input.attr('id', type + '_' + adressenID); input.attr('value', value); - input.attr('placeholder', Stammdaten._getPlaceholder(id).toUpperCase()); + input.attr('placeholder', type.toUpperCase()); input.addClass('form-control adresse_input'); input.val(value); $(this).parent().prepend(input); @@ -193,8 +149,47 @@ var Stammdaten = { $('.editStammdaten').hide(); }, - _getPlaceholder(elementid) + _updated: function() { - return elementid.substr(0, elementid.indexOf("_")); - } + $('.kontakt_input').each(function() { + var span = $(this).parent('td').children('span'); + var value = $(this).val(); + + var oldSpanValue = span.data('value'); + span.data('value', value); + var newhtml = span.html().replace(oldSpanValue, value); + span.html(newhtml); + if (span.hasClass('email')) + span.find('a').attr('href', 'mailto:' + value); + + span.show(); + $(this).remove(); + }); + + $('.adresse').each(function() { + $(this).children('input').each(function() { + var value = $(this).val(); + var type = $(this).data('type'); + var div = $('div[data-type="' + type + '"]'); + div.data('value', value); + div.html(value); + div.show(); + $(this).remove(); + }); + }); + + $('.stammdaten_input').each(function() { + var div = $(this).parent('td').children('div'); + var value = $(this).val(); + div.html(value); + div.show(); + $(this).remove(); + }); + + var stammdatenform = $('.stammdaten_form'); + stammdatenform.find('select').attr('disabled', true); + + $('.editActionStammdaten').hide(); + $('.editStammdaten').show(); + }, } \ No newline at end of file From 71c953bac77b809cc651cd4380c4d7f17a0b953a Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Thu, 3 Nov 2022 12:04:46 +0100 Subject: [PATCH 118/646] studentenmeldung: standort_code is retrieved and set in xml correctly (first prestudent, then studiengang) --- vilesci/bis/studentenmeldung.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/vilesci/bis/studentenmeldung.php b/vilesci/bis/studentenmeldung.php index 140108a12..01d2dc766 100644 --- a/vilesci/bis/studentenmeldung.php +++ b/vilesci/bis/studentenmeldung.php @@ -271,7 +271,8 @@ if (CAMPUS_NAME == 'FH Technikum Wien' && $stg_kz==10006) DISTINCT ON(student_uid, nachname, vorname) *, public.tbl_person.person_id AS pers_id, to_char(gebdatum, 'ddmmyy') AS vdat, public.tbl_prestudent.foerderrelevant as pre_foerderrelevant, - public.tbl_studiengang.foerderrelevant as stg_foerderrelevant + public.tbl_studiengang.foerderrelevant as stg_foerderrelevant, + COALESCE(tbl_prestudent.standort_code, tbl_studiengang.standort_code) AS bis_standort_code FROM public.tbl_student JOIN public.tbl_benutzer ON(student_uid=uid) @@ -295,7 +296,8 @@ elseif ($stg_kz == 'alleBaMa') DISTINCT ON(tbl_student.studiengang_kz, matrikelnr, nachname, vorname) *, public.tbl_person.person_id AS pers_id, to_char(gebdatum, 'ddmmyy') AS vdat, public.tbl_prestudent.foerderrelevant as pre_foerderrelevant, - public.tbl_studiengang.foerderrelevant as stg_foerderrelevant + public.tbl_studiengang.foerderrelevant as stg_foerderrelevant, + COALESCE(tbl_prestudent.standort_code, tbl_studiengang.standort_code) AS bis_standort_code FROM public.tbl_student JOIN public.tbl_benutzer ON(student_uid=uid) @@ -327,7 +329,8 @@ else DISTINCT ON(student_uid, nachname, vorname) *, public.tbl_person.person_id AS pers_id, to_char(gebdatum, 'ddmmyy') AS vdat, public.tbl_prestudent.foerderrelevant as pre_foerderrelevant, - public.tbl_studiengang.foerderrelevant as stg_foerderrelevant + public.tbl_studiengang.foerderrelevant as stg_foerderrelevant, + COALESCE(tbl_prestudent.standort_code, tbl_studiengang.standort_code) AS bis_standort_code FROM public.tbl_student JOIN public.tbl_benutzer ON(student_uid=uid) @@ -1615,7 +1618,7 @@ function GenerateXMLStudentBlock($row) if(!$ausserordentlich) { $datei.=" - ".$row->standort_code.""; + ".$row->bis_standort_code.""; } /* * BMWFFoerderrung derzeit fuer alle Studierende auf Ja gesetzt From 4dd983c105d4c1985dbafdba96b5341d0d44f53e Mon Sep 17 00:00:00 2001 From: cgfhtw Date: Thu, 3 Nov 2022 12:52:31 +0100 Subject: [PATCH 119/646] Phrases --- system/phrasesupdate.php | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 8ac09cee0..1cbab4108 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -15708,6 +15708,46 @@ array( ) ) ), + array( + 'app' => 'core', + 'category' => 'kvp', + 'phrase' => 'new.error.nostandardcourse.title', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Fehler", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Error", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'kvp', + 'phrase' => 'new.error.nostandardcourse.msg', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Dieser Moodle Kurs ist keinem standardisierten Quellkurs zugeordnet", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "This Moodle Course is not derived from a standardized Source Course", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'core', 'category' => 'kvp', From ebb3a6de1fd9e5949233319b5ab07cba18e4c965 Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Thu, 3 Nov 2022 15:33:05 +0100 Subject: [PATCH 120/646] plausichecks view: adapted to vue update - set correct cs and css includes, removed body --- application/views/system/issues/plausichecks.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/application/views/system/issues/plausichecks.php b/application/views/system/issues/plausichecks.php index 99d426199..4016e64cd 100644 --- a/application/views/system/issues/plausichecks.php +++ b/application/views/system/issues/plausichecks.php @@ -3,12 +3,12 @@ $this->load->view( 'templates/FHC-Header', array( 'title' => 'Plausichecks', - 'jquery' => true, - 'jqueryui' => true, + 'jquery3' => true, + 'jqueryui1' => true, 'jquerycheckboxes' => true, - 'bootstrap' => true, - 'fontawesome' => true, - 'sbadmintemplate' => true, + 'bootstrap3' => true, + 'fontawesome4' => true, + 'sbadmintemplate3' => true, 'ajaxlib' => true, 'navigationwidget' => true, 'dialoglib' => true, @@ -18,7 +18,6 @@ $this->load->view( ); ?> -
widgetlib->widget('NavigationWidget'); ?> @@ -98,6 +97,5 @@ $this->load->view(
- load->view('templates/FHC-Footer'); ?> From 180e24b9166102187be4223014c7d185970d2f10 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Fri, 4 Nov 2022 10:37:38 +0100 Subject: [PATCH 121/646] - studienbestaetigung in englischer sprache hinzugefuegt - odt files angepasst im core --- cis/private/pdfExport.php | 2 +- cis/private/profile/dokumente.php | 14 +- content/fas.xul.php | 9 +- content/student/studentoverlay.js.php | 4 +- locale/de-AT/fas.dtd | 4 + rdf/student.rdf.php | 1 + system/vorlage_zip/Inskription.odt | Bin 21839 -> 12858 bytes system/vorlage_zip/InskriptionEng.odt | Bin 0 -> 13220 bytes system/xsl/inskriptioneng_0.xml | 347 ++++++++++++++++++++++++++ 9 files changed, 372 insertions(+), 9 deletions(-) create mode 100644 system/vorlage_zip/InskriptionEng.odt create mode 100644 system/xsl/inskriptioneng_0.xml diff --git a/cis/private/pdfExport.php b/cis/private/pdfExport.php index 99b5c94f0..a570c75f9 100644 --- a/cis/private/pdfExport.php +++ b/cis/private/pdfExport.php @@ -233,7 +233,7 @@ if ((((isset($_GET["uid"]) && $user == $_GET["uid"])) || $rechte->isBerechtigt(' if (isset($_GET['ss'])) $stsem_zahlung = $konto->getLastStSemBuchungstypen($user, $buchungstypen, $_GET['ss']); - if ((($xsl=='Inskription') || ($xsl == 'Studienblatt')) && ($_GET["ss"] != $stsem_zahlung)) + if ((($xsl == 'Inskription') || ($xsl == 'InskriptionEng') || ($xsl == 'Studienblatt')) && ($_GET["ss"] != $stsem_zahlung)) { die('Der Studienbeitrag wurde noch nicht bezahlt'); } diff --git a/cis/private/profile/dokumente.php b/cis/private/profile/dokumente.php index 598c65148..f75529561 100644 --- a/cis/private/profile/dokumente.php +++ b/cis/private/profile/dokumente.php @@ -244,18 +244,22 @@ if (in_array($stsem, $stsem_arr)) '.$p->t('global/name').' - '; + '; if ($stsem_zahlung != FALSE && $stsem == $stsem_zahlung) { $path = "../pdfExport.php?xsl=Inskription&xml=student.rdf.php&ss=".$stsem."&uid=".$uid."&xsl_stg_kz=".$xsl_stg_kz; - echo ''; - echo ''.$p->t('tools/inskriptionsbestaetigung').' '.$stsem.''; + echo ''; + echo ''.$p->t('tools/inskriptionsbestaetigung').' '.$stsem.' ' . $p->t('global/deutsch'). ''; + + $patheng = "../pdfExport.php?xsl=InskriptionEng&xml=student.rdf.php&ss=".$stsem."&uid=".$uid."&xsl_stg_kz=".$xsl_stg_kz; + echo ''; + echo ''.$p->t('tools/inskriptionsbestaetigung').' '.$stsem.' ' . $p->t('global/englisch'). ''; } else { - echo ''.$p->t('tools/studienbeitragFuerSSNochNichtBezahlt',array($stsem)).''; + echo ''.$p->t('tools/studienbeitragFuerSSNochNichtBezahlt',array($stsem)).''; } - echo ''; + echo ''; if (defined('CIS_DOKUMENTE_STUDIENBUCHLBATT_DRUCKEN') && CIS_DOKUMENTE_STUDIENBUCHLBATT_DRUCKEN) { diff --git a/content/fas.xul.php b/content/fas.xul.php index 449f917b7..80efdb2f9 100644 --- a/content/fas.xul.php +++ b/content/fas.xul.php @@ -125,7 +125,8 @@ foreach($addon_obj->result as $addon) - + + @@ -513,6 +514,12 @@ foreach($addon_obj->result as $addon) label = "&menu-dokumente-inskriptionsbestaetigung.label;" command = "menu-dokumente-inskriptionsbestaetigung:command" accesskey = "&menu-dokumente-inskriptionsbestaetigung.accesskey;"/> + 0) - window.open('content/pdfExport.php?xml=student.rdf.php&xsl=Inskription&stg_kz='+stg_kz+'&uid='+paramList+'&ss='+stsem+'&output='+output,'Inskriptionsbestaetigung', 'height=200,width=350,left=0,top=0,hotkeys=0,resizable=yes,status=no,scrollbars=yes,toolbar=no,location=no,menubar=no,dependent=yes'); + window.open('content/pdfExport.php?xml=student.rdf.php&xsl='+ xsl +'&stg_kz='+stg_kz+'&uid='+paramList+'&ss='+stsem+'&output='+output,'Inskriptionsbestaetigung', 'height=200,width=350,left=0,top=0,hotkeys=0,resizable=yes,status=no,scrollbars=yes,toolbar=no,location=no,menubar=no,dependent=yes'); else alert('Bitte einen Studenten auswaehlen'); } diff --git a/locale/de-AT/fas.dtd b/locale/de-AT/fas.dtd index df6180904..c3d420ede 100644 --- a/locale/de-AT/fas.dtd +++ b/locale/de-AT/fas.dtd @@ -187,6 +187,10 @@ + + + + diff --git a/rdf/student.rdf.php b/rdf/student.rdf.php index af0bbe82d..6eb9a967e 100644 --- a/rdf/student.rdf.php +++ b/rdf/student.rdf.php @@ -1218,6 +1218,7 @@ else bezeichnung.']]> bezeichnung.']]> + english.']]> typ.']]> orgform_kurzbz.']]> diff --git a/system/vorlage_zip/Inskription.odt b/system/vorlage_zip/Inskription.odt index d1933cdcb62b745b19287a5a29eacfe5a786f433..6471c5cc2bd6b81776a4e9172079222313ede67e 100644 GIT binary patch literal 12858 zcmbVy1z1#Dxc1N~DG~yMl=Lt(gM=ai0@5NNISeHXHGnjVw1m%2R@Lgm5mVsW)J!P8Gw%ZL#BUs28b;EyIKotBQux-=#~Y-+Q`=7hfhCYxzP9HkM|qWL#zsF|^G}lhgaHyd$N!e1`6qiewvM(a(f{!CpX3}6MhM6MgO>;!8>|0+ zFHusqMsS$b-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yDnqa5DE^g+$8q@L`#GJ zlG2IMEl^%J>?kkR7*NRD?0J)^T)UER%Rc+5w{&rax8v%9GI<3`cCAyo@Dl*A&i_v< zkTcxH-Ui|BA&k0V)0Wug5-Q4oUQ`G}v=dcCfIt*qYo!CGPV%-1P-Nxav7y@7#LET` zv9p+-vB#R?!?C65^KiBo(IxryMiSQiJgpb(@H2vP)xwpz{c>-KWrCdd*q0qbb1?!{ z-Yx>N7Aavu(qN~KC)s>A@2x86J>{9Yejp6vQ_D7H;JdL8pzf^m>(rr)^vwvD_AZG z#&!^gBEWeQ=I?573ud9ie#v&e3)a4#-A&8Gr;{u*pbL7l)$%^yr#6K}61UUt(WQLeTqguA;H93`?pl4UQX zE7B85vUKzOk2rS^xQFLI1Y_K3jM6BDe~9+BAxU9W~A-X$i*-? z1v%c|+G%6_K<29YEL|71zJgbrCC)Npw4d1&m4QVu7525Q*APT;@@APr!VKBVCdJa5 ztp`=+9YdX)l=L_!DzwX1pWwRK)#V+8|6dDL!q=-J zT6yW-XDwfTOt+eJyb}gp4-a_kl7L4%nl=+Frh$gD_h=^fcAoUNm4 zN^>9lzjYAxXWg$G)E|e*)5FHE@GdK9)+y1Drw7#m2w;CJLsE&i#g?(*Zq#niLJCBO z^mac7!!4Gr|8{%Zo_u=&C8kM@e9FxRyK&n$h2*9_C9twPTKv0#+xHK@i^g9_^m&qt z@4)ReOR`ncYmIpW0KVSd!Z>({0Ga{gxxMA gWHF|MBZ*~CY1Y>Ul1`TZfTN@blB7Q^`s7dl2jBr9qW}N^ diff --git a/system/vorlage_zip/InskriptionEng.odt b/system/vorlage_zip/InskriptionEng.odt new file mode 100644 index 0000000000000000000000000000000000000000..e26be218e03bf872113f94ac7236f90f0dd11dcb GIT binary patch literal 13220 zcmeHtbzD?i^e>1=hom41jC2ht-64oHh|(|&4Fk;3b?HWs4yC1}VL&>hyQHKA1f)S4 z-r&`%*WbPO^WOXOectAC&YZLMs=f9;i?z@BD$AqXBtk+$M?xZU1Zn8C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!lAeQjY_jSL^{aQNx-J%D>->c0ZlK)m({bdlTju9b=$kNw^ o)(@#4q4_nDT<7GU?H%jCWN2l1)LYkVw-JA~i2QROczyT3065PZx&QzG literal 0 HcmV?d00001 diff --git a/system/xsl/inskriptioneng_0.xml b/system/xsl/inskriptioneng_0.xml new file mode 100644 index 000000000..c2080a5ec --- /dev/null +++ b/system/xsl/inskriptioneng_0.xml @@ -0,0 +1,347 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + + + + --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + + + + --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + + + + --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + + + + + + + Certificate of Enrolment University of Applied Sciences Demo + + + + + + To be submitted to (place where the certificate is to be submitted and its reference number, e.g. social security number). + + + Student number + + + + + + + + + + + + + + + + + + born on , is enrolled as a regular student in + (beginning ) + in the + + + Bachelor Degree program + + + Master Degree program + + + Degree Program + + + + + + + + + + + + (), + + st + nd + rd + th + + semester (beginning , ). + + + + + + + + Date: + + + Rector: + + + + + \ No newline at end of file From 9c0d70fe890d234aa2b44086fcfec4be0074a714 Mon Sep 17 00:00:00 2001 From: Paolo Date: Tue, 8 Nov 2022 12:01:05 +0100 Subject: [PATCH 122/646] 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 8df802b74a34c394df2178b48608476bb0944500 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Tue, 8 Nov 2022 14:45:02 +0100 Subject: [PATCH 123/646] - die Abteilung und das Unternehmen werden im CSV angezeigt --- include/mitarbeiter.class.php | 28 +++++++++++++++++++ include/organisationseinheit.class.php | 37 ++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) diff --git a/include/mitarbeiter.class.php b/include/mitarbeiter.class.php index b7511a5ad..df5557454 100644 --- a/include/mitarbeiter.class.php +++ b/include/mitarbeiter.class.php @@ -1705,5 +1705,33 @@ class mitarbeiter extends benutzer } } + public function getMitarbeiterKostenstelle($von, $bis, $uid = null) + { + if (is_null($uid)) + $uid = $this->uid; + + $qry = " + SELECT o.oe_kurzbz AS standardkostenstelle, o.bezeichnung + FROM public.tbl_benutzerfunktion bf + JOIN public.tbl_organisationseinheit o USING(oe_kurzbz) + WHERE bf.funktion_kurzbz = 'kstzuordnung' + AND (bf.datum_bis IS NULL OR datum_bis >= ". $this->db_add_param($von). ") + AND (bf.datum_von IS NULL OR datum_von <= ". $this->db_add_param($bis). ") + AND bf.uid = ". $this->db_add_param($uid); + + if ($result = $this->db_query($qry)) + { + while($row = $this->db_fetch_object($result)) + { + $obj = new StdClass(); + $obj->oekurzbz = $row->standardkostenstelle; + $obj->bezeichnung = $row->bezeichnung; + + $this->result []= $obj; + } + return true; + } + } + } ?> diff --git a/include/organisationseinheit.class.php b/include/organisationseinheit.class.php index d58cfd327..1a2e0ca16 100644 --- a/include/organisationseinheit.class.php +++ b/include/organisationseinheit.class.php @@ -938,5 +938,42 @@ class organisationseinheit extends basis_db return false; } } + + public function getOERoot($oe_kurzbz) + { + $qry = ' + WITH RECURSIVE organizations(rid, oe_kurzbz, oe_parent_kurzbz) AS + ( + SELECT 1 AS rid, o.oe_kurzbz, o.oe_parent_kurzbz + FROM public.tbl_organisationseinheit o + WHERE o.oe_kurzbz = '. $this->db_add_param($oe_kurzbz). ' + UNION ALL + SELECT rid + 1 AS rid, oe.oe_kurzbz, oe.oe_parent_kurzbz + FROM organizations org, public.tbl_organisationseinheit oe + WHERE oe.oe_kurzbz = org.oe_parent_kurzbz + AND oe.aktiv = TRUE + ) + SELECT oe_kurzbz + FROM organizations orgs + ORDER BY rid DESC + LIMIT 1 + '; + + if($this->db_query($qry)) + { + if($row = $this->db_fetch_object()) + { + $this->oe_kurzbz = $row->oe_kurzbz; + return true; + } + } + else + { + $this->errormsg = 'Fehler beim Laden der Organisationseinheiten'; + return false; + } + } + + } ?> From 29809b6bf1ab0403e87e3debfdb80d7482389d6a Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Tue, 8 Nov 2022 16:15:16 +0100 Subject: [PATCH 124/646] moved Beurteilungsformulare Pruefungssenat changes to dbupdate_3.4 --- system/dbupdate_3.3.php | 28 ---------------------------- system/dbupdate_3.4.php | 2 ++ system/dbupdate_3.4/19154.php | 30 ++++++++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 28 deletions(-) create mode 100644 system/dbupdate_3.4/19154.php diff --git a/system/dbupdate_3.3.php b/system/dbupdate_3.3.php index 342c9d264..3c016cc39 100644 --- a/system/dbupdate_3.3.php +++ b/system/dbupdate_3.3.php @@ -6807,34 +6807,6 @@ if(!@$db->db_query("SELECT herkunftsland_code FROM bis.tbl_bisio LIMIT 1")) echo '
Spalte herkunftsland_code in bis.tbl_bisio hinzugefügt'; } -// lehre.tbl_betreuerart: add type Senatsvorsitz -if($result = $db->db_query("SELECT 1 FROM lehre.tbl_betreuerart WHERE betreuerart_kurzbz='Senatsvorsitz'")) -{ - if($db->db_num_rows($result)==0) - { - $qry = "INSERT INTO lehre.tbl_betreuerart(betreuerart_kurzbz, beschreibung) VALUES('Senatsvorsitz', 'Senatsvorsitz kommissionelle Prüfung');"; - - if(!$db->db_query($qry)) - echo 'Betreuerart: '.$db->db_last_error().'
'; - else - echo '
Neue Betreuerart Senatsvorsitz in lehre.tbl_betreuerart hinzugefügt'; - } -} - -// lehre.tbl_betreuerart: add type Senatsprüfer -if($result = $db->db_query("SELECT 1 FROM lehre.tbl_betreuerart WHERE betreuerart_kurzbz='Senatspruefer'")) -{ - if($db->db_num_rows($result)==0) - { - $qry = "INSERT INTO lehre.tbl_betreuerart(betreuerart_kurzbz, beschreibung) VALUES('Senatspruefer', 'SenatsprüferIn kommissionelle Prüfung');"; - - if(!$db->db_query($qry)) - echo 'Betreuerart: '.$db->db_last_error().'
'; - else - echo '
Neue Betreuerart Senatspruefer in lehre.tbl_betreuerart hinzugefügt'; - } -} - // *** Pruefung und hinzufuegen der neuen Attribute und Tabellen echo '

Pruefe Tabellen und Attribute!

'; diff --git a/system/dbupdate_3.4.php b/system/dbupdate_3.4.php index c3600d250..5c79d6c76 100644 --- a/system/dbupdate_3.4.php +++ b/system/dbupdate_3.4.php @@ -28,6 +28,8 @@ require_once('dbupdate_3.4/example2.php'); ... */ +require_once('dbupdate_3.4/19154.php'); + // *** Pruefung und hinzufuegen der neuen Attribute und Tabellen echo '

Pruefe Tabellen und Attribute!

'; diff --git a/system/dbupdate_3.4/19154.php b/system/dbupdate_3.4/19154.php new file mode 100644 index 000000000..c13a7b98e --- /dev/null +++ b/system/dbupdate_3.4/19154.php @@ -0,0 +1,30 @@ +db_query("SELECT 1 FROM lehre.tbl_betreuerart WHERE betreuerart_kurzbz='Senatsvorsitz'")) +{ + if($db->db_num_rows($result)==0) + { + $qry = "INSERT INTO lehre.tbl_betreuerart(betreuerart_kurzbz, beschreibung) VALUES('Senatsvorsitz', 'Senatsvorsitz kommissionelle Prüfung');"; + + if(!$db->db_query($qry)) + echo 'Betreuerart: '.$db->db_last_error().'
'; + else + echo '
Neue Betreuerart Senatsvorsitz in lehre.tbl_betreuerart hinzugefügt'; + } +} + +// lehre.tbl_betreuerart: add type Senatsprüfer +if($result = $db->db_query("SELECT 1 FROM lehre.tbl_betreuerart WHERE betreuerart_kurzbz='Senatspruefer'")) +{ + if($db->db_num_rows($result)==0) + { + $qry = "INSERT INTO lehre.tbl_betreuerart(betreuerart_kurzbz, beschreibung) VALUES('Senatspruefer', 'SenatsprüferIn kommissionelle Prüfung');"; + + if(!$db->db_query($qry)) + echo 'Betreuerart: '.$db->db_last_error().'
'; + else + echo '
Neue Betreuerart Senatspruefer in lehre.tbl_betreuerart hinzugefügt'; + } +} From 4e3e42549107806c2b6522eb1808a70eb7fa86c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Wed, 9 Nov 2022 11:58:31 +0100 Subject: [PATCH 125/646] Mailversand bei Urlaubstool korrigiert --- cis/private/profile/urlaubstool.php | 86 ++++++++++++++------------- config/cis.config-default.inc.php | 6 +- config/vilesci.config-default.inc.php | 5 +- 3 files changed, 52 insertions(+), 45 deletions(-) diff --git a/cis/private/profile/urlaubstool.php b/cis/private/profile/urlaubstool.php index afd62559a..42bbe2ec7 100644 --- a/cis/private/profile/urlaubstool.php +++ b/cis/private/profile/urlaubstool.php @@ -170,19 +170,22 @@ if (isset($_GET['rechts_x']) || isset($_POST['rechts_x'])) //Bereits freigegebenen Eintrag löschen //Eintragung löschen -if((isset($_GET['delete']) && isset($_GET['informSupervisor'])) || (isset($_POST['delete']) && isset($_POST['informSupervisor']))) +if(isset($_GET['delete'])) { $zeitsperre = new zeitsperre(); $zeitsperre->load($_GET['delete']); $vondatum = $zeitsperre->getVonDatum(); $bisdatum = $zeitsperre->getBisDatum(); - $vondatum = $datum_obj->formatDatum($vondatum ,'d.m.Y'); - $bisdatum = $datum_obj->formatDatum($bisdatum,'d.m.Y'); + $vondatum = $datum_obj->formatDatum($vondatum ,'d.m.Y'); + $bisdatum = $datum_obj->formatDatum($bisdatum,'d.m.Y'); if(!$zeitsperre->delete($_GET['delete'])) + { echo $zeitsperre->errormsg; - + } + else + { //Mail an Vorgesetzten $prsn = new person(); @@ -207,48 +210,36 @@ if((isset($_GET['delete']) && isset($_GET['informSupervisor'])) || (isset($_POS } } - $benutzer = new benutzer(); - $benutzer->load($uid); + $benutzer = new benutzer(); + $benutzer->load($uid); - //new sanchomail - $nameMitarbeiter = $benutzer->vorname. " ". $benutzer->nachname; - $beschreibung = $zeitsperre->bezeichnung; - $subject = "Urlaub wurde gelöscht"; - $mailvorlage = 'Sancho_Mail_Urlaub_Loeschen'; + //new sanchomail + $nameMitarbeiter = $benutzer->vorname. " ". $benutzer->nachname; + $beschreibung = $zeitsperre->bezeichnung; + $subject = "Urlaub wurde gelöscht"; + $mailvorlage = 'Sancho_Mail_Urlaub_Loeschen'; - $from='vilesci@'.DOMAIN; + $from='vilesci@'.DOMAIN; - //Sanchomail mit Vorlage Sancho Mail Urlaub - $template_data = array( - 'vorgesetzter' => $fullName, - 'nameMitarbeiter' => $nameMitarbeiter, - 'beschreibung' =>$beschreibung, - 'vonDatum' => $vondatum, - 'bisDatum' => $bisdatum - ); + //Sanchomail mit Vorlage Sancho Mail Urlaub + $template_data = array( + 'vorgesetzter' => $fullName, + 'nameMitarbeiter' => $nameMitarbeiter, + 'beschreibung' =>$beschreibung, + 'vonDatum' => $vondatum, + 'bisDatum' => $bisdatum + ); - if (sendSanchoMail($mailvorlage, $template_data, $to, $subject)) - { - $vgmail="".$p->t('urlaubstool/VorgesetzteInformiert',array($fullName)).""; - } - else - { - $vgmail="
".$p->t('urlaubstool/fehlerBeimSendenAufgetreten',array($fullName))."!"; - } + if (sendSanchoMail($mailvorlage, $template_data, $to, $subject)) + { + $vgmail="".$p->t('urlaubstool/VorgesetzteInformiert',array($fullName)).""; + } + else + { + $vgmail="
".$p->t('urlaubstool/fehlerBeimSendenAufgetreten',array($fullName))."!"; + } + } } - else - { - $vgmail="
".$p->t('urlaubstool/konnteKeinFreigabemailVersendetWerden').""; - } -} - - -//Eintragung löschen -if((isset($_GET['delete']) || isset($_POST['delete']))) -{ - $zeitsperre = new zeitsperre(); - if(!$zeitsperre->delete($_GET['delete'])) - echo $zeitsperre->errormsg; } //Eintragung speichern @@ -594,6 +585,17 @@ $datum_obj = new datum(); loadAddons(); +foreach($addon_obj->result as $addon) +{ + if(file_exists('../../../addons/'.$addon->kurzbz.'/cis/init.js.php')) + { + echo ' + '; + } +} // Wenn Seite fertig geladen ist Addons aufrufen echo ' @@ -900,7 +902,7 @@ for ($i=0;$i<6;$i++) if($hgfarbe[$j+7*$i]=='#CDDDEE') { $k=$j+7*$i; - echo ""; + echo ""; echo 'loeschen'; } } diff --git a/config/cis.config-default.inc.php b/config/cis.config-default.inc.php index da3baf507..027af9504 100644 --- a/config/cis.config-default.inc.php +++ b/config/cis.config-default.inc.php @@ -261,5 +261,9 @@ define('CIS_ZEITWUNSCH_GD', false); define('CIS_SHOW_COVID_STATUS', false); //Vertrag Allin -define ('DEFAULT_ALLIN_DIENSTVERTRAG',[110,111]); +define ('DEFAULT_ALLIN_DIENSTVERTRAG',[111]); + +//Echter Dienstvertrag +define ('DEFAULT_ECHTER_DIENSTVERTRAG',[103,111]); + ?> diff --git a/config/vilesci.config-default.inc.php b/config/vilesci.config-default.inc.php index 6ed926b3f..17f668b90 100644 --- a/config/vilesci.config-default.inc.php +++ b/config/vilesci.config-default.inc.php @@ -266,8 +266,9 @@ define('FAS_DOPPELTE_BUCHUNGSTYPEN_CHECK', serialize( // Spezialnoten die am Zeunigs und Diplomasupplement ignoriert werden define('ZEUGNISNOTE_NICHT_ANZEIGEN',serialize(array('iar', 'nz'))); +//Default Lehrmodus +define ('DEFAULT_LEHRMODUS','regulaer'); + //Echter Dienstvertrag define ('DEFAULT_ECHTER_DIENSTVERTRAG',[103,110]); - - ?> From 74fb245757e75b5c6bfd20af9042dc9482ead8ea Mon Sep 17 00:00:00 2001 From: ma0068 Date: Thu, 10 Nov 2022 11:20:36 +0100 Subject: [PATCH 126/646] =?UTF-8?q?26114=20=C3=84nderung=20Mailtext=20Urla?= =?UTF-8?q?ub=20neu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cis/private/profile/urlaubstool.php | 85 +++++++++---------- cis/private/profile/zeitsperre_resturlaub.php | 2 +- 2 files changed, 43 insertions(+), 44 deletions(-) diff --git a/cis/private/profile/urlaubstool.php b/cis/private/profile/urlaubstool.php index 42bbe2ec7..cf66953b3 100644 --- a/cis/private/profile/urlaubstool.php +++ b/cis/private/profile/urlaubstool.php @@ -52,8 +52,8 @@ $mehrarbeitsstunden = '0'; $anspruch = '25'; $zaehl=1; $tage=array(); //Array Tage für Kalenderanzeige -$hgfarbe=array_fill(0,44,'#E9ECEE'); //Array mit Hintegrundfarben der Kalenderfelder -$datensatz=array_fill(0,44,0); +$hgfarbe=array_fill(0, 44, '#E9ECEE'); //Array mit Hintegrundfarben der Kalenderfelder +$datensatz=array_fill(0, 44, 0); $freigabevon=array(); $freigabeamum=array(); $vertretung_uid=array(); @@ -125,7 +125,6 @@ if (isset($_GET['hgfarbe'])) } else { - if (!isset($_GET['spmonat'])) { for($i=0;$i<44;$i++) @@ -172,46 +171,46 @@ if (isset($_GET['rechts_x']) || isset($_POST['rechts_x'])) //Eintragung löschen if(isset($_GET['delete'])) { - $zeitsperre = new zeitsperre(); - $zeitsperre->load($_GET['delete']); + $zeitsperre = new zeitsperre(); + $zeitsperre->load($_GET['delete']); - $vondatum = $zeitsperre->getVonDatum(); - $bisdatum = $zeitsperre->getBisDatum(); - $vondatum = $datum_obj->formatDatum($vondatum ,'d.m.Y'); - $bisdatum = $datum_obj->formatDatum($bisdatum,'d.m.Y'); + $vondatum = $zeitsperre->getVonDatum(); + $bisdatum = $zeitsperre->getBisDatum(); + $vondatum = $datum_obj->formatDatum($vondatum ,'d.m.Y'); + $bisdatum = $datum_obj->formatDatum($bisdatum,'d.m.Y'); - if(!$zeitsperre->delete($_GET['delete'])) - { - echo $zeitsperre->errormsg; - } - else - { - //Mail an Vorgesetzten - $prsn = new person(); + if(!$zeitsperre->delete($_GET['delete'])) + { + echo $zeitsperre->errormsg; + } + else + { + //Mail an Vorgesetzten + $prsn = new person(); - $vorgesetzter = $ma->getVorgesetzte($uid); - if($vorgesetzter) - { - $to=''; - $fullName =''; - foreach($ma->vorgesetzte as $vg) - { - if($to!='') - { - $to.=', '.$vg.'@'.DOMAIN; - $name = $prsn->getFullNameFromBenutzer($vg); - $fullName.=', '.$name; - } - else - { - $to.=$vg.'@'.DOMAIN; - $name = $prsn->getFullNameFromBenutzer($vg); - $fullName.=$name; - } - } + $vorgesetzter = $ma->getVorgesetzte($uid); + if($vorgesetzter) + { + $to=''; + $fullName =''; + foreach($ma->vorgesetzte as $vg) + { + if($to!='') + { + $to.=', '.$vg.'@'.DOMAIN; + $name = $prsn->getFullNameFromBenutzer($vg); + $fullName.=', '.$name; + } + else + { + $to.=$vg.'@'.DOMAIN; + $name = $prsn->getFullNameFromBenutzer($vg); + $fullName.=$name; + } + } - $benutzer = new benutzer(); - $benutzer->load($uid); + $benutzer = new benutzer(); + $benutzer->load($uid); //new sanchomail $nameMitarbeiter = $benutzer->vorname. " ". $benutzer->nachname; @@ -238,7 +237,7 @@ if(isset($_GET['delete'])) { $vgmail="
".$p->t('urlaubstool/fehlerBeimSendenAufgetreten',array($fullName))."!"; } - } + } } } @@ -428,7 +427,7 @@ if(isset($_GET['speichern']) && isset($_GET['wtag'])) require_once('../../../addons/casetime/config.inc.php'); require_once('../../../addons/casetime/include/functions.inc.php'); $urlaubssaldo = getCastTimeUrlaubssaldo($uid); - $urlaubssaldo = "Aktueller Urlaubssaldo: ". $urlaubssaldo->{'AktuellerStand'} . " Tage"; + $urlaubssaldo = $urlaubssaldo->{'AktuellerStand'}; } //Sanchomail mit Vorlage Sancho Mail Urlaub Neu @@ -898,12 +897,12 @@ for ($i=0;$i<6;$i++) } elseif(isset($freigabeamum[$j+7*$i])) { - echo 'freigegeben '; + echo 'freigegeben '; if($hgfarbe[$j+7*$i]=='#CDDDEE') { $k=$j+7*$i; echo ""; - echo 'loeschen'; + echo 'loeschen'; } } else diff --git a/cis/private/profile/zeitsperre_resturlaub.php b/cis/private/profile/zeitsperre_resturlaub.php index 87489d169..01306de98 100644 --- a/cis/private/profile/zeitsperre_resturlaub.php +++ b/cis/private/profile/zeitsperre_resturlaub.php @@ -356,7 +356,7 @@ if($addoncasetime) $zeitsaldo = getCaseTimeZeitsaldo($uid); $zeitsaldo = "Aktueller Zeitsaldo: ". $zeitsaldo . " (".formatZeitsaldo($zeitsaldo).")"; $urlaubssaldo = getCastTimeUrlaubssaldo($uid); - $urlaubssaldo = "Aktueller Urlaubssaldo: ". $urlaubssaldo->{'AktuellerStand'} . " Tage"; + $urlaubssaldo = $urlaubssaldo->{'AktuellerStand'}; } //Zeitsperre Speichern From f766f36095f5ff577868667ef878f61d60ff4110 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Thu, 10 Nov 2022 11:43:27 +0100 Subject: [PATCH 127/646] =?UTF-8?q?26113=20=C3=84nderung=20Mails=20Zeitsal?= =?UTF-8?q?do?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cis/private/profile/zeitsperre_resturlaub.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cis/private/profile/zeitsperre_resturlaub.php b/cis/private/profile/zeitsperre_resturlaub.php index 01306de98..36271fde2 100644 --- a/cis/private/profile/zeitsperre_resturlaub.php +++ b/cis/private/profile/zeitsperre_resturlaub.php @@ -354,7 +354,7 @@ if($addoncasetime) require_once('../../../addons/casetime/config.inc.php'); require_once('../../../addons/casetime/include/functions.inc.php'); $zeitsaldo = getCaseTimeZeitsaldo($uid); - $zeitsaldo = "Aktueller Zeitsaldo: ". $zeitsaldo . " (".formatZeitsaldo($zeitsaldo).")"; + $zeitsaldo = formatZeitsaldo($zeitsaldo); $urlaubssaldo = getCastTimeUrlaubssaldo($uid); $urlaubssaldo = $urlaubssaldo->{'AktuellerStand'}; } From f72afe473c49cb12c9a8fbfc50e7901063dc90d0 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Thu, 10 Nov 2022 15:02:13 +0100 Subject: [PATCH 128/646] =?UTF-8?q?26112=20Vilesci-Kein=20L=C3=B6schen=20v?= =?UTF-8?q?on=20Zeitsperren=20bei=20abgeschickter=20Monatsliste=20m=C3=B6g?= =?UTF-8?q?lich?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vilesci/personen/urlaubsverwaltung.php | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/vilesci/personen/urlaubsverwaltung.php b/vilesci/personen/urlaubsverwaltung.php index fec5222d7..f631aa081 100644 --- a/vilesci/personen/urlaubsverwaltung.php +++ b/vilesci/personen/urlaubsverwaltung.php @@ -70,7 +70,6 @@ if ($addoncasetime) require_once('../../addons/casetime/include/functions.inc.php'); } - //Kopfzeile echo ' @@ -91,7 +90,7 @@ echo ' '; - } + if(file_exists('../../../addons/'.$addon->kurzbz.'/cis/init.js.php')) + { + echo ' + '; + } } // Wenn Seite fertig geladen ist Addons aufrufen @@ -612,57 +609,58 @@ echo ' '; ?> - - - <?php echo $p->t('urlaubstool/urlaubstool');?> - + }, + select: function(event, ui) + { + //Ausgeaehlte Ressource zuweisen und Textfeld wieder leeren + $("#vertretung").val(ui.item.uid); + } + }); +}) + + +<?php echo $p->t('urlaubstool/urlaubstool');?> + ".$p->t('urlaubstool/urlaubstool')." (".$uid.")"; + //Anzeige Resturlaubsberechnung echo ''; echo ''; -for($i=1;$i<=7;$i++) +for($i=1; $i<=7; $i++) echo "\n".''; echo ''; -for ($i=0;$i<6;$i++) +for ($i=0; $i<6; $i++) { echo "\n".''; - for ($j=1;$j<8;$j++) + for ($j=1; $j<8; $j++) { echo "\n"; - if(strlen(stristr($tage[$j+7*$i],"."))>0) + if(strlen(stristr($tage[$j+7*$i], "."))>0) { if($j%6==0 || $j==7) { @@ -866,7 +864,7 @@ for ($i=0;$i<6;$i++) } if($tage[$j+7*$i]!='') { - if($hgfarbe[$j+7*$i]=='#FFFC7F' )//|| $hgfarbe[$j+7*$i]=='#CDDDEE') + if($hgfarbe[$j+7*$i]=='#FFFC7F')//|| $hgfarbe[$j+7*$i]=='#CDDDEE') { echo 't('urlaubstool/erreichbar').': '.$erreichbarkeit_kurzbz[$j+7*$i].'">'.$tage[$j+7*$i].'
';; $k=$j+7*$i; @@ -876,16 +874,16 @@ for ($i=0;$i<6;$i++) elseif($hgfarbe[$j+7*$i]=='#E9ECEE') { echo ''.$tage[$j+7*$i].'
'; - if(strlen(stristr($tage[$j+7*$i],"."))>0) + if(strlen(stristr($tage[$j+7*$i], "."))>0) { echo ''; + value="'.date("Y-m-d", mktime(0, 0, 0, substr($tage[$j+7*$i], 3, 2), substr($tage[$j+7*$i], 0, 2), substr($tage[$j+7*$i], 6, 4))).'" + id="'.date("d.m.Y", mktime(0, 0, 0, substr($tage[$j+7*$i], 3, 2), substr($tage[$j+7*$i], 0, 2), substr($tage[$j+7*$i], 6, 4))).'">'; } else { - echo ''; + echo ''; } } else @@ -897,12 +895,12 @@ for ($i=0;$i<6;$i++) } elseif(isset($freigabeamum[$j+7*$i])) { - echo 'freigegeben '; + echo 'freigegeben '; if($hgfarbe[$j+7*$i]=='#CDDDEE') { $k=$j+7*$i; echo ""; - echo 'loeschen'; + echo 'loeschen'; } } else From ac1df7691a72d95e33b48e33426ffdb3da03870e Mon Sep 17 00:00:00 2001 From: Paolo Date: Fri, 11 Nov 2022 13:54:25 +0100 Subject: [PATCH 132/646] - 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 a412db7356eb9e6ed64d1637b1617be5d38a1ff5 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Fri, 11 Nov 2022 14:27:06 +0100 Subject: [PATCH 133/646] Attribut raumtyp_aktiv als boolean parsen --- include/raumtyp.class.php | 6 ++---- rdf/raumtyp.rdf.php | 10 +++++----- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/include/raumtyp.class.php b/include/raumtyp.class.php index 6aa54254e..ec274df7a 100644 --- a/include/raumtyp.class.php +++ b/include/raumtyp.class.php @@ -68,8 +68,7 @@ class raumtyp extends basis_db $raumtyp_obj->beschreibung = $row->beschreibung; $raumtyp_obj->raumtyp_kurzbz = $row->raumtyp_kurzbz; - $raumtyp_obj->aktiv = $row->aktiv; - + $raumtyp_obj->aktiv = $this->db_parse_bool($row->aktiv); $this->result[] = $raumtyp_obj; } @@ -101,8 +100,7 @@ class raumtyp extends basis_db { $this->beschreibung = $row->beschreibung; $this->raumtyp_kurzbz = $row->kurzbz; - $this->aktiv = $row->aktiv; - + $this->aktiv = $this->db_parse_bool($row->aktiv); } else { diff --git a/rdf/raumtyp.rdf.php b/rdf/raumtyp.rdf.php index 56da76b5b..1f7289747 100644 --- a/rdf/raumtyp.rdf.php +++ b/rdf/raumtyp.rdf.php @@ -56,11 +56,11 @@ foreach ($raumtypDAO->result as $rt) { ?> - - raumtyp_kurzbz ?> - beschreibung ?> - aktiv=='t'?'true':'false') ?> - + + raumtyp_kurzbz ?> + beschreibung ?> + aktiv ? "true" : "false") ?> + Date: Mon, 14 Nov 2022 17:57:20 +0100 Subject: [PATCH 134/646] studentenmeldung.php: correct order - Studenten first, then Bewerber --- vilesci/bis/studentenmeldung.php | 57 ++++++++++++++++---------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/vilesci/bis/studentenmeldung.php b/vilesci/bis/studentenmeldung.php index d085a4ed9..5cf04de0d 100644 --- a/vilesci/bis/studentenmeldung.php +++ b/vilesci/bis/studentenmeldung.php @@ -351,6 +351,12 @@ else "; } +$header = " + + ".$erhalter." + ".date("dmY", $datumobj->mktime_fromdate($bisdatum))." + "; + if($result = $db->db_query($qry)) { $stg_kz_index = ''; @@ -397,23 +403,24 @@ if($result = $db->db_query($qry)) else die('Fehler:'.$stg_obj->errormsg); - // Header am Beginn rausschreiben + // Erstes Studiengang Tag am Beginn rausschreiben if ($stg_kz_index == '') { - $header = " - - ".$erhalter." - ".date("dmY", $datumobj->mktime_fromdate($bisdatum))." - "; - + $header .= " + + ".$row->studiengang_kz.""; $datei .= $header; $dateiNurBewerber .= $header; } } - //Bewerberblock bei neuem Studiengang, und am Ende noch einmal - if (($stg_kz_index != '' && $row->studiengang_kz != $stg_kz_index) || $row_num == $num_rows) + // Student Daten schreiben + $datei .= GenerateXMLStudentBlock($row); + + // wenn neuer Studiengang oder letzter Durchlauf... + if ($stg_kz_index != '' && ($row->studiengang_kz != $stg_kz_index || $row_num == $num_rows)) { + //Bewerberblock bei neuem Studiengang, und am Ende noch einmal // (bei Ausserordentlichen nicht anzeigen) if($row->studiengang_kz!=('9'.$erhalter)) { @@ -437,29 +444,24 @@ if($result = $db->db_query($qry)) $dateiNurBewerber.=$bewerberBlock; } } + + // ...Studiengang Tag schliessen + $stgClose = " + "; + $datei .= $stgClose; + $dateiNurBewerber .= $stgClose; } // wenn neuer Studiengang... - if ($row->studiengang_kz != $stg_kz_index) + if ($stg_kz_index != '' && $row->studiengang_kz != $stg_kz_index) { - // ...Studiengang Tag schliessen - if ($stg_kz_index != '') - { - $stgClose = " - "; - $datei .= $stgClose; - $dateiNurBewerber .= $stgClose; - } - - // ...neuen Studiengang Tag öffnen - $stgOpen = " - - ".$row->studiengang_kz.""; - $datei .= $stgOpen; - $dateiNurBewerber .= $stgOpen; + // ...neuen Studiengang Tag öffnen + $stgOpen = " + + ".$row->studiengang_kz.""; + $datei .= $stgOpen; + $dateiNurBewerber .= $stgOpen; } - // Student Daten schreiben - $datei .= GenerateXMLStudentBlock($row); // Studiengang kz speichern und Zeile erhöhen $stg_kz_index = $row->studiengang_kz; @@ -468,7 +470,6 @@ if($result = $db->db_query($qry)) } $footer=" - "; From 8bbbd8cb8d2354078a9c0456ae64eebfa37bf99d Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Mon, 14 Nov 2022 18:13:49 +0100 Subject: [PATCH 135/646] studentenmeldung bugfix: Erhalter Kz is correctly exported --- vilesci/bis/studentenmeldung.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/vilesci/bis/studentenmeldung.php b/vilesci/bis/studentenmeldung.php index 5cf04de0d..ec4102a7b 100644 --- a/vilesci/bis/studentenmeldung.php +++ b/vilesci/bis/studentenmeldung.php @@ -351,12 +351,6 @@ else "; } -$header = " - - ".$erhalter." - ".date("dmY", $datumobj->mktime_fromdate($bisdatum))." - "; - if($result = $db->db_query($qry)) { $stg_kz_index = ''; @@ -406,7 +400,11 @@ if($result = $db->db_query($qry)) // Erstes Studiengang Tag am Beginn rausschreiben if ($stg_kz_index == '') { - $header .= " + $header = " + + ".$erhalter." + ".date("dmY", $datumobj->mktime_fromdate($bisdatum))." + ".$row->studiengang_kz.""; $datei .= $header; From 540fc4bede933b704d2d69aeb0325bcc0da780c0 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Tue, 15 Nov 2022 11:22:47 +0100 Subject: [PATCH 136/646] 26198 Notenimport ausschliesslich bei vorhandener Note --- .../lehre/benotungstool/nachpruefungeintragen.php | 12 +++++++++++- locale/de-AT/benotungstool.php | 3 ++- locale/en-US/benotungstool.php | 1 + 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/cis/private/lehre/benotungstool/nachpruefungeintragen.php b/cis/private/lehre/benotungstool/nachpruefungeintragen.php index 290113179..bf0d4b197 100644 --- a/cis/private/lehre/benotungstool/nachpruefungeintragen.php +++ b/cis/private/lehre/benotungstool/nachpruefungeintragen.php @@ -95,6 +95,8 @@ if (isset($_REQUEST['sammel']) && $_REQUEST["sammel"] == 1) { $errorMatrnr = ''; $errorDatum = ''; + $errorNachp = ''; + foreach ($_POST as $row => $val) { if(mb_strstr(mb_strtolower($row), 'student_uid_')) @@ -140,6 +142,14 @@ if (isset($_REQUEST['sammel']) && $_REQUEST["sammel"] == 1) } } + //check ob eine Note vorhanden ist oder (intern) angerechnet wurde + $lvnote = new lvgesamtnote(); + if (!$lvnote->load($lvid, $student_uid, $stsem)) + { + $errorNachp.="\n".$p->t('benotungstool/NachpruefungNichtZulaessig', array($student_uid)); + continue; + } + $lehreinheit_id = getLehreinheit($db, $lvid, $student_uid, $stsem); if(isset($_POST['student_uid_'.$id]) && (isset($_POST['note_'.$id]) || isset($_POST['punkte_'.$id])) && isset($_POST['datumNachp_'.$id])) @@ -152,7 +162,7 @@ if (isset($_REQUEST['sammel']) && $_REQUEST["sammel"] == 1) } } } - echo $errorMatrnr . $errorDatum; + echo $errorMatrnr . $errorDatum . $errorNachp; } else { diff --git a/locale/de-AT/benotungstool.php b/locale/de-AT/benotungstool.php index feac092f6..d6e77d3ce 100644 --- a/locale/de-AT/benotungstool.php +++ b/locale/de-AT/benotungstool.php @@ -150,8 +150,9 @@ $this->phrasen['benotungstool/kreuzerltool']='Kreuzerltool'; $this->phrasen['benotungstool/studentIstLvNichtZugeordnet']='Der Student %s %s (%s) ist dieser Lehrveranstaltung nicht zugeordnet. Die Note wird nicht uebernommen!'; $this->phrasen['benotungstool/studentMitMatrikelnummerExistiertNicht']='Student*in mit Matrikelnummer %s existiert nicht.'; $this->phrasen['benotungstool/datumsformatUnzulaessig']='Das Datum %s entspricht nicht dem Format TT.MM.JJJJ!'; +$this->phrasen['benotungstool/NachpruefungNichtZulaessig']='Nachprüfung für Student*in %s nicht zulässig.'; $this->phrasen['benotungstool/noteUnzulaessig']='Die Note %s ist nicht zulaessig. Die Zeile wurde uebersprungen.'; -$this->phrasen['benotungstool/noteNichtUeberschreibbar']='Für Student mit Matrikelnummer %s eingetragene Zeugnisote %s ist nicht überschreibbar'; +$this->phrasen['benotungstool/noteNichtUeberschreibbar']='Für Student mit Matrikelnummer %s eingetragene Zeugnisnote %s ist nicht überschreibbar'; $this->phrasen['benotungstool/fehlerhafteNoteBeiStudent']='Fehlerhafte Note bei Student %s %s'; $this->phrasen['benotungstool/keineKreuzerllistenFuerDieseLehrveranstaltung']='Derzeit gibt es keine Kreuzerllisten für diese Lehrveranstaltung'; $this->phrasen['benotungstool/notenuebersichtFuer']='Notenübersicht für'; diff --git a/locale/en-US/benotungstool.php b/locale/en-US/benotungstool.php index f482409d8..73a3bd343 100644 --- a/locale/en-US/benotungstool.php +++ b/locale/en-US/benotungstool.php @@ -148,6 +148,7 @@ $this->phrasen['benotungstool/pruefungAnlegenFuer']='Create an examination for ' $this->phrasen['benotungstool/kreuzerltool']='"Kreuzerl" tool'; $this->phrasen['benotungstool/studentIstLvNichtZugeordnet']='Student is not assigned to this course. The grade was not accepted!'; $this->phrasen['benotungstool/studentMitMatrikelnummerExistiertNicht']='Student with student ID number %s does not exist.'; +$this->phrasen['benotungstool/NachpruefungNichtZulaessig']='Re-examination for student %s not allowed.'; $this->phrasen['benotungstool/datumsformatUnzulaessig']='The date %s is not in valid format TT.MM.JJJJ.'; $this->phrasen['benotungstool/noteNichtUeberschreibbar']='Transcript grade %2$s for student with Personal identifier %1$s is not rewritable'; $this->phrasen['benotungstool/fehlerhafteNoteBeiStudent']='Incorrect grade for student %s %s'; From 763b0bb756f406df18fa1e6fa3fdd2e5c198e9d3 Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Wed, 16 Nov 2022 17:19:13 +0100 Subject: [PATCH 137/646] renamed betreuerart of secondary examiner of bachelor thesis with Vorsitz from Senatspruefer to Senatsmitglied --- .../education/Projektbetreuer_model.php | 4 +-- cis/private/lehre/abgabe_lektor.php | 20 +++++++------ cis/private/lehre/abgabe_lektor_details.php | 2 +- cis/private/lehre/abgabe_student.php | 30 ++++++++++++------- include/projektbetreuer.class.php | 6 ++-- locale/de-AT/abgabetool.php | 2 +- locale/en-US/abgabetool.php | 2 +- system/dbupdate_3.4/19154.php | 10 +++---- system/phrasesupdate.php | 2 +- 9 files changed, 44 insertions(+), 34 deletions(-) diff --git a/application/models/education/Projektbetreuer_model.php b/application/models/education/Projektbetreuer_model.php index db9310eed..93fb656a7 100644 --- a/application/models/education/Projektbetreuer_model.php +++ b/application/models/education/Projektbetreuer_model.php @@ -133,7 +133,7 @@ class Projektbetreuer_model extends DB_Model ) OR /* either Zweitbegutachter of masterarbeit, or Kommissionsprüfer if Kommission */ ( - betr.betreuerart_kurzbz = 'Senatspruefer' + betr.betreuerart_kurzbz = 'Senatsmitglied' AND EXISTS ( SELECT 1 FROM lehre.tbl_projektbetreuer WHERE person_id = ? @@ -176,7 +176,7 @@ class Projektbetreuer_model extends DB_Model LEFT JOIN public.tbl_benutzer USING(person_id) WHERE projektarbeit_id = ? AND tbl_projektbetreuer.person_id = ? - AND betreuerart_kurzbz IN ('Zweitbegutachter', 'Senatspruefer') + AND betreuerart_kurzbz IN ('Zweitbegutachter', 'Senatsmitglied') LIMIT 1"; $betreueruidRes = $this->execQuery($betreuerUidQry, array($projektarbeit_id, $zweitbegutachter_person_id)); diff --git a/cis/private/lehre/abgabe_lektor.php b/cis/private/lehre/abgabe_lektor.php index 6b087d256..3d20c8a7e 100644 --- a/cis/private/lehre/abgabe_lektor.php +++ b/cis/private/lehre/abgabe_lektor.php @@ -61,8 +61,10 @@ $sql_query = "SELECT FROM (SELECT tbl_person.vorname, tbl_person.nachname, tbl_studiengang.typ, tbl_studiengang.kurzbz, tbl_projektarbeit.projekttyp_kurzbz, tbl_projekttyp.bezeichnung, tbl_projektarbeit.titel, tbl_projektarbeit.projektarbeit_id, - tbl_projektbetreuer.betreuerart_kurzbz, tbl_benutzer.uid, tbl_student.matrikelnr, tbl_lehreinheit.studiensemester_kurzbz - FROM lehre.tbl_projektarbeit LEFT JOIN lehre.tbl_projektbetreuer using(projektarbeit_id) + tbl_projektbetreuer.betreuerart_kurzbz, tbl_betreuerart.beschreibung AS betreuerart_beschreibung, tbl_benutzer.uid, tbl_student.matrikelnr, tbl_lehreinheit.studiensemester_kurzbz + FROM lehre.tbl_projektarbeit + LEFT JOIN lehre.tbl_projektbetreuer using(projektarbeit_id) + LEFT JOIN lehre.tbl_betreuerart using(betreuerart_kurzbz) LEFT JOIN public.tbl_benutzer on(uid=student_uid) LEFT JOIN public.tbl_student on(public.tbl_benutzer.uid=public.tbl_student.student_uid) LEFT JOIN public.tbl_person on(tbl_benutzer.person_id=tbl_person.person_id) @@ -75,7 +77,7 @@ $sql_query = "SELECT WHERE public.tbl_benutzer.person_id=lehre.tbl_projektbetreuer.person_id AND public.tbl_benutzer.uid=".$db->db_add_param($getuid).") ".($showall?'':' AND public.tbl_benutzer.aktiv AND lehre.tbl_projektarbeit.note IS NULL ')." - AND betreuerart_kurzbz IN ('Betreuer', 'Begutachter', 'Erstbegutachter', 'Zweitbegutachter', 'Erstbetreuer', 'Senatsvorsitz', 'Senatspruefer') + AND betreuerart_kurzbz IN ('Betreuer', 'Begutachter', 'Erstbegutachter', 'Zweitbegutachter', 'Erstbetreuer', 'Senatsvorsitz', 'Senatsmitglied') ORDER BY tbl_projektarbeit.projektarbeit_id, betreuerart_kurzbz desc) as xy ORDER BY nachname"; @@ -111,7 +113,7 @@ else $htmlstr .= "
\n"; $htmlstr .= " \n"; $htmlstr .= " \n"; - $htmlstr .= " \n"; + $htmlstr .= " \n"; $htmlstr .= " \n"; $i++; } @@ -126,11 +128,11 @@ echo ' '.$p->t('abgabetool/abgabetool').' - - - - - + + + + + @@ -212,7 +212,7 @@ if (isset($_POST['vorr'])) $statisticAdded = 0; $statisticUebersprungen = 0; $statisticStudienplanKorrektur = 0; - $errorMsg = array(); + $errorMsg = array('Studenten im letzten Ausbildungssemester ohne Diplomandenstatus' => 0); $stg_help = new studiengang(); if (!$stg_help->load($stg_kz)) @@ -322,23 +322,8 @@ if (isset($_POST['vorr'])) && $row_status->ausbildungssemester == $max[$stg_kz] && $row_status->status_kurzbz == 'Student') { - $statisticUebersprungen++; - $errorMsg['Studenten im letzten Ausbildungssemester ohne Diplomandenstatus']++; + $errorMsg['Studenten im letzten Ausbildungssemester ohne Diplomandenstatus'] = $errorMsg['Studenten im letzten Ausbildungssemester ohne Diplomandenstatus']+1; continue; - - /* - $sqlInsertDiplomand = "INSERT INTO public.tbl_prestudentstatus (prestudent_id, status_kurzbz, - studiensemester_kurzbz, ausbildungssemester, datum, insertamum, - insertvon, updateamum, updatevon, ext_id, orgform_kurzbz, studienplan_id, statusgrund_id) - VALUES (".$db->db_add_param($row->prestudent_id).", ". - $db->db_add_param($status_kurzbz).", ". - $db->db_add_param($next_ss).", ". - $db->db_add_param($ausbildungssemester).", now(), now(), ". - $db->db_add_param($user).", NULL, NULL, NULL, ". - $db->db_add_param($row_status->orgform_kurzbz).", ". - $db->db_add_param($studienplan_id).", ". - $db->db_add_param($statusgrundId).");"; - */ } $lvb = new lehrverband(); @@ -435,14 +420,22 @@ if (isset($_POST['vorr'])) } } echo ''; - echo 'Vorgerückte Personen: '.$statisticAdded.'
'; - echo 'Übersprungene Personen: '.$statisticUebersprungen.'
'; - echo 'Studienplanzuordnung korrigiert: '.$statisticStudienplanKorrektur.'
'; + if ($statisticAdded > 0) + echo 'Vorgerückte Personen: '.$statisticAdded.'
'; + if ($statisticStudienplanKorrektur > 0) + echo 'Studienplanzuordnung korrigiert: '.$statisticStudienplanKorrektur.'
'; + echo '
'; + echo ''; + if ($statisticUebersprungen > 0) + echo $statisticUebersprungen.' Personen wurden übersprungen, weil schon ein Eintrag im Zielsemester vorhanden ist
'; echo '
'; echo ''; - foreach($errorMsg AS $key=>$value) + foreach($errorMsg AS $text=>$anzahl) { - echo 'Fehler: '.$key.': '.$value; + if ($anzahl > 0) + { + echo $anzahl.' '.$text; + } } echo ''; } From f15e89c45177466f424afe0b4a7bc661b1a23ad8 Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Mon, 16 Jan 2023 10:24:09 +0100 Subject: [PATCH 197/646] ignore DienstreiseMT entries when calculating Pausenfehler --- include/zeitaufzeichnung.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/zeitaufzeichnung.class.php b/include/zeitaufzeichnung.class.php index 7f46d763a..4db01ee7d 100644 --- a/include/zeitaufzeichnung.class.php +++ b/include/zeitaufzeichnung.class.php @@ -897,6 +897,8 @@ or not exists foreach ($this->result as $row) { + if($row->aktivitaet_kurzbz == 'DienstreiseMT' ) continue; + $datumtag = $datum->formatDatum($row->datum, 'Y-m-d'); if (($tagesbeginn == '' || $datum->mktime_fromtimestamp($datum->formatDatum($tagesbeginn, $format = 'Y-m-d H:i:s')) > $datum->mktime_fromtimestamp($datum->formatDatum($row->start, $format = 'Y-m-d H:i:s'))) && $row->aktivitaet_kurzbz != 'LehreExtern' && $row->aktivitaet_kurzbz != 'Ersatzruhe') From f0b1c14ea4640f9aba2515e2bc9192012bd02692 Mon Sep 17 00:00:00 2001 From: Manfred Date: Tue, 17 Jan 2023 15:57:01 +0100 Subject: [PATCH 198/646] Contents unchanged --- vilesci/stammdaten/benutzerberechtigung_uebersicht.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vilesci/stammdaten/benutzerberechtigung_uebersicht.php b/vilesci/stammdaten/benutzerberechtigung_uebersicht.php index 655ce058e..2361af438 100644 --- a/vilesci/stammdaten/benutzerberechtigung_uebersicht.php +++ b/vilesci/stammdaten/benutzerberechtigung_uebersicht.php @@ -21,7 +21,7 @@ * Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at > * Manfred Kindl */ -require_once('../../config/vilesci.config.inc.php'); +require_once('../../config/vilesci.config.inc.php'); require_once('../../include/functions.inc.php'); require_once('../../include/studiengang.class.php'); require_once('../../include/benutzerberechtigung.class.php'); From 73dc39b9d8aee79f33c36cd6c14c6b89380f1338 Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Tue, 17 Jan 2023 20:45:05 +0100 Subject: [PATCH 199/646] added phrases for Projektarbeitsbeurteilung language dropdown --- system/phrasesupdate.php | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 08b504c48..2a41883c2 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -10489,6 +10489,46 @@ Any unusual occurrences ) ) ), + array( + 'app' => 'projektarbeitsbeurteilung', + 'category' => 'projektarbeitsbeurteilung', + 'phrase' => 'sprache', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Sprache', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'language', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'projektarbeitsbeurteilung', + 'category' => 'projektarbeitsbeurteilung', + 'phrase' => 'spracheAendernFehler', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Fehler beim Ändern der Sprache', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Error when changing language', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'core', 'category' => 'anrechnung', From c8fb2080da98dbd84a2fefdb80a0303739976498 Mon Sep 17 00:00:00 2001 From: Manfred Date: Fri, 20 Jan 2023 10:46:22 +0100 Subject: [PATCH 200/646] =?UTF-8?q?Studiengangsfilter=20bei=20Fragen=C3=BC?= =?UTF-8?q?bersicht?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cis/testtool/admin/uebersichtFragen.php | 600 +++++++++++++----------- 1 file changed, 338 insertions(+), 262 deletions(-) diff --git a/cis/testtool/admin/uebersichtFragen.php b/cis/testtool/admin/uebersichtFragen.php index 50963a337..0342abd05 100644 --- a/cis/testtool/admin/uebersichtFragen.php +++ b/cis/testtool/admin/uebersichtFragen.php @@ -1,263 +1,339 @@ -, - */ -require_once("../../../config/cis.config.inc.php"); -require_once('../../../include/basis_db.class.php'); -require_once("../../../include/gebiet.class.php"); -require_once("../../../include/frage.class.php"); -require_once("../../../include/vorschlag.class.php"); -require_once('../../../include/functions.inc.php'); -require_once("../../../include/benutzerberechtigung.class.php"); - -if (!$db = new basis_db()) - die('Fehler beim Oeffnen der Datenbankverbindung'); -?> - - - - - Testool Fragen Übersicht - - - -getBerechtigungen($user); - -if(!$rechte->isBerechtigt('basis/testtool', null, 's')) - die('Sie haben keine Berechtigung für diese Seite'); - -$gebiet = new gebiet(); -$gebiet->getAll(); -$sprache = (isset($_REQUEST['Sprache'])?$_REQUEST['Sprache']:'German'); -$Auswahlgebiet = (isset($_REQUEST['AuswahlGebiet'])?$_REQUEST['AuswahlGebiet']:''); -$loesungen = (isset($_REQUEST['loesungen']) && $_REQUEST['loesungen'] != '' ? true:false); - -echo '
-
'; @@ -708,7 +706,7 @@ echo ' style="vertical-align: middle;" alt="links">  \n"; echo ' '; echo ' '; //Tage -$mbeginn=mktime(0, 0, 0, ($wmonat+1) , 1, $jahre[$wjahr]); +$mbeginn=mktime(0, 0, 0, ($wmonat+1), 1, $jahre[$wjahr]); $ttt=getdate($mbeginn); $wotag="$ttt[wday]"; if ($wotag==0) @@ -786,9 +784,9 @@ else { $mendev = cal_days_in_month(CAL_GREGORIAN, ($wmonat), $jahre[$wjahr]); } -$ttt=getdate(mktime(0, 0, 0, ($wmonat+1) , $mende, $jahre[$wjahr])); +$ttt=getdate(mktime(0, 0, 0, ($wmonat+1), $mende, $jahre[$wjahr])); //echo "monatsende:".$mende; -for($i=1;$i<43;$i++) +for($i=1; $i<43; $i++) { if($i>=$wotag && $zaehl<=$mende) { @@ -799,22 +797,22 @@ for($i=1;$i<43;$i++) { if($wmonat==0) { - $tage[$i]=date("d.m.Y", mktime(0, 0, 0, 12 , $mendev+$i-($wotag-1), $jahre[$wjahr]-1)); + $tage[$i]=date("d.m.Y", mktime(0, 0, 0, 12, $mendev+$i-($wotag-1), $jahre[$wjahr]-1)); } else { - $tage[$i]=date("d.m.Y", mktime(0, 0, 0, ($wmonat) , $mendev+$i-($wotag-1), $jahre[$wjahr])); + $tage[$i]=date("d.m.Y", mktime(0, 0, 0, ($wmonat), $mendev+$i-($wotag-1), $jahre[$wjahr])); } } elseif ($i>$mende && $i<=$mende+($wotag-1)+(7-($ttt['wday']==0?7:$ttt['wday']))) { if($wmonat==11) { - $tage[$i]=date("d.m.Y", mktime(0, 0, 0, 1 , $i-$mende-$wotag+1, $jahre[$wjahr+1])); + $tage[$i]=date("d.m.Y", mktime(0, 0, 0, 1, $i-$mende-$wotag+1, $jahre[$wjahr+1])); } else { - $tage[$i]=date("d.m.Y", mktime(0, 0, 0, ($wmonat+2) , $i-$mende-$wotag+1, $jahre[$wjahr])); + $tage[$i]=date("d.m.Y", mktime(0, 0, 0, ($wmonat+2), $i-$mende-$wotag+1, $jahre[$wjahr])); } } else @@ -832,17 +830,17 @@ echo '
'.$tagbez[$lang->index][$i].'
".strtoupper($row->typ.$row->kurzbz)."".$db->convert_html_chars($row->studiensemester_kurzbz)."".$db->convert_html_chars($row->titel)."".$db->convert_html_chars($row->betreuerart_kurzbz)."".($row->betreuerart_beschreibung == null ? $db->convert_html_chars($row->betreuerart_kurzbz) : $db->convert_html_chars($row->betreuerart_beschreibung))."
- - - - - - - - - - - - - -
Gebiet:
Sprache: -
-Mit Lösungen -

'; - - -if(isset($_REQUEST['AuswahlGebiet'])) -{ - $gebiet_id = $_REQUEST['AuswahlGebiet']; - - $gebietdetails = new gebiet(); - $gebietdetails->load($gebiet_id); - - $qry = "SELECT DISTINCT UPPER(typ||kurzbz) AS studiengang - FROM testtool.tbl_ablauf JOIN public.tbl_studiengang USING (studiengang_kz) - WHERE gebiet_id=".$db->db_add_param($gebiet_id)." - ORDER BY studiengang"; - $result = $db->db_query($qry); - - if ($gebietdetails) - { - echo ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Gebiet:'.$gebietdetails->bezeichnung.'
Verwendet in den Studiengängen:'; - $i=1; - while ($row = $db->db_fetch_object($result)) - { - echo $row->studiengang.($db->db_num_rows($result)>1 && $db->db_num_rows($result)>$i?', ':''); - $i++; - if ($i % 10 == 0) - echo '
'; - } - echo '
  
Beschreibung:'.($gebietdetails->beschreibung!=''?$gebietdetails->beschreibung:'-').'
Zeit:'.$gebietdetails->zeit.'
Multipleresponse:'.($gebietdetails->multipleresponse==true?'Ja':'Nein').'
Gestellte Fragen:'.$gebietdetails->maxfragen.'
Zufallsfrage:'.($gebietdetails->zufallfrage==true?'Ja':'Nein').'
Zufallsvorschlag:'.($gebietdetails->zufallvorschlag==true?'Ja':'Nein').'
Startlevel:'.($gebietdetails->level_start!=''?$gebietdetails->level_start:'Keines').'
Höheres Level nach:'.($gebietdetails->level_sprung_auf!=''?$gebietdetails->level_sprung_auf.' richtigen Antwort(en)':'-').'
Niedrigeres Level nach:'.($gebietdetails->level_sprung_ab!=''?$gebietdetails->level_sprung_ab.' falschen Antwort(en)':'-').'
Levelgleichverteilung:'.($gebietdetails->levelgleichverteilung==true?'Ja':'Nein').'
Maximalpunkte:'.$gebietdetails->maxpunkte.'
Antworten pro Zeile:'.$gebietdetails->antwortenprozeile.'


'; - } - - $frage = new frage(); - $frage->getFragenGebiet($gebiet_id); - - foreach($frage->result as $fragen) - { - $sprachevorschlag = new vorschlag(); - $spracheFrage = new frage(); - $spracheFrage->getFrageSprache($fragen->frage_id, $sprache); - - echo "<NR:".$fragen->nummer.($fragen->level!=""?"  Level: ".$fragen->level."":"").($fragen->demo=="t"?"  Demo":"").">
"; - //Sound einbinden - if($spracheFrage->audio!='') - { - echo ' '; - } - // FRAGE anzeigen - echo "$spracheFrage->text

\n"; - - // Bild einbinden wenn vorhanden - if($spracheFrage->bild!='') - echo "

\n"; - - echo"
"; - - // ANTWORTEN anzeigen - $sprachevorschlag->getVorschlag($fragen->frage_id, $sprache, $random=false); - $anzahlBild = 0; - foreach($sprachevorschlag->result as $vor) - { - $vorschlag = new vorschlag(); - $vorschlag->loadVorschlagSprache($vor->vorschlag_id, $sprache); - - if($vorschlag->bild == '') - { - if ($loesungen) - { - echo ''; - } - else - { - echo ''; - } - } - if($vorschlag->bild!='') - { - // zeilenumbruch nach 4 bilder - if($anzahlBild%4==0) - echo ""; - echo ""; - } - else - { - echo ""; - } - - $anzahlBild++; - } - if($vorschlag->audio!='') - { - echo ' '; - } - - } - echo "
'.$vor->nummer.''.$vor->punkte.' '.$vorschlag->text.'
'.$vor->nummer.' '.$vorschlag->text.'
"; - echo "
"; - if ($loesungen) - { - echo "
".$vor->punkte."


"; - } -} -?> - +, + */ +require_once("../../../config/cis.config.inc.php"); +require_once('../../../include/basis_db.class.php'); +require_once("../../../include/gebiet.class.php"); +require_once("../../../include/frage.class.php"); +require_once("../../../include/vorschlag.class.php"); +require_once('../../../include/functions.inc.php'); +require_once("../../../include/benutzerberechtigung.class.php"); +require_once('../../../include/studiengang.class.php'); +require_once('../../../include/ablauf.class.php'); + +if (!$db = new basis_db()) + die('Fehler beim Oeffnen der Datenbankverbindung'); +?> + + + + + Testool Fragen Übersicht + + + +getBerechtigungen($user); + +if(!$rechte->isBerechtigt('basis/testtool', null, 's')) + die('Sie haben keine Berechtigung für diese Seite'); + +$gebiet = new gebiet(); +$gebiet->getAll(); +$sprache = (isset($_REQUEST['Sprache'])?$_REQUEST['Sprache']:'German'); +$Auswahlgebiet = (isset($_REQUEST['AuswahlGebiet'])?$_REQUEST['AuswahlGebiet']:''); +$loesungen = (isset($_REQUEST['loesungen']) && $_REQUEST['loesungen'] != '' ? true:false); + +$studiengang = new studiengang(); +$studiengang->getAll('typ, kurzbz', false); +$stg_kz = (isset($_GET['stg_kz'])?$_GET['stg_kz']:'-1'); +$gebiet_id = (isset($_GET['gebiet_id'])?$_GET['gebiet_id']:''); + +echo ' + + + + + +'; +/*echo '';*/ +echo ' + + + + + + + + + + +
Studiengang:'; +//Liste der Studiengänge +echo ''; +echo '
Gebiet:'; +//Liste der Gebiete +$qry = "SELECT * FROM testtool.tbl_ablauf WHERE studiengang_kz=".$db->db_add_param($stg_kz); +$anzahl = $db->db_num_rows($db->db_query($qry)); + +if ($stg_kz !== "-1" && $anzahl !== 0) +{ + $qry = "SELECT * FROM testtool.tbl_gebiet LEFT JOIN testtool.tbl_ablauf USING (gebiet_id) + WHERE studiengang_kz=".$db->db_add_param($stg_kz)." ORDER BY semester,reihung"; +} +else + $qry = "SELECT * FROM testtool.tbl_gebiet ORDER BY bezeichnung"; + +if (($anzahl !== 0) || ($stg_kz == '-1') && ($stg_kz !== '')) +{ + if ($result = $db->db_query($qry)) + { + echo ' '; + } +} +elseif (($anzahl == 0)) +{ + echo 'Keine Gebiete für diesen Studiengang'; +} +echo '
Sprache: +
+Mit Lösungen +

'; + + +if(isset($_REQUEST['AuswahlGebiet'])) +{ + $gebiet_id = $_REQUEST['AuswahlGebiet']; + + $gebietdetails = new gebiet(); + $gebietdetails->load($gebiet_id); + + $qry = "SELECT DISTINCT UPPER(typ||kurzbz) AS studiengang + FROM testtool.tbl_ablauf JOIN public.tbl_studiengang USING (studiengang_kz) + WHERE gebiet_id=".$db->db_add_param($gebiet_id)." + ORDER BY studiengang"; + $result = $db->db_query($qry); + + if ($gebietdetails) + { + echo ' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Gebiet:'.$gebietdetails->bezeichnung.'
Verwendet in den Studiengängen:'; + $i=1; + while ($row = $db->db_fetch_object($result)) + { + echo $row->studiengang.($db->db_num_rows($result)>1 && $db->db_num_rows($result)>$i?', ':''); + $i++; + if ($i % 10 == 0) + echo '
'; + } + echo '
  
Beschreibung:'.($gebietdetails->beschreibung!=''?$gebietdetails->beschreibung:'-').'
Zeit:'.$gebietdetails->zeit.'
Multipleresponse:'.($gebietdetails->multipleresponse==true?'Ja':'Nein').'
Gestellte Fragen:'.$gebietdetails->maxfragen.'
Zufallsfrage:'.($gebietdetails->zufallfrage==true?'Ja':'Nein').'
Zufallsvorschlag:'.($gebietdetails->zufallvorschlag==true?'Ja':'Nein').'
Startlevel:'.($gebietdetails->level_start!=''?$gebietdetails->level_start:'Keines').'
Höheres Level nach:'.($gebietdetails->level_sprung_auf!=''?$gebietdetails->level_sprung_auf.' richtigen Antwort(en)':'-').'
Niedrigeres Level nach:'.($gebietdetails->level_sprung_ab!=''?$gebietdetails->level_sprung_ab.' falschen Antwort(en)':'-').'
Levelgleichverteilung:'.($gebietdetails->levelgleichverteilung==true?'Ja':'Nein').'
Maximalpunkte:'.$gebietdetails->maxpunkte.'
Antworten pro Zeile:'.$gebietdetails->antwortenprozeile.'


'; + } + + $frage = new frage(); + $frage->getFragenGebiet($gebiet_id); + + foreach($frage->result as $fragen) + { + $sprachevorschlag = new vorschlag(); + $spracheFrage = new frage(); + $spracheFrage->getFrageSprache($fragen->frage_id, $sprache); + + echo "<NR:".$fragen->nummer.($fragen->level!=""?"  Level: ".$fragen->level."":"").($fragen->demo=="t"?"  Demo":"").">
"; + //Sound einbinden + if($spracheFrage->audio!='') + { + echo ' '; + } + // FRAGE anzeigen + echo "$spracheFrage->text

\n"; + + // Bild einbinden wenn vorhanden + if($spracheFrage->bild!='') + echo "

\n"; + + echo"
"; + + // ANTWORTEN anzeigen + $sprachevorschlag->getVorschlag($fragen->frage_id, $sprache, $random=false); + $anzahlBild = 0; + foreach($sprachevorschlag->result as $vor) + { + $vorschlag = new vorschlag(); + $vorschlag->loadVorschlagSprache($vor->vorschlag_id, $sprache); + + if($vorschlag->bild == '') + { + if ($loesungen) + { + echo ''; + } + else + { + echo ''; + } + } + if($vorschlag->bild!='') + { + // zeilenumbruch nach 4 bilder + if($anzahlBild%4==0) + echo ""; + echo ""; + } + else + { + echo ""; + } + + $anzahlBild++; + } + if($vorschlag->audio!='') + { + echo ' '; + } + + } + echo "
'.$vor->nummer.''.$vor->punkte.' '.$vorschlag->text.'
'.$vor->nummer.' '.$vorschlag->text.'
"; + echo "
"; + if ($loesungen) + { + echo "
".$vor->punkte."


"; + } +} +?> + \ No newline at end of file From a9e235678c04ef74b1b5c94905091692bd8c003f Mon Sep 17 00:00:00 2001 From: Manfred Date: Tue, 24 Jan 2023 21:13:36 +0100 Subject: [PATCH 201/646] Filter Widget in Tabellen --- vilesci/stammdaten/reihungstest_administration.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vilesci/stammdaten/reihungstest_administration.php b/vilesci/stammdaten/reihungstest_administration.php index 658f01b31..3f3ec6e83 100644 --- a/vilesci/stammdaten/reihungstest_administration.php +++ b/vilesci/stammdaten/reihungstest_administration.php @@ -110,17 +110,17 @@ echo ' - + - + - + - Lehrveranstaltungen - Übersicht - - - - -   - - - - - - - - - - - -
-  Lehrveranstaltungen - Übersicht ('.$stsem->studiensemester_kurzbz.') -
 
- '; - - $qry = "SELECT - tbl_lehrveranstaltung.lehrveranstaltung_id, tbl_lehrveranstaltung.studiengang_kz, - tbl_lehrveranstaltung.bezeichnung, tbl_lehrveranstaltung.semester, - tbl_lehrveranstaltung.bezeichnung_english, tbl_lehrveranstaltung.incoming, - tbl_lehrveranstaltung.sprache, - ( - SELECT - count(*) - FROM - campus.vw_student_lehrveranstaltung - JOIN public.tbl_student ON(uid=student_uid) - JOIN public.tbl_prestudentstatus USING(prestudent_id) - WHERE - lehrveranstaltung_id=tbl_lehrveranstaltung.lehrveranstaltung_id AND - lehreinheit_id in (SELECT lehreinheit_id FROM lehre.tbl_lehreinheit - WHERE lehrveranstaltung_id=tbl_lehrveranstaltung.lehrveranstaltung_id - AND tbl_lehreinheit.studiensemester_kurzbz='$stsem->studiensemester_kurzbz') - AND tbl_prestudentstatus.status_kurzbz='Incoming' - AND tbl_prestudentstatus.status_kurzbz='$stsem->studiensemester_kurzbz' - GROUP BY uid - ) as anzahlincoming - FROM - lehre.tbl_lehrveranstaltung JOIN public.tbl_studiengang USING(studiengang_kz) - WHERE - tbl_lehrveranstaltung.incoming>0 AND - tbl_lehrveranstaltung.aktiv AND - tbl_lehrveranstaltung.lehre - AND tbl_lehrveranstaltung.studiengang_kz>0 AND tbl_lehrveranstaltung.studiengang_kz<10000 - AND tbl_studiengang.aktiv - "; - - echo ' - - - - - - - - - - - - - - '; - if($result = $db->db_query($qry)) - { - $i=0; - while($row = $db->db_fetch_object($result)) - { - $freieplaetze = $row->incoming - $row->anzahlincoming; - if($freieplaetze<0) - $freieplaetze=0; - - $i++; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - } - } - echo '
IDStudiengangSemesterSpracheLehrveranstaltungLehrveranstaltung EnglischLV-InfoPlätze gesamtFreie Plätze
',$row->lehrveranstaltung_id,'',$stg->kuerzel_arr[$row->studiengang_kz],'',$row->semester,'',$row->sprache,'',$row->bezeichnung,'',$row->bezeichnung_english,' - Deutsch  - Englisch - ',$row->incoming,'',$freieplaetze,'
'; -?> -
- - - - - - diff --git a/include/tw/cis_menu_lv.inc.php b/include/tw/cis_menu_lv.inc.php index 4b3005c07..16abdc48a 100644 --- a/include/tw/cis_menu_lv.inc.php +++ b/include/tw/cis_menu_lv.inc.php @@ -68,29 +68,8 @@ function checkZeilenUmbruch() if(!defined('CIS_LEHRVERANSTALTUNG_LVINFO_ANZEIGEN') || CIS_LEHRVERANSTALTUNG_LVINFO_ANZEIGEN) { $text=''; - - $qry = "SELECT * FROM campus.tbl_lvinfo WHERE lehrveranstaltung_id=".$db->db_add_param($lvid, FHC_INTEGER)." AND genehmigt=true AND sprache='".ATTR_SPRACHE_DE."' AND aktiv=true"; $need_br=false; - if($result=$db->db_query($qry)) - { - if($db->db_num_rows($result)>0) - { - $text.= "".$p->t('global/deutsch')." "; - $need_br=true; - } - } - $qry = "SELECT * FROM campus.tbl_lvinfo WHERE lehrveranstaltung_id=".$db->db_add_param($lvid, FHC_INTEGER)." AND genehmigt=true AND sprache='".ATTR_SPRACHE_EN."' AND aktiv=true"; - if($result=$db->db_query($qry)) - { - if($db->db_num_rows($result)>0) - { - $row1=$db->db_fetch_object($result); - $text.= "".$p->t('global/englisch').""; - $need_br=true; - } - } - // Bearbeiten Button anzeigen wenn Lektor der LV und bearbeiten fuer Lektoren aktiviert ist // Oder Berechtigung zum Bearbeiten eingetragen ist if((!defined('CIS_LEHRVERANSTALTUNG_LVINFO_LEKTOR_EDIT') && $lektor_der_lv) From 7bb340a4158bf54a1554da9d8416afa2101ac957 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Wed, 1 Mar 2023 10:44:47 +0100 Subject: [PATCH 230/646] - checksystem auf 3.4 umgebaut - vilesci raumtypen inaktive raumtypen werden markiert - tempus karteireiter ort zeigt nur aktive raumtypen an - raumsuche auf aktive raumtypen eingeschraenkt --- cis/private/lvplan/raumsuche.php | 12 ++++++------ include/raumtyp.class.php | 8 ++++++-- rdf/ort.rdf.php | 6 ++++-- system/dbupdate_3.3.php | 14 -------------- system/dbupdate_3.4.php | 1 + ...24913_tabelle_raumtyp_neues_attribut_aktiv.php | 15 +++++++++++++++ vilesci/lehre/lehrveranstaltung_details.php | 7 ++++++- vilesci/stammdaten/raum_details.php | 6 +++++- 8 files changed, 43 insertions(+), 26 deletions(-) create mode 100644 system/dbupdate_3.4/24913_tabelle_raumtyp_neues_attribut_aktiv.php diff --git a/cis/private/lvplan/raumsuche.php b/cis/private/lvplan/raumsuche.php index 0cb9677d4..7be028be8 100644 --- a/cis/private/lvplan/raumsuche.php +++ b/cis/private/lvplan/raumsuche.php @@ -47,11 +47,11 @@ echo ' - - - - - + + + + + "; + +} + if(isset($_POST['schick'])) { if($rechte->isBerechtigt('basis/berechtigung', null, 'suid')) @@ -418,9 +482,10 @@ if (!$b = new berechtigung()) $b->getRollen(); foreach($b->result as $berechtigung) { - $rolle_arr[] = $berechtigung->rolle_kurzbz; + $rolle_arr[$berechtigung->rolle_kurzbz] = $berechtigung->beschreibung; } -sort($rolle_arr); +ksort($rolle_arr, SORT_STRING | SORT_FLAG_CASE); + $b->getBerechtigungen(); foreach($b->result as $berechtigung) { @@ -592,10 +657,10 @@ if (isset($_REQUEST['uid']) || isset($_REQUEST['funktion_kurzbz'])) //Rolle $htmlstr .= " "; @@ -683,8 +748,8 @@ if (isset($_REQUEST['uid']) || isset($_REQUEST['funktion_kurzbz'])) $htmlstr .= " - Rolle - Berechtigung + Rolle + Berechtigung Art Organisationseinheit Kostenstelle @@ -742,22 +807,32 @@ if (isset($_REQUEST['uid']) || isset($_REQUEST['funktion_kurzbz'])) //Rolle $htmlstr .= " "; - $htmlstr .= " "; $htmlstr .= " "; - for ($i = 0; $i < sizeof($rolle_arr); $i++) + foreach ($rolle_arr AS $key => $value) { - if ($b->rolle_kurzbz == $rolle_arr[$i]) + if ($b->rolle_kurzbz == $key) { - $sel = " selected"; + $sel = " selected='selected'"; } else $sel = ""; - $htmlstr .= ""; + $htmlstr .= ""; } $htmlstr .= " "; if ($b->rolle_kurzbz != '') { - $htmlstr .= " "; + $htmlstr .= " "; } $htmlstr.=""; @@ -827,13 +902,13 @@ if (isset($_REQUEST['uid']) || isset($_REQUEST['funktion_kurzbz'])) $htmlstr .= " "; //Gültig ab - $htmlstr .= " "; + $htmlstr .= " "; $htmlstr .= " ".$b->start.""; $htmlstr .= " "; $htmlstr .= " "; // Gültig bis - $htmlstr .= " "; + $htmlstr .= " "; $htmlstr .= " ".$b->ende.""; $htmlstr .= " "; $htmlstr .= " "; @@ -842,7 +917,8 @@ if (isset($_REQUEST['uid']) || isset($_REQUEST['funktion_kurzbz'])) $htmlstr .= " "; $htmlstr .= " anmerkung))."' data-toggle='tooltip' @@ -856,36 +932,54 @@ if (isset($_REQUEST['uid']) || isset($_REQUEST['funktion_kurzbz'])) $htmlstr .= " + data-placement='auto'> "; - $htmlstr .= " "; - $htmlstr .= " "; - $htmlstr .= " "; + $htmlstr .= " "; + $htmlstr .= " "; + $htmlstr .= " "; $htmlstr .= " "; $htmlstr .= " "; } $htmlstr .= ""; $htmlstr .= '
- -
- -
- + +
+
+ +
+ +
+ +
-
'; $htmlstr .= ""; - + $htmlstr .= "
















"; } ?> @@ -910,7 +1004,203 @@ if (isset($_REQUEST['uid']) || isset($_REQUEST['funktion_kurzbz'])) ?> - + + + + + + + + + + + + + +

+ + + + + From 43f613b0bc286bf9c85981727fe187d7e3890447 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Wed, 5 Apr 2023 13:32:32 +0200 Subject: [PATCH 306/646] =?UTF-8?q?=C3=84nderung=20FHStG=20auf=20FHG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rdf/diplomasupplement.xml.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rdf/diplomasupplement.xml.php b/rdf/diplomasupplement.xml.php index 47da798b7..4f19566d2 100644 --- a/rdf/diplomasupplement.xml.php +++ b/rdf/diplomasupplement.xml.php @@ -257,7 +257,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml") if($row->typ=='d') { echo ' UNESCO ISCED 7'; - echo ' '; + echo ' '; echo ' '; echo ' '; echo ' '; @@ -269,7 +269,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml") elseif($row->typ=='m') { echo ' UNESCO ISCED 7'; - echo ' '; + echo ' '; echo ' '; echo ' '; echo ' '; @@ -281,7 +281,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml") elseif($row->typ=='b') { echo ' UNESCO ISCED 6'; - echo ' '; + echo ' '; echo ' '; echo ' '; echo ' '; @@ -299,8 +299,8 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml") elseif($row->typ=='l' || $row->typ=='k' || $row->typ=='e') { echo ' UNESCO ISCED 7'; - echo ' Lehrgang zur Weiterbildung nach §9 FHStG idgF.'; - echo ' Certificate Program for Further Education subjected to § 9 FHStG'; + echo ' Lehrgang zur Weiterbildung nach §9 FHG idgF.'; + echo ' Certificate Program for Further Education subjected to § 9 FHG'; echo ' '; echo ' '; echo ' '; From e46d5a2433df617f2f5cb93c8280f1b192313a5e Mon Sep 17 00:00:00 2001 From: Paolo Date: Wed, 5 Apr 2023 15:22:49 +0200 Subject: [PATCH 307/646] application/views/templates/FHC-Footer.php now includes the bootstrap5 bundle JS --- application/views/templates/FHC-Footer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/views/templates/FHC-Footer.php b/application/views/templates/FHC-Footer.php index 0c3782fea..c461dd8b0 100644 --- a/application/views/templates/FHC-Footer.php +++ b/application/views/templates/FHC-Footer.php @@ -60,7 +60,7 @@ if ($bootstrap3 === true) generateJSsInclude('vendor/twbs/bootstrap3/dist/js/bootstrap.min.js'); // Bootstrap 5 JS - if ($bootstrap5 === true) generateJSsInclude('vendor/twbs/bootstrap5/dist/js/bootstrap.min.js'); + if ($bootstrap5 === true) generateJSsInclude('vendor/twbs/bootstrap5/dist/js/bootstrap.bundle.min.js'); // Moment JS if ($momentjs2 === true) From 326b53544a47dcc8e0fc5a61eb40f94023cc47b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Wed, 5 Apr 2023 16:28:19 +0200 Subject: [PATCH 308/646] =?UTF-8?q?=C3=9Cbernahme=20Optimierung=20der=20An?= =?UTF-8?q?wesenheitsabfrage=20von=20BFI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/anwesenheit.class.php | 1373 +++++++++++++++++---------------- 1 file changed, 714 insertions(+), 659 deletions(-) diff --git a/include/anwesenheit.class.php b/include/anwesenheit.class.php index 3365e6d68..2b8389c79 100644 --- a/include/anwesenheit.class.php +++ b/include/anwesenheit.class.php @@ -1,659 +1,714 @@ - - */ -/** - * Klasse zur Verwaltung der Anwesenheiten der Studierenden - */ -require_once(dirname(__FILE__).'/basis_db.class.php'); -require_once(dirname(__FILE__).'/../config/global.config.inc.php'); - -class anwesenheit extends basis_db -{ - public $new=true; // boolean - public $result = array(); - - public $anwesenheit_id; // serial - public $uid; // varchar(32) - public $einheiten; // numeric(3,1) - public $datum; // date - public $anwesend; // boolean - public $lehreinheit_id; // bigint - public $anmerkung; // varchar(256) - - /** - * Konstruktor - * @param $anwesenheit_id ID des Datensatzes der geladen werden soll (Default=null) - */ - public function __construct($anwesenheit_id=null) - { - parent::__construct(); - - if(!is_null($anwesenheit_id)) - $this->load($anwesenheit_id); - } - - /** - * Laedt den Datensatz mit der ID $anwesenheit_id - * @param $anwesenheit_id ID des Datensatzes - * @return true wenn ok, false im Fehlerfall - */ - public function load($anwesenheit_id) - { - //Pruefen ob anwesenheit_id eine gueltige Zahl ist - if(!is_numeric($anwesenheit_id) || $anwesenheit_id == '') - { - $this->errormsg = 'Anwesenheit_id muss eine Zahl sein'; - return false; - } - - //Daten aus der Datenbank lesen - $qry = "SELECT * FROM campus.tbl_anwesenheit WHERE anwesenheit_id=".$this->db_add_param($anwesenheit_id, FHC_INTEGER, false); - - if(!$this->db_query($qry)) - { - $this->errormsg = 'Fehler bei einer Datenbankabfrage'; - return false; - } - - if($row = $this->db_fetch_object()) - { - $this->anwesenheit_id = $row->anwesenheit_id; - $this->uid = $row->uid; - $this->einheiten = $row->einheiten; - $this->datum = $row->datum; - $this->anwesend = $this->db_parse_bool($row->anwesend); - $this->lehreinheit_id = $row->lehreinheit_id; - $this->anmerkung = $row->anmerkung; - $this->new=false; - } - else - { - $this->errormsg = 'Es ist kein Datensatz mit dieser ID vorhanden'; - return false; - } - - return true; - } - - /** - * Prueft die Variablen auf Gueltigkeit - * @return true wenn ok, false im Fehlerfall - */ - protected function validate() - { - //Zahlenfelder pruefen - if(!is_numeric($this->anwesenheit_id) && $this->anwesenheit_id!='') - { - $this->errormsg='anwesenheit_id enthaelt ungueltige Zeichen'; - return false; - } - - //Gesamtlaenge pruefen - if(mb_strlen($this->anmerkung)>255) - { - $this->errormsg = 'Anmerkung darf nicht länger als 255 Zeichen sein'; - return false; - } - - $this->errormsg = ''; - return true; - } - - /** - * Speichert den aktuellen Datensatz in die Datenbank - * Wenn $neu auf true gesetzt ist wird ein neuer Datensatz angelegt - * andernfalls wird der bestehende Datensatz aktualisiert - * @return true wenn ok, false im Fehlerfall - */ - public function save() - { - //Variablen pruefen - if(!$this->validate()) - return false; - - if($this->new) - { - //Neuen Datensatz einfuegen - $qry='BEGIN;INSERT INTO campus.tbl_anwesenheit (uid, einheiten, anwesend, datum, lehreinheit_id, anmerkung) VALUES('. - $this->db_add_param($this->uid).', '. - $this->db_add_param($this->einheiten).', '. - $this->db_add_param($this->anwesend, FHC_BOOLEAN).', '. - $this->db_add_param($this->datum).', '. - $this->db_add_param($this->lehreinheit_id).', '. - $this->db_add_param($this->anmerkung).');'; - } - else - { - //Pruefen ob id eine gueltige Zahl ist - if(!is_numeric($this->anwesenheit_id)) - { - $this->errormsg = 'anwesenheit_id muss eine gueltige Zahl sein'; - return false; - } - $qry='UPDATE campus.tbl_anwesenheit SET'. - ' uid='.$this->db_add_param($this->uid).', '. - ' einheiten='.$this->db_add_param($this->einheiten).', '. - ' anwesend='.$this->db_add_param($this->anwesend,FHC_BOOLEAN).', '. - ' datum='.$this->db_add_param($this->datum).', '. - ' lehreinheit_id='.$this->db_add_param($this->lehreinheit_id, FHC_INTEGER).', '. - ' anmerkung='.$this->db_add_param($this->anmerkung).' '. - 'WHERE anwesenheit_id='.$this->db_add_param($this->anwesenheit_id, FHC_INTEGER, false).';'; - } - - if($this->db_query($qry)) - { - if($this->new) - { - //naechste ID aus der Sequence holen - $qry="SELECT currval('campus.seq_anwesenheit_anwesenheit_id') as id;"; - if($this->db_query($qry)) - { - if($row = $this->db_fetch_object()) - { - $this->anwesenheit_id = $row->id; - $this->db_query('COMMIT'); - } - else - { - $this->db_query('ROLLBACK'); - $this->errormsg = "Fehler beim Auslesen der Sequence"; - return false; - } - } - else - { - $this->db_query('ROLLBACK'); - $this->errormsg = 'Fehler beim Auslesen der Sequence'; - return false; - } - } - - } - else - { - $this->errormsg = 'Fehler beim Speichern des Datensatzes'; - return false; - } - return $this->anwesenheit_id; - } - - /** - * Laedt die Anwesenheiten einer Lehreinheit/Datum - * @param $lehreinheit_id - * @param $datum - * @return boolean true wenn ok, false im Fehlerfall - */ - public function getAnwesenheitLehreinheit($lehreinheit_id, $datum=null) - { - $qry = "SELECT * FROM campus.tbl_anwesenheit - WHERE - lehreinheit_id=".$this->db_add_param($lehreinheit_id, FHC_INTEGER); - - if(!is_null($datum)) - $qry.=" AND datum=".$this->db_add_param($datum); - - if($result = $this->db_query($qry)) - { - while($row = $this->db_fetch_object($result)) - { - $obj = new anwesenheit(); - - $obj->anwesenheit_id = $row->anwesenheit_id; - $obj->uid = $row->uid; - $obj->einheiten = $row->einheiten; - $obj->datum = $row->datum; - $obj->anwesend = $this->db_parse_bool($row->anwesend); - $obj->lehreinheit_id = $row->lehreinheit_id; - $obj->anmerkung = $row->anmerkung; - - $this->result[] = $obj; - } - return true; - } - else - { - $this->errormsg = 'Fehler beim Laden der Daten'; - return false; - } - } - - public function loadAnwesenheitMitarbeiter($mitarbeiter_uid, $lehreinheit_id) - { - $qry = "SELECT - datum, a.einheiten, - (SELECT true FROM campus.tbl_anwesenheit - WHERE lehreinheit_id=".$this->db_add_param($lehreinheit_id)." AND datum=a.datum LIMIT 1) as anwesend, - (SELECT stundensatz FROM lehre.tbl_lehreinheitmitarbeiter WHERE lehreinheit_id=".$this->db_add_param($lehreinheit_id)." - AND mitarbeiter_uid=".$this->db_add_param($mitarbeiter_uid).") as stundensatz - FROM - (SELECT datum, count(distinct stunde) as einheiten FROM lehre.tbl_stundenplan - WHERE - lehreinheit_id=".$this->db_add_param($lehreinheit_id)." - AND mitarbeiter_uid=".$this->db_add_param($mitarbeiter_uid)." - GROUP by datum) as a - "; - - if($result = $this->db_query($qry)) - { - $this->anzahl_termine=0; - $this->anzahl_anwesend=0; - $this->anwesenheit = array(); - - while($row = $this->db_fetch_object($result)) - { - $anwesend = $this->db_parse_bool($row->anwesend); - $key = $lehreinheit_id.'/'.$row->datum; - - $this->anwesenheit[$key]['anwesend'] = ($anwesend?true:false); - $this->anwesenheit[$key]['lehreinheit_id'] = $lehreinheit_id; - $this->anwesenheit[$key]['datum']=$row->datum; - $this->anwesenheit[$key]['einheiten']=$row->einheiten; - $this->anwesenheit[$key]['stundensatz']=$row->stundensatz; - - $this->anzahl_termine++; - if($anwesend) - $this->anzahl_anwesend++; - } - if($this->anzahl_termine>0) - { - $this->prozent_anwesend=$this->anzahl_anwesend/$this->anzahl_termine*100; - } - return true; - } - else - { - $this->errormsg='Fehler beim Laden der Daten'; - return false; - } - } - - /** - * Liefert für Student und Einheit wieviel Einheiten als anwesend/abwesend - * eingetragen sind. - * - * @param string $uid - * @param int $lehreinheit_id - * @param bool $anwesend - * @return int - */ - public function getAnwesenheit($uid, $lehreinheit_id, $anwesend = FALSE) - { - $qry = 'SELECT sum(einheiten) AS einheiten ' - . 'FROM campus.tbl_anwesenheit ' - . 'WHERE uid = ' . $this->db_add_param($uid) - . ' AND lehreinheit_id = ' . $this->db_add_param($lehreinheit_id, FHC_INTEGER) - . ' AND anwesend = ' . $this->db_add_param($anwesend, FHC_BOOLEAN); - - $result = $this->db_query($qry); - $row = $this->db_fetch_object($result); - - return $row->einheiten; - } - - /** - * Liefert die Anwesenheiten/Abwesenheiten eines Studenten bei einer LV - * - * @param string $student_uid - * @param int $lehrveranstaltung_id - * @param string $studiensemester_kurzbz - * @param boolean $anwesend - * @return boolean - */ - public function getAnwesenheitLehrveranstaltung($student_uid, $lehrveranstaltung_id, $studiensemester_kurzbz, $anwesend=false) - { - $qry = 'SELECT - distinct tbl_anwesenheit.* - FROM - campus.tbl_anwesenheit - JOIN campus.vw_student_lehrveranstaltung USING(uid) - WHERE - uid='.$this->db_add_param($student_uid).' - AND vw_student_lehrveranstaltung.lehreinheit_id=tbl_anwesenheit.lehreinheit_id - AND lehrveranstaltung_id='.$this->db_add_param($lehrveranstaltung_id, FHC_INTEGER).' - AND studiensemester_kurzbz='.$this->db_add_param($studiensemester_kurzbz).' - AND anwesend=' . $this->db_add_param($anwesend, FHC_BOOLEAN).' - ORDER BY datum'; - - if($result = $this->db_query($qry)) - { - while($row = $this->db_fetch_object($result)) - { - $obj = new anwesenheit(); - - $obj->anwesenheit_id = $row->anwesenheit_id; - $obj->uid = $row->uid; - $obj->einheiten = $row->einheiten; - $obj->datum = $row->datum; - $obj->anwesend = $this->db_parse_bool($row->anwesend); - $obj->lehreinheit_id = $row->lehreinheit_id; - $obj->anmerkung = $row->anmerkung; - - $this->result[] = $obj; - } - return true; - } - else - { - $this->errormsg = 'Fehler beim Laden der Daten'; - return false; - } - } - - /** - * Liefert die Termine an denen eine Abwesenheit eingetragen ist. - * - * @param string $uid - * @param int $lehreinheit_id - * @return array - */ - public function getAbwesendTermine($uid, $lehreinheit_id) - { - - $qry = 'SELECT datum, einheiten ' - . 'FROM campus.tbl_anwesenheit ' - . 'WHERE uid = ' . $this->db_add_param($uid) - . ' AND lehreinheit_id = ' . $this->db_add_param($lehreinheit_id) - . ' AND anwesend = FALSE ' - . 'ORDER BY datum'; - - $result = $this->db_query($qry); - $ret_obj = array(); - - while($row = $this->db_fetch_object($result)) - { - $ret_obj[] = $row; - } - - return $ret_obj; - } - - public function getAmpel($anwesenheit_relativ) - { - - if($anwesenheit_relativ < FAS_ANWESENHEIT_ROT) - { - return 'red'; - } - elseif($anwesenheit_relativ < FAS_ANWESENHEIT_GELB) - { - return 'yellow'; - } - else - { - return 'green'; - } - } - - /** - * Prueft ob Anwesenheiten erfasst wurden - * @param $lehreinheit_id ID der Lehreinheit - * @param $datum Datum - * @param $uid UID des Studierenden - * @return boolean true wenn vorhanden, sonst false - */ - public function AnwesenheitExists($lehreinheit_id, $datum, $uid=null) - { - $qry = "SELECT - 1 - FROM - campus.tbl_anwesenheit - WHERE - anwesend=true - AND lehreinheit_id=".$this->db_add_param($lehreinheit_id)." - AND datum=".$this->db_add_param($datum); - - if($uid!='') - $qry.=" AND uid=".$this->db_add_param($uid); - - if($result = $this->db_query($qry)) - { - if($this->db_num_rows($result)>0) - return true; - else - return false; - } - else - { - $this->errormsg = 'Fehler beim Laden der Daten'; - return false; - } - } - - /** - * Prueft ob Anwesenheiten erfasst wurden - * @param $lehreinheit_id ID der Lehreinheit - * @param $datum Datum - * @param $uid UID des Studierenden - * @return boolean true wenn vorhanden, sonst false - */ - public function AnwesenheitEntryExists($lehreinheit_id, $datum, $uid=null) - { - $qry = "SELECT - 1 - FROM - campus.tbl_anwesenheit - WHERE - lehreinheit_id=".$this->db_add_param($lehreinheit_id)." - AND datum=".$this->db_add_param($datum)." - AND uid=".$this->db_add_param($uid); - - if($result = $this->db_query($qry)) - { - if($this->db_num_rows($result)>0) - return true; - else - return false; - } - else - { - $this->errormsg = 'Fehler beim Laden der Daten'; - return false; - } - } - - /** - * Laedt die Anwesenheiten in Prozent von Studierenden bei Lehrveranstaltungen - * Wenn die StudentUID uebergeben wird, werden alle Lehrveranstaltungen zu denen der Studierenden zugeteilt ist inkl Prozent der Anwesenheit - * Wenn die LehrveranstaltungID uebergeben wird, werden alle Studierenden geholt die zugeteilt sind inkl Prozent der Anwesenheit - * Es werden pro Student die Anwesenheiten berechnet aufgrund der Lehreinheit zu der sie zugeordnet sind - * @param $studiensemester_kurzbz - * @param $student_uid - * @param $lehrveranstaltung_id - * @return boolean true wenn ok, false im fehlerfall - */ - public function loadAnwesenheitStudiensemester($studiensemester_kurzbz, $student_uid=null, $lehrveranstaltung_id=null) - { - $qry = "SELECT lehrveranstaltung_id, bezeichnung, vorname, wahlname, nachname,uid, sum(anwesend) as anwesend, sum(nichtanwesend) as nichtanwesend, sum(gesamtstunden) as gesamtstunden FROM ( - SELECT - lehrveranstaltung_id, bezeichnung, vorname, wahlname, nachname, uid, - ( - SELECT - sum(einheiten) - FROM - campus.tbl_anwesenheit - WHERE - lehreinheit_id=vw_student_lehrveranstaltung.lehreinheit_id - AND uid=vw_student_lehrveranstaltung.uid - AND anwesend - ) as anwesend, - ( - SELECT - sum(einheiten) - FROM - campus.tbl_anwesenheit - WHERE - lehreinheit_id=vw_student_lehrveranstaltung.lehreinheit_id - AND uid=vw_student_lehrveranstaltung.uid - AND NOT anwesend - ) as nichtanwesend, - ( - SELECT count(*) anzahl FROM - (SELECT datum, stunde FROM campus.vw_stundenplan - WHERE lehreinheit_id=vw_student_lehrveranstaltung.lehreinheit_id - AND (vw_stundenplan.titel not like '%Nebenprüfung%' OR vw_stundenplan.titel is null) GROUP BY datum, stunde) as a - ) as gesamtstunden - FROM - campus.vw_student_lehrveranstaltung - JOIN public.tbl_benutzer USING(uid) - JOIN public.tbl_person USING(person_id) - WHERE - studiensemester_kurzbz=".$this->db_add_param($studiensemester_kurzbz); - - if(!is_null($lehrveranstaltung_id)) - $qry.=" AND lehrveranstaltung_id=".$this->db_add_param($lehrveranstaltung_id); - if(!is_null($student_uid)) - $qry.=" AND uid=".$this->db_add_param($student_uid); - - $qry.=") as b GROUP BY lehrveranstaltung_id, bezeichnung, vorname, wahlname, nachname, uid"; - - if($lehrveranstaltung_id!='') - $qry.=" order by nachname, vorname "; - elseif($student_uid!='') - $qry.=" order by bezeichnung"; - - if($result = $this->db_query($qry)) - { - while($row = $this->db_fetch_object($result)) - { - $obj = new stdClass(); - $obj->bezeichnung = $row->bezeichnung; - $obj->anwesend = $row->anwesend; - $obj->nichtanwesend = $row->nichtanwesend; - $obj->gesamtstunden = $row->gesamtstunden; - - $obj->erfassteanwesenheit = $row->anwesend+$row->nichtanwesend; - if($row->gesamtstunden=='' || $obj->erfassteanwesenheit=='') - $obj->prozent=100; - else - $obj->prozent = number_format(100-(100/$obj->gesamtstunden*$row->nichtanwesend),2); - $obj->vorname = $row->vorname; - $obj->wahlname = $row->wahlname; - $obj->nachname = $row->nachname; - $obj->uid = $row->uid; - $obj->lehrveranstaltung_id = $row->lehrveranstaltung_id; - $this->result[] = $obj; - } - return true; - } - else - { - $this->errormsg='Fehler beim Laden der Daten'; - return false; - } - } - - /** - * Aendert die bestehende Anwesenheit - * @param $lehreinheit_id ID der Lehreinheit - * @param $datum Datum - * @param $uid UID des Studierenden - * @return boolean true ok, sonst false - */ - public function AnwesenheitToggle($lehreinheit_id, $datum, $uid) - { - if($this->AnwesenheitEntryExists($lehreinheit_id, $datum, $uid)) - { - $qry = "UPDATE - campus.tbl_anwesenheit - SET anwesend= NOT anwesend - WHERE - lehreinheit_id=".$this->db_add_param($lehreinheit_id)." - AND datum=".$this->db_add_param($datum)." - AND uid=".$this->db_add_param($uid); - - if($result = $this->db_query($qry)) - { - if($this->db_affected_rows($result)>0) - return true; - else - { - $this->errormsg='Anwesenheitsliste wurde noch nicht erfasst'; - return false; - } - } - else - { - $this->errormsg = 'Fehler beim Laden der Daten'; - return false; - } - } - else - { - // Anwesenheitsliste wurde noch nicht erfasst. Eintrag neu anlegen - - // Einheiten ermitteln - $qry = "SELECT - distinct stunde - FROM - lehre.tbl_stundenplan - WHERE - lehreinheit_id=".$this->db_add_param($lehreinheit_id)." - AND datum=".$this->db_add_param($datum); - - if($result = $this->db_query($qry)) - { - if($anzahl = $this->db_num_rows($result)) - { - $einheiten = $anzahl; - } - } - if($einheiten>0) - { - $this->lehreinheit_id=$lehreinheit_id; - $this->datum = $datum; - $this->uid = $uid; - $this->anwesend=true; - $this->new=true; - $this->einheiten=$einheiten; - if($this->save()) - return true; - else - { - $this->errormsg = 'Fehler beim Speichern der Daten'; - return true; - } - } - else - { - $this->errormsg = 'Anzahl der Einheiten fuer diesen Tag konnte nicht ermittelt werden'; - return false; - } - } - } - - /** - * Loescht eine Anwesenheit - * @param anwesenheit_id integer ID der Anwesenheit. - * @return boolean true wenn ok , false im fehlerfall - */ - public function delete($anwesenheit_id) - { - $qry = "DELETE FROM campus.tbl_anwesenheit WHERE anwesenheit_id=".$this->db_add_param($anwesenheit_id, FHC_INTEGER).";"; - - if($this->db_query($qry)) - { - return true; - } - else - { - $this->errormsg = 'Fehler beim Löschen der Anwesenheit'; - return false; - } - } -} + + */ +/** + * Klasse zur Verwaltung der Anwesenheiten der Studierenden + */ +require_once(dirname(__FILE__).'/basis_db.class.php'); +require_once(dirname(__FILE__).'/../config/global.config.inc.php'); + +class anwesenheit extends basis_db +{ + public $new=true; // boolean + public $result = array(); + + public $anwesenheit_id; // serial + public $uid; // varchar(32) + public $einheiten; // numeric(3,1) + public $datum; // date + public $anwesend; // boolean + public $lehreinheit_id; // bigint + public $anmerkung; // varchar(256) + + /** + * Konstruktor + * @param $anwesenheit_id ID des Datensatzes der geladen werden soll (Default=null) + */ + public function __construct($anwesenheit_id=null) + { + parent::__construct(); + + if(!is_null($anwesenheit_id)) + $this->load($anwesenheit_id); + } + + /** + * Laedt den Datensatz mit der ID $anwesenheit_id + * @param $anwesenheit_id ID des Datensatzes + * @return true wenn ok, false im Fehlerfall + */ + public function load($anwesenheit_id) + { + //Pruefen ob anwesenheit_id eine gueltige Zahl ist + if(!is_numeric($anwesenheit_id) || $anwesenheit_id == '') + { + $this->errormsg = 'Anwesenheit_id muss eine Zahl sein'; + return false; + } + + //Daten aus der Datenbank lesen + $qry = "SELECT * FROM campus.tbl_anwesenheit WHERE anwesenheit_id=".$this->db_add_param($anwesenheit_id, FHC_INTEGER, false); + + if(!$this->db_query($qry)) + { + $this->errormsg = 'Fehler bei einer Datenbankabfrage'; + return false; + } + + if($row = $this->db_fetch_object()) + { + $this->anwesenheit_id = $row->anwesenheit_id; + $this->uid = $row->uid; + $this->einheiten = $row->einheiten; + $this->datum = $row->datum; + $this->anwesend = $this->db_parse_bool($row->anwesend); + $this->lehreinheit_id = $row->lehreinheit_id; + $this->anmerkung = $row->anmerkung; + $this->new=false; + } + else + { + $this->errormsg = 'Es ist kein Datensatz mit dieser ID vorhanden'; + return false; + } + + return true; + } + + /** + * Prueft die Variablen auf Gueltigkeit + * @return true wenn ok, false im Fehlerfall + */ + protected function validate() + { + //Zahlenfelder pruefen + if(!is_numeric($this->anwesenheit_id) && $this->anwesenheit_id!='') + { + $this->errormsg='anwesenheit_id enthaelt ungueltige Zeichen'; + return false; + } + + //Gesamtlaenge pruefen + if(mb_strlen($this->anmerkung)>255) + { + $this->errormsg = 'Anmerkung darf nicht länger als 255 Zeichen sein'; + return false; + } + + $this->errormsg = ''; + return true; + } + + /** + * Speichert den aktuellen Datensatz in die Datenbank + * Wenn $neu auf true gesetzt ist wird ein neuer Datensatz angelegt + * andernfalls wird der bestehende Datensatz aktualisiert + * @return true wenn ok, false im Fehlerfall + */ + public function save() + { + //Variablen pruefen + if(!$this->validate()) + return false; + + if($this->new) + { + //Neuen Datensatz einfuegen + $qry='BEGIN;INSERT INTO campus.tbl_anwesenheit (uid, einheiten, anwesend, datum, lehreinheit_id, anmerkung) VALUES('. + $this->db_add_param($this->uid).', '. + $this->db_add_param($this->einheiten).', '. + $this->db_add_param($this->anwesend, FHC_BOOLEAN).', '. + $this->db_add_param($this->datum).', '. + $this->db_add_param($this->lehreinheit_id).', '. + $this->db_add_param($this->anmerkung).');'; + } + else + { + //Pruefen ob id eine gueltige Zahl ist + if(!is_numeric($this->anwesenheit_id)) + { + $this->errormsg = 'anwesenheit_id muss eine gueltige Zahl sein'; + return false; + } + $qry='UPDATE campus.tbl_anwesenheit SET'. + ' uid='.$this->db_add_param($this->uid).', '. + ' einheiten='.$this->db_add_param($this->einheiten).', '. + ' anwesend='.$this->db_add_param($this->anwesend,FHC_BOOLEAN).', '. + ' datum='.$this->db_add_param($this->datum).', '. + ' lehreinheit_id='.$this->db_add_param($this->lehreinheit_id, FHC_INTEGER).', '. + ' anmerkung='.$this->db_add_param($this->anmerkung).' '. + 'WHERE anwesenheit_id='.$this->db_add_param($this->anwesenheit_id, FHC_INTEGER, false).';'; + } + + if($this->db_query($qry)) + { + if($this->new) + { + //naechste ID aus der Sequence holen + $qry="SELECT currval('campus.seq_anwesenheit_anwesenheit_id') as id;"; + if($this->db_query($qry)) + { + if($row = $this->db_fetch_object()) + { + $this->anwesenheit_id = $row->id; + $this->db_query('COMMIT'); + } + else + { + $this->db_query('ROLLBACK'); + $this->errormsg = "Fehler beim Auslesen der Sequence"; + return false; + } + } + else + { + $this->db_query('ROLLBACK'); + $this->errormsg = 'Fehler beim Auslesen der Sequence'; + return false; + } + } + + } + else + { + $this->errormsg = 'Fehler beim Speichern des Datensatzes'; + return false; + } + return $this->anwesenheit_id; + } + + /** + * Laedt die Anwesenheiten einer Lehreinheit/Datum + * @param $lehreinheit_id + * @param $datum + * @return boolean true wenn ok, false im Fehlerfall + */ + public function getAnwesenheitLehreinheit($lehreinheit_id, $datum=null) + { + $qry = "SELECT * FROM campus.tbl_anwesenheit + WHERE + lehreinheit_id=".$this->db_add_param($lehreinheit_id, FHC_INTEGER); + + if(!is_null($datum)) + $qry.=" AND datum=".$this->db_add_param($datum); + + if($result = $this->db_query($qry)) + { + while($row = $this->db_fetch_object($result)) + { + $obj = new anwesenheit(); + + $obj->anwesenheit_id = $row->anwesenheit_id; + $obj->uid = $row->uid; + $obj->einheiten = $row->einheiten; + $obj->datum = $row->datum; + $obj->anwesend = $this->db_parse_bool($row->anwesend); + $obj->lehreinheit_id = $row->lehreinheit_id; + $obj->anmerkung = $row->anmerkung; + + $this->result[] = $obj; + } + return true; + } + else + { + $this->errormsg = 'Fehler beim Laden der Daten'; + return false; + } + } + + public function loadAnwesenheitMitarbeiter($mitarbeiter_uid, $lehreinheit_id) + { + $qry = "SELECT + datum, a.einheiten, + (SELECT true FROM campus.tbl_anwesenheit + WHERE lehreinheit_id=".$this->db_add_param($lehreinheit_id)." AND datum=a.datum LIMIT 1) as anwesend, + (SELECT stundensatz FROM lehre.tbl_lehreinheitmitarbeiter WHERE lehreinheit_id=".$this->db_add_param($lehreinheit_id)." + AND mitarbeiter_uid=".$this->db_add_param($mitarbeiter_uid).") as stundensatz + FROM + (SELECT datum, count(distinct stunde) as einheiten FROM lehre.tbl_stundenplan + WHERE + lehreinheit_id=".$this->db_add_param($lehreinheit_id)." + AND mitarbeiter_uid=".$this->db_add_param($mitarbeiter_uid)." + GROUP by datum) as a + "; + + if($result = $this->db_query($qry)) + { + $this->anzahl_termine=0; + $this->anzahl_anwesend=0; + $this->anwesenheit = array(); + + while($row = $this->db_fetch_object($result)) + { + $anwesend = $this->db_parse_bool($row->anwesend); + $key = $lehreinheit_id.'/'.$row->datum; + + $this->anwesenheit[$key]['anwesend'] = ($anwesend?true:false); + $this->anwesenheit[$key]['lehreinheit_id'] = $lehreinheit_id; + $this->anwesenheit[$key]['datum']=$row->datum; + $this->anwesenheit[$key]['einheiten']=$row->einheiten; + $this->anwesenheit[$key]['stundensatz']=$row->stundensatz; + + $this->anzahl_termine++; + if($anwesend) + $this->anzahl_anwesend++; + } + if($this->anzahl_termine>0) + { + $this->prozent_anwesend=$this->anzahl_anwesend/$this->anzahl_termine*100; + } + return true; + } + else + { + $this->errormsg='Fehler beim Laden der Daten'; + return false; + } + } + + /** + * Liefert für Student und Einheit wieviel Einheiten als anwesend/abwesend + * eingetragen sind. + * + * @param string $uid + * @param int $lehreinheit_id + * @param bool $anwesend + * @return int + */ + public function getAnwesenheit($uid, $lehreinheit_id, $anwesend = FALSE) + { + $qry = 'SELECT sum(einheiten) AS einheiten ' + . 'FROM campus.tbl_anwesenheit ' + . 'WHERE uid = ' . $this->db_add_param($uid) + . ' AND lehreinheit_id = ' . $this->db_add_param($lehreinheit_id, FHC_INTEGER) + . ' AND anwesend = ' . $this->db_add_param($anwesend, FHC_BOOLEAN); + + $result = $this->db_query($qry); + $row = $this->db_fetch_object($result); + + return $row->einheiten; + } + + /** + * Liefert die Anwesenheiten/Abwesenheiten eines Studenten bei einer LV + * + * @param string $student_uid + * @param int $lehrveranstaltung_id + * @param string $studiensemester_kurzbz + * @param boolean $anwesend + * @return boolean + */ + public function getAnwesenheitLehrveranstaltung($student_uid, $lehrveranstaltung_id, $studiensemester_kurzbz, $anwesend=false) + { + $qry = 'SELECT + distinct tbl_anwesenheit.* + FROM + campus.tbl_anwesenheit + JOIN campus.vw_student_lehrveranstaltung USING(uid) + WHERE + uid='.$this->db_add_param($student_uid).' + AND vw_student_lehrveranstaltung.lehreinheit_id=tbl_anwesenheit.lehreinheit_id + AND lehrveranstaltung_id='.$this->db_add_param($lehrveranstaltung_id, FHC_INTEGER).' + AND studiensemester_kurzbz='.$this->db_add_param($studiensemester_kurzbz).' + AND anwesend=' . $this->db_add_param($anwesend, FHC_BOOLEAN).' + ORDER BY datum'; + + if($result = $this->db_query($qry)) + { + while($row = $this->db_fetch_object($result)) + { + $obj = new anwesenheit(); + + $obj->anwesenheit_id = $row->anwesenheit_id; + $obj->uid = $row->uid; + $obj->einheiten = $row->einheiten; + $obj->datum = $row->datum; + $obj->anwesend = $this->db_parse_bool($row->anwesend); + $obj->lehreinheit_id = $row->lehreinheit_id; + $obj->anmerkung = $row->anmerkung; + + $this->result[] = $obj; + } + return true; + } + else + { + $this->errormsg = 'Fehler beim Laden der Daten'; + return false; + } + } + + /** + * Liefert die Termine an denen eine Abwesenheit eingetragen ist. + * + * @param string $uid + * @param int $lehreinheit_id + * @return array + */ + public function getAbwesendTermine($uid, $lehreinheit_id) + { + + $qry = 'SELECT datum, einheiten ' + . 'FROM campus.tbl_anwesenheit ' + . 'WHERE uid = ' . $this->db_add_param($uid) + . ' AND lehreinheit_id = ' . $this->db_add_param($lehreinheit_id) + . ' AND anwesend = FALSE ' + . 'ORDER BY datum'; + + $result = $this->db_query($qry); + $ret_obj = array(); + + while($row = $this->db_fetch_object($result)) + { + $ret_obj[] = $row; + } + + return $ret_obj; + } + + public function getAmpel($anwesenheit_relativ) + { + + if($anwesenheit_relativ < FAS_ANWESENHEIT_ROT) + { + return 'red'; + } + elseif($anwesenheit_relativ < FAS_ANWESENHEIT_GELB) + { + return 'yellow'; + } + else + { + return 'green'; + } + } + + /** + * Prueft ob Anwesenheiten erfasst wurden + * @param $lehreinheit_id ID der Lehreinheit + * @param $datum Datum + * @param $uid UID des Studierenden + * @return boolean true wenn vorhanden, sonst false + */ + public function AnwesenheitExists($lehreinheit_id, $datum, $uid=null) + { + $qry = "SELECT + 1 + FROM + campus.tbl_anwesenheit + WHERE + anwesend=true + AND lehreinheit_id=".$this->db_add_param($lehreinheit_id)." + AND datum=".$this->db_add_param($datum); + + if($uid!='') + $qry.=" AND uid=".$this->db_add_param($uid); + + if($result = $this->db_query($qry)) + { + if($this->db_num_rows($result)>0) + return true; + else + return false; + } + else + { + $this->errormsg = 'Fehler beim Laden der Daten'; + return false; + } + } + + /** + * Prueft ob Anwesenheiten erfasst wurden + * @param $lehreinheit_id ID der Lehreinheit + * @param $datum Datum + * @param $uid UID des Studierenden + * @return boolean true wenn vorhanden, sonst false + */ + public function AnwesenheitEntryExists($lehreinheit_id, $datum, $uid=null) + { + $qry = "SELECT + 1 + FROM + campus.tbl_anwesenheit + WHERE + lehreinheit_id=".$this->db_add_param($lehreinheit_id)." + AND datum=".$this->db_add_param($datum)." + AND uid=".$this->db_add_param($uid); + + if($result = $this->db_query($qry)) + { + if($this->db_num_rows($result)>0) + return true; + else + return false; + } + else + { + $this->errormsg = 'Fehler beim Laden der Daten'; + return false; + } + } + + /** + * Laedt die Anwesenheiten in Prozent von Studierenden bei Lehrveranstaltungen + * Wenn die StudentUID uebergeben wird, werden alle Lehrveranstaltungen zu denen der Studierenden zugeteilt ist inkl Prozent der Anwesenheit + * Wenn die LehrveranstaltungID uebergeben wird, werden alle Studierenden geholt die zugeteilt sind inkl Prozent der Anwesenheit + * Es werden pro Student die Anwesenheiten berechnet aufgrund der Lehreinheit zu der sie zugeordnet sind + * @param $studiensemester_kurzbz + * @param $student_uid + * @param $lehrveranstaltung_id + * @return boolean true wenn ok, false im fehlerfall + */ + public function loadAnwesenheitStudiensemester($studiensemester_kurzbz, $student_uid=null, $lehrveranstaltung_id=null) + { + $qry = "SELECT + lehrveranstaltung_id, vorname, nachname, wahlname, student_uid as uid, bezeichnung, + gesamt as gesamtstunden, anwesend, nichtanwesend, trunc(100-(nichtanwesend/gesamt)*100,2) as prozent + FROM + ( + SELECT + vorname, nachname, wahlname, lehrveranstaltung_id, bezeichnung, gruppe, student_uid, + count(stundenplan_id) as gesamt, + case when anwesend.summe is null then 0 else anwesend.summe end as anwesend, + case when nichtanwesend.summe is null then 0 else nichtanwesend.summe end as nichtanwesend + FROM + ( + SELECT + sum(stundenplan_id) as stundenplan_id, datum, stunde, lehrveranstaltung_id, + bezeichnung, studiensemester_kurzbz, studiengang_kz, + TRIM( + CASE WHEN stp.gruppe_kurzbz is not null then stp.gruppe_kurzbz + else stp.semester||(case when verband is null then '' else stp.verband end)||(case when stp.gruppe is null then '' else stp.gruppe end) end) as gruppe + FROM + lehre.tbl_lehrveranstaltung lv + JOIN lehre.tbl_lehreinheit le using (lehrveranstaltung_id) + JOIN lehre.tbl_stundenplan stp using (lehreinheit_id,studiengang_kz) + WHERE + studiensemester_kurzbz = ".$this->db_add_param($studiensemester_kurzbz)." + AND (titel not like '%Nebenprüfung%' OR titel is null) + + group by datum, stunde, lehrveranstaltung_id, bezeichnung, studiensemester_kurzbz, studiengang_kz, stp.gruppe_kurzbz, stp.semester, stp.verband, stp.gruppe + )x + JOIN ( + SELECT semester::text as gruppe, public.tbl_studentlehrverband.studiensemester_kurzbz, student_uid, studiengang_kz + FROM + public.tbl_studentlehrverband + WHERE studiensemester_kurzbz = ".$this->db_add_param($studiensemester_kurzbz)." + + UNION + + SELECT semester||verband as gruppe, public.tbl_studentlehrverband.studiensemester_kurzbz, student_uid, studiengang_kz + FROM + public.tbl_studentlehrverband + WHERE + studiensemester_kurzbz = ".$this->db_add_param($studiensemester_kurzbz)." + + UNION + + SELECT semester||verband||gruppe as gruppe, public.tbl_studentlehrverband.studiensemester_kurzbz, student_uid, studiengang_kz + FROM + public.tbl_studentlehrverband + WHERE + studiensemester_kurzbz = ".$this->db_add_param($studiensemester_kurzbz)." + + UNION + + SELECT gruppe_kurzbz as gruppe, public.tbl_benutzergruppe.studiensemester_kurzbz, uid as student_uid, studiengang_kz + FROM + public.tbl_benutzergruppe + JOIN + public.tbl_gruppe using (gruppe_kurzbz) + WHERE studiensemester_kurzbz = ".$this->db_add_param($studiensemester_kurzbz)." + + )a using (gruppe, studiensemester_kurzbz, studiengang_kz) + JOIN public.tbl_benutzer b on b.uid = student_uid + JOIN public.tbl_person p using(person_id) + LEFT JOIN( + SELECT + lehrveranstaltung_id, studiensemester_kurzbz, uid as student_uid, sum(einheiten) as summe + FROM + campus.tbl_anwesenheit a + JOIN lehre.tbl_lehreinheit le using (lehreinheit_id) + JOIN lehre.tbl_lehrveranstaltung lv using (lehrveranstaltung_id) + WHERE + anwesend = true AND studiensemester_kurzbz = ".$this->db_add_param($studiensemester_kurzbz)." + GROUP BY + lehrveranstaltung_id, bezeichnung, uid, studiensemester_kurzbz + )anwesend using(lehrveranstaltung_id, student_uid, studiensemester_kurzbz) + LEFT JOIN( + SELECT lehrveranstaltung_id, studiensemester_kurzbz, uid as student_uid, sum(einheiten) as summe + FROM + campus.tbl_anwesenheit a + JOIN lehre.tbl_lehreinheit le using (lehreinheit_id) + JOIN lehre.tbl_lehrveranstaltung lv using (lehrveranstaltung_id) + WHERE + anwesend = false AND studiensemester_kurzbz = ".$this->db_add_param($studiensemester_kurzbz)." + GROUP BY + lehrveranstaltung_id, bezeichnung, uid, studiensemester_kurzbz + )nichtanwesend using(lehrveranstaltung_id, student_uid, studiensemester_kurzbz) + WHERE + lehrveranstaltung_id > 0 + "; + + if(!is_null($student_uid)) + $qry.=" AND student_uid=".$this->db_add_param($student_uid); + if(!is_null($lehrveranstaltung_id)) + $qry.=" AND lehrveranstaltung_id=".$this->db_add_param($lehrveranstaltung_id); + + $qry.="group by + vorname, nachname, wahlname, lehrveranstaltung_id, bezeichnung, gruppe, student_uid, anwesend.summe, nichtanwesend.summe + )m"; + + if($lehrveranstaltung_id != '') + $qry.=" order by nachname, vorname "; + elseif($student_uid != '') + $qry.=" order by bezeichnung"; + + if($result = $this->db_query($qry)) + { + while($row = $this->db_fetch_object($result)) + { + $obj = new stdClass(); + $obj->bezeichnung = $row->bezeichnung; + $obj->anwesend = $row->anwesend; + $obj->nichtanwesend = $row->nichtanwesend; + $obj->gesamtstunden = $row->gesamtstunden; + + $obj->erfassteanwesenheit = $row->anwesend+$row->nichtanwesend; + if($row->gesamtstunden=='' || $obj->erfassteanwesenheit=='') + $obj->prozent=100; + else + $obj->prozent = number_format(100-(100/$obj->gesamtstunden*$row->nichtanwesend),2); + $obj->vorname = $row->vorname; + $obj->wahlname = $row->wahlname; + $obj->nachname = $row->nachname; + $obj->uid = $row->uid; + $obj->lehrveranstaltung_id = $row->lehrveranstaltung_id; + $this->result[] = $obj; + } + return true; + } + else + { + $this->errormsg='Fehler beim Laden der Daten'; + return false; + } + } + + /** + * Aendert die bestehende Anwesenheit + * @param $lehreinheit_id ID der Lehreinheit + * @param $datum Datum + * @param $uid UID des Studierenden + * @return boolean true ok, sonst false + */ + public function AnwesenheitToggle($lehreinheit_id, $datum, $uid) + { + if($this->AnwesenheitEntryExists($lehreinheit_id, $datum, $uid)) + { + $qry = "UPDATE + campus.tbl_anwesenheit + SET anwesend= NOT anwesend + WHERE + lehreinheit_id=".$this->db_add_param($lehreinheit_id)." + AND datum=".$this->db_add_param($datum)." + AND uid=".$this->db_add_param($uid); + + if($result = $this->db_query($qry)) + { + if($this->db_affected_rows($result)>0) + return true; + else + { + $this->errormsg='Anwesenheitsliste wurde noch nicht erfasst'; + return false; + } + } + else + { + $this->errormsg = 'Fehler beim Laden der Daten'; + return false; + } + } + else + { + // Anwesenheitsliste wurde noch nicht erfasst. Eintrag neu anlegen + + // Einheiten ermitteln + $qry = "SELECT + distinct stunde + FROM + lehre.tbl_stundenplan + WHERE + lehreinheit_id=".$this->db_add_param($lehreinheit_id)." + AND datum=".$this->db_add_param($datum); + + if($result = $this->db_query($qry)) + { + if($anzahl = $this->db_num_rows($result)) + { + $einheiten = $anzahl; + } + } + if($einheiten>0) + { + $this->lehreinheit_id=$lehreinheit_id; + $this->datum = $datum; + $this->uid = $uid; + $this->anwesend=true; + $this->new=true; + $this->einheiten=$einheiten; + if($this->save()) + return true; + else + { + $this->errormsg = 'Fehler beim Speichern der Daten'; + return true; + } + } + else + { + $this->errormsg = 'Anzahl der Einheiten fuer diesen Tag konnte nicht ermittelt werden'; + return false; + } + } + } + + /** + * Loescht eine Anwesenheit + * @param anwesenheit_id integer ID der Anwesenheit. + * @return boolean true wenn ok , false im fehlerfall + */ + public function delete($anwesenheit_id) + { + $qry = "DELETE FROM campus.tbl_anwesenheit WHERE anwesenheit_id=".$this->db_add_param($anwesenheit_id, FHC_INTEGER).";"; + + if($this->db_query($qry)) + { + return true; + } + else + { + $this->errormsg = 'Fehler beim Löschen der Anwesenheit'; + return false; + } + } +} From 19d369c3c708a9eaaabe16d54d54f121ca008366 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Thu, 6 Apr 2023 10:17:15 +0200 Subject: [PATCH 309/646] - im kalender mitarbeiter kurzbz statt uid anzeigen --- include/lehrstunde.class.php | 4 + include/wochenplan.class.php | 29 ++-- system/dbupdate_3.4.php | 1 + ...ter_kurzbz_bei_reservierungen_anzeigen.php | 130 ++++++++++++++++++ 4 files changed, 155 insertions(+), 9 deletions(-) create mode 100644 system/dbupdate_3.4/10001_tempus_mitarbeiter_kurzbz_bei_reservierungen_anzeigen.php diff --git a/include/lehrstunde.class.php b/include/lehrstunde.class.php index 280e626a8..a0f52d799 100644 --- a/include/lehrstunde.class.php +++ b/include/lehrstunde.class.php @@ -41,6 +41,7 @@ class lehrstunde extends basis_db public $unr; // @brief Unterrichtsnummer public $lektor_uid; // @brief UID des Lektors public $lektor_kurzbz; // @brief Kurzbezeichnung des Lektors + public $mitarbeiter_kurzbz; // @brief Kurzbezeichnung public $datum; // @brief Datum public $stunde; // @brief Unterrichts-Stunde des Tages public $ort_kurzbz; // @brief Ort in dem der Unterricht stattfindet @@ -116,6 +117,7 @@ class lehrstunde extends basis_db $this->unr=$row->unr; $this->lektor_uid=$row->uid; $this->lektor_kurzbz=$row->lektor; + $this->mitarbeiter_kurzbz=$row->mitarbeiter_kurzbz; $this->datum=$row->datum; $this->stunde=$row->stunde; $this->ort_kurzbz=$row->ort_kurzbz; @@ -590,6 +592,7 @@ class lehrstunde extends basis_db $stunde->unr=$row->unr; $stunde->lektor_uid=$row->uid; $stunde->lektor_kurzbz=$row->lektor; + $stunde->mitarbeiter_kurzbz=$row->mitarbeiter_kurzbz; $stunde->datum=$row->datum; $stunde->stunde=$row->stunde; $stunde->ort_kurzbz=$row->ort_kurzbz; @@ -663,6 +666,7 @@ class lehrstunde extends basis_db $stunde->updateamum=$row->insertamum; $stunde->updatevon=$row->insertvon; $stunde->farbe=''; + $stunde->mitarbeiter_kurzbz = $row->mitarbeiter_kurzbz; $this->lehrstunden[]=$stunde; } } diff --git a/include/wochenplan.class.php b/include/wochenplan.class.php index f6cc94c3c..34fbadc63 100644 --- a/include/wochenplan.class.php +++ b/include/wochenplan.class.php @@ -445,6 +445,7 @@ class wochenplan extends basis_db $this->std_plan[$tag][$stunde][$idx]->stundenplan_id=$this->wochenplan->lehrstunden[$i]->stundenplan_id; $this->std_plan[$tag][$stunde][$idx]->lektor_uid=$this->wochenplan->lehrstunden[$i]->lektor_uid; $this->std_plan[$tag][$stunde][$idx]->lektor=$this->wochenplan->lehrstunden[$i]->lektor_kurzbz; + $this->std_plan[$tag][$stunde][$idx]->mitarbeiter_kurzbz=$this->wochenplan->lehrstunden[$i]->mitarbeiter_kurzbz; $this->std_plan[$tag][$stunde][$idx]->ort=$this->wochenplan->lehrstunden[$i]->ort_kurzbz; $this->std_plan[$tag][$stunde][$idx]->stg=$this->wochenplan->lehrstunden[$i]->studiengang; $this->std_plan[$tag][$stunde][$idx]->stg_kz=$this->wochenplan->lehrstunden[$i]->studiengang_kz; @@ -736,7 +737,10 @@ class wochenplan extends basis_db { $unr[]=$lehrstunde->unr; // Lektoren - $lektor[]=$lehrstunde->lektor; + if ($lehrstunde->mitarbeiter_kurzbz === null) + $lektor[] = $lehrstunde->lektor; + else + $lektor[]=$lehrstunde->mitarbeiter_kurzbz; // Lehrverband $typ=''; if ($lehrstunde->reservierung) @@ -1450,7 +1454,10 @@ class wochenplan extends basis_db if ($lehrstunde->unr==$unr) { // Lektoren - $lektor[]=$lehrstunde->lektor; + if ($lehrstunde->mitarbeiter_kurzbz === null) + $lektor[] = $lehrstunde->lektor; + else + $lektor[]=$lehrstunde->mitarbeiter_kurzbz; // Lehrverband $lvb=$lehrstunde->stg.'-'.$lehrstunde->sem; if ($lehrstunde->ver!=null && $lehrstunde->ver!='0' && $lehrstunde->ver!='') @@ -2364,7 +2371,10 @@ class wochenplan extends basis_db $unr[]=$lehrstunde->unr; // Lektoren - $lektor[]=$lehrstunde->lektor; + if ($lehrstunde->mitarbeiter_kurzbz === null) + $lektor[] = $lehrstunde->lektor; + else + $lektor[]=$lehrstunde->mitarbeiter_kurzbz; $lektor_uids[]=$lehrstunde->lektor_uid; // Lehrverband $lvb=$lehrstunde->stg.'-'.$lehrstunde->sem; @@ -2516,6 +2526,7 @@ class wochenplan extends basis_db if (!mb_strstr($this->std_plan[$i][$j][$idx1]->lektor,$this->std_plan[$i][$j][$idx]->lektor)) { $this->std_plan[$i][$j][$idx]->lektor.=' / '.$this->std_plan[$i][$j][$idx1]->lektor; + $this->std_plan[$i][$j][$idx]->mitarbeiter_kurzbz.=' / '.$this->std_plan[$i][$j][$idx1]->mitarbeiter_kurzbz; } //Ort @@ -2549,7 +2560,7 @@ class wochenplan extends basis_db //"Betreff","Beginnt am","Beginnt um","Endet am","Endet um","Ganztaegiges Ereignis","Erinnerung Ein/Aus","Erinnerung am","Erinnerung um","Besprechungsplanung","Erforderliche Teilnehmer","Optionale Teilnehmer","Besprechungsressourcen","Abrechnungsinformationen","Beschreibung", //"Kategorien","Ort","Prioritaet","Privat","Reisekilometer","Vertraulichkeit","Zeitspanne zeigen als" echo $this->crlf.'"'.$this->std_plan[$i][$j][$idx]->lehrfach.(isset($this->std_plan[$i][$j][$idx]->lehrform) && $this->std_plan[$i][$j][$idx]->lehrform!=''?'-'.$this->std_plan[$i][$j][$idx]->lehrform:'').($lvb!=''?' - '.$lvb:'').'","'.$start_date.'","'.$start_time.'","'.$end_date.'","'.$end_time.'","Aus","Aus",,,,,,,,"Stundenplan'; - echo $this->crlf.$this->std_plan[$i][$j][$idx]->lehrfach.$this->crlf.$this->std_plan[$i][$j][$idx]->lektor.$this->crlf.$lvb.$this->crlf.$this->std_plan[$i][$j][$idx]->ort.(LVPLAN_ANMERKUNG_ANZEIGEN?$this->crlf.$this->std_plan[$i][$j][$idx]->anmerkung:'').'","StundenplanFH","'.$this->std_plan[$i][$j][$idx]->ort.'","Normal","Aus",,"Normal","2"'; + echo $this->crlf.$this->std_plan[$i][$j][$idx]->lehrfach.$this->crlf.(($this->std_plan[$i][$j][$idx]->mitarbeiter_kurzbz === null) ? $this->std_plan[$i][$j][$idx]->lektor : $this->std_plan[$i][$j][$idx]->mitarbeiter_kurzbz).$this->crlf.$lvb.$this->crlf.$this->std_plan[$i][$j][$idx]->ort.(LVPLAN_ANMERKUNG_ANZEIGEN?$this->crlf.$this->std_plan[$i][$j][$idx]->anmerkung:'').'","StundenplanFH","'.$this->std_plan[$i][$j][$idx]->ort.'","Normal","Aus",,"Normal","2"'; } elseif ($target=='ical') { @@ -2564,9 +2575,9 @@ class wochenplan extends basis_db $end_date_time_ical = $eda[2].$eda[1].$eda[0].'T'.sprintf('%02s',($eta[0])).$eta[1].$eta[2]; //neu gruppieren der Startzeit und des Startdatums echo $this->crlf.'BEGIN:VEVENT'.$this->crlf - .'UID:'.'FH'.str_replace(',',' ',$lvb.$this->std_plan[$i][$j][$idx]->ort.$this->std_plan[$i][$j][$idx]->lektor.$lehrfach[$idx].$start_date_time_ical.$end_date_time_ical.$this->crlf) + .'UID:'.'FH'.str_replace(',',' ',$lvb.$this->std_plan[$i][$j][$idx]->ort.(($this->std_plan[$i][$j][$idx]->mitarbeiter_kurzbz === null) ? $this->std_plan[$i][$j][$idx]->lektor : $this->std_plan[$i][$j][$idx]->mitarbeiter_kurzbz).$lehrfach[$idx].$start_date_time_ical.$end_date_time_ical.$this->crlf) .'SUMMARY:'.str_replace(',',' ',$lehrfach[$idx].' '.$this->std_plan[$i][$j][$idx]->ort.' - '.$lvb.$this->crlf) - .'DESCRIPTION:'.str_replace(',',' ',$lehrfach[$idx].'\n'.$this->std_plan[$i][$j][$idx]->lektor.'\n'.$lvb.'\n'.$this->std_plan[$i][$j][$idx]->ort.(LVPLAN_ANMERKUNG_ANZEIGEN?'\n'.$this->std_plan[$i][$j][$idx]->anmerkung:'').$this->crlf) + .'DESCRIPTION:'.str_replace(',',' ',$lehrfach[$idx].'\n'.(($this->std_plan[$i][$j][$idx]->mitarbeiter_kurzbz === null) ? $this->std_plan[$i][$j][$idx]->lektor : $this->std_plan[$i][$j][$idx]->mitarbeiter_kurzbz).'\n'.$lvb.'\n'.$this->std_plan[$i][$j][$idx]->ort.(LVPLAN_ANMERKUNG_ANZEIGEN?'\n'.$this->std_plan[$i][$j][$idx]->anmerkung:'').$this->crlf) .'LOCATION:'.$this->std_plan[$i][$j][$idx]->ort.$this->crlf .'CATEGORIES:'.$lvplan_kategorie.$this->crlf .'DTSTART;TZID=Europe/Vienna:'.$start_date_time_ical.$this->crlf @@ -2606,9 +2617,9 @@ class wochenplan extends basis_db $start_date_time_ical = $sda[2].$sda[1].$sda[0].'T'.sprintf('%02s',($sta[0])).$sta[1].$sta[2]; //neu gruppieren der Startzeit und des Startdatums $end_date_time_ical = $eda[2].$eda[1].$eda[0].'T'.sprintf('%02s',($eta[0])).$eta[1].$eta[2]; //neu gruppieren der Startzeit und des Startdatums - $UID = 'FH'.$lvb.$this->std_plan[$i][$j][$idx]->ort.$this->std_plan[$i][$j][$idx]->lektor.$lehrfach[$idx].$start_date_time_ical.$end_date_time_ical; + $UID = 'FH'.$lvb.$this->std_plan[$i][$j][$idx]->ort.(($this->std_plan[$i][$j][$idx]->mitarbeiter_kurzbz === null) ? $this->std_plan[$i][$j][$idx]->lektor : $this->std_plan[$i][$j][$idx]->mitarbeiter_kurzbz).$lehrfach[$idx].$start_date_time_ical.$end_date_time_ical; $Summary = $lehrfach[$idx].' '.$this->std_plan[$i][$j][$idx]->ort.' - '.$lvb; - $description = $lehrfach[$idx].'\n'.$this->std_plan[$i][$j][$idx]->lektor.'\n'.$lvb.'\n'.$this->std_plan[$i][$j][$idx]->ort.(LVPLAN_ANMERKUNG_ANZEIGEN?'\n'.$this->std_plan[$i][$j][$idx]->anmerkung:''); + $description = $lehrfach[$idx].'\n'.(($this->std_plan[$i][$j][$idx]->mitarbeiter_kurzbz === null) ? $this->std_plan[$i][$j][$idx]->lektor : $this->std_plan[$i][$j][$idx]->mitarbeiter_kurzbz).'\n'.$lvb.'\n'.$this->std_plan[$i][$j][$idx]->ort.(LVPLAN_ANMERKUNG_ANZEIGEN?'\n'.$this->std_plan[$i][$j][$idx]->anmerkung:''); $UID = str_replace(',',' ',$UID); $Summary = str_replace(',',' ',$Summary); @@ -2646,7 +2657,7 @@ class wochenplan extends basis_db else { echo $this->crlf.'"'.$lehrfach[$idx].'","'.$lvplan_kategorie.'","'.$this->std_plan[$i][$j][$idx]->ort.'","Stundenplan'.$this->crlf.$this->std_plan[$i][$j][$idx]->lehrfach.$this->crlf; - echo $this->std_plan[$i][$j][$idx]->lektor.$this->crlf.$lvb.$this->crlf.$this->std_plan[$i][$j][$idx]->ort.(LVPLAN_ANMERKUNG_ANZEIGEN?$this->crlf.$this->std_plan[$i][$j][$idx]->anmerkung:'').'","Stundenplan",'; + echo (($this->std_plan[$i][$j][$idx]->mitarbeiter_kurzbz === null) ? $this->std_plan[$i][$j][$idx]->lektor : $this->std_plan[$i][$j][$idx]->mitarbeiter_kurzbz).$this->crlf.$lvb.$this->crlf.$this->std_plan[$i][$j][$idx]->ort.(LVPLAN_ANMERKUNG_ANZEIGEN?$this->crlf.$this->std_plan[$i][$j][$idx]->anmerkung:'').'","Stundenplan",'; echo '"'.$start_date.'","'.$start_time.'","'.$end_date.'","'.$end_time.'",,,,,'; } } diff --git a/system/dbupdate_3.4.php b/system/dbupdate_3.4.php index bc8152a90..66645fb0e 100644 --- a/system/dbupdate_3.4.php +++ b/system/dbupdate_3.4.php @@ -32,6 +32,7 @@ require_once('dbupdate_3.4/26173_index_webservicelog.php'); require_once('dbupdate_3.4/24682_reihungstest_zugangscode_fuer_login.php'); require_once('dbupdate_3.4/17512_fehlercode_constraints.php'); require_once('dbupdate_3.4/19154_beurteilungsformulare_pruefungssenat.php'); +require_once('dbupdate_3.4/10001_tempus_mitarbeiter_kurzbz_bei_reservierungen_anzeigen.php'); // *** Pruefung und hinzufuegen der neuen Attribute und Tabellen echo '

Pruefe Tabellen und Attribute!

'; diff --git a/system/dbupdate_3.4/10001_tempus_mitarbeiter_kurzbz_bei_reservierungen_anzeigen.php b/system/dbupdate_3.4/10001_tempus_mitarbeiter_kurzbz_bei_reservierungen_anzeigen.php new file mode 100644 index 000000000..0ccf85762 --- /dev/null +++ b/system/dbupdate_3.4/10001_tempus_mitarbeiter_kurzbz_bei_reservierungen_anzeigen.php @@ -0,0 +1,130 @@ +db_query("SELECT mitarbeiter_kurzbz FROM lehre.vw_stundenplandev")) +{ + $qry = " + CREATE OR REPLACE VIEW lehre.vw_stundenplandev + (stundenplandev_id, unr, uid, lehreinheit_id, lehrfach_id, datum, stunde, ort_kurzbz, studiengang_kz, + semester, verband, gruppe, gruppe_kurzbz, titel, anmerkung, fix, lehrveranstaltung_id, stg_kurzbz, + stg_kurzbzlang, stg_bezeichnung, stg_typ, fachbereich_kurzbz, lehrfach, lehrfach_bez, farbe, lehrform, + lektor, updateamum, updatevon, insertamum, insertvon, anmerkung_lehreinheit, mitarbeiter_kurzbz) + AS + SELECT tbl_stundenplandev.stundenplandev_id, + tbl_stundenplandev.unr, + tbl_stundenplandev.mitarbeiter_uid AS uid, + tbl_stundenplandev.lehreinheit_id, + tbl_lehreinheit.lehrfach_id, + tbl_stundenplandev.datum, + tbl_stundenplandev.stunde, + tbl_stundenplandev.ort_kurzbz, + tbl_stundenplandev.studiengang_kz, + tbl_stundenplandev.semester, + tbl_stundenplandev.verband, + tbl_stundenplandev.gruppe, + tbl_stundenplandev.gruppe_kurzbz, + tbl_stundenplandev.titel, + tbl_stundenplandev.anmerkung, + tbl_stundenplandev.fix, + tbl_lehreinheit.lehrveranstaltung_id, + tbl_studiengang.kurzbz AS stg_kurzbz, + tbl_studiengang.kurzbzlang AS stg_kurzbzlang, + tbl_studiengang.bezeichnung AS stg_bezeichnung, + tbl_studiengang.typ AS stg_typ, + (SELECT tbl_fachbereich.fachbereich_kurzbz + FROM tbl_fachbereich + WHERE tbl_fachbereich.oe_kurzbz::text = lehrfach.oe_kurzbz::text) AS fachbereich_kurzbz, + lehrfach.kurzbz AS lehrfach, + lehrfach.bezeichnung AS lehrfach_bez, + lehrfach.farbe, + tbl_lehreinheit.lehrform_kurzbz AS lehrform, + tbl_mitarbeiter.kurzbz AS lektor, + tbl_stundenplandev.updateamum, + tbl_stundenplandev.updatevon, + tbl_stundenplandev.insertamum, + tbl_stundenplandev.insertvon, + tbl_lehreinheit.anmerkung AS anmerkung_lehreinheit, + tbl_mitarbeiter.kurzbz AS mitarbeiter_kurzbz + FROM lehre.tbl_stundenplandev + JOIN tbl_studiengang USING (studiengang_kz) + JOIN lehre.tbl_lehreinheit USING (lehreinheit_id) + JOIN lehre.tbl_lehrveranstaltung lehrfach ON tbl_lehreinheit.lehrfach_id = lehrfach.lehrveranstaltung_id + JOIN tbl_mitarbeiter USING (mitarbeiter_uid) + JOIN tbl_benutzer ON mitarbeiter_uid = uid + JOIN tbl_person USING(person_id); + "; + + if (!$db->db_query($qry)) + echo 'lehre.vw_stundenplandev: ' . $db->db_last_error() . '
'; + else + echo 'lehre.vw_stundenplandev: Neue Spalte mitarbeiter_kurzbz hinzugefuegt
'; +} + +// lehre.vw_stundenplan erweitern +if (!$result = @$db->db_query("SELECT mitarbeiter_kurzbz FROM lehre.vw_stundenplan")) +{ + $qry = "CREATE OR REPLACE VIEW lehre.vw_stundenplan AS + SELECT + tbl_stundenplan.stundenplan_id, tbl_stundenplan.unr, tbl_stundenplan.mitarbeiter_uid AS uid, + tbl_stundenplan.lehreinheit_id, tbl_lehreinheit.lehrfach_id AS lehrfach_id, tbl_stundenplan.datum, + tbl_stundenplan.stunde, tbl_stundenplan.ort_kurzbz, tbl_stundenplan.studiengang_kz, + tbl_stundenplan.semester, tbl_stundenplan.verband, tbl_stundenplan.gruppe, tbl_stundenplan.gruppe_kurzbz, + tbl_stundenplan.titel, tbl_stundenplan.anmerkung, tbl_stundenplan.fix, tbl_lehreinheit.lehrveranstaltung_id, + tbl_studiengang.kurzbz AS stg_kurzbz, tbl_studiengang.kurzbzlang AS stg_kurzbzlang, + tbl_studiengang.bezeichnung AS stg_bezeichnung, tbl_studiengang.typ AS stg_typ, + (SELECT fachbereich_kurzbz FROM public.tbl_fachbereich WHERE oe_kurzbz=lehrfach.oe_kurzbz) as fachbereich_kurzbz, + lehrfach.kurzbz AS lehrfach, lehrfach.bezeichnung AS lehrfach_bez, lehrfach.farbe, + tbl_lehreinheit.lehrform_kurzbz AS lehrform, tbl_mitarbeiter.kurzbz AS lektor, + tbl_stundenplan.updateamum, tbl_stundenplan.updatevon, tbl_stundenplan.insertamum, + tbl_stundenplan.insertvon, tbl_lehreinheit.anmerkung AS anmerkung_lehreinheit, + tbl_mitarbeiter.kurzbz as mitarbeiter_kurzbz + FROM lehre.tbl_stundenplan + JOIN public.tbl_studiengang USING (studiengang_kz) + JOIN lehre.tbl_lehreinheit USING (lehreinheit_id) + JOIN lehre.tbl_lehrveranstaltung as lehrfach ON (tbl_lehreinheit.lehrfach_id=lehrfach.lehrveranstaltung_id) + JOIN public.tbl_mitarbeiter USING (mitarbeiter_uid) + JOIN tbl_benutzer ON mitarbeiter_uid = uid + JOIN tbl_person USING(person_id);"; + + if (!$db->db_query($qry)) + echo 'lehre.vw_stundenplan: ' . $db->db_last_error() . '
'; + else + echo 'lehre.vw_stundenplan: Neue Spalte mitarbeiter_kurzbz hinzugefuegt
'; +} + +// campus.vw_reservierung erweitern +if (!$result = @$db->db_query("SELECT mitarbeiter_kurzbz FROM campus.vw_reservierung")) +{ + $qry = "CREATE OR REPLACE view campus.vw_reservierung + (reservierung_id, ort_kurzbz, studiengang_kz, uid, stunde, datum, titel, beschreibung, semester, verband, + gruppe, gruppe_kurzbz, stg_kurzbz, insertamum, insertvon, mitarbeiter_kurzbz) + AS + SELECT tbl_reservierung.reservierung_id, + tbl_reservierung.ort_kurzbz, + tbl_reservierung.studiengang_kz, + tbl_reservierung.uid, + tbl_reservierung.stunde, + tbl_reservierung.datum, + tbl_reservierung.titel, + tbl_reservierung.beschreibung, + tbl_reservierung.semester, + tbl_reservierung.verband, + tbl_reservierung.gruppe, + tbl_reservierung.gruppe_kurzbz, + tbl_studiengang.kurzbz AS stg_kurzbz, + tbl_reservierung.insertamum, + tbl_reservierung.insertvon, + tbl_mitarbeiter.kurzbz as mitarbeiter_kurzbz + FROM campus.tbl_reservierung + JOIN tbl_studiengang USING (studiengang_kz) + LEFT JOIN tbl_benutzer ON tbl_reservierung.uid = tbl_benutzer.uid + LEFT JOIN tbl_mitarbeiter ON tbl_benutzer.uid = tbl_mitarbeiter.mitarbeiter_uid + LEFT JOIN tbl_person USING (person_id);"; + + if (!$db->db_query($qry)) + echo 'campus.vw_reservierung: ' . $db->db_last_error() . '
'; + else + echo 'campus.vw_reservierung: Neue Spalte mitarbeiter_kurzbz hinzugefuegt
'; +} + From a63a79ab91a2a2233e974328ad0e7ff0efc327ae Mon Sep 17 00:00:00 2001 From: cgfhtw Date: Fri, 7 Apr 2023 14:10:30 +0200 Subject: [PATCH 310/646] add param tableOnly & save for multiple components on one page --- public/js/components/filter/Filter.js | 247 +++++++++++++++----------- 1 file changed, 142 insertions(+), 105 deletions(-) diff --git a/public/js/components/filter/Filter.js b/public/js/components/filter/Filter.js index e153042ad..7a46fd629 100644 --- a/public/js/components/filter/Filter.js +++ b/public/js/components/filter/Filter.js @@ -23,6 +23,8 @@ import {CoreFetchCmpt} from '../../components/Fetch.js'; const FILTER_COMPONENT_NEW_FILTER = 'Filter Component New Filter'; const FILTER_COMPONENT_NEW_FILTER_TYPE = 'Filter Component New Filter Type'; +var _uuid = 0; + /** * */ @@ -42,10 +44,12 @@ export const CoreFilterCmpt = { required: true }, tabulatorOptions: Object, - tabulatorEvents: Array + tabulatorEvents: Array, + tableOnly: Boolean }, data: function() { return { + uuid: 0, // FilterCmpt properties filterName: null, fields: null, @@ -54,7 +58,6 @@ export const CoreFilterCmpt = { selectedFields: null, notSelectedFields: null, filterFields: null, - columnsAlias: null, availableFilters: null, @@ -64,104 +67,136 @@ export const CoreFilterCmpt = { fetchCmptApiFunctionParams: null, fetchCmptDataFetched: null, - tabulator: null + tabulator: null, + tableBuilt: false }; }, - created: function() { - this.getFilter(); // get the filter data - }, - updated: function() { - // - let dataset = JSON.parse(JSON.stringify(this.dataset)); - let fields = JSON.parse(JSON.stringify(this.fields)); - let selectedFields = JSON.parse(JSON.stringify(this.selectedFields)); + computed: { + filteredData() { + if (!this.dataset) + return []; + return JSON.parse(JSON.stringify(this.dataset)); + }, + filteredColumns() { + let fields = JSON.parse(JSON.stringify(this.fields)) || []; + let selectedFields = JSON.parse(JSON.stringify(this.selectedFields)) || []; - // - let columns = null; + let columns = null; - // If the tabulator options has been provided and it contains the property columns - if (this.tabulatorOptions != null && this.tabulatorOptions.hasOwnProperty('columns')) - { - columns = this.tabulatorOptions.columns; - } + // If the tabulator options has been provided and it contains the property columns + if (this.tabulatorOptions && this.tabulatorOptions.hasOwnProperty('columns')) + columns = this.tabulatorOptions.columns; - // If columns is not an array or it is an array with less elements then the array fields - if (!Array.isArray(columns) || (Array.isArray(columns) && columns.length < fields.length)) - { - columns = []; // set it as an empty array - - // Loop throught all the retrieved columns from database - for (let i = 0; i < fields.length; i++) + // If columns is not an array or it is an array with less elements then the array fields + if (!Array.isArray(columns) || (Array.isArray(columns) && columns.length < fields.length)) { - // Create a new column having the title equal to the field name - let column = { - title: fields[i], - field: fields[i] - }; + columns = []; // set it as an empty array - // If the column has to be displayed or not - selectedFields.indexOf(fields[i]) >= 0 ? column.visible = true : column.visible = false; - - // Add the new column to the list of columns - columns.push(column); - } - } - else // the property columns has been provided in the tabulator options - { - // Loop throught the property columns of the tabulator options - for (let i = 0; i < columns.length; i++) - { - // If the column has to be displayed or not - selectedFields.indexOf(columns[i].field) >= 0 ? columns[i].visible = true : columns[i].visible = false; - - if (columns[i].hasOwnProperty('resizable')) + // Loop throught all the retrieved columns from database + for (let field of fields) { - columns[i].visible ? columns[i].resizable = true : columns[i].resizable = false; - } + // Create a new column having the title equal to the field name + let column = { + title: field, + field: field + }; + + // If the column has to be displayed or not + column.visible = selectedFields.indexOf(field) >= 0; + + // Add the new column to the list of columns + columns.push(column); + } } - } - - this.columnsAlias = columns; - - // Define a default tabulator options in case it was not provided - let tabulatorOptions = { - height: 500, - layout: "fitColumns", - movableColumns: true, - reactiveData: true, - columns: columns, - data: JSON.parse(JSON.stringify(this.dataset)) - }; - - // If it was provided - if (this.tabulatorOptions != null) - { - // Then copy it... - tabulatorOptions = this.tabulatorOptions; - // ...and overwrite the properties data, reactiveData, movableColumns and columns - tabulatorOptions.data = JSON.parse(JSON.stringify(this.dataset)); - tabulatorOptions.columns = columns; - tabulatorOptions.reactiveData = true; - tabulatorOptions.movableColumns = true; - } - - // Start the tabulator with the buid options - this.tabulator = new Tabulator( - "#filterTableDataset", - tabulatorOptions - ); - - // If event handlers have been provided - if (Array.isArray(this.tabulatorEvents) && this.tabulatorEvents.length > 0) - { - // Attach all the provided event handlers to the started tabulator - for (let i = 0; i < this.tabulatorEvents.length; i++) + else // the property columns has been provided in the tabulator options { - this.tabulator.on(this.tabulatorEvents[i].event, this.tabulatorEvents[i].handler); + // Loop throught the property columns of the tabulator options + for (let col of columns) + { + // If the column has to be displayed or not + col.visible = selectedFields.indexOf(col.field) >= 0; + + if (col.hasOwnProperty('resizable')) + col.resizable = col.visible; + } } + + return columns; + }, + fieldNames() { + if (!this.tableBuilt) + return {}; + return this.tabulator.getColumns().reduce((res, col) => { + res[col.getField()] = col.getDefinition().title; + return res; + }, {}); + }, + idExtra() { + if (!this.uuid) + return ''; + return '-' + this.uuid; } }, + beforeCreate() { + if (!this.tableOnly == !this.filterType) + console.warn('You can not have a filter-type in table-only mode!'); + }, + created() { + this.uuid = _uuid++; + if (!this.tableOnly) + this.getFilter(); // get the filter data + }, + mounted() { + this.initTabulator(); + }, methods: { + initTabulator() { + // Define a default tabulator options in case it was not provided + let tabulatorOptions = {...{ + height: 500, + layout: "fitColumns", + movableColumns: true, + reactiveData: true + }, ...(this.tabulatorOptions || {})}; + + if (!this.tableOnly) { + tabulatorOptions.data = this.filteredData; + tabulatorOptions.columns = this.filteredColumns; + } + + // Start the tabulator with the build options + this.tabulator = new Tabulator( + this.$refs.table, + tabulatorOptions + ); + // If event handlers have been provided + if (Array.isArray(this.tabulatorEvents) && this.tabulatorEvents.length > 0) + { + // Attach all the provided event handlers to the started tabulator + for (let evt of this.tabulatorEvents) + this.tabulator.on(evt.event, evt.handler); + } + this.tabulator.on('tableBuilt', () => this.tableBuilt = true); + if (this.tableOnly) { + this.tabulator.on('tableBuilt', () => { + const cols = this.tabulator.getColumns(); + this.fields = cols.map(col => col.getField()); + this.selectedFields = cols.filter(col => col.isVisible()).map(col => col.getField()); + }); + } + }, + updateTabulator() { + if (this.tabulator) { + if (this.tableBuilt) + this._updateTabulator(); + else + this.tabulator.on('tableBuilt', this._updateTabulator); + } + }, + _updateTabulator() { + this.tabulator.setData(this.filteredData); + this.tabulator.setColumns(this.filteredColumns); + }, /** * */ @@ -209,6 +244,7 @@ export const CoreFilterCmpt = { { this.setDropDownMenu(data); } + this.updateTabulator(); } else { @@ -335,7 +371,7 @@ export const CoreFilterCmpt = { this.startFetchCmpt( CoreFilterAPIs.saveCustomFilter, { - customFilterName: document.getElementById('customFilterName').value + customFilterName: this.$refscustomFilterName.value }, this.getFilter ); @@ -463,22 +499,22 @@ export const CoreFilterCmpt = { /* * */ - handlerToggleSelectedField: function(event) { + handlerToggleSelectedField(field) { // If it is a selected field - if (this.selectedFields.indexOf(event.target.innerText) != -1) + if (this.selectedFields.indexOf(field) != -1) { // then hide it - this.tabulator.hideColumn(event.target.innerText); + this.tabulator.hideColumn(field); // and remove it from the this.selectedFields property - this.selectedFields.splice(this.selectedFields.indexOf(event.target.innerText), 1); + this.selectedFields.splice(this.selectedFields.indexOf(field), 1); } else // otherwise { // show it - this.tabulator.showColumn(event.target.innerText); + this.tabulator.showColumn(field); // and add it to the this.selectedFields property - this.selectedFields.push(event.target.innerText); + this.selectedFields.push(field); } }, /** @@ -527,6 +563,7 @@ export const CoreFilterCmpt = { template: `
-
+
- [ {{ filterName }} ] - - + [ {{ filterName }} ] + +
-
+
@@ -558,9 +595,9 @@ export const CoreFilterCmpt = {
- {{ fieldToDisplay }} + {{ fieldNames[fieldToDisplay] || fieldToDisplay }}
@@ -568,7 +605,7 @@ export const CoreFilterCmpt = {
-
+
@@ -591,7 +628,7 @@ export const CoreFilterCmpt = {
-
+
+ - diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index aa16ea77b..442ef7f81 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -20666,6 +20666,26 @@ array( ) ) ), + array( + 'app' => 'core', + 'category' => 'studierendenantrag', + 'phrase' => 'mail_part_grund', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => '

Grund:

{grund}

', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => '

Reason:

{grund}

', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'core', 'category' => 'studierendenantrag', From 02b64ad6a7c8690e95dc9b88166ca1443ee6f8ce Mon Sep 17 00:00:00 2001 From: cgfhtw Date: Tue, 25 Jul 2023 13:59:18 +0200 Subject: [PATCH 464/646] =?UTF-8?q?Assistenz=20kann=20eigene=20Abmeldungen?= =?UTF-8?q?=20Zur=C3=BCckziehen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/libraries/AntragLib.php | 3 +-- .../components/Studierendenantrag/Leitung.js | 20 +++++++++++++++++++ .../Studierendenantrag/Leitung/Table.js | 11 +++++++++- 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/application/libraries/AntragLib.php b/application/libraries/AntragLib.php index a04a03d84..0b5ec1957 100644 --- a/application/libraries/AntragLib.php +++ b/application/libraries/AntragLib.php @@ -1627,8 +1627,7 @@ class AntragLib if ($antrag->typ != Studierendenantrag_model::TYP_ABMELDUNG_STGL) return $this->isOwnAntrag($antrag_id); - // TODO(chris): assistenz can not cancel - should they be able to? - return false; + return $this->hasAccessToAntrag($antrag_id, 'student/studierendenantrag'); } /** diff --git a/public/js/components/Studierendenantrag/Leitung.js b/public/js/components/Studierendenantrag/Leitung.js index 2b2a53d61..747ad7123 100644 --- a/public/js/components/Studierendenantrag/Leitung.js +++ b/public/js/components/Studierendenantrag/Leitung.js @@ -267,6 +267,25 @@ export default { .then(this.showValidation) .catch(this.showError); }, + actionCancel(evt) { + var antraege = evt || this.selectedData; + this.$refs.loader.show(); + axios + .all( + antraege.map( + antrag => axios.post( + FHC_JS_DATA_STORAGE_OBJECT.app_root + + FHC_JS_DATA_STORAGE_OBJECT.ci_router + + '/components/Antrag/Abmeldung/cancelAntrag/', + { + antrag_id: antrag.studierendenantrag_id + } + ) + ) + ) + .then(this.showValidation) + .catch(this.showError); + }, showValidation(results) { var errors = results.filter(res => res.data.error); this.$refs.loader.hide(); @@ -327,6 +346,7 @@ export default { @action:object="actionObject" @action:objectionDeny="actionoObjectionDeny" @action:objectionApprove="actionObjectionApprove" + @action:cancel="actionCancel" > diff --git a/public/js/components/Studierendenantrag/Leitung/Table.js b/public/js/components/Studierendenantrag/Leitung/Table.js index cb469ee57..ba665c6f9 100644 --- a/public/js/components/Studierendenantrag/Leitung/Table.js +++ b/public/js/components/Studierendenantrag/Leitung/Table.js @@ -25,7 +25,8 @@ export default { 'action:reopen', 'action:object', 'action:objectionDeny', - 'action:objectionApprove' + 'action:objectionApprove', + 'action:cancel' ], data() { return { @@ -272,6 +273,14 @@ export default { }; container.append(button); } + // NOTE(chris): Cancel + if (data.typ == 'AbmeldungStgl' && data.status == 'Erstellt') { + let button = document.createElement('button'); + button.innerHTML = this.p.t('studierendenantrag', 'btn_cancel'); + button.className = "btn btn-outline-secondary"; + button.addEventListener('click',() => this.$emit('action:cancel', [cell.getData()])); + container.append(button); + } } if (this.stgL.includes(data.studiengang_kz)) { From 91f79b202186032d9404f5edf4f38aa510268ed6 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Wed, 26 Jul 2023 13:27:51 +0200 Subject: [PATCH 465/646] - aufgenommen filter infocenter fuer lehrgaenge --- .../system/infocenter/InfoCenter.php | 31 +++++- .../infocenter/infocenterAufgenommen.php | 50 ++++++++++ .../infocenter/infocenterAufgenommenData.php | 95 +++++++++++++++++++ system/filtersupdate.php | 21 ++++ 4 files changed, 196 insertions(+), 1 deletion(-) create mode 100644 application/views/system/infocenter/infocenterAufgenommen.php create mode 100644 application/views/system/infocenter/infocenterAufgenommenData.php diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index 548b071d3..e6d307322 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -21,6 +21,7 @@ class InfoCenter extends Auth_Controller const FREIGEGEBEN_PAGE = 'freigegeben'; const REIHUNGSTESTABSOLVIERT_PAGE = 'reihungstestAbsolviert'; const ABGEWIESEN_PAGE = 'abgewiesen'; + const AUFGENOMMEN_PAGE = 'aufgenommen'; const SHOW_DETAILS_PAGE = 'showDetails'; const SHOW_ZGV_DETAILS_PAGE = 'showZGVDetails'; const ZGV_UBERPRUEFUNG_PAGE = 'ZGVUeberpruefung'; @@ -115,6 +116,7 @@ class InfoCenter extends Auth_Controller 'index' => 'infocenter:r', 'freigegeben' => 'infocenter:r', 'abgewiesen' => 'infocenter:r', + 'aufgenommen' => 'infocenter:r', 'reihungstestAbsolviert' => 'infocenter:r', 'showDetails' => 'infocenter:r', 'showZGVDetails' => 'lehre/zgvpruefung:r', @@ -228,6 +230,16 @@ class InfoCenter extends Auth_Controller $this->load->view('system/infocenter/infocenterAbgewiesen.php'); } + + /** + * Aufgenommene page of the InfoCenter tool + */ + public function aufgenommen() + { + $this->_setNavigationMenu(self::AUFGENOMMEN_PAGE); // define the navigation menu for this page + + $this->load->view('system/infocenter/infocenterAufgenommen.php'); + } /** * @@ -1526,6 +1538,7 @@ class InfoCenter extends Auth_Controller $freigegebenLink = site_url(self::INFOCENTER_URI.'/'.self::FREIGEGEBEN_PAGE); $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); $currentFilterId = $this->input->get(self::FILTER_ID); if (isset($currentFilterId)) @@ -1533,6 +1546,7 @@ class InfoCenter extends Auth_Controller $freigegebenLink .= '?'.self::PREV_FILTER_ID.'='.$currentFilterId; $reihungstestAbsolviertLink .= '?'.self::PREV_FILTER_ID.'='.$currentFilterId; $abgewiesenLink .= '?'.self::PREV_FILTER_ID.'='.$currentFilterId; + $aufgenommenLink .= '?'.self::PREV_FILTER_ID.'='.$currentFilterId; } $this->navigationlib->setSessionMenu( @@ -1583,7 +1597,19 @@ class InfoCenter extends Auth_Controller null, // subscriptLinkValue '', // target 30 // sort - ) + ), + 'aufgenommen' => $this->navigationlib->oneLevel( + 'Aufgenommene', // description + $aufgenommenLink, // link + null, // children + 'check', // icon + null, // subscriptDescription + false, // expand + null, // subscriptLinkClass + null, // subscriptLinkValue + '', // target + 40 // sort + ), ) ); } @@ -1611,6 +1637,9 @@ class InfoCenter extends Auth_Controller if ($origin_page === self::ABGEWIESEN_PAGE) $link = site_url(self::INFOCENTER_URI.'/'.self::ABGEWIESEN_PAGE); + if ($origin_page === self::AUFGENOMMEN_PAGE) + $link = site_url(self::INFOCENTER_URI.'/'.self::AUFGENOMMEN_PAGE); + $prevFilterId = $this->input->get(self::PREV_FILTER_ID); if (isset($prevFilterId)) { diff --git a/application/views/system/infocenter/infocenterAufgenommen.php b/application/views/system/infocenter/infocenterAufgenommen.php new file mode 100644 index 000000000..6d65c0f7c --- /dev/null +++ b/application/views/system/infocenter/infocenterAufgenommen.php @@ -0,0 +1,50 @@ +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'), + 'global' => array('mailAnXversandt'), + '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/infocenterPersonDataset.js') + ) + ); +?> + + +
+ + widgetlib->widget('NavigationWidget'); ?> + +
+
+
+
+ +
+
+
+ load->view('system/infocenter/infocenterAufgenommenData.php'); ?> +
+
+
+
+ + +load->view('templates/FHC-Footer'); ?> diff --git a/application/views/system/infocenter/infocenterAufgenommenData.php b/application/views/system/infocenter/infocenterAufgenommenData.php new file mode 100644 index 000000000..720d118e3 --- /dev/null +++ b/application/views/system/infocenter/infocenterAufgenommenData.php @@ -0,0 +1,95 @@ +config->load('infocenter'); + $AUFGENOMMENER_STATUS = '\'Aufgenommener\''; + $REJECTED_STATUS = '\'Abgewiesener\''; + $STUDIENGANG_TYP = '\'l\''; + $STUDIENSEMESTER = '\''.$this->variablelib->getVar('infocenter_studiensemester').'\''; + $LOGDATA_NAME = '\'Message sent\''; + $LOGDATA_VON = '\'online\''; + +$query = ' + SELECT + p.person_id AS "PersonId", + p.vorname AS "Vorname", + p.nachname AS "Nachname", + ( + SELECT ARRAY_TO_STRING(ARRAY_AGG(DISTINCT UPPER(sg.typ) || UPPER(sg.kurzbz)), \', \') + FROM public.tbl_prestudentstatus pss + JOIN public.tbl_prestudent ps USING(prestudent_id) + JOIN public.tbl_studiengang sg USING(studiengang_kz) + WHERE + pss.status_kurzbz = '. $AUFGENOMMENER_STATUS .' + AND ps.person_id = p.person_id + AND sg.typ IN ('.$STUDIENGANG_TYP.') + AND pss.studiensemester_kurzbz = '.$STUDIENSEMESTER.' + AND NOT EXISTS ( + SELECT 1 + FROM tbl_prestudentstatus spss + WHERE spss.prestudent_id = pss.prestudent_id + AND spss.status_kurzbz = '. $REJECTED_STATUS .' + AND spss.studiensemester_kurzbz IN ( + SELECT ss.studiensemester_kurzbz FROM public.tbl_studiensemester ss WHERE ss.ende > + (SELECT start FROM public.tbl_studiensemester sss WHERE studiensemester_kurzbz = '. $STUDIENSEMESTER .')) + ) + LIMIT 1 + ) AS "Studiengang" + FROM + public.tbl_person p + WHERE + EXISTS ( + SELECT 1 + FROM public.tbl_prestudent sps + JOIN public.tbl_studiengang ssg USING(studiengang_kz) + WHERE sps.person_id = p.person_id + AND ssg.typ IN (' . $STUDIENGANG_TYP . ') + AND ' . $AUFGENOMMENER_STATUS . ' = ( + SELECT spss.status_kurzbz + FROM public.tbl_prestudentstatus spss + WHERE spss.prestudent_id = sps.prestudent_id + ORDER BY spss.datum DESC, spss.insertamum DESC, spss.ext_id DESC + LIMIT 1 + ) + AND EXISTS ( + SELECT 1 + FROM tbl_prestudentstatus spss + WHERE spss.prestudent_id = sps.prestudent_id + AND spss.status_kurzbz = ' . $AUFGENOMMENER_STATUS . ' + AND spss.studiensemester_kurzbz = ' . $STUDIENSEMESTER . ' + ) + ) + + '; + + $filterWidgetArray = array( + 'query' => $query, + 'app' => InfoCenter::APP, + 'datasetName' => 'aufgenommen', + '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('lehre', 'studiengang')) + ), + + 'formatRow' => function($datasetRaw) + { + $datasetRaw->{'Details'} = sprintf( + 'Details', + site_url('system/infocenter/InfoCenter/showDetails'), + $datasetRaw->{'PersonId'}, + 'aufgenommen', + (isset($_GET['fhc_controller_id']) ? $_GET['fhc_controller_id'] : ''), + (isset($_GET['filter_id']) ? $_GET['filter_id'] : '') + ); + return $datasetRaw; + } + ); + + echo $this->widgetlib->widget('FilterWidget', $filterWidgetArray); +?> diff --git a/system/filtersupdate.php b/system/filtersupdate.php index 241e44f2f..9f2b2c8e4 100644 --- a/system/filtersupdate.php +++ b/system/filtersupdate.php @@ -527,6 +527,27 @@ $filters = array( ', 'oe_kurzbz' => null, ), + array( + 'app' => 'infocenter', + 'dataset_name' => 'aufgenommen', + 'filter_kurzbz' => 'InfoCenterAufgenommenAlle', + 'description' => '{Alle}', + 'sort' => 1, + 'default_filter' => true, + 'filter' => ' + { + "name": "Aufgenommen - Alle", + "columns": [ + {"name": "PersonId"}, + {"name": "Vorname"}, + {"name": "Nachname"}, + {"name": "Studiengang"} + ], + "filters": [] + } + ', + 'oe_kurzbz' => null, + ), array( 'app' => 'budget', 'dataset_name' => 'budgetoverview', From 459f06876576954c023f8e317bea52d858829f14 Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Wed, 26 Jul 2023 20:59:05 +0200 Subject: [PATCH 466/646] bismeldestichtag gui: added icon to delete button, added id field --- public/js/apps/Bismeldestichtag/TabulatorSetup.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/public/js/apps/Bismeldestichtag/TabulatorSetup.js b/public/js/apps/Bismeldestichtag/TabulatorSetup.js index b7da6c1e1..ffc8a6e3a 100644 --- a/public/js/apps/Bismeldestichtag/TabulatorSetup.js +++ b/public/js/apps/Bismeldestichtag/TabulatorSetup.js @@ -22,14 +22,18 @@ export const BismeldestichtagTabulatorOptions = { maxHeight: "100%", minHeight: 50, layout: 'fitColumns', + index: 'meldestichtag_id', columns: [ {title: 'Meldestichtag',field: 'meldestichtag', headerFilter: true, formatter: function(cell){ return BismeldestichtagTabulatorHelperFunctions._formatDate(cell.getValue()); } }, {title: 'Studiensemester', field: 'studiensemester_kurzbz', headerFilter: true}, - {title: 'Löschen', field: 'meldestichtag_id', headerFilter: false, formatter:function(cell){ - return ''; + {title: 'ID', field: 'meldestichtag_id', headerFilter: true, visible: false}, + {title: 'Löschen', field: 'loeschen', headerFilter: false, formatter:function(cell){ + return ''; } } ] @@ -42,8 +46,7 @@ export const BismeldestichtagTabulatorEventHandlers = [ { event: "rowClick", handler: function(e, row) { - if (e.target.nodeName == 'DIV') - { + if (e.target.nodeName == 'DIV') { let data = row.getData(); alert(data.studiensemester_kurzbz + ': ' + BismeldestichtagTabulatorHelperFunctions._formatDate(data.meldestichtag)); } @@ -52,7 +55,7 @@ export const BismeldestichtagTabulatorEventHandlers = [ ]; let BismeldestichtagTabulatorHelperFunctions = { - _formatDate: function(date){ + _formatDate: function(date) { return date.replace(/(.*)-(.*)-(.*)/, '$3.$2.$1'); } } From 1e082ed22524780673b41dee60bc02c1673c6052 Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Thu, 27 Jul 2023 17:13:31 +0200 Subject: [PATCH 467/646] UHSTAT1 form: removed geburtsnation as it is saved in person table anyways, started to display existing uhstat data on form load --- application/controllers/codex/UHSTAT1.php | 73 ++++++++++++++------ application/models/codex/Abschluss_model.php | 8 ++- application/views/codex/uhstat1.php | 58 +++++----------- system/phrasesupdate.php | 40 ----------- 4 files changed, 73 insertions(+), 106 deletions(-) diff --git a/application/controllers/codex/UHSTAT1.php b/application/controllers/codex/UHSTAT1.php index 7deeb9eea..d0663c570 100644 --- a/application/controllers/codex/UHSTAT1.php +++ b/application/controllers/codex/UHSTAT1.php @@ -8,6 +8,17 @@ class UHSTAT1 extends FHC_Controller const LOWER_BOUNDARY_YEARS = 160; const UPPER_BOUNDARY_YEARS = 20; + private $_uhstat1Fields = array( + 'mutter_geburtsstaat' => array('name' => 'Geburtsstaat Mutter', 'rules' => array('required')), + 'mutter_geburtsjahr' => array('name' => 'Geburtsjahr Mutter', 'rules' => array('required')), + 'mutter_bildungsstaat' => array('name' => 'Bildungsstaat Mutter', 'rules' => array('required')), + 'mutter_bildungmax' => array('name' => 'Geburtsjahr Mutter', 'rules' => array('required')), + 'vater_geburtsstaat' => array('name' => 'Geburtsstaat Vater', 'rules' => array('required')), + 'vater_geburtsjahr', + 'vater_bildungsstaat', + 'vater_bildungmax' + ); + public function __construct() { parent::__construct( @@ -40,13 +51,17 @@ class UHSTAT1 extends FHC_Controller public function index() { - $formData = $this->_getFormData(); + $formMetaData = $this->_getFormMetaData(); - if (isError($formData)) show_error(getError($formData)); + if (isError($formMetaData)) show_error(getError($formMetaData)); - if (!hasData($formData)) show_error("No form data could be loaded"); + if (!hasData($formMetaData)) show_error("No form meta data could be loaded"); - $this->load->view("codex/uhstat1.php", array('formData' => getData($formData))); + $uhstatData = $this->_getUHSTAT1Data(); + + if (isError($uhstatData)) show_error(getError($uhstatData)); + + $this->load->view("codex/uhstat1.php", array('formMetaData' => getData($formMetaData), 'uhstatData' => getData($uhstatData))); } /** @@ -61,7 +76,6 @@ class UHSTAT1 extends FHC_Controller $this->form_validation->set_error_delimiters('', ''); // check required fields - $this->form_validation->set_rules('geburtsstaat', 'Geburtsstaat', 'required', array('required' => $this->p->t('uhstat', 'angabeFehlt'))); $this->form_validation->set_rules( 'mutter_geburtsstaat', 'Geburtsstaat Mutter', @@ -171,11 +185,11 @@ class UHSTAT1 extends FHC_Controller } } - $formData = $this->_getFormData(); + $formMetaData = $this->_getFormMetaData(); - if (isError($formData)) show_error(getError($formData)); + if (isError($formMetaData)) show_error(getError($formMetaData)); - if (!hasData($formData)) show_error("No form data could be loaded"); + if (!hasData($formMetaData)) show_error("No form data could be loaded"); // pass success/error messages to view $successMessage = isset($uhstat1datenRes) && isSuccess($uhstat1datenRes) ? $this->p->t('uhstat', 'erfolgreichGespeichert') : ''; @@ -183,7 +197,7 @@ class UHSTAT1 extends FHC_Controller // load view with form data $this->load->view("codex/uhstat1.php", array( - 'formData' => getData($formData), + 'formMetaData' => getData($formMetaData), 'successMessage' => $successMessage, 'errorMessage' => $errorMessage )); @@ -227,22 +241,23 @@ class UHSTAT1 extends FHC_Controller /** * Gets initial data needed to display UHSTAT1 form. */ - private function _getFormData() + private function _getFormMetaData() { $person_id = $this->input->get('person_id'); if (!isset($person_id) || !is_numeric($person_id)) return error("Person Id missing"); - $formData = array( + $languageIdx = $this->_getLanguageIndex(); + + $formMetaData = array( 'nation' => array(), 'abschluss_oesterreich' => array(), 'abschluss_nicht_oesterreich' => array(), 'jahre' => array(), - 'languageIdx' => $this->_getLanguageIndex(), 'person_id' => $person_id ); - $nationTextFieldName = $formData['languageIdx'] == 1 ? 'langtext' : 'engltext'; + $nationTextFieldName = $languageIdx == 1 ? 'langtext' : 'engltext'; // get nation list $this->load->model('codex/Nation_model', 'NationModel'); @@ -253,10 +268,10 @@ class UHSTAT1 extends FHC_Controller if (isError($nationRes)) return $nationRes; - if (hasData($nationRes)) $formData['nation'] = getData($nationRes); + if (hasData($nationRes)) $formMetaData['nation'] = getData($nationRes); // get abschluss list - $abschlussRes = $this->AbschlussModel->getActiveAbschluesse(); + $abschlussRes = $this->AbschlussModel->getActiveAbschluesse($languageIdx); if (isError($abschlussRes)) return $abschlussRes; @@ -267,22 +282,38 @@ class UHSTAT1 extends FHC_Controller foreach (getData($abschlussRes) as $abschluss) { if ($abschluss->in_oesterreich === true) - $formData['abschluss_oesterreich'][] = $abschluss; + $formMetaData['abschluss_oesterreich'][] = $abschluss; elseif ($abschluss->in_oesterreich === false) - $formData['abschluss_nicht_oesterreich'][] = $abschluss; + $formMetaData['abschluss_nicht_oesterreich'][] = $abschluss; else { - $formData['abschluss_oesterreich'][] = $abschluss; - $formData['abschluss_nicht_oesterreich'][] = $abschluss; + $formMetaData['abschluss_oesterreich'][] = $abschluss; + $formMetaData['abschluss_nicht_oesterreich'][] = $abschluss; } } } // get realistic birth years, dated back from current year $currYear = date("Y"); - $formData['jahre'] = range($currYear - self::UPPER_BOUNDARY_YEARS, $currYear - self::LOWER_BOUNDARY_YEARS); + $formMetaData['jahre'] = range($currYear - self::UPPER_BOUNDARY_YEARS, $currYear - self::LOWER_BOUNDARY_YEARS); - return success($formData); + return success($formMetaData); + } + + /** + * Gets initial data needed to display UHSTAT1 form. + */ + private function _getUHSTAT1Data() + { + $person_id = $this->input->get('person_id'); + + if (!isset($person_id) || !is_numeric($person_id)) return error("Person Id missing"); + + $this->Uhstat1datenModel->addSelect(" + mutter_geburtsstaat, mutter_geburtsjahr, mutter_bildungsstaat, mutter_bildungmax, + vater_geburtsstaat, vater_geburtsjahr, vater_bildungsstaat, vater_bildungmax" + ); + return $this->Uhstat1datenModel->loadWhere(array('person_id' => $person_id)); } /** diff --git a/application/models/codex/Abschluss_model.php b/application/models/codex/Abschluss_model.php index 93b940ed2..2907deff1 100644 --- a/application/models/codex/Abschluss_model.php +++ b/application/models/codex/Abschluss_model.php @@ -12,17 +12,19 @@ class Abschluss_model extends DB_Model $this->pk = 'ausbildung_code'; } - public function getActiveAbschluesse() + public function getActiveAbschluesse($languageIndex) { return $this->execQuery( ' SELECT - ausbildung_code, bezeichnung, in_oesterreich + ausbildung_code, bezeichnung[?], in_oesterreich FROM bis.tbl_abschluss WHERE aktiv - ORDER BY CASE WHEN in_oesterreich THEN 0 ELSE 1 END, ausbildung_code' + ORDER BY + CASE WHEN in_oesterreich THEN 0 ELSE 1 END, ausbildung_code', + array($languageIndex) ); } } diff --git a/application/views/codex/uhstat1.php b/application/views/codex/uhstat1.php index 918364cf6..c670373d0 100644 --- a/application/views/codex/uhstat1.php +++ b/application/views/codex/uhstat1.php @@ -23,34 +23,7 @@ $this->load->view( p->t('uhstat', 'uhstat1AnmeldungEinleitungstext') ?>


-
-
- p->t('uhstat', 'persoenlicheAngaben') ?> -

- p->t('uhstat', 'persoenlicheAngabenEinleitungstext') ?> -

-
- -
- - -
-
-
-
+
p->t('uhstat', 'angabenErziehungsberechtigte') ?>

@@ -63,7 +36,7 @@ $this->load->view(

- +