diff --git a/application/controllers/jobs/IssueResolver.php b/application/controllers/jobs/IssueResolver.php new file mode 100755 index 000000000..17c4cb9ce --- /dev/null +++ b/application/controllers/jobs/IssueResolver.php @@ -0,0 +1,28 @@ + class (library) name for resolving + $this->_codeLibMappings = array( + 'CORE_ZGV_0001' => 'CORE_ZGV_0001', + 'CORE_ZGV_0002' => 'CORE_ZGV_0002', + 'CORE_ZGV_0003' => 'CORE_ZGV_0003', + 'CORE_ZGV_0004' => 'CORE_ZGV_0004', + 'CORE_ZGV_0005' => 'CORE_ZGV_0005', + 'CORE_INOUT_0001' => 'CORE_INOUT_0001', + 'CORE_INOUT_0002' => 'CORE_INOUT_0002', + 'CORE_INOUT_0003' => 'CORE_INOUT_0003', + 'CORE_INOUT_0004' => 'CORE_INOUT_0004', + 'CORE_INOUT_0005' => 'CORE_INOUT_0005', + 'CORE_INOUT_0006' => 'CORE_INOUT_0006' + ); + } +} diff --git a/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php b/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php index 8e1b601aa..28edf4824 100644 --- a/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php +++ b/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php @@ -22,8 +22,8 @@ class approveAnrechnungDetail extends Auth_Controller // Set required permissions parent::__construct( array( - 'index' => 'lehre/anrechnung_genehmigen:rw', - 'download' => 'lehre/anrechnung_genehmigen:rw', + 'index' => 'lehre/anrechnung_genehmigen:r', + 'download' => 'lehre/anrechnung_genehmigen:r', 'approve' => 'lehre/anrechnung_genehmigen:rw', 'reject' => 'lehre/anrechnung_genehmigen:rw', 'requestRecommendation' => 'lehre/anrechnung_genehmigen:rw', @@ -81,7 +81,7 @@ class approveAnrechnungDetail extends Auth_Controller } // Check if user is entitled to read the Anrechnung - self::_checkIfEntitledToReadAnrechnung($anrechnung_id); + $this->_checkIfEntitledToReadAnrechnung($anrechnung_id); // Get Anrechung data $anrechnungData = $this->anrechnunglib->getAnrechnungData($anrechnung_id); @@ -99,11 +99,16 @@ class approveAnrechnungDetail extends Auth_Controller // Get Genehmigung data $genehmigungData = $this->anrechnunglib->getGenehmigungData($anrechnung_id); + $hasReadOnlyAccess = + $this->permissionlib->isBerechtigt(self::BERECHTIGUNG_ANRECHNUNG_GENEHMIGEN, 's', $antragData->studiengang_kz) + && !$this->permissionlib->isBerechtigt(self::BERECHTIGUNG_ANRECHNUNG_GENEHMIGEN, 'suid', $antragData->studiengang_kz); + $viewData = array( 'antragData' => $antragData, 'anrechnungData' => $anrechnungData, 'empfehlungData' => $empfehlungData, - 'genehmigungData' => $genehmigungData + 'genehmigungData' => $genehmigungData, + 'hasReadOnlyAccess' => $hasReadOnlyAccess ); $this->load->view('lehre/anrechnung/approveAnrechnungDetail.php', $viewData); @@ -385,7 +390,7 @@ class approveAnrechnungDetail extends Auth_Controller } // Check if user is entitled to read dms doc - self::_checkIfEntitledToReadDMSDoc($dms_id); + $this->_checkIfEntitledToReadDMSDoc($dms_id); // Set filename to be used on downlaod $filename = $this->anrechnunglib->setFilenameOnDownload($dms_id); @@ -421,26 +426,13 @@ class approveAnrechnungDetail extends Auth_Controller 'lehrveranstaltung_id' => getData($result)[0]->lehrveranstaltung_id )); - if(!hasData($result)) - { - show_error('Failed loading Lehrveranstaltung'); - } + $studiengang_kz = getData($result)[0]->studiengang_kz; - // Get STGL - $result = $this->StudiengangModel->getLeitung(getData($result)[0]->studiengang_kz); - - if (hasData($result)) - { - foreach (getData($result) as $stgl) - { - if ($stgl->uid == $this->_uid) - { - return; - } - } - } - - show_error('You are not entitled to read this Anrechnung'); + // Check if user is entitled + if (!$this->permissionlib->isBerechtigt(self::BERECHTIGUNG_ANRECHNUNG_GENEHMIGEN, 's', $studiengang_kz)) + { + show_error('You are not entitled to read this page'); + } } /** @@ -460,23 +452,13 @@ class approveAnrechnungDetail extends Auth_Controller 'lehrveranstaltung_id' => $result->lehrveranstaltung_id )); - if(!$result = getData($result)[0]) - { - show_error('Failed loading Lehrveranstaltung'); - } + $studiengang_kz = getData($result)[0]->studiengang_kz; - // Get STGL - $result = $this->StudiengangModel->getLeitung($result->studiengang_kz); - - if($result = getData($result)[0]) - { - if ($result->uid == $this->_uid) - { - return; - } - } - - show_error('You are not entitled to read this document'); + // Check if user is entitled + if (!$this->permissionlib->isBerechtigt(self::BERECHTIGUNG_ANRECHNUNG_GENEHMIGEN, 's', $studiengang_kz)) + { + show_error('You are not entitled to read this document'); + } } /** diff --git a/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php b/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php index 25c802caf..053988848 100644 --- a/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php +++ b/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php @@ -5,7 +5,8 @@ if (! defined('BASEPATH')) exit('No direct script access allowed'); class approveAnrechnungUebersicht extends Auth_Controller { const BERECHTIGUNG_ANRECHNUNG_GENEHMIGEN = 'lehre/anrechnung_genehmigen'; - + const BERECHTIGUNG_ANRECHNUNG_ANLEGEN = 'lehre/anrechnung_anlegen'; + const REVIEW_ANRECHNUNG_URI = '/lehre/anrechnung/ReviewAnrechnungUebersicht'; const ANRECHNUNGSTATUS_PROGRESSED_BY_STGL = 'inProgressDP'; @@ -19,8 +20,8 @@ class approveAnrechnungUebersicht extends Auth_Controller // Set required permissions parent::__construct( array( - 'index' => 'lehre/anrechnung_genehmigen:rw', - 'download' => 'lehre/anrechnung_genehmigen:rw', + 'index' => 'lehre/anrechnung_genehmigen:r', + 'download' => 'lehre/anrechnung_genehmigen:r', 'approve' => 'lehre/anrechnung_genehmigen:rw', 'reject' => 'lehre/anrechnung_genehmigen:rw', 'requestRecommendation' => 'lehre/anrechnung_genehmigen:rw' @@ -76,10 +77,19 @@ class approveAnrechnungUebersicht extends Auth_Controller { show_error(getError($studiengang_kz_arr)); } - + + $hasReadOnlyAccess = + $this->permissionlib->isBerechtigt(self::BERECHTIGUNG_ANRECHNUNG_GENEHMIGEN, 's') + && !$this->permissionlib->isBerechtigt(self::BERECHTIGUNG_ANRECHNUNG_GENEHMIGEN, 'suid'); + + // This permission is checked here to disable create Anrechnung button, if permission is not given + $hasCreateAnrechnungAccess = $this->permissionlib->isBerechtigt(self::BERECHTIGUNG_ANRECHNUNG_ANLEGEN, 's'); + $viewData = array( 'studiensemester_selected' => $studiensemester_kurzbz, - 'studiengaenge_entitled' => $studiengang_kz_arr + 'studiengaenge_entitled' => $studiengang_kz_arr, + 'hasReadOnlyAccess' => $hasReadOnlyAccess, + 'hasCreateAnrechnungAccess' => $hasCreateAnrechnungAccess ); $this->load->view('lehre/anrechnung/approveAnrechnungUebersicht.php', $viewData); @@ -239,7 +249,7 @@ class approveAnrechnungUebersicht extends Auth_Controller } // Check if user is entitled to read dms doc - self::_checkIfEntitledToReadDMSDoc($dms_id); + $this->_checkIfEntitledToReadDMSDoc($dms_id); // Set filename to be used on downlaod $filename = $this->anrechnunglib->setFilenameOnDownload($dms_id); @@ -281,22 +291,14 @@ class approveAnrechnungUebersicht extends Auth_Controller { show_error('Failed loading Lehrveranstaltung'); } + + $studiengang_kz = $result->studiengang_kz; - // Get STGL - $result = $this->StudiengangModel->getLeitung($result->studiengang_kz); - - if (hasData($result)) - { - foreach (getData($result) as $stgl) - { - if ($stgl->uid == $this->_uid) - { - return; - } - } - } - - show_error('You are not entitled to read this document'); + // Check if user is entitled + if (!$this->permissionlib->isBerechtigt(self::BERECHTIGUNG_ANRECHNUNG_GENEHMIGEN, 's', $studiengang_kz)) + { + show_error('You are not entitled to read this document'); + } } /** diff --git a/application/controllers/lehre/anrechnung/ReviewAnrechnungDetail.php b/application/controllers/lehre/anrechnung/ReviewAnrechnungDetail.php index 78175f4e6..7981f0ac8 100644 --- a/application/controllers/lehre/anrechnung/ReviewAnrechnungDetail.php +++ b/application/controllers/lehre/anrechnung/ReviewAnrechnungDetail.php @@ -79,7 +79,7 @@ class reviewAnrechnungDetail extends Auth_Controller // Get Anrechung data $anrechnungData = $this->anrechnunglib->getAnrechnungData($anrechnung_id); - + // Get Antrag data $antragData = $this->anrechnunglib->getAntragData( $anrechnungData->prestudent_id, @@ -110,7 +110,7 @@ class reviewAnrechnungDetail extends Auth_Controller { return $this->outputJsonError('Fehler beim Übertragen der Daten.'); } - + // Get lectors person data if (!$person = getData($this->PersonModel->getByUID($this->_uid))[0]) { @@ -218,10 +218,10 @@ class reviewAnrechnungDetail extends Auth_Controller // Check if user is entitled to read dms doc self::_checkIfEntitledToReadDMSDoc($dms_id); - + // Set filename to be used on downlaod $filename = $this->anrechnunglib->setFilenameOnDownload($dms_id); - + // Download file $this->dmslib->download($dms_id, $filename); } @@ -320,7 +320,12 @@ class reviewAnrechnungDetail extends Auth_Controller foreach ($studiengang_kz_arr as $studiengang_kz) { // Get STGL mail address, if available, otherwise get assistance mail address - list ($to, $vorname) = $this->_getSTGLMailAddress($studiengang_kz); + $stgmail = $this->_getSTGLMailAddress($studiengang_kz); + + if(isSuccess($stgmail) && hasData($stgmail)) + list ($to, $vorname) = getData($stgmail)[0]; + else + show_error ('Failed retrieving DegreeProgram Mail'); // Get full name of lector $this->load->model('person/Person_model', 'PersonModel'); @@ -361,24 +366,28 @@ class reviewAnrechnungDetail extends Auth_Controller $result = $this->StudiengangModel->getLeitung($stg_kz); // Get STGL mail address, if available - if (hasData($result)) + if (isSuccess($result) && hasData($result)) { - return array( + return success(array( $result->retval[0]->uid. '@'. DOMAIN, $result->retval[0]->vorname - ); + )); } // ...otherwise get assistance mail address else { $result = $this->StudiengangModel->load($stg_kz); - if (hasData($result)) + if (isSuccess($result) && hasData($result)) { - return array( + return success(array( $result->retval[0]->email, '' - ); + )); + } + else + { + return error('Keine E-Mail für diesen Stg gefunden'); } } } diff --git a/application/controllers/lehre/anrechnung/ReviewAnrechnungUebersicht.php b/application/controllers/lehre/anrechnung/ReviewAnrechnungUebersicht.php index cd0b7afaf..e5475d0d0 100644 --- a/application/controllers/lehre/anrechnung/ReviewAnrechnungUebersicht.php +++ b/application/controllers/lehre/anrechnung/ReviewAnrechnungUebersicht.php @@ -5,15 +5,15 @@ if (! defined('BASEPATH')) exit('No direct script access allowed'); class reviewAnrechnungUebersicht extends Auth_Controller { const BERECHTIGUNG_ANRECHNUNG_EMPFEHLEN = 'lehre/anrechnung_empfehlen'; - + const APPROVE_ANRECHNUNG_URI = '/lehre/anrechnung/ApproveAnrechnungUebersicht'; - + const ANRECHNUNGSTATUS_PROGRESSED_BY_STGL = 'inProgressDP'; const ANRECHNUNGSTATUS_PROGRESSED_BY_KF = 'inProgressKF'; const ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR = 'inProgressLektor'; const ANRECHNUNGSTATUS_APPROVED = 'approved'; const ANRECHNUNGSTATUS_REJECTED = 'rejected'; - + public function __construct() { // Set required permissions @@ -25,24 +25,24 @@ class reviewAnrechnungUebersicht extends Auth_Controller 'dontRecommend' => 'lehre/anrechnung_empfehlen:rw' ) ); - + // Load models $this->load->model('education/Anrechnung_model', 'AnrechnungModel'); $this->load->model('education/Anrechnungstatus_model', 'AnrechnungstatusModel'); $this->load->model('content/DmsVersion_model', 'DmsVersionModel'); $this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel'); - + // Load libraries $this->load->library('WidgetLib'); $this->load->library('PermissionLib'); $this->load->library('AnrechnungLib'); $this->load->library('DmsLib'); - + // Load helpers $this->load->helper('form'); $this->load->helper('url'); $this->load->helper('hlp_sancho_helper'); - + // Load language phrases $this->loadPhrases( array( @@ -54,12 +54,12 @@ class reviewAnrechnungUebersicht extends Auth_Controller 'table' ) ); - + $this->_setAuthUID(); - + $this->setControllerId(); } - + public function index() { // Get study semester @@ -70,14 +70,14 @@ class reviewAnrechnungUebersicht extends Auth_Controller $result = $this->StudiensemesterModel->getNearest(); $studiensemester_kurzbz = getData($result)[0]->studiensemester_kurzbz; } - + $viewData = array( 'studiensemester_selected' => $studiensemester_kurzbz ); - + $this->load->view('lehre/anrechnung/reviewAnrechnungUebersicht.php', $viewData); } - + /** * Recommend Anrechnungen. */ @@ -103,7 +103,7 @@ class reviewAnrechnungUebersicht extends Auth_Controller ); } } - + // Output json to ajax if (isset($json) && !isEmptyArray($json)) { @@ -123,19 +123,19 @@ class reviewAnrechnungUebersicht extends Auth_Controller return $this->outputJsonError($this->p->t('ui', 'errorNichtAusgefuehrt')); } } - + /** * Dont recommend Anrechnungen. */ public function dontRecommend() { $data = $this->input->post('data'); - + if(isEmptyArray($data)) { return $this->outputJsonError('Fehler beim Übertragen der Daten.'); } - + foreach ($data as $item) { // Approve Anrechnung @@ -149,7 +149,7 @@ class reviewAnrechnungUebersicht extends Auth_Controller ); } } - + // Output json to ajax if (isset($json) && !isEmptyArray($json)) { @@ -158,7 +158,7 @@ class reviewAnrechnungUebersicht extends Auth_Controller { show_error('Failed sending emails'); } - + return $this->outputJsonSuccess($json); } else @@ -166,7 +166,7 @@ class reviewAnrechnungUebersicht extends Auth_Controller return $this->outputJsonError($this->p->t('ui', 'errorNichtAusgefuehrt')); } } - + /** * Download and open uploaded document (Nachweisdokument). */ @@ -178,28 +178,28 @@ class reviewAnrechnungUebersicht extends Auth_Controller { show_error('Wrong parameter'); } - + // Check if user is entitled to read dms doc self::_checkIfEntitledToReadDMSDoc($dms_id); - + // Set filename to be used on downlaod $filename = $this->anrechnunglib->setFilenameOnDownload($dms_id); - + // Download file $this->dmslib->download($dms_id, $filename); } - - + + /** * Retrieve the UID of the logged user and checks if it is valid */ private function _setAuthUID() { $this->_uid = getAuthUID(); - + if (!$this->_uid) show_error('User authentification failed'); } - + /** * Check if user is entitled to read dms doc * @param $dms_id @@ -207,15 +207,15 @@ class reviewAnrechnungUebersicht extends Auth_Controller private function _checkIfEntitledToReadDMSDoc($dms_id) { $result = $this->AnrechnungModel->loadWhere(array('dms_id' => $dms_id)); - + if(!$result = getData($result)[0]) { show_error('Failed retrieving Anrechnung'); } - + $result = $this->LehrveranstaltungModel ->getLecturersByLv($result->studiensemester_kurzbz, $result->lehrveranstaltung_id); - + if($result = getData($result)) { $entitled_lector_arr = array_column($result, 'uid'); @@ -225,10 +225,10 @@ class reviewAnrechnungUebersicht extends Auth_Controller return; } } - + show_error('You are not entitled to read this document'); } - + /** * Send mails to STGL (if not present then to STGL assistance) * @param $mail_params @@ -239,36 +239,41 @@ class reviewAnrechnungUebersicht extends Auth_Controller { // Get studiengaenge $studiengang_kz_arr = array(); - + foreach ($mail_params as $item) { $this->AnrechnungModel->addSelect('studiengang_kz'); $this->AnrechnungModel->addJoin('public.tbl_prestudent', 'prestudent_id'); - + $studiengang_kz_arr[]= $this->AnrechnungModel->load($item['anrechnung_id'])->retval[0]->studiengang_kz; } - + $studiengang_kz_arr = array_unique($studiengang_kz_arr); - + // Send mail to STGL of each studiengang foreach ($studiengang_kz_arr as $studiengang_kz) { // Get STGL mail address, if available, otherwise get assistance mail address - list ($to, $vorname) = $this->_getSTGLMailAddress($studiengang_kz); - + $stgmail = $this->_getSTGLMailAddress($studiengang_kz); + + if(isSuccess($stgmail) && hasData($stgmail)) + list ($to, $vorname) = getData($stgmail)[0]; + else + show_error ('Failed retrieving DegreeProgram Mail'); + // Get full name of lector $this->load->model('person/Person_model', 'PersonModel'); if (!$lector_name = getData($this->PersonModel->getFullName($this->_uid))) { show_error ('Failed retrieving person'); } - + // Link to Antrag genehmigen $url = CIS_ROOT. 'cis/index.php?menu='. CIS_ROOT. 'cis/menu.php?content_id=&content='. CIS_ROOT. index_page(). self::APPROVE_ANRECHNUNG_URI; - + // Prepare mail content $body_fields = array( 'vorname' => $vorname, @@ -276,7 +281,7 @@ class reviewAnrechnungUebersicht extends Auth_Controller 'empfehlung' => $empfehlung ? 'positive' : 'negative', 'link' => anchor($url, 'Anrechnungsanträge Übersicht') ); - + sendSanchoMail( 'AnrechnungEmpfehlungAbgeben', $body_fields, @@ -284,37 +289,41 @@ class reviewAnrechnungUebersicht extends Auth_Controller 'Anerkennung nachgewiesener Kenntnisse: Empfehlung wurde abgegeben' ); } - + return true; } - + // Get STGL mail address, if available, otherwise get assistance mail address private function _getSTGLMailAddress($stg_kz) { $this->load->model('organisation/Studiengang_model', 'StudiengangModel'); $result = $this->StudiengangModel->getLeitung($stg_kz); - + // Get STGL mail address, if available - if (hasData($result)) + if (isSuccess($result) && hasData($result)) { - return array( + return success(array( $result->retval[0]->uid. '@'. DOMAIN, $result->retval[0]->vorname - ); + )); } // ...otherwise get assistance mail address else { $result = $this->StudiengangModel->load($stg_kz); - - if (hasData($result)) + + if (isSuccess($result) && hasData($result)) { - return array( + return success(array( $result->retval[0]->email, '' - ); + )); + } + else + { + return error('Keine E-Mail für diesen Stg gefunden'); } } } - -} \ No newline at end of file + +} diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index a69a43220..25ee96b60 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -560,8 +560,10 @@ class InfoCenter extends Auth_Controller /** * Sendet bei einer neuen ZGV Prüfung die Mail raus an den Studiengang */ - private function sendZgvMail($mail, $typ){ + private function sendZgvMail($mail, $typ, $person){ $data = array( + 'vorname' => $person->vorname, + 'nachname' => $person->nachname, 'link' => site_url('system/infocenter/ZGVUeberpruefung') ); @@ -657,6 +659,16 @@ class InfoCenter extends Auth_Controller if (isEmptyString($prestudent_id) || isEmptyString($person_id)) $this->terminateWithJsonError('Prestudentid OR/AND Personid missing'); + $person = $this->PersonModel->load($person_id); + + if (isError($person)) + $this->terminateWithJsonError(getError($person)); + + if (!hasData($person)) + $this->terminateWithJsonError('Person existiert nicht.'); + + $person = getData($person)[0]; + $zgv = $this->ZGVPruefungStatusModel->getZgvStatusByPrestudent($prestudent_id); $data = $this->_getPersonAndStudiengangFromPrestudent($prestudent_id); @@ -688,7 +700,7 @@ class InfoCenter extends Auth_Controller $this->_log($person_id, 'updatezgv', array($zgv[0]->zgvpruefung_id, 'pruefung_stg')); if (isSuccess($insert)) - $this->sendZgvMail($mail, $typ); + $this->sendZgvMail($mail, $typ, $person); elseif (isError($insert)) $this->terminateWithJsonError('Fehler beim Speichern'); }else @@ -714,7 +726,7 @@ class InfoCenter extends Auth_Controller $this->_log($person_id, 'newzgv', array($zgvpruefung_id)); if (isSuccess($result)) - $this->sendZgvMail($mail, $typ); + $this->sendZgvMail($mail, $typ, $person); elseif (isError($result)) $this->terminateWithJsonError('Fehler beim Speichern'); } @@ -1708,9 +1720,15 @@ class InfoCenter extends Auth_Controller if (isset($locked->retval[0]->uid)) { - $lockedby = $locked->retval[0]->uid; - if ($lockedby !== $this->_uid) + if (!$lockedby = getData($this->PersonModel->getFullName($locked->retval[0]->uid))) + { + show_error('Failed retrieving person'); + } + + if ($locked->retval[0]->uid !== $this->_uid) + { $lockedbyother = true; + } } $stammdaten = $this->PersonModel->getPersonStammdaten($person_id, true); diff --git a/application/controllers/system/issues/Issues.php b/application/controllers/system/issues/Issues.php index e9764fb63..e0103cfec 100644 --- a/application/controllers/system/issues/Issues.php +++ b/application/controllers/system/issues/Issues.php @@ -58,21 +58,42 @@ class Issues extends Auth_Controller { $issue_ids = $this->input->post('issue_ids'); $status_kurzbz = $this->input->post('status_kurzbz'); - $verarbeitetvon = $this->_uid; + $user = $this->_uid; $errors = array(); foreach ($issue_ids as $issue_id) { - $issueRes = $this->issueslib->changeIssueStatus($issue_id, $status_kurzbz, $verarbeitetvon); + switch ($status_kurzbz) + { + case IssuesLib::STATUS_NEU: + $changeIssueMethod = 'setNeu'; + break; + case IssuesLib::STATUS_IN_BEARBEITUNG: + $changeIssueMethod = 'setInBearbeitung'; + break; + case IssuesLib::STATUS_BEHOBEN: + $changeIssueMethod = 'setBehoben'; + break; + default: + $changeIssueMethod = null; + break; + } - if (isError($issueRes)) - $errors[] = getError($issueRes); + if (isEmptyString($changeIssueMethod)) + $errors[] = error("Invalid issue status given"); + else + { + $issueRes = $this->issueslib->{$changeIssueMethod}($issue_id, $user); + + if (isError($issueRes)) + $errors[] = getError($issueRes); + } } if (!isEmptyArray($errors)) $this->outputJsonError(implode(", ", $errors)); else - $this->outputJsonSuccess("Status erfolgreich aktualisiert"); + $this->outputJsonSuccess("Status successfully refreshed"); } /** @@ -133,7 +154,7 @@ class Issues extends Auth_Controller // add oes for which there is the "manage issues" Berechtigung if (!$oe_kurzbz_berechtigt = $this->permissionlib->getOE_isEntitledFor(self::BERECHTIGUNG_KURZBZ)) - show_error('Keine Berechtigung oder Fehler bei Berechtigungsprüfung'); + show_error('No permission or error when checking permissions'); $all_oe_kurzbz_berechtigt = array_unique(array_merge($oe_kurzbz_for_funktion, $oe_kurzbz_berechtigt)); diff --git a/application/core/IIssueResolvedChecker.php b/application/core/IIssueResolvedChecker.php new file mode 100644 index 000000000..82da67ff7 --- /dev/null +++ b/application/core/IIssueResolvedChecker.php @@ -0,0 +1,15 @@ +load->model('system/Issue_model', 'IssueModel'); + + $this->load->library('IssuesLib'); + } + + /** + * Initializes issue resolution. + */ + public function run() + { + $this->logInfo("Issue resolve job started"); + + // load open issues with given errorcodes + $openIssuesRes = $this->IssueModel->getOpenIssues(array_keys($this->_codeLibMappings)); + + // log error if occured + if (isError($openIssuesRes)) + { + $this->logError(getError($openIssuesRes)); + } + else + { + // log info if no data found + if (!hasData($openIssuesRes)) + { + $this->logInfo("No open issues found"); + } + else + { + + $openIssues = getData($openIssuesRes); + + foreach ($openIssues as $issue) + { + if (isset($this->_codeLibMappings[$issue->fehlercode])) + { + $libName = $this->_codeLibMappings[$issue->fehlercode]; + + // 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_RESOLVED_METHOD_NAME))) + { + // log error and continue with next issue if not + $this->logError("Method " . self::CHECK_ISSUE_RESOLVED_METHOD_NAME . " is not defined in library $lowercaseLibName"); + continue; + } + + // call the function for checking for issue resolution + $issueResolvedRes = $this->{$lowercaseLibName}->{self::CHECK_ISSUE_RESOLVED_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"); + } +} diff --git a/application/helpers/hlp_header_helper.php b/application/helpers/hlp_header_helper.php index f8bbb9ad2..203834ebb 100644 --- a/application/helpers/hlp_header_helper.php +++ b/application/helpers/hlp_header_helper.php @@ -39,6 +39,24 @@ function printPageTitle($title) } } +/** + * Print the meta tag http-equiv refresh having as content the value of the given parameter + */ +function printRefreshMeta($refresh) +{ + if ($refresh != null) + { + if (is_numeric($refresh) && $refresh > 0) + { + echo ''; + } + else + { + show_error('The provided refresh parameter has to be a number greater then 0'); + } + } +} + /** * Generates tags for the style sheets you want to include, the parameter could by a string or an array of strings */ diff --git a/application/libraries/AnrechnungLib.php b/application/libraries/AnrechnungLib.php index 3bec62dce..ee197ab05 100644 --- a/application/libraries/AnrechnungLib.php +++ b/application/libraries/AnrechnungLib.php @@ -89,6 +89,7 @@ class AnrechnungLib $antrag_data->vorname = $person->vorname; $antrag_data->nachname = $person->nachname; $antrag_data->matrikelnr = $student->matrikelnr; + $antrag_data->studiengang_kz = $studiengang->studiengang_kz; $antrag_data->stg_bezeichnung = $studiengang->bezeichnung; $antrag_data->lektoren = $lv_lektoren_arr; $antrag_data->zgv = $latest_zgv_bezeichnung; diff --git a/application/libraries/IssuesLib.php b/application/libraries/IssuesLib.php index 1b06db333..d6488bc36 100644 --- a/application/libraries/IssuesLib.php +++ b/application/libraries/IssuesLib.php @@ -62,17 +62,17 @@ class IssuesLib * @param array $fehlertext_params params for sprint replace of error text in system.tbl_fehler * @return object success or error */ - public function addFhcIssue($fehler_kurzbz, $person_id = null, $oe_kurzbz = null, $fehlertext_params = null) + public function addFhcIssue($fehler_kurzbz, $person_id = null, $oe_kurzbz = null, $fehlertext_params = null, $resolution_params = null) { $fehlerRes = $this->_ci->FehlerModel->loadWhere(array('fehler_kurzbz' => $fehler_kurzbz)); if (hasData($fehlerRes)) { $fehlercode = getData($fehlerRes)[0]->fehlercode; - return $this->_addIssue($fehlercode, $person_id, $oe_kurzbz, $fehlertext_params); + return $this->_addIssue($fehlercode, $person_id, $oe_kurzbz, $fehlertext_params, $resolution_params); } else - return error("Fehler $fehler_kurzbz nicht gefunden"); + return error("Error $fehler_kurzbz not found"); } /** @@ -82,13 +82,13 @@ class IssuesLib * @param int $person_id * @param int $oe_kurzbz * @param array $fehlertext_params params for replacement of parts of error text - * @param bool $force_predefined if true, only predefined external issues are added + * @param bool $force_predefined if true, only predefined (with entry in fehler table) external issues are added * @return object success or error */ - public function addExternalIssue($fehlercode_extern, $inhalt_extern, $person_id = null, $oe_kurzbz = null, $fehlertext_params = null, $force_predefined = false) + public function addExternalIssue($fehlercode_extern, $inhalt_extern, $person_id = null, $oe_kurzbz = null, $fehlertext_params = null) { if (isEmptyString($fehlercode_extern)) - return error("fehlercode_extern fehlt"); + return error("fehlercode_extern missing"); // get external fehlercode (unique for each app) $this->_ci->FehlerModel->addSelect('fehlercode'); @@ -102,19 +102,13 @@ class IssuesLib if (isError($fehlerRes)) return $fehlerRes; - $fehlerData = getData($fehlerRes)[0]; - // check if there is a predefined custom error for the external issue if (hasData($fehlerRes)) { + $fehlerData = getData($fehlerRes)[0]; // if found, use the code $fehlercode = $fehlerData->fehlercode; } - elseif ($force_predefined === true) - { - // only added if predefined - return success("No definition found - not added"); - } else { // if predefined error is not found, insert with fallback code @@ -122,20 +116,70 @@ class IssuesLib } // add external issue - return $this->_addIssue($fehlercode, $person_id, $oe_kurzbz, $fehlertext_params, $fehlercode_extern, $inhalt_extern); + return $this->_addIssue($fehlercode, $person_id, $oe_kurzbz, $fehlertext_params, null, $fehlercode_extern, $inhalt_extern); + } + + /** + * Set issue to resolved. + * @param int $issue_id + * @param string $user uid of issue resolver + * @return object success or error + */ + public function setBehoben($issue_id, $user) + { + $data = array( + 'status_kurzbz' => self::STATUS_BEHOBEN, + 'verarbeitetvon' => $user, + 'verarbeitetamum' => date('Y-m-d H:i:s') + ); + + return $this->_changeIssueStatus($issue_id, $data, $user); + } + + /** + * Set issue to in progress. + * @param int $issue_id + * @param string $user uid of issue resovler + * @return object success or error + */ + public function setInBearbeitung($issue_id, $user) + { + $data = array( + 'status_kurzbz' => self::STATUS_IN_BEARBEITUNG, + 'verarbeitetvon' => $user + ); + + return $this->_changeIssueStatus($issue_id, $data, $user); + } + + /** + * Set issue to new. + * @param int $issue_id + * @param string $user uid of issue resolver + * @return object success or error + */ + public function setNeu($issue_id, $user) + { + $data = array( + 'status_kurzbz' => self::STATUS_NEU, + 'verarbeitetvon' => null, + 'verarbeitetamum' => null + ); + + return $this->_changeIssueStatus($issue_id, $data, $user); } /** * Changes status of an issue. * @param int $issue_id - * @param string $status_kurzbz the new status - * @param string $verarbeitetvon uid of person changing the status (needed for in Bearbeitung and behoben) + * @param array $sdata the data to save, including status + * @param string $user uid of person changing the status (needed for in Bearbeitung and behoben) * @return success or error */ - public function changeIssueStatus($issue_id, $status_kurzbz, $verarbeitetvon = null) + private function _changeIssueStatus($issue_id, $data, $user) { if (!isset($issue_id) || !is_numeric($issue_id)) - return error("Issue Id muss korrekt gesetzt sein."); + return error("Issue Id must be set correctly."); // check if given status is same as existing $this->_ci->IssueModel->addSelect('status_kurzbz'); @@ -143,39 +187,14 @@ class IssuesLib if (hasData($currStatus)) { - if (getData($currStatus)[0]->status_kurzbz == $status_kurzbz) - return success("Gleicher Status bereits gesetzt"); + if (getData($currStatus)[0]->status_kurzbz == $data['status_kurzbz']) + return success("Same status already set"); } else - return error("Fehler beim Holen des Status"); + return error("Error when getting status"); - $data = array( - 'status_kurzbz' => $status_kurzbz, - 'updatevon' => $verarbeitetvon, - 'updateamum' => date('Y-m-d H:i:s') - ); - - if ($status_kurzbz == self::STATUS_NEU) - { - - $data['verarbeitetvon'] = null; - } - - if ($status_kurzbz == self::STATUS_NEU || $status_kurzbz == self::STATUS_IN_BEARBEITUNG) - { - $data['verarbeitetamum'] = null; - } - - if ($status_kurzbz == self::STATUS_IN_BEARBEITUNG || $status_kurzbz == self::STATUS_BEHOBEN) - { - if (isset($verarbeitetvon)) - $data['verarbeitetvon'] = $verarbeitetvon; - else - return error("Verarbeitetvon nicht gesetzt"); - } - - if ($status_kurzbz == self::STATUS_BEHOBEN) - $data['verarbeitetamum'] = date('Y-m-d H:i:s'); + $data['updatevon'] = $user; + $data['updateamum'] = date('Y-m-d H:i:s'); return $this->_ci->IssueModel->update( array( @@ -191,14 +210,15 @@ class IssuesLib * @param int $person_id * @param string $oe_kurzbz * @param array $fehlertext_params + * @param string $resolution_params * @param string $fehlercode_extern * @param string $inhalt_extern * @return object success or error */ - private function _addIssue($fehlercode, $person_id = null, $oe_kurzbz = null, $fehlertext_params = null, $fehlercode_extern = null, $inhalt_extern = null) + private function _addIssue($fehlercode, $person_id = null, $oe_kurzbz = null, $fehlertext_params = null, $resolution_params = null, $fehlercode_extern = null, $inhalt_extern = null) { if (isEmptyString($person_id) && isEmptyString($oe_kurzbz)) - return error("Person_id oder oe_kurzbz muss gesetzt sein."); + return error("Person_id or oe_kurzbz must be set."); // get fehlertextVorlage and replace it with params $fehlerRes = $this->_ci->FehlerModel->load($fehlercode); @@ -218,6 +238,20 @@ class IssuesLib if ($openIssueCount == 0) { + if (isset($resolution_params)) + { + if (is_array($resolution_params)) + { + foreach ($resolution_params as $resolution_key => $resolution_param) + { + if (!is_string($resolution_key)) + return error("Invalid parameter for resolution, must be an associative array"); + } + } + else + return error("Invalid parameters for resolution"); + } + return $this->_ci->IssueModel->insert( array( 'fehlercode' => $fehlercode, @@ -228,6 +262,7 @@ class IssuesLib 'oe_kurzbz' => $oe_kurzbz, 'datum' => date('Y-m-d H:i:s'), 'status_kurzbz' => self::STATUS_NEU, + 'behebung_parameter' => isset($resolution_params) ? json_encode($resolution_params) : null, 'insertvon' => $this->_insertvon ) ); @@ -236,9 +271,9 @@ class IssuesLib return success($openIssueCount); } else - return error("Anzahl offener Issues konnte nicht ermittelt werden."); + return error("Number of open issues could not be determined"); } else - return error("Fehler $fehlercode nicht gefunden"); + return error("Error $fehlercode could not be found"); } } diff --git a/application/libraries/issues/CORE_INOUT_0001.php b/application/libraries/issues/CORE_INOUT_0001.php new file mode 100644 index 000000000..d62c73f9e --- /dev/null +++ b/application/libraries/issues/CORE_INOUT_0001.php @@ -0,0 +1,31 @@ +_ci =& get_instance(); // get code igniter instance + + $this->_ci->load->model('codex/Bisiozweck_model', 'BisiozweckModel'); + + // get all bisio Zwecke + $this->_ci->BisiozweckModel->addSelect('1'); + $bisiozweckRes = $this->_ci->BisiozweckModel->loadWhere(array('bisio_id' => $params['bisio_id'])); + + if (isError($bisiozweckRes)) + return $bisiozweckRes; + + if (hasData($bisiozweckRes)) + return success(true); // resolved if bisio Zweck exists + else + return success(false); // not resolved if no bisio zweck + } +} diff --git a/application/libraries/issues/CORE_INOUT_0002.php b/application/libraries/issues/CORE_INOUT_0002.php new file mode 100644 index 000000000..9868ccd25 --- /dev/null +++ b/application/libraries/issues/CORE_INOUT_0002.php @@ -0,0 +1,34 @@ +_ci =& get_instance(); // get code igniter instance + + $this->_ci->load->model('codex/Bisiozweck_model', 'BisiozweckModel'); + + // get all bisio Zwecke + $this->_ci->BisiozweckModel->addSelect('1'); + $bisiozweckRes = $this->_ci->BisiozweckModel->loadWhere(array('bisio_id' => $params['bisio_id'])); + + if (isError($bisiozweckRes)) + return $bisiozweckRes; + + if (hasData($bisiozweckRes)) + { + if (count(getData($bisiozweckRes)) <= 1) // resolved if one bisio Zweck + return success(true); + else + return success(false); // otherwise not resolved + } + else + return success(true); // resolved if no bisio zweck + } +} diff --git a/application/libraries/issues/CORE_INOUT_0003.php b/application/libraries/issues/CORE_INOUT_0003.php new file mode 100644 index 000000000..0fee6c061 --- /dev/null +++ b/application/libraries/issues/CORE_INOUT_0003.php @@ -0,0 +1,39 @@ +_ci =& get_instance(); // get code igniter instance + + $this->_ci->load->model('codex/Bisiozweck_model', 'BisiozweckModel'); + + // get all Zwecke + $this->_ci->BisiozweckModel->addSelect('zweck_code'); + $bisiozweckRes = $this->_ci->BisiozweckModel->loadWhere(array('bisio_id' => $params['bisio_id'])); + + if (isError($bisiozweckRes)) + return $bisiozweckRes; + + if (hasData($bisiozweckRes)) + { + $bisiozweckData = getData($bisiozweckRes); + + // resolved if Zweck is 1, 2 or 3 + if (count($bisiozweckData) == 1 && !in_array($bisiozweckData[0]->zweck_code, array(1, 2, 3))) + return success(false); + else + return success(true); + } + else + return success(true); + } +} diff --git a/application/libraries/issues/CORE_INOUT_0004.php b/application/libraries/issues/CORE_INOUT_0004.php new file mode 100644 index 000000000..703b108cc --- /dev/null +++ b/application/libraries/issues/CORE_INOUT_0004.php @@ -0,0 +1,57 @@ +_ci =& get_instance(); // get code igniter instance + + $this->_ci->load->model('codex/Aufenthaltfoerderung_model', 'AufenthaltfoerderungModel'); + + // get all Zwecke + $this->_ci->AufenthaltfoerderungModel->addSelect('tbl_aufenthaltfoerderung.aufenthaltfoerderung_code'); + $this->_ci->AufenthaltfoerderungModel->addJoin('bis.tbl_bisio_aufenthaltfoerderung', 'aufenthaltfoerderung_code'); + $this->_ci->AufenthaltfoerderungModel->addOrder('tbl_aufenthaltfoerderung.aufenthaltfoerderung_code'); + $bisioFoerderungRes = $this->_ci->AufenthaltfoerderungModel->loadWhere(array('bisio_id' => $params['bisio_id'])); + + if (isError($bisioFoerderungRes)) + return $bisioFoerderungRes; + + if (hasData($bisioFoerderungRes)) + { + // resolved if Aufenthaltsfoerderung exists + return success(true); + } + else + { + $this->_ci->load->model('codex/Bisio_model', 'BisioModel'); + + // get Bisio Aufenthaltsdauer + $aufenthaltsdauerRes = $this->_ci->BisioModel->getAufenthaltsdauer($params['bisio_id']); + + if (isError($aufenthaltsdauerRes)) + return $aufenthaltsdauerRes; + + if (hasData($aufenthaltsdauerRes)) + { + $aufenthaltsdauer = getData($aufenthaltsdauerRes); + + // check if stay >= 29 days. If yes and no Aufenthaltsfoerderung - not resolved + if ($aufenthaltsdauer >= 29) + return success(false); + else + return success(true); + } + else // no Aufenthaltsdauer - not resolved + return success(false); + } + } +} diff --git a/application/libraries/issues/CORE_INOUT_0005.php b/application/libraries/issues/CORE_INOUT_0005.php new file mode 100644 index 000000000..e655d2e36 --- /dev/null +++ b/application/libraries/issues/CORE_INOUT_0005.php @@ -0,0 +1,53 @@ +_ci =& get_instance(); // get code igniter instance + + $this->_ci->load->model('codex/Bisio_model', 'BisioModel'); + + // get all Zwecke + $this->_ci->BisioModel->addSelect('ects_angerechnet'); + $bisioRes = $this->_ci->BisioModel->loadWhere(array('bisio_id' => $params['bisio_id'])); + + if (isError($bisioRes)) + return $bisioRes; + + if (hasData($bisioRes) && !isEmptyString(getData($bisioRes)[0]->ects_angerechnet)) + { + // resolved if ects exists + return success(true); + } + else + { + // get Bisio Aufenthaltsdauer + $aufenthaltsdauerRes = $this->_ci->BisioModel->getAufenthaltsdauer($params['bisio_id']); + + if (isError($aufenthaltsdauerRes)) + return $aufenthaltsdauerRes; + + if (hasData($aufenthaltsdauerRes)) + { + $aufenthaltsdauer = getData($aufenthaltsdauerRes); + + // check if stay >= 29 days. If yes and no ects - not resolved + if ($aufenthaltsdauer >= 29) + return success(false); + else + return success(true); + } + else // no Aufenthaltsdauer - not resolved + return success(false); + } + } +} diff --git a/application/libraries/issues/CORE_INOUT_0006.php b/application/libraries/issues/CORE_INOUT_0006.php new file mode 100644 index 000000000..a447a9625 --- /dev/null +++ b/application/libraries/issues/CORE_INOUT_0006.php @@ -0,0 +1,54 @@ +_ci =& get_instance(); // get code igniter instance + + $this->_ci->load->model('codex/Bisio_model', 'BisioModel'); + //$this->_ci->load->model('codex/Aufenthaltfoerderung_model', 'AufenthaltfoerderungModel'); + + // get all Zwecke + $this->_ci->BisioModel->addSelect('ects_erworben'); + $bisioRes = $this->_ci->BisioModel->loadWhere(array('bisio_id' => $params['bisio_id'])); + + if (isError($bisioRes)) + return $bisioRes; + + if (hasData($bisioRes) && !isEmptyString(getData($bisioRes)[0]->ects_erworben)) + { + // resolved if ects exists + return success(true); + } + else + { + // get Bisio Aufenthaltsdauer + $aufenthaltsdauerRes = $this->_ci->BisioModel->getAufenthaltsdauer($params['bisio_id']); + + if (isError($aufenthaltsdauerRes)) + return $aufenthaltsdauerRes; + + if (hasData($aufenthaltsdauerRes)) + { + $aufenthaltsdauer = getData($aufenthaltsdauerRes); + + // check if stay >= 29 days. If yes and no ects - not resolved + if ($aufenthaltsdauer >= 29) + return success(false); + else + return success(true); + } + else // no Aufenthaltsdauer - not resolved + return success(false); + } + } +} diff --git a/application/libraries/issues/CORE_ZGV_0001.php b/application/libraries/issues/CORE_ZGV_0001.php new file mode 100644 index 000000000..47d27d30e --- /dev/null +++ b/application/libraries/issues/CORE_ZGV_0001.php @@ -0,0 +1,42 @@ +_ci =& get_instance(); // get code igniter instance + + // get zgvdatum of prestudent + $this->_ci->load->model('crm/Prestudent_model', 'PrestudentModel'); + + $this->_ci->PrestudentModel->addSelect('zgvdatum'); + $prestudentRes = $this->_ci->PrestudentModel->load($params['prestudent_id']); + + if (isError($prestudentRes)) + return $prestudentRes; + + if (hasData($prestudentRes)) + { + $zgvdatum = getData($prestudentRes)[0]->zgvdatum; + + if (isEmptyString($zgvdatum)) + return success(false); + + // check if zgvdatum comes after today + if ($zgvdatum > date('Y-m-d')) + return success(false); + else + return success(true); + } + else + return success(false); + } +} diff --git a/application/libraries/issues/CORE_ZGV_0002.php b/application/libraries/issues/CORE_ZGV_0002.php new file mode 100644 index 000000000..d09380ddb --- /dev/null +++ b/application/libraries/issues/CORE_ZGV_0002.php @@ -0,0 +1,50 @@ +_ci =& get_instance(); // get code igniter instance + + // get zgvdatum of prestudent + $this->_ci->load->model('crm/Prestudent_model', 'PrestudentModel'); + + $this->_ci->PrestudentModel->addSelect('zgvdatum, gebdatum'); + $this->_ci->PrestudentModel->addJoin('public.tbl_person', 'person_id'); + $prestudentRes = $this->_ci->PrestudentModel->load($params['prestudent_id']); + + if (isError($prestudentRes)) + return $prestudentRes; + + if (hasData($prestudentRes)) + { + $prestudentData = getData($prestudentRes)[0]; + + $zgvdatum = $prestudentData->zgvdatum; + + if (isEmptyString($zgvdatum)) + return success(false); + + $gebdatum = $prestudentData->gebdatum; + + if (isEmptyString($gebdatum)) + return success(false); + + // check if zgvdatum comes before geburtsdatum + if ($zgvdatum < $gebdatum) + return success(false); + else + return success(true); + } + else + return success(false); + } +} diff --git a/application/libraries/issues/CORE_ZGV_0003.php b/application/libraries/issues/CORE_ZGV_0003.php new file mode 100644 index 000000000..db0ab29db --- /dev/null +++ b/application/libraries/issues/CORE_ZGV_0003.php @@ -0,0 +1,42 @@ +_ci =& get_instance(); // get code igniter instance + + // get zgvdatum of prestudent + $this->_ci->load->model('crm/Prestudent_model', 'PrestudentModel'); + + $this->_ci->PrestudentModel->addSelect('zgvmadatum'); + $prestudentRes = $this->_ci->PrestudentModel->load($params['prestudent_id']); + + if (isError($prestudentRes)) + return $prestudentRes; + + if (hasData($prestudentRes)) + { + $zgvdatum = getData($prestudentRes)[0]->zgvmadatum; + + if (isEmptyString($zgvdatum)) + return success(false); + + // check if zgvdatum comes after today + if ($zgvdatum > date('Y-m-d')) + return success(false); + else + return success(true); + } + else + return success(false); + } +} diff --git a/application/libraries/issues/CORE_ZGV_0004.php b/application/libraries/issues/CORE_ZGV_0004.php new file mode 100644 index 000000000..27488af00 --- /dev/null +++ b/application/libraries/issues/CORE_ZGV_0004.php @@ -0,0 +1,50 @@ +_ci =& get_instance(); // get code igniter instance + + // get zgvdatum of prestudent + $this->_ci->load->model('crm/Prestudent_model', 'PrestudentModel'); + + $this->_ci->PrestudentModel->addSelect('zgvdatum, zgvmadatum'); + $prestudentRes = $this->_ci->PrestudentModel->load($params['prestudent_id']); + + if (isError($prestudentRes)) + return $prestudentRes; + + if (hasData($prestudentRes)) + { + $prestudentData = getData($prestudentRes)[0]; + + // get and compare zgvdatum and zgvmadatum + $zgvdatum = $prestudentData->zgvdatum; + + if (isEmptyString($zgvdatum)) + return success(false); + + $zgvmadatum = $prestudentData->zgvmadatum; + + if (isEmptyString($zgvmadatum)) + return success(false); + + // check if zgvmadatum comes after zgvdatum + if ($zgvmadatum < $zgvdatum) + return success(false); + else + return success(true); + } + else + return success(false); + } +} diff --git a/application/libraries/issues/CORE_ZGV_0005.php b/application/libraries/issues/CORE_ZGV_0005.php new file mode 100644 index 000000000..405f3d88d --- /dev/null +++ b/application/libraries/issues/CORE_ZGV_0005.php @@ -0,0 +1,50 @@ +_ci =& get_instance(); // get code igniter instance + + // get zgvdatum and geburtsdatum of prestudent + $this->_ci->load->model('crm/Prestudent_model', 'PrestudentModel'); + + $this->_ci->PrestudentModel->addSelect('zgvmadatum, gebdatum'); + $this->_ci->PrestudentModel->addJoin('public.tbl_person', 'person_id'); + $prestudentRes = $this->_ci->PrestudentModel->load($params['prestudent_id']); + + if (isError($prestudentRes)) + return $prestudentRes; + + if (hasData($prestudentRes)) + { + $prestudentData = getData($prestudentRes)[0]; + + $zgvdatum = $prestudentData->zgvmadatum; + + if (isEmptyString($zgvdatum)) + return success(false); + + $gebdatum = $prestudentData->gebdatum; + + if (isEmptyString($gebdatum)) + return success(false); + + // check if zgvdatum comes before geburtsdatum + if ($zgvdatum < $gebdatum) + return success(false); + else + return success(true); + } + else + return success(false); + } +} diff --git a/application/models/codex/Bisio_model.php b/application/models/codex/Bisio_model.php index 5f35aec9a..1cff1dc54 100644 --- a/application/models/codex/Bisio_model.php +++ b/application/models/codex/Bisio_model.php @@ -11,4 +11,37 @@ class Bisio_model extends DB_Model $this->dbTable = 'bis.tbl_bisio'; $this->pk = 'bisio_id'; } + + /** + * Gets duration of stay in days by bisio_id. + * @param int $bisio_id + * @return object success with number of days or error + */ + public function getAufenthaltsdauer($bisio_id) + { + // get from and to date + $this->addSelect('von, bis'); + $bisioRes = $this->load($bisio_id); + + if (isError($bisioRes)) + return $bisioRes; + + if (hasData($bisioRes)) + { + $bisioData = getData($bisioRes)[0]; + + $avon = $bisioData->von; + $abis = $bisioData->bis; + + if (is_null($avon) || is_null($abis)) + return success("Von or bis date not set"); + + $vonDate = new DateTime($avon); + $bisDate = new DateTime($abis); + $interval = $vonDate->diff($bisDate); + return success($interval->days); + } + else + return success("Bisio not found"); + } } diff --git a/application/models/education/Zeugnisnote_model.php b/application/models/education/Zeugnisnote_model.php index 65607e252..a4185a7f4 100644 --- a/application/models/education/Zeugnisnote_model.php +++ b/application/models/education/Zeugnisnote_model.php @@ -86,9 +86,10 @@ class Zeugnisnote_model extends DB_Model * @param bool $lehre * @param bool $offiziell * @param bool $positiv + * @param bool $zeugnis * @return object */ - public function getByPerson($person_id, $studiensemester_kurzbz, $aktiv = true, $lehre = null, $offiziell = null, $positiv = null) + public function getByPerson($person_id, $studiensemester_kurzbz, $aktiv = true, $lehre = null, $offiziell = null, $positiv = null, $zeugnis = null) { $params = array($person_id, $studiensemester_kurzbz); @@ -129,6 +130,12 @@ class Zeugnisnote_model extends DB_Model $params[] = $positiv; } + if (isset($zeugnis)) + { + $qry .= ' AND lv.zeugnis = ?'; + $params[] = $zeugnis; + } + $qry .= ' ORDER BY zgnisnote.benotungsdatum'; return $this->execQuery($qry, $params); diff --git a/application/models/organisation/Studiengang_model.php b/application/models/organisation/Studiengang_model.php index 6358ca81e..e2b3bdfb7 100644 --- a/application/models/organisation/Studiengang_model.php +++ b/application/models/organisation/Studiengang_model.php @@ -448,10 +448,11 @@ class Studiengang_model extends DB_Model return $this->execQuery($query, array($typ)); } - + /** - * Get Studiengangsleitung - * @param null $studiengang_kz + * Get Studiengangsleitung/en of Studiengang/Studiengaenge. + * + * @param null $studiengang_kz Numeric or Array * @return array */ public function getLeitung($studiengang_kz = null) @@ -460,7 +461,12 @@ class Studiengang_model extends DB_Model $this->addJoin('public.tbl_benutzerfunktion', 'oe_kurzbz'); $this->addJoin('public.tbl_benutzer', 'uid'); $this->addJoin('public.tbl_person', 'person_id'); - + + if (!is_numeric($studiengang_kz) && !is_array($studiengang_kz)) + { + return error('Studiengangskennzahl ungültig'); + } + if (is_null($studiengang_kz)) { $condition = ' @@ -469,16 +475,21 @@ class Studiengang_model extends DB_Model AND ( datum_bis >= NOW() OR datum_bis IS NULL ) '; } - elseif (is_numeric($studiengang_kz)) + elseif (is_numeric($studiengang_kz) || is_array($studiengang_kz)) { + if (is_array($studiengang_kz)) + { + $studiengang_kz = array_map(array($this,'escape'), $studiengang_kz); + $studiengang_kz = implode(', ', $studiengang_kz); + } $condition = ' funktion_kurzbz = \'Leitung\' AND ( datum_von <= NOW() OR datum_von IS NULL ) AND ( datum_bis >= NOW() OR datum_bis IS NULL ) - AND studiengang_kz = ' . $this->db->escape($studiengang_kz) + AND studiengang_kz IN (' . $studiengang_kz. ')'; ; } - + return $this->loadWhere($condition); } diff --git a/application/models/person/Person_model.php b/application/models/person/Person_model.php index ec5522674..559700390 100644 --- a/application/models/person/Person_model.php +++ b/application/models/person/Person_model.php @@ -165,7 +165,7 @@ class Person_model extends DB_Model if (!hasData($person)) return success(null); - $this->KontaktModel->addSelect('kontakttyp, anmerkung, kontakt, zustellung'); + $this->KontaktModel->addSelect('kontakt_id, kontakttyp, anmerkung, kontakt, zustellung'); $this->KontaktModel->addOrder('kontakttyp'); $this->KontaktModel->addOrder('insertamum', 'DESC'); $where = $zustellung_only === true ? array('person_id' => $person_id, 'zustellung' => true) : array('person_id' => $person_id); @@ -268,16 +268,61 @@ class Person_model extends DB_Model public function checkDuplicate($person_id) { - $qry = "SELECT sp.person_id - FROM public.tbl_person p - LEFT JOIN public.tbl_person sp ON p.vorname = sp.vorname - AND p.nachname = sp.nachname - AND p.gebdatum = sp.gebdatum - JOIN public.tbl_prestudent ps ON sp.person_id = ps.person_id - JOIN public.tbl_prestudentstatus pss ON ps.prestudent_id = pss.prestudent_id - WHERE p.person_id = ? AND sp.person_id != ? AND pss.status_kurzbz = ?"; + $qry = "SELECT person_id + FROM public.tbl_prestudent p + JOIN + ( + SELECT DISTINCT ON(prestudent_id) * + FROM public.tbl_prestudentstatus + WHERE prestudent_id IN + ( + SELECT prestudent_id + FROM public.tbl_prestudent + WHERE person_id IN + ( + SELECT p2.person_id + FROM public.tbl_person p + JOIN public.tbl_person p2 + ON p.vorname = p2.vorname + AND p.nachname = p2.nachname + AND p.gebdatum = p2.gebdatum + AND p.person_id = ? + ) + ) + ORDER BY prestudent_id, datum DESC, insertamum DESC + ) ps USING(prestudent_id) + JOIN public.tbl_status USING(status_kurzbz) + WHERE status_kurzbz = 'Interessent' + AND studiengang_kz IN + ( + SELECT studiengang_kz + FROM public.tbl_prestudent p + JOIN + ( + SELECT DISTINCT ON(prestudent_id) * + FROM public.tbl_prestudentstatus + WHERE prestudent_id IN + ( + SELECT prestudent_id + FROM public.tbl_prestudent + WHERE person_id IN + ( + SELECT p2.person_id + FROM public.tbl_person p + JOIN public.tbl_person p2 + ON p.vorname = p2.vorname + AND p.nachname = p2.nachname + AND p.gebdatum = p2.gebdatum + AND p.person_id = ? + ) + ) + ORDER BY prestudent_id, datum DESC, insertamum DESC + ) ps USING(prestudent_id) + JOIN public.tbl_status USING(status_kurzbz) + WHERE status_kurzbz = 'Abbrecher' + ) + "; - - return $this->execQuery($qry, array($person_id, $person_id, 'Abbrecher')); + return $this->execQuery($qry, array($person_id, $person_id)); } } diff --git a/application/models/system/Issue_model.php b/application/models/system/Issue_model.php index 5dac85066..ab1f9ba6e 100644 --- a/application/models/system/Issue_model.php +++ b/application/models/system/Issue_model.php @@ -12,6 +12,45 @@ class Issue_model extends DB_Model $this->pk = 'issue_id'; } + /** + * Gets issues which are open, i.e. not resolved. + * @param array $fehlercodes only issues for given fehler are retrieved + * @param int $person_id + * @param string $oe_kurzbz + * @param string $fehlercode_extern + * @return object success with issues or error + */ + public function getOpenIssues($fehlercodes, $person_id = null, $oe_kurzbz = null, $fehlercode_extern = null) + { + $params = array($fehlercodes); + // issue exists for a fehlercode (or fehlercode_extern), person_id, oe_kurzbz, if not verarbeitet yet + $qry = 'SELECT issue_id, fehlercode, inhalt, fehlercode_extern, inhalt_extern, person_id, oe_kurzbz, + behebung_parameter, datum, verarbeitetvon, verarbeitetamum + FROM system.tbl_issue + WHERE fehlercode IN ? + AND verarbeitetamum IS NULL'; + + if (!isEmptyString($fehlercode_extern)) + { + $qry .= ' AND fehlercode_extern = ?'; + $params[] = $fehlercode_extern; + } + + if (isset($person_id)) + { + $qry .= ' AND person_id = ?'; + $params[] = $person_id; + } + + if (isset($oe_kurzbz)) + { + $qry .= ' AND oe_kurzbz = ?'; + $params[] = $oe_kurzbz; + } + + return $this->execQuery($qry, $params); + } + /** * Gets number of open (non-resolved) issues. * @param string $fehlercode unique error code diff --git a/application/views/lehre/anrechnung/approveAnrechnungDetail.php b/application/views/lehre/anrechnung/approveAnrechnungDetail.php index 4603708f4..cd38fd9ac 100644 --- a/application/views/lehre/anrechnung/approveAnrechnungDetail.php +++ b/application/views/lehre/anrechnung/approveAnrechnungDetail.php @@ -25,7 +25,8 @@ $this->load->view( 'bitteBegruendungAngeben', 'empfehlungWurdeAngefordert', 'anrechnungenWurdenGenehmigt', - 'anrechnungenWurdenAbgelehnt' + 'anrechnungenWurdenAbgelehnt', + 'nurLeseberechtigung' ), 'person' => array( 'student', @@ -72,7 +73,7 @@ $this->load->view( -
+
diff --git a/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php b/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php index 850affeea..308f702a3 100644 --- a/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php +++ b/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php @@ -48,7 +48,8 @@ $this->load->view( 'empfehlungWurdeAngefordert', 'empfehlungWurdeAngefordertAusnahmeWoKeineLektoren', 'anrechnungenWurdenGenehmigt', - 'anrechnungenWurdenAbgelehnt' + 'anrechnungenWurdenAbgelehnt', + 'nurLeseberechtigung' ), 'person' => array( 'student', @@ -101,7 +102,7 @@ $this->load->view(
-
+
widgetlib->widget( @@ -226,7 +227,7 @@ $this->load->view( class='fa fa-times'>
- ' target='_blank'> + ' target='_blank'> p->t('global', 'antragAnlegen'); ?>
diff --git a/application/views/person/bpk/bpkData.php b/application/views/person/bpk/bpkData.php index 3580ed4bc..1c70b44a6 100644 --- a/application/views/person/bpk/bpkData.php +++ b/application/views/person/bpk/bpkData.php @@ -3,7 +3,8 @@ 'query' => ' SELECT person_id, vorname, nachname, geschlecht, svnr, ersatzkennzeichen, matr_nr, - staatsbuergerschaft, gebdatum, false AS mitarbeiter + staatsbuergerschaft, gebdatum, false AS mitarbeiter, + (SELECT count(*) FROM public.tbl_akte WHERE person_id=tbl_person.person_id) AS anzahl_dokumente FROM public.tbl_person WHERE @@ -14,7 +15,8 @@ UNION SELECT person_id, vorname, nachname, geschlecht, svnr, ersatzkennzeichen, matr_nr, - staatsbuergerschaft, gebdatum, true AS mitarbeiter + staatsbuergerschaft, gebdatum, true AS mitarbeiter, + (SELECT count(*) FROM public.tbl_akte WHERE person_id=tbl_person.person_id) AS anzahl_dokumente FROM public.tbl_person JOIN public.tbl_benutzer USING(person_id) @@ -36,7 +38,8 @@ ucfirst($this->p->t('person', 'matrikelnummer')), ucfirst($this->p->t('person', 'staatsbuergerschaft')), ucfirst($this->p->t('person', 'geburtsdatum')), - 'Mitarbeiter' + 'Mitarbeiter', + 'Anzahl Dokumente' ), 'formatRow' => function($datasetRaw) { diff --git a/application/views/system/infocenter/infocenterData.php b/application/views/system/infocenter/infocenterData.php index d867c8613..f3849d622 100644 --- a/application/views/system/infocenter/infocenterData.php +++ b/application/views/system/infocenter/infocenterData.php @@ -414,6 +414,10 @@ { $datasetRaw->{'OnholdDate'} = '-'; } + else + { + $datasetRaw->{'OnholdDate'} = date_format(date_create($datasetRaw->{'OnholdDate'}), 'Y-m-d H:i'); + } if ($datasetRaw->{'StgAbgeschickt'} == null) { diff --git a/application/views/system/infocenter/infocenterFreigegebenData.php b/application/views/system/infocenter/infocenterFreigegebenData.php index 39b1e3cca..92f062b62 100644 --- a/application/views/system/infocenter/infocenterFreigegebenData.php +++ b/application/views/system/infocenter/infocenterFreigegebenData.php @@ -11,6 +11,7 @@ $STATUS_KURZBZ = '\'Wartender\', \'Bewerber\', \'Aufgenommener\', \'Student\''; $STUDIENSEMESTER = '\''.$this->variablelib->getVar('infocenter_studiensemester').'\''; $ORG_NAME = '\'InfoCenter\''; + $IDENTITY = '\'identity\''; $query = ' SELECT @@ -245,7 +246,15 @@ $query = ' LIMIT 1 ) LIMIT 1 - ) AS "InfoCenterMitarbeiter" + ) AS "InfoCenterMitarbeiter", + ( + SELECT akte.akte_id + FROM public.tbl_akte akte + JOIN public.tbl_dokument USING (dokument_kurzbz) + WHERE akte.person_id = p.person_id + AND dokument_kurzbz = '. $IDENTITY .' + LIMIT 1 + ) AS "AktenId" FROM public.tbl_person p LEFT JOIN ( SELECT tpl.person_id, @@ -317,7 +326,8 @@ $query = ' 'Reihungstest date', 'ZGV Nation BA', 'ZGV Nation MA', - 'InfoCenter Mitarbeiter' + 'InfoCenter Mitarbeiter', + 'Identitätsnachweis' ), 'formatRow' => function($datasetRaw) { @@ -425,6 +435,19 @@ $query = ' $datasetRaw->{'InfoCenterMitarbeiter'} = 'Ja'; } + if ($datasetRaw->{'AktenId'} !== null) + { + $datasetRaw->{'AktenId'} = sprintf( + 'Identitätsnachweis', + $datasetRaw->{'AktenId'} + ); + } + else + { + $datasetRaw->{'AktenId'} = '-'; + } + + return $datasetRaw; }, 'markRow' => function($datasetRaw) { diff --git a/application/views/templates/FHC-Header.php b/application/views/templates/FHC-Header.php index f4ba1bb4b..8620f8d1c 100644 --- a/application/views/templates/FHC-Header.php +++ b/application/views/templates/FHC-Header.php @@ -10,6 +10,7 @@ // By default set the parameters to null $title = isset($title) ? $title : null; + $refresh = isset($refresh) ? $refresh : null; $customCSSs = isset($customCSSs) ? $customCSSs : null; $customJSs = isset($customJSs) ? $customJSs : null; $phrases = isset($phrases) ? $phrases : null; @@ -48,6 +49,8 @@ + + - - - + '; + if (!$norefresh) + { + echo ''; + } +echo ' '; //Skript fuer den automatischen bildlauf diff --git a/cis/private/profile/zeitsperre_resturlaub.php b/cis/private/profile/zeitsperre_resturlaub.php index 6ceaff350..aba828241 100644 --- a/cis/private/profile/zeitsperre_resturlaub.php +++ b/cis/private/profile/zeitsperre_resturlaub.php @@ -45,7 +45,7 @@ $uid = get_uid(); $PHP_SELF = $_SERVER['PHP_SELF']; -$typen_arr = array("Urlaub", "PflegeU", "ZA", "Krank", "DienstF", "DienstV"); +$typen_arr = array("Urlaub", "PflegeU", "ZA", "Krank", "DienstF", "DienstV", "CovidSB", "CovidKS"); if(isset($_GET['type'])) $type=$_GET['type']; @@ -69,8 +69,8 @@ $datum_obj = new datum(); $ma= new mitarbeiter(); // definiert bis zu welchem Datum die Eintragung nicht mehr möglich ist -$zasperre = new zeitaufzeichnung(); -if ($sperrdat = $zasperre->getEintragungGesperrtBisForUser($uid)) +$zaufzeichnung = new zeitaufzeichnung(); +if ($sperrdat = $zaufzeichnung->getEintragungGesperrtBisForUser($uid)) $gesperrt_bis = $sperrdat; else if (defined('CIS_ZEITAUFZEICHNUNG_GESPERRT_BIS') && CIS_ZEITAUFZEICHNUNG_GESPERRT_BIS != '') $gesperrt_bis = CIS_ZEITAUFZEICHNUNG_GESPERRT_BIS; @@ -138,7 +138,15 @@ $( document ).ready(function() rows: 4, }); + $("#vondatum").change( + function() + { + $(".error").text(""); + } + ) + }); + // set holidays function which is configured in beforeShowDay function setHoliDays(date) { for (i = 0; i < holiDays.length; i++) { @@ -302,7 +310,9 @@ function showHideStudeDropDown() || dd.options[dd.selectedIndex].value == 'Urlaub' || dd.options[dd.selectedIndex].value == 'Krank' || dd.options[dd.selectedIndex].value == 'DienstF' - || dd.options[dd.selectedIndex].value == 'DienstV') + || dd.options[dd.selectedIndex].value == 'DienstV' + || dd.options[dd.selectedIndex].value == 'CovidSB' + || dd.options[dd.selectedIndex].value == 'CovidKS') { document.getElementById('vonStd').style.visibility = 'hidden'; document.getElementById('bisStd').style.visibility = 'hidden'; @@ -350,6 +360,40 @@ if(isset($_GET['type']) && ($_GET['type']=='edit_sperre' || $_GET['type']=='new_ $error_msg .= $p->t('zeitsperre/bisDatumUngueltig').' '; } + //Prüfen auf vorhandene Zeitaufzeichnung + if (isset($_POST['bisdatum']) && isset($_POST['vondatum']) + && $zaufzeichnung->existsZeitaufzeichnung($uid, $_POST['vondatum'], $_POST['bisdatum']) + // Nur Zeitaufzeichnungsrelevante Typen sollen das speichern blockieren + && in_array($_POST['zeitsperretyp_kurzbz'], zeitsperre::getBlockierendeZeitsperren())) + { + $error = true; + $error_msg .= $p->t('zeitsperre/zeitaufzeichnungVorhanden'); + } + + //Prüfen auf vorhandene Zeitsperre + if (isset($_POST['bisdatum']) && isset($_POST['vondatum']) + && in_array($_POST['zeitsperretyp_kurzbz'], zeitsperre::getBlockierendeZeitsperren())) + { + $von = $_POST['vondatum']; + $von2 = new DateTime($von); + $von2 = $von2->format('Y-m-d'); + $zeitsperre = new zeitsperre(); + + if ($zeitsperre->getSperreByDate($uid, $von2, null, zeitsperre::NUR_BLOCKIERENDE_ZEITSPERREN)) + { + foreach ($zeitsperre->result as $z) + { + // Beim editieren nicht mit dem eigenen Eintrag kollidieren + if($_GET['type'] == 'edit_sperre' && $z->zeitsperre_id == $_GET['id']) + continue; + + $typ = $z->zeitsperretyp_kurzbz; + $error = true; + $error_msg .= $p->t('zeitsperre/zeitsperreEingetragen', [$von, $typ]); + } + } + } + //von - bis-datum pruefen von darf nicht groesser als bis sein // 09.02.2009 simane $vondatum=0; diff --git a/cis/private/tools/zeitaufzeichnung.php b/cis/private/tools/zeitaufzeichnung.php index 1e91aec20..ba57b442f 100644 --- a/cis/private/tools/zeitaufzeichnung.php +++ b/cis/private/tools/zeitaufzeichnung.php @@ -1,5 +1,5 @@ getBerechtigungen($user); +$mas = new mitarbeiter(); +$mas->getUntergebene($user, true); +$untergebenen_arr = array(); +$untergebenen_arr = $mas->untergebene; +$adminView = false; + //Wenn User Administrator ist und UID uebergeben wurde, dann die Zeitaufzeichnung //des uebergebenen Users anzeigen if(isset($_GET['uid'])) { - if($rechte->isBerechtigt('admin') || $rechte->isBerechtigt('mitarbeiter/urlaube', null, 'suid')) + if ($rechte->isBerechtigt('admin') || $rechte->isBerechtigt('mitarbeiter/urlaube', null, 'suid') || + (in_array($_GET['uid'], $untergebenen_arr))) { $user = $_GET['uid']; $rechte = new benutzerberechtigung(); $rechte->getBerechtigungen($user); $passuid = true; + $adminView = true; } else { @@ -116,8 +125,6 @@ else $gesperrt_bis = '2015-08-31'; $sperrdatum = date('c', strtotime($gesperrt_bis)); -$datumjetzt = strtotime("+5 weeks"); -$limitdatum = date('c', $datumjetzt); // Uses urlencode to avoid XSS issues $zeitaufzeichnung_id = urlencode(isset($_GET['zeitaufzeichnung_id'])?$_GET['zeitaufzeichnung_id']:''); @@ -174,7 +181,7 @@ if(isset($_POST['export'])) } //CSV export für Übersicht zugeteilter Projekte - Konflikt mit normalen HTML headern deshalb weiter vorne -if(isset($_POST['projektübersichtexport'])) +if(isset($_GET['projektübersichtexport'])) { exportProjectOverviewAsCSV($user, ','); } @@ -291,11 +298,13 @@ echo ' { var uid = $("#uidpass").val(); var Datum = $(this).val(); + $("#triggerPhasenReset").text(""); Tag=Datum.substring(0,2); Monat=Datum.substring(3,5); Jahr=Datum.substring(6,10); var day = Jahr + "-" + Monat + "-" + Tag; checkBisverwendung(day,uid); + checkZeitsperre(day,uid); } ) @@ -347,6 +356,7 @@ echo ' document.getElementById("von_datum").value=ret_datum; document.getElementById("von_uhrzeit").value=ret_uhrzeit; + $("#von_datum").trigger("change"); } function foo(val) @@ -454,6 +464,7 @@ echo ' { document.getElementById("von_datum").value=document.getElementById("bis_datum").value; document.getElementById("von_uhrzeit").value=document.getElementById("bis_uhrzeit").value; + $("#von_datum").trigger("change"); } function checkdatum() @@ -642,7 +653,6 @@ echo ' } projphasenhtml += "<\/option>"; } - $("#projektphase").append(projphasenhtml); $("#projektphaseformgroup").show(); } @@ -747,6 +757,7 @@ echo ' Jahr=Datum.substring(6,10); var checkedDay = Jahr + "-" + Monat + "-" + Tag; checkBisverwendung(checkedDay, uid); + checkZeitsperre(checkedDay, uid); } function checkBisverwendung(day, uid) @@ -766,17 +777,51 @@ echo ' else { $("#homeofficeBlock").hide(); - } } }); } + function checkZeitsperre(day, uid) + { + $.ajax + ({ + type: "GET", + url: "zeitaufzeichnung_zeitsperren.php", + dataType: "json", + data: + { + day: day, + uid: uid + }, + success: function (json) + { + var output = ""; + if (json.length > 0) + { + output = "' . $p->t("zeitaufzeichnung/zeitsperreVorhanden", ['{day}', '{typ}']) . '"; + output = output.replace(\'{day}\', json[0].day); + output = output.replace(\'{typ}\', json[0].typ); + $("#errZeitsperren").show(); + $("#buttonSave").prop("disabled",true); + } + else + { + $("#errZeitsperren").hide(); + $("#buttonSave").prop("disabled",false); + output = ""; + } + $("#outputZeitsperren").html(output); + } + }); + } + '; + echo '

'.$p->t("zeitaufzeichnung/zeitaufzeichnungVon").' '.$db->convert_html_chars($bn->vorname).' '.$db->convert_html_chars($bn->nachname).'

'; // Wenn Kartennummer übergeben wurde dann hole uid von Karteninhaber @@ -790,388 +835,49 @@ if($kartennummer != '') } //Speichern der Daten -function checkVals ($oe_val, $project_val, $phase_val, $service_val) -{ - $error = 0; - if ($service_val && ( filter_var($service_val, FILTER_VALIDATE_INT) === false )) - $error = 1; - if ($phase_val && ( filter_var($phase_val, FILTER_VALIDATE_INT) === false )) - $error = 1; - if ($oe_val) - { - $oecheck = new organisationseinheit($oe_val); - if ($oecheck->errormsg) - $error = 1; - } - if ($project_val) - { - $procheck = new projekt($project_val); - if ($procheck->errormsg) - $error = 1; - } - return $error; -} - if(isset($_POST['save']) || isset($_POST['edit']) || isset($_POST['import'])) { - $zeit = new zeitaufzeichnung(); - - $projects_of_user = new projekt(); - $projects= $projects_of_user->getProjekteListForMitarbeiter($user); - $project_kurzbz_array = array(); - $projektph_of_user = new projektphase(); $projektphasen = $projektph_of_user->getProjectphaseForMitarbeiter($user); - $projectphasen_kurzbz_array = array(); - - foreach($projects as $prjct) - { - array_push($project_kurzbz_array, (string) $prjct->projekt_kurzbz); - } - foreach ($projektphasen as $pp) - { - array_push($projectphasen_kurzbz_array, (string) $pp->projektphase_id); - } - - $projectphase = new projektphase(); if ($_FILES['csv']['error'] == 0 && isset($_POST['import'])) { - $name = $_FILES['csv']['name']; - $tmpName = $_FILES['csv']['tmp_name']; - $mimeType = mime_content_type($_FILES['csv']['tmp_name']); - //echo($mimeType); - if($mimeType=='text/plain') - { - if(($handle = fopen($tmpName, 'r')) !== FALSE) - { - if (mb_detect_encoding(fgets($handle), 'UTF-8', true)) - { - set_time_limit(0); - $anzahl = 0; - $importtage_array = array(); - $ende_vorher = date('Y-m-d H:i:s'); - - while(($data = fgetcsv($handle, 1000, ';', '"')) !== FALSE) - { - if($data[0] == $user){ - if(!empty($data[6]) && !in_array($data[6], $project_kurzbz_array) && empty($data[7])) - { - echo ''.$p->t("global/fehlerBeimSpeichernDerDaten").': Eingabe nicht möglich, da Sie folgendem Projekt entweder nicht zugewiesen sind oder das Projekt schon abgeschlossen wurde: ('.$data[6].')
'; - } - elseif(!empty($data[7]) && !in_array($data[7], $projectphasen_kurzbz_array)) - { - echo ''.$p->t("global/fehlerBeimSpeichernDerDaten").': Eingabe nicht möglich, da Sie folgender Projektphase entweder nicht zugewiesen sind oder die Projektphase schon abgeschlossen wurde: ('.$data[7].')
'; - } - else - { - $vonCSV = $datum->formatDatum($data[2], $format='Y-m-d'); - $bisCSV = $datum->formatDatum($data[3], $format='Y-m-d'); - $dateVonCSV = new DateTime($vonCSV); - $dateBisCSV = new DateTime($bisCSV); - - if (!isset($data[5])) - $data[5] = NULL; - if (!isset($data[6])) - $data[6] = NULL; - if (!isset($data[7])) - $data[7] = NULL; - if (!isset($data[8])) - $data[8] = NULL; - if ($datum->formatDatum($data[2], $format='Y-m-d H:i:s') < $sperrdatum) - echo ''.$p->t("global/fehlerBeimSpeichernDerDaten").': Eingabe nicht möglich da vor dem Sperrdatum ('.$data[2].')
'; - elseif ($datum->formatDatum($data[2], $format='Y-m-d H:i:s') > $limitdatum) - echo ''.$p->t("global/fehlerBeimSpeichernDerDaten").': Eingabe nicht möglich da ('.$data[2].') zu weit in der Zukunft liegt.
'; - elseif ($dateVonCSV!=$dateBisCSV && $data[1]!="DienstreiseMT") - { - echo ''.$p->t("global/fehlerBeimSpeichernDerDaten").': Eingabe nicht möglich, da keine Zeitaufzeichnung über mehrere Tage erlaubt ist (ausgenommen Dienstreisen).
'; - } - elseif (empty($data[7]) && !empty($data[6]) && !$projects_of_user->checkProjectInCorrectTime($data[6], $data[2], $data[3])) - { - echo ''.$p->t("global/fehlerBeimSpeichernDerDaten").': Eingabe nicht möglich, da angegebenes Anfangs und Enddatum nicht in den Projektzeitrahmen fällt: ('.$data[2].') ('.$data[3].')
'; - } - elseif (!empty($data[7]) && !$projektph_of_user ->checkProjectphaseInCorrectTime($data[7], $data[2], $data[3])) - { - echo ''.$p->t("global/fehlerBeimSpeichernDerDaten").': Eingabe nicht möglich, da angegebenes Anfangs und Enddatum nicht in den Projektphasenzeitrahmen fällt: ('.$data[2].') ('.$data[3].')
'; - } - elseif (checkVals($data[5],$data[6],$data[7],$data[8])) - { - echo ''.$p->t("global/fehlerBeimSpeichernDerDaten").': Fehlerhafte Werte ('.$data[2].')
'; - } - else - { - if ($data[1] == 'LehreIntern') - $data[1] = 'Lehre'; - $zeit->new = true; - $zeit->beschreibung = NULL; - $zeit->oe_kurzbz_1 = NULL; - $zeit->projekt_kurzbz = NULL; - $zeit->projektphase_id = NULL; - $zeit->service_id = NULL; - - $zeit->insertamum = date('Y-m-d H:i:s'); - $zeit->updateamum = date('Y-m-d H:i:s'); - $zeit->updatevon = $user; - $zeit->insertvon = $user; - $zeit->uid = $data[0]; - $zeit->aktivitaet_kurzbz = $data[1]; - $zeit->start = $datum->formatDatum($data[2], $format='Y-m-d H:i:s'); - $zeit->ende = $datum->formatDatum($data[3], $format='Y-m-d H:i:s'); - if (isset($data[4])) - $zeit->beschreibung = $data[4]; - if (isset($data[5])) - $zeit->oe_kurzbz_1 = $data[5]; - if (isset($data[6])) - $zeit->projekt_kurzbz = $data[6]; - if (isset($data[7])) - $zeit->projektphase_id = $data[7]; - if (isset($data[8])) - $zeit->service_id = $data[8]; - if (isset($data[9])) - { - if (strtolower($data[9] == 'true')) - { - // check, ob homeoffice gemäß Bisverwendung - $verwendung = new bisverwendung(); - $verwendung->getVerwendungDatum($data[0],$vonCSV); - - foreach ($verwendung->result as $v) - // echo "homeoffice für Tag " . $vonCSV . " ". $v->homeoffice . " " . $v->bisverwendung_id . "
"; - - if ($v->homeoffice) - { - - // echo "homeoffice erlaubt
"; - $zeit->homeoffice = true; - } - else - { - echo ''.$p->t("zeitaufzeichnung/homeofficeNichtErlaubt", ($vonCSV)) .'
'; - - $zeit->homeoffice = false; - } - } - else - { - $zeit->homeoffice = false; - } - } - else - { - $zeit->homeoffice = false; - } - $tag = $datum->formatDatum($data[2], $format='Y-m-d'); - - if(!in_array($tag, $importtage_array)) - { - $importtage_array[] = $tag; - $zeit->deleteEntriesForUser($user, $tag); - $tag_aktuell = $tag; - } - else - { - if ($ende_vorher < $zeit->start) - { - $pause = new zeitaufzeichnung(); - $pause->new = true; - $pause->insertamum = date('Y-m-d H:i:s'); - $pause->updateamum = date('Y-m-d H:i:s'); - $pause->updatevon = $user; - $pause->insertvon = $user; - $pause->uid = $user; - $pause->aktivitaet_kurzbz = 'Pause'; - $pause->start = $ende_vorher; - $pause->ende = $zeit->start; - $pause->beschreibung = ''; - $pause->homeoffice = $homeoffice; - if(!$pause->save()) - { - echo ''.$p->t("global/fehlerBeimSpeichernDerDaten").': '.$pause->errormsg.'
'; - } - } - } - - $ende_vorher = $zeit->ende; - if($data[2] != $data[3]) - { - /* - if ($data[1] == 'LehreExtern') - { - $zeit->start = date('Y-m-d H:i:s', strtotime('+2 seconds', strtotime($data[2]))); - $zeit->ende = date('Y-m-d H:i:s', strtotime('-2 seconds', strtotime($data[3]))); - } - */ - if(!$zeit->save()) - { - echo ''.$p->t("global/fehlerBeimSpeichernDerDaten").': '.$zeit->errormsg.'('.$zeit->start.')
'; - } - else - $anzahl++; - } - else - $anzahl++; - - } - } - } - else if (strpos($data[0],'#') === false) - { - echo ''.$p->t("global/fehlerBeimSpeichernDerDaten").': Falsche UID nicht importiert ('.$data[0].')
'; - } - } - if($anzahl>0) - { - echo ''.$p->t("global/datenWurdenGespeichert").' ('.$anzahl.')'; - foreach ($importtage_array as $ptag) - { - $zeit->cleanPausenForUser($user, $ptag); - } - } - } - else - echo 'Datei konnte nicht importiert werden. Encoding ist nicht UTF-8!'; - } - } + $zeit_csv_import = new zeitaufzeichnung_import_csv($p, $user, $sperrdatum, $_FILES['csv']['tmp_name']); + $zeit_csv_import->import(); + echo $zeit_csv_import->OutputToHTML(); } else if ($datum->formatDatum($von, $format='Y-m-d H:i:s') < $sperrdatum) - echo '' .$p->t("global/fehlerBeimSpeichernDerDaten").': Eingabe nicht möglich da vor dem Sperrdatum'; + echo '' .$p->t("global/fehlerBeimSpeichernDerDaten").': Eingabe nicht möglich da vor dem Sperrdatum'; + // NOTE(chris): Save else if (isset($_POST['save']) || isset($_POST['edit'])) { - - if(isset($_POST['edit'])) + $zeit_post_import = new zeitaufzeichnung_import_post($p, $user, isset($_POST['edit']), [ + 'aktivitaet_kurzbz' => $aktivitaet_kurzbz, + 'beschreibung' => $beschreibung, + 'bis' => $bis, + 'bis_pause' => $bis_pause, + 'homeoffice' => $homeoffice, + 'kunde_uid' => $kunde_uid, + 'oe_kurzbz_1' => $oe_kurzbz_1, + 'oe_kurzbz_2' => $oe_kurzbz_2, + 'projekt_kurzbz' => $projekt_kurzbz, + 'projektphase_id' => $projektphase_id, + 'service_id' => $service_id, + 'von' => $von, + 'von_pause' => $von_pause, + 'zeitaufzeichnung_id' => $zeitaufzeichnung_id, + ]); + $zeit_post_import->import(); + echo $zeit_post_import->OutputToHTML(); + if (!$zeit_post_import->hasErrors() && !$zeit_post_import->hasWarnings()) { - if(!$zeit->load($zeitaufzeichnung_id)) - die($p->t("global/fehlerBeimLadenDesDatensatzes")); - - $zeit->new = false; - } - else - { - $zeit->new = true; - $zeit->insertamum = date('Y-m-d H:i:s'); - $zeit->insertvon = $user; - } - - $zeit->uid = $user; - $zeit->aktivitaet_kurzbz = $aktivitaet_kurzbz; - $zeit->start = $datum->formatDatum($von, $format='Y-m-d H:i:s'); - $zeit->ende = $datum->formatDatum($bis, $format='Y-m-d H:i:s'); - $zeit->beschreibung = $beschreibung; - $zeit->oe_kurzbz_1 = $oe_kurzbz_1; - $zeit->oe_kurzbz_2 = $oe_kurzbz_2; - $zeit->updateamum = date('Y-m-d H:i:s'); - $zeit->updatevon = $user; - $zeit->projekt_kurzbz = $projekt_kurzbz; - $zeit->projektphase_id = $projektphase_id; - $zeit->homeoffice = $homeoffice; - $zeit->service_id = $service_id; - $zeit->kunde_uid = $kunde_uid; - $saveerror = 0; - - if (!$projects_of_user->checkProjectInCorrectTime($projekt_kurzbz, $datum->formatDatum($von, $format='Y-m-d'), $datum->formatDatum($bis, $format='Y-m-d'))) - { - echo ''.$p->t("global/fehlerBeimSpeichernDerDaten").': Eingabe nicht möglich, da angegebenes Anfangs und Enddatum nicht in den Projektzeitrahmen fällt.
'; - $saveerror = 1; - } - elseif ($datum->formatDatum($von, $format='Y-m-d') > $limitdatum || $datum->formatDatum($bis, $format='Y-m-d') > $limitdatum) - { - echo ''.$p->t("global/fehlerBeimSpeichernDerDaten").': Eingabe nicht möglich, da angegebenes Anfangs oder Enddatum zu weit in der Zukunft liegt.
'; - $saveerror = 1; - } - elseif (!$projectphase->checkProjectphaseInCorrectTime($projektphase_id, $datum->formatDatum($von, $format='Y-m-d'), $datum->formatDatum($bis, $format='Y-m-d'))) - { - echo '

'.$p->t("global/fehlerBeimSpeichernDerDaten").': - Eingabe nicht möglich, da angegebenes Anfangs und Enddatum nicht in den Projektphasenzeitrahmen fällt.


'; - $saveerror = 1; - - } - elseif (abs($von-$bis)>0 && $aktivitaet_kurzbz!="DienstreiseMT") - { - echo ''.$p->t("global/fehlerBeimSpeichernDerDaten").': Eingabe nicht möglich, da keine Zeitaufzeichnung über mehrere Tage erlaubt ist (ausgenommen Dienstreisen).
'; - $saveerror = 1; - } - elseif (isset($_POST['genPause']) && (isset($_POST['save']) || isset($_POST['edit']))) - { - - $p_start = $datum->formatDatum($von_pause, $format='Y-m-d H:i:s'); - $p_end = $datum->formatDatum($bis_pause, $format='Y-m-d H:i:s'); - - // checken ob Pause innerhalb der Arbeitszeit ist - if ($zeit->start > $p_start || $zeit->ende < $p_end) - { - echo ''.$p->t("global/fehlerBeimSpeichernDerDaten").': Pause außerhalb der Arbeitszeit
'; - $saveerror = 1; - - } - elseif ($p_start > $p_end) - { - echo ''.$p->t("global/fehlerBeimSpeichernDerDaten").': Fehlerhafte Pausenzeiten
'; - $saveerror = 1; - } - else - { - //Eintrag Arbeit bis zur Pause - $zeit->ende = $datum->formatDatum($von_pause, $format='Y-m-d H:i:s'); - if(!$zeit->save()) - { - echo ''.$p->t("global/fehlerBeimSpeichernDerDaten").': '.$zeit->errormsg.'
'; - $saveerror = 1; - } - //Eintrag für die Pause - $pause = new zeitaufzeichnung(); - $pause->new = true; - $pause->insertamum = date('Y-m-d H:i:s'); - $pause->updateamum = date('Y-m-d H:i:s'); - $pause->updatevon = $user; - $pause->insertvon = $user; - $pause->uid = $user; - $pause->aktivitaet_kurzbz = 'Pause'; - $pause->homeoffice = $homeoffice; - $pause->start = $datum->formatDatum($von_pause, $format='Y-m-d H:i:s'); - $pause->ende = $datum->formatDatum($bis_pause, $format='Y-m-d H:i:s'); - $pause->beschreibung = ''; - if(!$pause->save()) - { - echo ''.$p->t("global/fehlerBeimSpeichernDerDaten").': '.$pause->errormsg.'
'; - $saveerror = 1; - } - // Eintrag Arbeit ab der Pause - if ($zeit->new == false) - { - $zeit->new = true; - $zeit->insertamum = date('Y-m-d H:i:s'); - $zeit->insertvon = $user; - } - - $zeit->start = $datum->formatDatum($bis_pause, $format='Y-m-d H:i:s'); - $zeit->ende = $datum->formatDatum($bis, $format='Y-m-d H:i:s'); - if(!$zeit->save()) - { - echo ''.$p->t("global/fehlerBeimSpeichernDerDaten").': '.$zeit->errormsg.'
'; - $saveerror = 1; - } - } - } - elseif (!isset($_POST['genPause'])) - { - if(!$zeit->save()) - { - echo ''.$p->t("global/fehlerBeimSpeichernDerDaten").': '.$zeit->errormsg.''; - $saveerror = 1; - } - } - - if ($saveerror == 0) - { - echo ''.$p->t("global/datenWurdenGespeichert").''; - // Nach dem Speichern in den neu Modus springen und als Von Zeit // das Ende des letzten Eintrages eintragen $zeitaufzeichnung_id = ''; - $uid = $zeit->uid; + $uid = $user; $aktivitaet_kurzbz = ''; - $von = date('d.m.Y H:i', $datum->mktime_fromtimestamp($zeit->ende)); - $bis = date('d.m.Y H:i', $datum->mktime_fromtimestamp($zeit->ende)+3600); + $von = date('d.m.Y H:i', $datum->mktime_fromtimestamp($datum->formatDatum($bis, $format = 'Y-m-d H:i:s'))); + $bis = date('d.m.Y H:i', $datum->mktime_fromtimestamp($datum->formatDatum($bis, $format = 'Y-m-d H:i:s'))+3600); $beschreibung = ''; $oe_kurzbz_1 = ''; $oe_kurzbz_2 = ''; @@ -1183,7 +889,6 @@ if(isset($_POST['save']) || isset($_POST['edit']) || isset($_POST['import'])) } } - //Datensatz loeschen if(isset($_GET['type']) && $_GET['type']=='delete') { @@ -1193,13 +898,16 @@ if(isset($_GET['type']) && $_GET['type']=='delete') { if ($zeit->start < $sperrdatum) - echo ''.$p->t("global/fehlerBeimSpeichernDerDaten").': Eingabe nicht möglich da vor dem Sperrdatum'; + echo ''.$p->t("global/fehlerBeimSpeichernDerDaten").': Eingabe nicht möglich da vor dem Sperrdatum'; else { if($zeit->uid==$user) { if($zeit->delete($zeitaufzeichnung_id)) + { + $zeitaufzeichnung_id = ''; echo ''.$p->t("global/eintragWurdeGeloescht").''; + } else echo ''.$p->t("global/fehlerBeimLoeschenDesEintrags").''; } @@ -1254,7 +962,6 @@ if (isset($_GET['type']) && $_GET['type'] == 'edit') } } - //Projekte holen zu denen der Benutzer zugeteilt ist $projekt = new projekt(); @@ -1266,13 +973,19 @@ if ($projekt->getProjekteMitarbeiter($user, true)) echo " @@ -1291,13 +1004,32 @@ if ($projekt->getProjekteMitarbeiter($user, true)) } echo '

'.$p->t("urlaubstool/meineZeitsperren").'

'; echo $p->t("zeitaufzeichnung/supportAnfragen"); - echo ' - -
- ".$p->t("zeitaufzeichnung/neu")." | + ".$p->t("zeitaufzeichnung/neu")." | "; - CSV Import | + if (!$adminView) + { + echo + " + CSV Import | - CSV Export | + CSV Export | + "; + } - Projektübersichtexport"; + echo " Projektübersichtexport"; if($anzprojekte > 0) echo " | ".$p->t("zeitaufzeichnung/projektexport").""; echo "
'; + + //Dropdown timesheets Mitarbeiter + if ($untergebenen_arr) + { + $mitarbeiter = new mitarbeiter(); + $mitarbeiter->getMitarbeiterArray($untergebenen_arr); + + echo " +

+ + "; + } + echo ' + '; echo ''; - - echo ''; + echo ' - - - '; - - - - $tag=$datumtag; - $tagessumme='00:00'; - $pausesumme='00:00'; - $elsumme='00:00'; - $ersumme = '00:00'; - $extlehrearr = array(); - $tagesbeginn = ''; - $tagesende = ''; - $pflichtpause = false; - $wochensaldo = $datum_obj->sumZeit($wochensaldo,$tagessaldo ); - //} - //else - //{ - // echo ''; - //} + $lang = getSprache(); + if ($lang == 'German') + $langindex = 1; + else + $langindex = 2; + echo ''.$tagbez[$langindex][$datum->formatDatum($tag,'N')].' '.$datum->formatDatum($tag,'d.m.Y').''.$zeitsperre_text.''.$pausefehlt_str; + if ($ersumme != '00:00') + $erstr = ' (+ '.$ersumme.' ER)'; + else + { + $erstr = ''; + } + echo ' + + + '; + $tag=$datumtag; + $tagessumme='00:00'; + $pausesumme='00:00'; + $elsumme='00:00'; + $ersumme = '00:00'; + $extlehrearr = array(); + $tagesbeginn = ''; + $tagesende = ''; + $pflichtpause = false; + $wochensaldo = $datum_obj->sumZeit($wochensaldo,$tagessaldo ); } // Nach jeder Woche eine Summenzeile einfuegen und eine neue Tabelle beginnen @@ -1907,7 +1646,7 @@ if ($projekt->getProjekteMitarbeiter($user, true)) $ersumme_woche = '00:00'; } - // Diestreisen NEU + // Dienstreisen NEU if (array_key_exists($datumtag, $dr_arr)) { $colspan=($za_simple)?6:8; @@ -1926,8 +1665,6 @@ if ($projekt->getProjekteMitarbeiter($user, true)) echo ''; echo ''; echo '\n"; echo "\n"; - echo " \n"; - echo " \n"; + + if (!$adminView) + { + if(!isset($_GET['filter']) && ($row->uid==$user && $row->datum > $sperrdatum)) + echo ''.$p->t("global/bearbeiten").''; + } + echo "\n"; + echo " \n"; + echo " \n"; 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') $tagesbeginn = $row->start; @@ -2021,17 +1766,8 @@ if ($projekt->getProjekteMitarbeiter($user, true)) '; } - - //echo $p->t("zeitaufzeichnung/gesamtdauer").": ".$db->convert_html_chars($summe); Aukommentiert. Irrelevant } echo '
'; echo ''; + if (isset($_GET['projektexport'])) { $projektexpurl = dirname($_SERVER["PHP_SELF"]) .'/zeitaufzeichnung_projektliste.php'; @@ -1331,10 +1063,6 @@ if ($projekt->getProjekteMitarbeiter($user, true)) //Formular echo '
'; -/* echo '
- - '; + echo ''; + else + { + echo ''; + echo '  '; + echo ''; + } + } + echo '
'; - echo '';*/ if (isset($_GET['csvimport'])) { echo ''; @@ -1360,31 +1088,23 @@ if ($projekt->getProjekteMitarbeiter($user, true)) if (isset($_GET['projektübersichtexport'])) { - echo ''; echo ''; echo ''; echo ''; echo ''; - } //Aktivitaet echo ''; echo ' + + + '; + //Zeitsperren + echo '

'; + //Homeoffice Checkbox echo ' @@ -1634,23 +1363,30 @@ if ($projekt->getProjekteMitarbeiter($user, true)) '; - //Beschreibung - echo ''; - echo ''; - else - { - echo ''; - echo '  '; - echo ''; - } - echo '


CSV-Export

'.$p->t("zeitaufzeichnung/aktivitaet").''; - //if ($za_simple == 1) - $qry = "SELECT * FROM fue.tbl_aktivitaet where aktivitaet_kurzbz in (".$activities_str.") ORDER by sort,beschreibung"; - //else - // $qry = "SELECT * FROM fue.tbl_aktivitaet where sort != 5 or sort is null ORDER by sort,beschreibung"; + + $qry = "SELECT * FROM fue.tbl_aktivitaet where aktivitaet_kurzbz in (".$activities_str.") ORDER by sort,beschreibung"; + if($result = $db->db_query($qry)) { echo '
'.$p->t("zeitaufzeichnung/organisationseinheiten").'
  +

+
'.$p->t("global/von").' - '.$p->t("global/bis").' @@ -1621,6 +1347,9 @@ if ($projekt->getProjekteMitarbeiter($user, true))
'.$p->t("global/beschreibung").'
'; - //SpeichernButton - if($zeitaufzeichnung_id=='') - echo '
'; + if (!$adminView) + { + //Beschreibung + echo '
'.$p->t("global/beschreibung").'
'; + //SpeichernButton + if($zeitaufzeichnung_id == '') + echo '
'; + echo '


'; - echo '


'; + if (!$adminView) + { + echo '
'; + } + echo '
'; // Summen Lehre anzeigen $bv = new bisverwendung(); @@ -1695,7 +1431,8 @@ if ($projekt->getProjekteMitarbeiter($user, true)) echo ''; else echo ''; - //echo ''; + + $za = new zeitaufzeichnung(); if(isset($_GET['filter'])) @@ -1713,8 +1450,6 @@ if ($projekt->getProjekteMitarbeiter($user, true)) $dr->getDienstreisenUser($user, 180); $dr_arr = $dr->result; - //var_dump($dr->result); - if(count($za->result)>0) { //Uebersichtstabelle @@ -1755,112 +1490,116 @@ if ($projekt->getProjekteMitarbeiter($user, true)) $tag = $datumtag; if($tag!=$datumtag) { + if ($datum->formatDatum($tag,'N') == '6' || $datum->formatDatum($tag,'N') == '7') + $style = 'style="background-color:#eeeeee; font-size: 8pt;"'; + else + $style = 'style="background-color:#DCE4EF; font-size: 8pt;"'; - //if ($row->uid) - //{ - if ($datum->formatDatum($tag,'N') == '6' || $datum->formatDatum($tag,'N') == '7') - $style = 'style="background-color:#eeeeee; font-size: 8pt;"'; - else - $style = 'style="background-color:#DCE4EF; font-size: 8pt;"'; + // zeitsperren anzeigen + if (array_key_exists($datum->formatDatum($tag,'Y-m-d'), $zeitsperren)) + { + $zeitsperre_text = " -- ".$zeitsperren[$datum->formatDatum($tag,'Y-m-d')]." -- "; + $style = 'style="background-color:#cccccc; font-size: 8pt;"'; + } + else + $zeitsperre_text = ''; + if (isset($_GET["von_datum"]) && $datum->formatDatum($tag, 'd.m.Y') == $_GET["von_datum"]) + $style = 'style="border-top: 3px solid #8DBDD8; border-bottom: 3px solid #8DBDD8"'; - // zeitsperren anzeigen - if (array_key_exists($datum->formatDatum($tag,'Y-m-d'), $zeitsperren)) + list($h1, $m1) = explode(':', $pausesumme); + $pausesumme = $h1*3600+$m1*60; + $tagessaldo = $datum->mktime_fromtimestamp($datum->formatDatum($tagesende, $format='Y-m-d H:i:s'))-$datum->mktime_fromtimestamp($datum->formatDatum($tagesbeginn, $format='Y-m-d H:i:s'))-3600; + foreach($extlehrearr as $el) + { + if ($el["start"] > $tagesbeginn && $el["ende"] < $tagesende) + $elsumme = $datum_obj->sumZeit($elsumme, $el["diff"]); + } + list($h2, $m2) = explode(':', $elsumme); + $elsumme = $h2*3600+$m2*60; + if ($datum->formatDatum($tag, 'Y-m-d') >= '2019-11-06') + { + $pausesumme = $pausesumme; + } + else if ($tagessaldo > 18000 && $tagessaldo < 19800 && $pflichtpause==false && $elsumme == 0) + { + $pausesumme = $tagessaldo-18000; + } + else if ($tagessaldo>18000 && $pflichtpause==false && $elsumme == 0) + { + $pausesumme = $pausesumme+1800; + } + + if ($elsumme > 0){ + $pausesumme = $pausesumme + $elsumme; + $pflichtpause = true; + } + + $tagessaldo = $tagessaldo-$pausesumme; + // fehlende Pausen berechnen + $pausefehlt_str = ''; + + //Prüfung auf azgrelevant und blockierende Pausenfehler + $linkExclamation = APP_ROOT. 'skin/images/exclamation.png'; + $linkInformation = APP_ROOT. 'skin/images/information.png'; + + $za = new zeitaufzeichnung(); + $verwendung = new bisverwendung(); + if ($za->checkPausenErrors($user, $tag)) + { + $verwendung->getVerwendungDatum($user, $tag); + foreach ($verwendung->result as $v) { - $zeitsperre_text = " -- ".$zeitsperren[$datum->formatDatum($tag,'Y-m-d')]." -- "; - $style = 'style="background-color:#cccccc; font-size: 8pt;"'; + if ($v->azgrelevant) + { + $pausefehlt_str = ' -- Pause fehlt oder zu kurz -- '; + } + else + { + $pausefehlt_str = ' -- Pause fehlt --'; + } } - else - $zeitsperre_text = ''; - //var_dump($zs->result); - if (isset($_GET["von_datum"]) && $datum->formatDatum($tag, 'd.m.Y') == $_GET["von_datum"]) - $style = 'style="border-top: 3px solid #8DBDD8; border-bottom: 3px solid #8DBDD8"'; + } - list($h1, $m1) = explode(':', $pausesumme); - $pausesumme = $h1*3600+$m1*60; - $tagessaldo = $datum->mktime_fromtimestamp($datum->formatDatum($tagesende, $format='Y-m-d H:i:s'))-$datum->mktime_fromtimestamp($datum->formatDatum($tagesbeginn, $format='Y-m-d H:i:s'))-3600; - foreach($extlehrearr as $el) - { - if ($el["start"] > $tagesbeginn && $el["ende"] < $tagesende) - $elsumme = $datum_obj->sumZeit($elsumme, $el["diff"]); - } - list($h2, $m2) = explode(':', $elsumme); - $elsumme = $h2*3600+$m2*60; - if ($datum->formatDatum($tag, 'Y-m-d') >= '2019-11-06') - { - $pausesumme = $pausesumme; - } - else if ($tagessaldo > 18000 && $tagessaldo < 19800 && $pflichtpause==false && $elsumme == 0) - { - $pausesumme = $tagessaldo-18000; - } - else if ($tagessaldo>18000 && $pflichtpause==false && $elsumme == 0) - { - $pausesumme = $pausesumme+1800; - } + $tagessaldo = date('H:i', ($tagessaldo)); + $colspan = ($za_simple)?6:8; + echo '
'; - if ($elsumme > 0){ - $pausesumme = $pausesumme + $elsumme; - $pflichtpause = true; - } + // Zusaetzlicher span fuer Addon Informationen - $tagessaldo = $tagessaldo-$pausesumme; - // fehlende Pausen berechnen - $pausefehlt_str = ''; - if ($tagessaldo > 19800 && $pausesumme < 1800) - $pausefehlt_str = '-- Pause fehlt oder zu kurz --'; - elseif ($tagessaldo > 18000 && $tagessaldo < 19800 && $pausesumme < $tagessaldo - 18000) - $pausefehlt_str = '-- Pause fehlt oder zu kurz --'; - - - $tagessaldo = date('H:i', ($tagessaldo)); - $colspan = ($za_simple)?6:8; - echo '
'; - - // Zusaetzlicher span fuer Addon Informationen - - $lang = getSprache(); - if ($lang == 'German') - $langindex = 1; - else - $langindex = 2; - echo ''.$tagbez[$langindex][$datum->formatDatum($tag,'N')].' '.$datum->formatDatum($tag,'d.m.Y').''.$zeitsperre_text.''.$pausefehlt_str; - if ($ersumme != '00:00') - $erstr = ' (+ '.$ersumme.' ER)'; - else - { - $erstr = ''; - } - echo ' - '.$p->t("zeitaufzeichnung/arbeitszeit").': '.$datum->formatDatum($tagesbeginn, $format='H:i').'-'.$datum->formatDatum($tagesende, $format='H:i').' '.$p->t("eventkalender/uhr").'
- '.$p->t("zeitaufzeichnung/pause").': -
'.$tagessaldo.$erstr.'
'.date('H:i', ($pausesumme-3600)).'
'; - if ($tag > $sperrdatum) - echo '<-'; - - echo '
'.$datum->formatDatum($row->datum,'D d.m.Y').'
+ '.$p->t("zeitaufzeichnung/arbeitszeit").': '.$datum->formatDatum($tagesbeginn, $format='H:i').'-'.$datum->formatDatum($tagesende, $format='H:i').' '.$p->t("eventkalender/uhr").'
+ '.$p->t("zeitaufzeichnung/pause").': +
'.$tagessaldo.$erstr.'
'.date('H:i', ($pausesumme-3600)).'
'; + if ($tag > $sperrdatum) + echo '<-'; + echo '
'; -// if(!isset($_GET['filter']) && ($datumtag > $sperrdatum)) -// echo ''.$p->t("global/bearbeiten").''; echo ""; if(!isset($_GET['filter']) && ($datumtag > $sperrdatum)) @@ -1991,14 +1728,22 @@ if ($projekt->getProjekteMitarbeiter($user, true)) '.$db->convert_html_chars($row->diff).' beschreibung)).'">'.StringCut($db->convert_html_chars($row->beschreibung),20,null,'...').' '; - if(!isset($_GET['filter']) && ($row->uid==$user && $row->datum > $sperrdatum)) - echo ''.$p->t("global/bearbeiten").''; - echo ""; - if(!isset($_GET['filter']) && ($row->uid==$user && $row->start > $sperrdatum)) - echo ''.$p->t("global/loeschen").''; - echo "
"; + + if (!$adminView) + { + if(!isset($_GET['filter']) && ($row->uid==$user && $row->start > $sperrdatum)) + echo ''.$p->t("global/loeschen").''; + } + echo "
'; - /* - } - else - { - echo $p->t("zeitaufzeichnung/sieSindDerzeitKeinenProjektenZugeordnet"); - } - */ } else { diff --git a/cis/private/tools/zeitaufzeichnung_projektliste.php b/cis/private/tools/zeitaufzeichnung_projektliste.php index ce00eabc1..c96e816df 100644 --- a/cis/private/tools/zeitaufzeichnung_projektliste.php +++ b/cis/private/tools/zeitaufzeichnung_projektliste.php @@ -48,6 +48,11 @@ $sprache_index = $sprache_obj->index; $uid = get_uid(); +$mitarbeiter = new mitarbeiter(); +$mitarbeiter->getUntergebene($uid, true); +$untergebenen_arr = array(); +$untergebenen_arr = $mitarbeiter->untergebene; + //Wenn User Administrator ist und UID uebergeben wurde, dann die Zeitaufzeichnung //des uebergebenen Users anzeigen if (isset($_GET['uid'])) @@ -55,7 +60,7 @@ if (isset($_GET['uid'])) $rechte = new benutzerberechtigung(); $rechte->getBerechtigungen($uid); - if ($rechte->isBerechtigt('admin')) + if ($rechte->isBerechtigt('admin') || (in_array($_GET['uid'], $untergebenen_arr))) { $uid = $_GET['uid']; } @@ -74,9 +79,9 @@ $year = $_GET['projexpjahr']; $monthtext = $monatsname[$sprache_index][$month - 1]; $username = $benutzer->vorname." ".$benutzer->nachname; -$mitarbeiter = new mitarbeiter(); $mitarbeiter->load($uid); $persnr = $mitarbeiter->personalnummer; + $daysinmonth = cal_days_in_month(CAL_GREGORIAN, $month, $year); $date = new datum(); diff --git a/cis/private/tools/zeitaufzeichnung_projektphasen.php b/cis/private/tools/zeitaufzeichnung_projektphasen.php index cd0acc0bd..053f38b91 100644 --- a/cis/private/tools/zeitaufzeichnung_projektphasen.php +++ b/cis/private/tools/zeitaufzeichnung_projektphasen.php @@ -27,12 +27,18 @@ require_once('../../../include/projektphase.class.php'); require_once('../../../include/datum.class.php'); require_once('../../../include/benutzerberechtigung.class.php'); require_once('../../../include/phrasen.class.php'); +require_once('../../../include/mitarbeiter.class.php'); if (!$db = new basis_db()) die('Es konnte keine Verbindung zum Server aufgebaut werden.'); $user = get_uid(); +$mitarbeiter = new mitarbeiter(); +$mitarbeiter->getUntergebene($user, true); +$untergebenen_arr = array(); +$untergebenen_arr = $mitarbeiter->untergebene; + //Wenn User Administrator ist und UID uebergeben wurde, dann die Phasen //des uebergebenen Users anzeigen if (isset($_GET['uid']) && $user != $_GET['uid']) @@ -40,7 +46,7 @@ if (isset($_GET['uid']) && $user != $_GET['uid']) $rechte = new benutzerberechtigung(); $rechte->getBerechtigungen($user); - if ($rechte->isBerechtigt('admin')) + if ($rechte->isBerechtigt('admin') || (in_array($_GET['uid'], $untergebenen_arr))) { $user = $_GET['uid']; } diff --git a/cis/private/tools/zeitaufzeichnung_zeitsperren.php b/cis/private/tools/zeitaufzeichnung_zeitsperren.php new file mode 100644 index 000000000..47611ba6f --- /dev/null +++ b/cis/private/tools/zeitaufzeichnung_zeitsperren.php @@ -0,0 +1,68 @@ + + */ +/** + * Checks, if there is a zeitsperre for a certain date. It should not be possible + * to add a zeitaufzeichnung with a holiday (or else) entry on the same day. + */ + + +require_once('../../../config/cis.config.inc.php'); +require_once('../../../include/globals.inc.php'); +require_once('../../../include/phrasen.class.php'); +require_once('../../../include/benutzerberechtigung.class.php'); +require_once('../../../include/zeitsperre.class.php'); + +header('Content-Type: application/json; charset=utf-8'); +$sprache = getSprache(); +$p = new phrasen($sprache); + +if ( isset($_GET['day']) ) +{ + $auth = new authentication(); + $uid = $auth->getUser(); + $day = $_GET['day']; + + $zs = new zeitsperre(); + $sperreVorhanden = false; + $typ = ''; + $zs->getSperreByDate($uid, $day, null, zeitsperre::NUR_BLOCKIERENDE_ZEITSPERREN); + $result_obj = array(); + $now = new DateTime($day); + $now = $now->format('d.m.Y'); + + foreach ($zs->result as $z) + { + if ($z->zeitsperretyp_kurzbz) + { + $item['typ'] = $z->zeitsperretyp_kurzbz; + $item['day'] = $now; + $item['sperreVorhanden'] = true; + $result_obj[] = $item; + } + } + echo json_encode($result_obj); +} else { + http_response_code(500); + echo json_encode(array( + array( + "error" => 'missing parameter day' + ) + )); +} diff --git a/cis/testtool/login.php b/cis/testtool/login.php index a738c0a88..df4874a4c 100644 --- a/cis/testtool/login.php +++ b/cis/testtool/login.php @@ -55,7 +55,7 @@ if (isset($_GET['logout']) && $_GET['logout'] == true) echo ' diff --git a/cis/testtool/logout.html b/cis/testtool/logout.html new file mode 100644 index 000000000..58a0b191f --- /dev/null +++ b/cis/testtool/logout.html @@ -0,0 +1,31 @@ + + + + TestTool - FH Technikum Wien + + + + + +
+
+
+
+

Vielen Dank für die Teilnahme an unserem Aufnahmeverfahren.

+

+ Die zuständige Assistenz wird sich in den nächsten Tagen bei Ihnen melden. +

+ Zurück zur Startseite +
+
+

Thank you for participating in our admission procedure.

+

+ The assistant in charge will contact you in the next few days. +

+ Back to startpage +
+
+
+
+ + diff --git a/composer.json b/composer.json index 145927be0..4d1c2a896 100644 --- a/composer.json +++ b/composer.json @@ -246,7 +246,7 @@ "afarkas/html5shiv": "3.7.*", - "chriskacerguis/codeigniter-restserver": "3.0.*", + "chriskacerguis/codeigniter-restserver": "3.0.3", "christianbach/tablesorter": "1.0.*", "codeigniter/framework": "3.*", "components/jquery": "3.*", diff --git a/composer.lock b/composer.lock index 467af9461..6fc201986 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "d9941245360c86434d18413999bdc812", - "content-hash": "fbeb5d4ef943f6d1d55220cb844d11f1", + "hash": "ab181b377c4128ccde03cc50571b7ab6", + "content-hash": "e19ca762a6a929e69ae3b0e649fa4f6d", "packages": [ { "name": "BlackrockDigital/startbootstrap-sb-admin-2", @@ -130,24 +130,24 @@ }, { "name": "codeigniter/framework", - "version": "3.1.11", + "version": "3.1.13", "source": { "type": "git", "url": "https://github.com/bcit-ci/CodeIgniter.git", - "reference": "b73eb19aed66190c10c9cad476da7c36c271d6dc" + "reference": "bcb17eb8ba53a85de154439d0ab8ff1bed047bc9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bcit-ci/CodeIgniter/zipball/b73eb19aed66190c10c9cad476da7c36c271d6dc", - "reference": "b73eb19aed66190c10c9cad476da7c36c271d6dc", + "url": "https://api.github.com/repos/bcit-ci/CodeIgniter/zipball/bcb17eb8ba53a85de154439d0ab8ff1bed047bc9", + "reference": "bcb17eb8ba53a85de154439d0ab8ff1bed047bc9", "shasum": "" }, "require": { "php": ">=5.3.7" }, "require-dev": { - "mikey179/vfsstream": "1.1.*", - "phpunit/phpunit": "4.* || 5.*" + "mikey179/vfsstream": "1.6.*", + "phpunit/phpunit": "4.* || 5.* || 9.*" }, "suggest": { "paragonie/random_compat": "Provides better randomness in PHP 5.x" @@ -159,7 +159,7 @@ ], "description": "The CodeIgniter framework", "homepage": "https://codeigniter.com", - "time": "2019-09-19 12:08:45" + "time": "2022-03-03 13:21:49" }, { "name": "components/angular.js", @@ -502,16 +502,16 @@ }, { "name": "components/jquery", - "version": "3.4.1", + "version": "3.6.0", "source": { "type": "git", "url": "https://github.com/components/jquery.git", - "reference": "901828b7968b18319e377dc23d466f28426ee083" + "reference": "6cf38ee1fd04b6adf8e7dda161283aa35be818c3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/components/jquery/zipball/901828b7968b18319e377dc23d466f28426ee083", - "reference": "901828b7968b18319e377dc23d466f28426ee083", + "url": "https://api.github.com/repos/components/jquery/zipball/6cf38ee1fd04b6adf8e7dda161283aa35be818c3", + "reference": "6cf38ee1fd04b6adf8e7dda161283aa35be818c3", "shasum": "" }, "type": "component", @@ -540,7 +540,7 @@ ], "description": "jQuery JavaScript Library", "homepage": "http://jquery.com", - "time": "2019-10-23 05:15:13" + "time": "2021-03-20 19:13:42" }, { "name": "components/jqueryui", @@ -674,6 +674,7 @@ "captcha", "security" ], + "abandoned": true, "time": "2018-03-09 06:07:41" }, { @@ -750,16 +751,16 @@ }, { "name": "fzaninotto/faker", - "version": "v1.9.1", + "version": "v1.9.2", "source": { "type": "git", "url": "https://github.com/fzaninotto/Faker.git", - "reference": "fc10d778e4b84d5bd315dad194661e091d307c6f" + "reference": "848d8125239d7dbf8ab25cb7f054f1a630e68c2e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/fc10d778e4b84d5bd315dad194661e091d307c6f", - "reference": "fc10d778e4b84d5bd315dad194661e091d307c6f", + "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/848d8125239d7dbf8ab25cb7f054f1a630e68c2e", + "reference": "848d8125239d7dbf8ab25cb7f054f1a630e68c2e", "shasum": "" }, "require": { @@ -797,7 +798,7 @@ "fixtures" ], "abandoned": true, - "time": "2019-12-12 13:22:17" + "time": "2020-12-11 09:56:16" }, { "name": "joeldbirch/superfish", @@ -1086,16 +1087,16 @@ }, { "name": "ml/json-ld", - "version": "1.1.0", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/lanthaler/JsonLD.git", - "reference": "b5f82820c255cb64067b1c7adbb819cad4afa70a" + "reference": "c74a1aed5979ed1cfb1be35a55a305fd30e30b93" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lanthaler/JsonLD/zipball/b5f82820c255cb64067b1c7adbb819cad4afa70a", - "reference": "b5f82820c255cb64067b1c7adbb819cad4afa70a", + "url": "https://api.github.com/repos/lanthaler/JsonLD/zipball/c74a1aed5979ed1cfb1be35a55a305fd30e30b93", + "reference": "c74a1aed5979ed1cfb1be35a55a305fd30e30b93", "shasum": "" }, "require": { @@ -1131,7 +1132,7 @@ "JSON-LD", "jsonld" ], - "time": "2018-11-18 20:26:18" + "time": "2020-06-16 17:45:06" }, { "name": "moment/momentjs", @@ -1146,16 +1147,16 @@ }, { "name": "mottie/tablesorter", - "version": "v2.31.2", + "version": "v2.31.3", "source": { "type": "git", "url": "https://github.com/Mottie/tablesorter.git", - "reference": "6a32e5acc294be5b6c420c83d70d66e096533d8f" + "reference": "7202d5faf8105a5ecd1a2b7a653777618713ffe5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Mottie/tablesorter/zipball/6a32e5acc294be5b6c420c83d70d66e096533d8f", - "reference": "6a32e5acc294be5b6c420c83d70d66e096533d8f", + "url": "https://api.github.com/repos/Mottie/tablesorter/zipball/7202d5faf8105a5ecd1a2b7a653777618713ffe5", + "reference": "7202d5faf8105a5ecd1a2b7a653777618713ffe5", "shasum": "" }, "require": { @@ -1193,7 +1194,7 @@ "sorting", "table" ], - "time": "2019-12-01 13:49:52" + "time": "2020-03-03 13:46:03" }, { "name": "nategood/httpful", @@ -1322,16 +1323,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "2.0.31", + "version": "2.0.36", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "233a920cb38636a43b18d428f9a8db1f0a1a08f4" + "reference": "a97547126396548c224703a267a30af1592be146" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/233a920cb38636a43b18d428f9a8db1f0a1a08f4", - "reference": "233a920cb38636a43b18d428f9a8db1f0a1a08f4", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/a97547126396548c224703a267a30af1592be146", + "reference": "a97547126396548c224703a267a30af1592be146", "shasum": "" }, "require": { @@ -1409,7 +1410,7 @@ "x.509", "x509" ], - "time": "2021-04-06 13:56:45" + "time": "2022-01-30 08:48:36" }, { "name": "rmariuzzo/jquery-checkboxes", @@ -1435,16 +1436,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.13.1", + "version": "v1.19.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3" + "reference": "aed596913b70fae57be53d86faa2e9ef85a2297b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/aed596913b70fae57be53d86faa2e9ef85a2297b", + "reference": "aed596913b70fae57be53d86faa2e9ef85a2297b", "shasum": "" }, "require": { @@ -1456,16 +1457,20 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-main": "1.19-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1489,7 +1494,7 @@ "polyfill", "portable" ], - "time": "2019-11-27 13:56:44" + "time": "2020-10-23 09:01:57" }, { "name": "tapmodo/Jcrop", @@ -1504,16 +1509,16 @@ }, { "name": "tinymce/tinymce", - "version": "4.9.8", + "version": "4.9.11", "source": { "type": "git", "url": "https://github.com/tinymce/tinymce-dist.git", - "reference": "912df2bc85015c758e32d1262219f1653bbf9783" + "reference": "3a68b67d1120ab89c6760afeb787291703c9a7d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tinymce/tinymce-dist/zipball/912df2bc85015c758e32d1262219f1653bbf9783", - "reference": "912df2bc85015c758e32d1262219f1653bbf9783", + "url": "https://api.github.com/repos/tinymce/tinymce-dist/zipball/3a68b67d1120ab89c6760afeb787291703c9a7d5", + "reference": "3a68b67d1120ab89c6760afeb787291703c9a7d5", "shasum": "" }, "type": "component", @@ -1546,7 +1551,7 @@ "tinymce", "wysiwyg" ], - "time": "2020-01-28 05:03:01" + "time": "2020-07-13 05:29:19" }, { "name": "tomazdragar/SimpleCropper", @@ -1611,16 +1616,16 @@ }, { "name": "twig/twig", - "version": "v1.42.4", + "version": "v1.42.5", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "e587180584c3d2d6cb864a0454e777bb6dcb6152" + "reference": "87b2ea9d8f6fd014d0621ca089bb1b3769ea3f8e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/e587180584c3d2d6cb864a0454e777bb6dcb6152", - "reference": "e587180584c3d2d6cb864a0454e777bb6dcb6152", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/87b2ea9d8f6fd014d0621ca089bb1b3769ea3f8e", + "reference": "87b2ea9d8f6fd014d0621ca089bb1b3769ea3f8e", "shasum": "" }, "require": { @@ -1629,8 +1634,7 @@ }, "require-dev": { "psr/container": "^1.0", - "symfony/debug": "^3.4|^4.2", - "symfony/phpunit-bridge": "^4.4@dev|^5.0" + "symfony/phpunit-bridge": "^4.4|^5.0" }, "type": "library", "extra": { @@ -1659,7 +1663,6 @@ }, { "name": "Twig Team", - "homepage": "https://twig.symfony.com/contributors", "role": "Contributors" }, { @@ -1673,24 +1676,24 @@ "keywords": [ "templating" ], - "time": "2019-11-11 16:49:32" + "time": "2020-02-11 05:59:23" }, { "name": "zetacomponents/base", - "version": "1.9.1", + "version": "1.9.3", "source": { "type": "git", "url": "https://github.com/zetacomponents/Base.git", - "reference": "489e20235989ddc97fdd793af31ac803972454f1" + "reference": "2f432f4117a5aa2164d4fb1784f84db91dbdd3b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zetacomponents/Base/zipball/489e20235989ddc97fdd793af31ac803972454f1", - "reference": "489e20235989ddc97fdd793af31ac803972454f1", + "url": "https://api.github.com/repos/zetacomponents/Base/zipball/2f432f4117a5aa2164d4fb1784f84db91dbdd3b8", + "reference": "2f432f4117a5aa2164d4fb1784f84db91dbdd3b8", "shasum": "" }, "require-dev": { - "phpunit/phpunit": "~5.7", + "phpunit/phpunit": "~8.0", "zetacomponents/unit-test": "*" }, "type": "library", @@ -1737,27 +1740,27 @@ ], "description": "The Base package provides the basic infrastructure that all packages rely on. Therefore every component relies on this package.", "homepage": "https://github.com/zetacomponents", - "time": "2017-11-28 11:30:00" + "time": "2021-07-25 15:46:08" }, { "name": "zetacomponents/database", - "version": "1.5.1", + "version": "1.5.2", "source": { "type": "git", "url": "https://github.com/zetacomponents/Database.git", - "reference": "1750d34bf64b62f064c5b1aeb5374fbd06400904" + "reference": "85a2fd2af4e49f64d5c7616b6fb82c1b88de53b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zetacomponents/Database/zipball/1750d34bf64b62f064c5b1aeb5374fbd06400904", - "reference": "1750d34bf64b62f064c5b1aeb5374fbd06400904", + "url": "https://api.github.com/repos/zetacomponents/Database/zipball/85a2fd2af4e49f64d5c7616b6fb82c1b88de53b4", + "reference": "85a2fd2af4e49f64d5c7616b6fb82c1b88de53b4", "shasum": "" }, "require": { "zetacomponents/base": "~1.8" }, "require-dev": { - "phpunit/phpunit": "~5.7", + "phpunit/phpunit": "~8.0", "zetacomponents/database-schema": "~1.5", "zetacomponents/unit-test": "*" }, @@ -1814,27 +1817,28 @@ ], "description": "A lightweight database layer on top of PHP's PDO that allows you to utilize a database without having to take care of differences in SQL dialects.", "homepage": "https://github.com/zetacomponents", - "time": "2017-11-28 10:55:26" + "time": "2022-02-11 17:18:33" }, { "name": "zetacomponents/document", - "version": "1.3.1", + "version": "1.3.3", "source": { "type": "git", "url": "https://github.com/zetacomponents/Document.git", - "reference": "688abfde573cf3fe0730f82538fbd7aa9fc95bc8" + "reference": "196884f00871ea7dcbca9ab8bc85716f626e9cc3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zetacomponents/Document/zipball/688abfde573cf3fe0730f82538fbd7aa9fc95bc8", - "reference": "688abfde573cf3fe0730f82538fbd7aa9fc95bc8", + "url": "https://api.github.com/repos/zetacomponents/Document/zipball/196884f00871ea7dcbca9ab8bc85716f626e9cc3", + "reference": "196884f00871ea7dcbca9ab8bc85716f626e9cc3", "shasum": "" }, "require": { - "zetacomponents/base": "*" + "zetacomponents/base": "~1.8" }, "require-dev": { - "zetacomponents/unit-test": "dev-master" + "phpunit/phpunit": "~8.0", + "zetacomponents/unit-test": "*" }, "type": "library", "autoload": { @@ -1865,7 +1869,7 @@ ], "description": "The Document components provides a general conversion framework for different semantic document markup languages like XHTML, Docbook, RST and similar.", "homepage": "https://github.com/zetacomponents", - "time": "2013-12-19 11:40:00" + "time": "2022-02-11 17:26:31" }, { "name": "zetacomponents/workflow", diff --git a/content/fas.xul.php b/content/fas.xul.php index d1d43f473..19b24b0f0 100644 --- a/content/fas.xul.php +++ b/content/fas.xul.php @@ -903,7 +903,7 @@ foreach($addon_obj->result as $addon) echo ''; //echo ''; echo ''; - echo ''; + echo ''; } if($rechte->isBerechtigt('admin') || $rechte->isBerechtigt('mitarbeiter')) { diff --git a/content/fasoverlay.js.php b/content/fasoverlay.js.php index db26a9180..fcdc20228 100644 --- a/content/fasoverlay.js.php +++ b/content/fasoverlay.js.php @@ -741,6 +741,10 @@ function onLektorSelect(event) var uid=tree.view.getCellText(tree.currentIndex,col); var stg_idx = tree.view.getParentIndex(tree.currentIndex); + //Wenn der Filter angewendet wurde, gibt es keinen Parent. Daher wird hier der stg_idx auf 0 gesetzt. + if(stg_idx == -1 && uid != '') + stg_idx = 0; + //wenn direkt ein studiengang markiert wurde dann abbrechen if(stg_idx==-1) return; @@ -789,6 +793,58 @@ function onLektorSelect(event) } } +// Lektorenliste aktualisieren +function onLektorRefresh() +{ + netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); + var treeLektorenTree=document.getElementById('tree-lektor'); + // Input-Feld leeren + document.getElementById('fas-lektor-filter').value = ''; + var url = 'rdf/mitarbeiter.rdf.php?user=true&'+gettimestamp(); + + var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService); + var datasource = rdfService.GetDataSource(url); + var oldDatasources = treeLektorenTree.database.GetDataSources(); + + datasource.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource); + datasource.QueryInterface(Components.interfaces.nsIRDFXMLSink); + + treeLektorenTree.database.RemoveDataSource(oldDatasources.getNext()); + treeLektorenTree.database.AddDataSource(datasource); + treeLektorenTree.builder.rebuild(); +} + +// Lektorenliste filtern +function onLektorFilter() +{ + netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); + var filter=document.getElementById('fas-lektor-filter').value; + + var treeLektorenTree=document.getElementById('tree-lektor'); + + if(filter.length>2) + { + var url = 'rdf/mitarbeiter.rdf.php?filter='+encodeURIComponent(filter)+'&'+gettimestamp(); + var oldDatasources = treeLektorenTree.database.GetDataSources(); + + //Refresh damit die entfernten DS auch wirklich entfernt werden + treeLektorenTree.builder.rebuild(); + + var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService); + if(typeof(filter)=='undefined') + var datasource = rdfService.GetDataSource(url); + else + var datasource = rdfService.GetDataSourceBlocking(url); + datasource.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource); + datasource.QueryInterface(Components.interfaces.nsIRDFXMLSink); + treeLektorenTree.database.RemoveDataSource(oldDatasources.getNext()); + treeLektorenTree.database.AddDataSource(datasource); + if(typeof(filter)!='undefined') + treeLektorenTree.builder.rebuild(); + treeLektorenTree.builder.addListener(LektorTreeListener); + } +} + function loadURL(event) { var contentFrame = document.getElementById('contentFrame'); diff --git a/content/fasoverlay.xul.php b/content/fasoverlay.xul.php index 51564dc19..eea32279b 100644 --- a/content/fasoverlay.xul.php +++ b/content/fasoverlay.xul.php @@ -133,52 +133,68 @@ echo ' - - - - - + + + + + + + + + + + + + + + + - - + + + setFilename($filename); - + if ($sign === true) { $dokument->sign($user); @@ -528,6 +528,11 @@ else $bezeichnung = mb_substr($xsl." ".strtoupper($row->typ).strtoupper($row->kurzbz)." ".$semester.". Semester".' '.$ss . ' '. $lehrveranstaltung->bezeichnung, 0, 64); $titel = mb_substr($xsl."_".strtoupper($row->typ).strtoupper($row->kurzbz)."_".$semester.'_'.$ss. '_' . str_replace(' ', '_', $lehrveranstaltung->bezeichnung), 0, 60); } + elseif ($xsl == 'SZeugnis') + { + $bezeichnung = mb_substr($vorlage->bezeichnung." ".$studiengang->kuerzel, 0, 64); + $titel = mb_substr($vorlage->bezeichnung." ".$studiengang->kuerzel, 0, 64); + } else { $bezeichnung = mb_substr($xsl." ".strtoupper($row->typ).strtoupper($row->kurzbz)." ".$semester.". Semester".' '.$ss, 0, 64); @@ -574,7 +579,7 @@ else $dokument->setFilename($filename); $error = false; - + // XML-tag archivierbar ergaenzen $dokument->setXMLTag_archivierbar(); @@ -586,7 +591,7 @@ else { $dokument->sign($user); } - + if ($dokument->create($output)) $doc = $dokument->output(false); else diff --git a/content/planner.overlay.js.php b/content/planner.overlay.js.php index e71db9680..d51378b61 100644 --- a/content/planner.overlay.js.php +++ b/content/planner.overlay.js.php @@ -31,18 +31,18 @@ function treeProjektmenueSelect() { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); var tree=document.getElementById('tree-projektmenue'); - + // Wenn auf die Ueberschrift geklickt wird, soll nix passieren if(tree.currentIndex==-1) return; - + var bezeichnung = getTreeCellText(tree, "treecol-projektmenue-bezeichnung", tree.currentIndex); var oe=getTreeCellText(tree, "treecol-projektmenue-oe", tree.currentIndex); var projekt_kurzbz=getTreeCellText(tree, "treecol-projektmenue-projekt_kurzbz", tree.currentIndex); var projekt_phase=getTreeCellText(tree, "treecol-projektmenue-projekt_phase", tree.currentIndex); var projekt_phase_id=getTreeCellText(tree, "treecol-projektmenue-projekt_phase_id", tree.currentIndex); - - + + //Neu und Delete Button fuer Projekte und Phasen aktivieren/deaktivieren if (projekt_kurzbz=='') { @@ -54,7 +54,7 @@ function treeProjektmenueSelect() document.getElementById('toolbarbutton-projekt-neu').disabled=true; document.getElementById('toolbarbutton-projektphase-neu').disabled=false; } - + //Projekte neu laden try { @@ -75,8 +75,8 @@ function treeProjektmenueSelect() reloadRessourcePhasen(); } } - else - { + else + { // Wenn der Tab Phase oder Tasks ausgewaehlt ist auf die Projekte wechseln if(document.getElementById('tabs-planner-main').selectedItem==document.getElementById('tab-projektphase') || document.getElementById('tabs-planner-main').selectedItem==document.getElementById('tab-projekttask')) @@ -102,7 +102,7 @@ function treeProjektmenueSelect() } catch(e) {} - + var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService); datasourceTreeProjekt = rdfService.GetDataSource(datasource); datasourceTreeProjekt.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource); @@ -115,12 +115,12 @@ function treeProjektmenueSelect() { debug("whoops Projekt load failed with exception: "+e); } - + // Projektphasen neu laden if(projekt_kurzbz!='') { // Wenn ein Projekt angeklickt wird, ggf Karteireiter wechseln - + // Wenn der Ressourceauslastung Tab geoeffnet ist if(document.getElementById('tabs-planner-main').selectedItem==document.getElementById('tab-ressourceauslastung')) { @@ -135,7 +135,7 @@ function treeProjektmenueSelect() reloadRessourcePhasen(); } } - else + else { // Wenn der Tab Projekte oder Tasks ausgewaehlt ist auf die Phasen wechseln if(document.getElementById('tabs-planner-main').selectedItem==document.getElementById('tab-projekte') @@ -144,10 +144,11 @@ function treeProjektmenueSelect() document.getElementById('tabs-planner-main').selectedItem=document.getElementById('tab-projektphase'); } } - + try { var datasources="rdf/projektphase.rdf.php?"+gettimestamp(); + datasources = datasources + "&filterprj=" + encodeURIComponent(projekt_kurzbz); var ref="http://www.technikum-wien.at/projektphase/"+oe+"/"+projekt_kurzbz; var treePhase=document.getElementById('tree-projektphase'); @@ -165,7 +166,7 @@ function treeProjektmenueSelect() } catch(e) {} - + var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService); datasourceTreeProjektphase = rdfService.GetDataSource(datasources); datasourceTreeProjektphase.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource); @@ -180,7 +181,7 @@ function treeProjektmenueSelect() debug("whoops Projektphase load failed with exception: "+e); } } - + // Projekttasks neu laden if(projekt_phase_id!='') { @@ -190,12 +191,12 @@ function treeProjektmenueSelect() { document.getElementById('tabs-planner-main').selectedItem=document.getElementById('tab-projekttask'); } - LoadTasks(projekt_phase_id); + LoadTasks(projekt_phase_id); } - + document.getElementById('projekttask-toolbar-del').disabled=true; - - + + // Dokumente laden if(projekt_phase_id!='' || projekt_kurzbz!='') { @@ -203,21 +204,21 @@ function treeProjektmenueSelect() document.getElementById('toolbarbutton-projektdokument-zuweisung').disabled=false; try { - + if(projekt_phase_id!='') url = "rdf/dms.rdf.php?projektphase_id="+projekt_phase_id+"&"+gettimestamp(); else if(projekt_kurzbz!='') url = "rdf/dms.rdf.php?projekt_kurzbz="+projekt_kurzbz+"&"+gettimestamp(); - + var treeDokument=document.getElementById('tree-projektdokument'); - + //Alte DS entfernen var oldDatasources = treeDokument.database.GetDataSources(); while(oldDatasources.hasMoreElements()) { treeDokument.database.RemoveDataSource(oldDatasources.getNext()); } - + try { datasourceTreeDokument.removeXMLSinkObserver(DokumentTreeSinkObserver); @@ -226,7 +227,7 @@ function treeProjektmenueSelect() catch(e) {} treeDokument.builder.rebuild(); - + var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService); datasourceTreeDokument = rdfService.GetDataSource(url); datasourceTreeDokument.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource); @@ -245,13 +246,13 @@ function treeProjektmenueSelect() else { document.getElementById('toolbarbutton-projektdokument-neu').disabled=true; - document.getElementById('toolbarbutton-projektdokument-zuweisung').disabled=true; + document.getElementById('toolbarbutton-projektdokument-zuweisung').disabled=true; drawGantt(); } - - - - + + + + // Bestellung laden if(projekt_phase_id=='' && projekt_kurzbz!='') { @@ -259,14 +260,14 @@ function treeProjektmenueSelect() { url = "rdf/bestellung.rdf.php?projektKurzbz="+projekt_kurzbz+"&"+gettimestamp(); var treeBestellung=document.getElementById('tree-bestellung'); - + //Alte DS entfernen var oldDatasources = treeBestellung.database.GetDataSources(); while(oldDatasources.hasMoreElements()) { treeBestellung.database.RemoveDataSource(oldDatasources.getNext()); } - + try { datasourceTreeBestellung.removeXMLSinkObserver(BestellungTreeSinkObserver); @@ -274,7 +275,7 @@ function treeProjektmenueSelect() } catch(e) {} - + var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService); datasourceTreeBestellung = rdfService.GetDataSource(url); datasourceTreeBestellung.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource); @@ -323,7 +324,7 @@ function ProjektmenueRefresh(filter) global_filter='alle'; if(filter==undefined) filter=global_filter; - + global_filter=filter; try { @@ -332,7 +333,7 @@ function ProjektmenueRefresh(filter) url = "rdf/projektphase.rdf.php?"+gettimestamp(); else url = "rdf/projektphase.rdf.php?filter="+global_filter+"&"+gettimestamp(); - + var treeProjektmenue=document.getElementById('tree-projektmenue'); //Alte DS entfernen @@ -342,7 +343,7 @@ function ProjektmenueRefresh(filter) treeProjektmenue.database.RemoveDataSource(oldDatasources.getNext()); } treeProjektmenue.builder.rebuild(); - + var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService); datasourceTreeProjektmenue = rdfService.GetDataSource(url); datasourceTreeProjektmenue.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource); @@ -372,11 +373,11 @@ function loadURL(event) function parseRDFString(str, url) { - try + try { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - } - catch(e) + } + catch(e) { alert(e); return; @@ -423,34 +424,34 @@ var projektTaskDDObserver= { debug('treeDragDrop: e'); } - + var ds = dragservice_ds; var tree = document.getElementById('tree-projektmenue') var row = { } var col = { } var child = { } - + tree.treeBoxObject.getCellAt(evt.pageX, evt.pageY, row, col, child) - + col = tree.columns ? tree.columns["treecol-projektmenue-projekt_phase_id"] : "treecol-projektmenue-projekt_phase_id"; projektphaseID=tree.view.getCellText(row.value,col); - + if(projektphaseID == '') { alert('keine phase ausgewählt!'); - return false; + return false; } - var projekttask_id = dropdata.data; - + var projekttask_id = dropdata.data; + var soapBody = new SOAPObject("changeProjektPhase"); //soapBody.appendChild(new SOAPObject("username")).val('joe'); //soapBody.appendChild(new SOAPObject("passwort")).val('waschl'); soapBody.appendChild(new SOAPObject("projekttask_id")).val(projekttask_id); soapBody.appendChild(new SOAPObject("projektphase_id")).val(projektphaseID); - + var sr = new SOAPRequest("changeProjektPhase",soapBody); - + SOAPClient.Proxy="soap/projekttask.soap.php?"+gettimestamp(); SOAPClient.SendRequest(sr, clb_changePhaseTask); } @@ -473,7 +474,7 @@ function clb_changePhaseTask(respObj) } netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); document.getElementById('textbox-projekttaskdetail-projekttask_id').value=id; - + TaskSelectID=id; datasourceTreeTask.Refresh(false); //non blocking TaskTreeRefresh() diff --git a/content/projekt/projekt.overlay.xul.php b/content/projekt/projekt.overlay.xul.php index d51388eaa..c1cd7d100 100644 --- a/content/projekt/projekt.overlay.xul.php +++ b/content/projekt/projekt.overlay.xul.php @@ -109,6 +109,14 @@ echo ' + +