diff --git a/application/config/navigation.php b/application/config/navigation.php index d76b8a7f2..d415e9332 100644 --- a/application/config/navigation.php +++ b/application/config/navigation.php @@ -71,6 +71,16 @@ $config['navigation_header'] = array( 'lehre/lehrauftrag_erteilen:r' ) ), + 'zverfueg' => array( + 'link' => site_url('lehre/lvplanung/AdminZeitverfuegbarkeit'), + 'description' => 'Zeitverfügbarkeit', + 'expand' => true, + 'sort' => 45, + 'requiredPermissions' => array( + 'lehre/zeitverfuegbarkeit:rw', + 'lehre/zeitverfuegbarkeit:rw' + ) + ), 'zgvueberpruefung' => array( 'link' => site_url('system/infocenter/ZGVUeberpruefung'), 'description' => 'ZGV Überprüfung', diff --git a/application/controllers/jobs/LVPlanJob.php b/application/controllers/jobs/LVPlanJob.php index 2688e5cc9..2acbe5512 100644 --- a/application/controllers/jobs/LVPlanJob.php +++ b/application/controllers/jobs/LVPlanJob.php @@ -19,7 +19,7 @@ */ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class LVPlanJob extends CLI_Controller +class LVPlanJob extends JOB_Controller { /** * Initialize LVPlanJob Class @@ -149,4 +149,313 @@ class LVPlanJob extends CLI_Controller echo "Failed ".$fail."\n"; } } + + /** + * Send Mail to STGL, Kompetenzfeld and LV Planung about todays updated Zeitwuensche. + * STGL gets list only of lectors who updated future assigend courses concerning their STG. + * Kompetenzleitung gets list only of lectors who updated future assigend courses concerning their KF. + * LVPlanung gets list of lectors who updated future assigend courses. + */ + public function mailUpdatedZeitwuensche() + { + // Load models + $this->load->model('ressource/Stundenplandev_model', 'StundenplandevModel'); + $this->load->model('organisation/Studiensemester_model', 'StundiensemesterModel'); + $this->load->model('education/Lehreinheit_model', 'LehreinheitModel'); + $this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel'); + $this->load->model('person/Person_model', 'PersonModel'); + + // Load libs + $this->load->library('MailLib'); + + // Load helpers + $this->load->helper('hlp_sancho_helper'); + + // Start Log Message + $this->logInfo('Mail updated Zeitwuensche started.'); + + // Get all lectors, who updated their Zeitwunsch today + $db = new DB_Model(); + $result = $db->execReadOnlyQuery(' + SELECT + zwg.mitarbeiter_uid, tbl_lehrveranstaltung.studiengang_kz, tbl_lehrveranstaltung.oe_kurzbz + FROM + campus.tbl_zeitwunsch_gueltigkeit zwg + JOIN lehre.tbl_stundenplandev stpl + ON( + stpl.mitarbeiter_uid=zwg.mitarbeiter_uid + AND stpl.datum BETWEEN zwg.von AND COALESCE(zwg.bis, \'2999-12-31\') + AND (zwg.insertamum::date = (NOW()-\'1 days\'::interval)::date + OR + zwg.updateamum::date = (NOW()-\'1 days\'::interval)::date) + AND stpl.datum > now() + ) + JOIN lehre.tbl_lehreinheit USING(lehreinheit_id) + JOIN lehre.tbl_lehrveranstaltung USING(lehrveranstaltung_id) + GROUP BY + zwg.mitarbeiter_uid, tbl_lehrveranstaltung.studiengang_kz, tbl_lehrveranstaltung.oe_kurzbz + '); + + if (!hasData($result)) + { + return; // No updated Zeitwuensche today + } + + $uidByStg_arr = array(); // Mail data for Studiengang + $uidByOe_arr = array(); // Mail data for Kompetenzfeld + $uid_arr = array(); // Mail data for Kompetenzfeld + + // Loop through lectors, who updated their Zeitwunsch today + $changed_arr = getData($result); + foreach ($changed_arr as $row) + { + + // Add unique lector array + if (!in_array($row->mitarbeiter_uid, $uid_arr)) + { + $uid_arr[]= $row->mitarbeiter_uid; + } + + // Build unique Studiengang array + if (!array_key_exists($row->studiengang_kz, $uidByStg_arr)) + { + $uidByStg_arr[$row->studiengang_kz] = array($row->mitarbeiter_uid); + + } + elseif (!in_array($row->mitarbeiter_uid, $uidByStg_arr[$row->studiengang_kz])) + { + $uidByStg_arr[$row->studiengang_kz][]= $row->mitarbeiter_uid; + } + + // Build unique Kompetenzfeld array + if (!array_key_exists($row->oe_kurzbz, $uidByOe_arr)) + { + $uidByOe_arr[$row->oe_kurzbz] = array($row->mitarbeiter_uid); + + } + elseif (!in_array($row->mitarbeiter_uid, $uidByOe_arr[$row->oe_kurzbz])) + { + $uidByOe_arr[$row->oe_kurzbz][]= $row->mitarbeiter_uid; + } + } + + // Send mail to STG Assistenz + $result = $this->_sendMailToStg($uidByStg_arr); + if (isError($result)) + { + $this->logError(getError($result)); + } + + // Send mail to Kompetenzfeld Leitung + $result = $this->_sendMailToKF($uidByOe_arr); + if (isError($result)) + { + $this->logError(getError($result)); + } + + // Send mail to LV Planung + $result = $this->_sendMailToLvPlanung($uid_arr); + if (isError($result)) + { + $this->logError(getError($result)); + } + + // End Log Message + $this->logInfo('Mail updated Zeitwuensche ended.'); + } + + /** + * Send Mail to STGL Assistance about lectors, who teach LV assigend to the STG, and who updated Zeitwuensche. + * + * @param $data_arr + * @param $stg_bezeichnung + */ + private function _sendMailToStg($data_arr) + { + foreach ($data_arr as $stg_kurzbz => $uid_arr) + { + // Get STG eMail + $this->load->model('organisation/Studiengang_model', 'StudiengangModel'); + $result = $this->StudiengangModel->load($stg_kurzbz); + $stgMail = $result->retval[0]->email; + + $lektorenTabelle = ' + + + + + + + '; + + foreach($uid_arr as $uid) + { + $person = $this->PersonModel->getByUid($uid); + $lektorenTabelle.= ' + + + + + '; + } + + $lektorenTabelle.= '
NameUID
'. getData($person)[0]->vorname. ' '. getData($person)[0]->nachname. '['. $uid. ']
'; + + $contentData_arr = array( + 'datentabelle' => $lektorenTabelle + ); + + // Send mail + if (!sendSanchoMail( + 'ZeitwunschUpdateMail', + $contentData_arr, + $stgMail, + 'Änderung von Zeitwünschen', + 'sancho_header_min_bw.jpg', + 'sancho_footer_min_bw.jpg' + )) + { + $errorReceiverUid_arr[]= $stgMail; + } + } + + if (isset($errorReceiverUid_arr)) + { + return error('Mail updated Zeitwuensche could not be sent to :'. implode($errorReceiverUid_arr, ',')); + } + + return success(); + } + + /** + * Send Mail to Kompetenzfeld about lectors, who teach LV assigend to the Kompetenzfeld, and who updated Zeitwuensche. + * + * @param $data_arr + * @param $stg_bezeichnung + */ + private function _sendMailToKF($data_arr) + { + // Send mail to Komepetenzfeld Leitung + foreach ($data_arr as $oe_kurzbz => $uid_arr) + { + // Get KF Leitung eMail + $this->load->model('person/Benutzerfunktion_model', 'BenutzerfunktionModel'); + $result = $this->BenutzerfunktionModel->getBenutzerFunktionen( + 'Leitung', + $oe_kurzbz, + $activeoeonly = true, + $activebenonly = true + ); + + if(isSuccess($result) && hasData($result)) + { + $empfaenger = array(); + + foreach(getData($result) as $row) + $empfaenger[] = $row->uid. '@'. DOMAIN; + $kfMail = implode(',',$empfaenger); + + $lektorenTabelle = ' + + + + + + + '; + + foreach($uid_arr as $uid) + { + $person = $this->PersonModel->getByUid($uid); + $lektorenTabelle.= ' + + + + + '; + } + + $lektorenTabelle.= '
NameUID
'. getData($person)[0]->vorname. ' '. getData($person)[0]->nachname. '['. $uid. ']
'; + + $contentData_arr = array( + 'datentabelle' => $lektorenTabelle + ); + + // Send mail + if (!sendSanchoMail( + 'ZeitwunschUpdateMail', + $contentData_arr, + $kfMail, + 'Änderung von Zeitwünschen', + 'sancho_header_min_bw.jpg', + 'sancho_footer_min_bw.jpg' + )) + { + $errorReceiverUid_arr[]= $kfMail; + } + } + } + + if (isset($errorReceiverUid_arr)) + { + return error('Mail updated Zeitwuensche could not be sent to :'. implode($errorReceiverUid_arr, ',')); + } + + return success(); + } + + /** + * Send Mail to LV Planung about all lectors who updated Zeitwuensche. + * + * @param $data_arr + * @param $stg_bezeichnung + */ + private function _sendMailToLvPlanung($data_arr) + { + $lektorenTabelle = ' + + + + + + + '; + + foreach($data_arr as $lector) + { + $person = $this->PersonModel->getByUid($lector); + $lektorenTabelle.= ' + + + + + '; + } + + $lektorenTabelle.= '
NameUID
'. getData($person)[0]->vorname. ' '. getData($person)[0]->nachname. '['. $lector. ']
'; + + $contentData_arr = array( + 'datentabelle' => $lektorenTabelle + ); + + // Send mail + if (!sendSanchoMail( + 'ZeitwunschUpdateMail', + $contentData_arr, + MAIL_LVPLAN, + 'Änderung von Zeitwünschen', + 'sancho_header_min_bw.jpg', + 'sancho_footer_min_bw.jpg' + )) + { + $errorReceiver = MAIL_LVPLAN; + } + + if (isset($errorReceiver)) + { + return error('Mail updated Zeitwuensche could not be sent to :'. $errorReceiver); + } + + return success(); + } } diff --git a/application/controllers/lehre/anrechnung/RequestAnrechnung.php b/application/controllers/lehre/anrechnung/RequestAnrechnung.php index bc886a876..bf98e1c59 100644 --- a/application/controllers/lehre/anrechnung/RequestAnrechnung.php +++ b/application/controllers/lehre/anrechnung/RequestAnrechnung.php @@ -119,7 +119,7 @@ class requestAnrechnung extends Auth_Controller // Validate data if (empty($_FILES['uploadfile']['name'])) { - return $this->outputJsonError($this->p->t('ui', 'errorUploadFehlt')); + return $this->outputJsonError($this->p->t('ui', 'errorUploadFehltOderZuGross')); } if (isEmptyString($begruendung_id) || diff --git a/application/controllers/lehre/lvplanung/AdminZeitverfuegbarkeit.php b/application/controllers/lehre/lvplanung/AdminZeitverfuegbarkeit.php new file mode 100644 index 000000000..007b6974d --- /dev/null +++ b/application/controllers/lehre/lvplanung/AdminZeitverfuegbarkeit.php @@ -0,0 +1,310 @@ + 'lehre/zeitverfuegbarkeit:rw', + 'saveZeitverfuegbarkeit' => 'lehre/zeitverfuegbarkeit:rw', + 'deleteZeitverfuegbarkeit' => 'lehre/zeitverfuegbarkeit:rw' + ) + ); + + // Load models + $this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel'); + $this->load->model('person/Benutzer_model', 'BenutzerModel'); + $this->load->model('person/Person_model', 'PersonModel'); + $this->load->model('ressource/Zeitsperre_model', 'ZeitsperreModel'); + + // Load libraries + $this->load->library('PermissionLib'); + $this->load->library('AuthLib'); + $this->load->library('WidgetLib'); + + // Load helpers + $this->load->helper('array'); + + // Load language phrases + $this->loadPhrases( + array( + 'global', + 'ui', + 'lehre' + ) + ); + + $this->_setAuthUID(); // sets property uid + + $this->setControllerId(); // sets the controller id + } + + // ----------------------------------------------------------------------------------------------------------------- + // Public methods + + public function index() + { + // Get Studiengaenge the user is entitled for + $result = $this->permissionlib->getSTG_isEntitledFor(self::BERECHTIGUNG_ZEITVERFUEGBARKEIT); + $studiengang_kz_arr = !isEmptyArray($result) ? $result : array(); + + // Get lectors of that Studiengaenge + $result = $this->_getLehreinheitmitarbeiterByStg($studiengang_kz_arr); + $lektor_arr = hasData($result) ? getData($result) : array(); + + // Get available Stundenplan Stunden + $result = $this->_getStunden(); + $stunde_arr = hasData($result) ? getData($result) : array(); + + // Get actual Studiensemester to set min-limit Datepicker + $result = $this->StudiensemesterModel->getAkt(); + $studsemStart = hasData($result) ? getData($result)[0]->start : ''; + + $view_data = array( + 'studiengang_kz_arr' => $studiengang_kz_arr, + 'lektor_arr' => $lektor_arr, + 'stunde_arr' => $stunde_arr, + 'studsemStart' => $studsemStart + ); + + $this->load->view('lehre/lvplanung/adminZeitverfuegbarkeit.php', $view_data); + } + + /** + * Save or update Zeitverfuegbarkeit. + */ + public function saveZeitverfuegbarkeit() + { + $zeitsperre_id = $this->input->post('zeitsperre_id'); + $mitarbeiter_uid = $this->input->post('mitarbeiter_uid'); + $zeitsperretyp_kurzbz = $this->input->post('zeitsperretyp_kurzbz'); + $bezeichnung = $this->input->post('bezeichnung'); + $vonDatum = $this->input->post('vondatum'); + $vonStunde = isEmptyString($this->input->post('vonstunde')) ? null : $this->input->post('vonstunde'); + $bisDatum = $this->input->post('bisdatum'); + $bisStunde = isEmptyString($this->input->post('bisstunde')) ? null : $this->input->post('bisstunde'); + + $result = $this->_validate($this->input->post()); + if (isSuccess($result)) + { + if (is_numeric($zeitsperre_id)) + { + $result = $this->ZeitsperreModel->update( + $zeitsperre_id, + array( + 'vondatum' => $vonDatum, + 'vonstunde' => $vonStunde, + 'bisdatum' => $bisDatum, + 'bisstunde' => $bisStunde, + 'bezeichnung' => $bezeichnung + ) + ); + } + else + { + $result = $this->ZeitsperreModel->save( + $zeitsperretyp_kurzbz, + $mitarbeiter_uid, + $vonDatum, + $bisDatum, + $vonStunde, + $bisStunde, + $bezeichnung + ); + } + } + + if (isError($result)) + { + $this->terminateWithJsonError(getError($result)); + } + + $zeitsperre_id = getData($result); + + // Success response to AJAX + $this->outputJsonSuccess(array( + 'zeitsperre_id' => $zeitsperre_id, + 'msg' => $this->p->t('ui', 'gespeichert') + )); + } + + /** + * Delete Zeitverfuegbarkeit. + */ + public function deleteZeitverfuegbarkeit() + { + $zeitsperre_id = $this->input->post('zeitsperre_id'); + + if (!is_numeric($zeitsperre_id)) + { + $this->terminateWithJsonError('Wählen Sie einen Lehrenden aus der Zeitverfügbarkeit-Tabelle aus.'); + } + + // Load Zeitsperre + $result = $this->ZeitsperreModel->load($zeitsperre_id); + $delZsp = getData($result)[0]; + + // Delete + $result = $this->ZeitsperreModel->delete($zeitsperre_id); + + if (isError($result)) + { + $this->terminateWithJsonError(getError($result)); + } + + // Store Deletion query + $delQry = $this->db->last_query(); + + // Log deletion + $this->_logDeletion($delZsp, $delQry); + + $this->outputJsonSuccess(array('msg' => $this->p->t('ui', 'geloescht'))); + } + + // ----------------------------------------------------------------------------------------------------------------- + // Private methods + + /** + * 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'); + } + + /** + * Get all lectors that are assigend to Lehreinheiten in actual or future semester. + * + * @param $studiengang_kz_arr Restrict only to given stg- + * @return mixed + */ + private function _getLehreinheitmitarbeiterByStg($studiengang_kz_arr) + { + $this->MitarbeiterModel->addSelect('lema.mitarbeiter_uid, nachname, vorname'); + $this->MitarbeiterModel->addDistinct('lema.mitarbeiter_uid'); + $this->MitarbeiterModel->addJoin('lehre.tbl_lehreinheitmitarbeiter lema', 'tbl_mitarbeiter.mitarbeiter_uid = lema.mitarbeiter_uid'); + $this->MitarbeiterModel->addJoin('public.tbl_benutzer b', 'lema.mitarbeiter_uid = b.uid'); + $this->MitarbeiterModel->addJoin('public.tbl_person p', 'person_id'); + $this->MitarbeiterModel->addJoin('lehre.tbl_lehreinheit le', 'lehreinheit_id'); + $this->MitarbeiterModel->addJoin('lehre.tbl_lehrveranstaltung lv', 'lehrveranstaltung_id'); + $this->MitarbeiterModel->addJoin('public.tbl_studiensemester ss', 'studiensemester_kurzbz'); + $this->MitarbeiterModel->addOrder('lema.mitarbeiter_uid'); + + // Return lektoren assigned to actual or future lehreinheiten + return $this->MitarbeiterModel->loadWhere(' + lv.studiengang_kz IN (' . implode(', ', $studiengang_kz_arr) . ') + AND b.aktiv + AND personalnummer > 0 + AND NOW() <= ss.ende' + ); + } + + /** + * Get all available Stunden of Stundentabelle. + * + * @return mixed + */ + private function _getStunden() + { + $this->load->model('ressource/Stunde_model', 'StundeModel'); + $this->StundeModel->addOrder('stunde'); + + return $this->StundeModel->load(); + } + + /** + * Validaton checks performed on post data. + * + * @param $post + * @return array|stdClass + * @throws Exception + */ + private function _validate($post) + { + if (isEmptyString($post['mitarbeiter_uid'])) + { + return (error('LektorIn fehlt')); + } + + if (isEmptyString($post['bezeichnung'])) + { + return (error('Notiz fehlt')); + } + + if (isEmptyString($post['vondatum'])) + { + return error('Startdatum fehlt'); + } + + if (isEmptyString($post['bisdatum'])) + { + return error('Endedatum fehlt'); + } + + if (new DateTime($post['bisdatum']) < new DateTime($post['vondatum'])) + { + return error('Endedatum darf nicht VOR dem Startdatum liegen'); + } + + // Check bisstunde not after vonstunde within same day + if (new DateTime($post['bisdatum']) == new DateTime($post['vondatum'])) + { + if (is_numeric($post['vonstunde']) && is_numeric($post['bisstunde']) + && $post['bisstunde'] < $post['vonstunde']) + { + return error('Am gleichen Tag darf Endstunde nicht VOR der Startstunde liegen'); + } + } + + // Check dates are > then start of actual Studiensemester + $result = $this->StudiensemesterModel->getAkt(); + $studsemStart = hasData($result) ? getData($result)[0]->start : ''; + + if (new DateTime($post['vondatum']) < new DateTime($studsemStart) || + new DateTime($post['bisdatum']) < new DateTime($studsemStart)) + { + return error('Start- und Endedatum können nur für das aktuelle oder künftige Studiensemester geplant werden'); + } + + return success(); + } + + /** + * Log information of deleted Zeitsperre into log table. + * + * @param $delZsp object of deleted Zeitsperre + * @param $delQry string of performed delete query + * @return mixed + * @throws Exception + */ + private function _logDeletion($delZsp, $delQry) + { + $beschreibung = 'Zeitverfügbarkeitlöschung ' + . $delZsp->mitarbeiter_uid. ' ' + . (new DateTime($delZsp->vondatum))->format('d.m.Y') + . (is_null($delZsp->vonstunde) ? '(*)' : '('. $delZsp->vonstunde. ')') + . '-' + . (new DateTime($delZsp->bisdatum))->format('d.m.Y') + . (is_null($delZsp->bisstunde) ? '(*)' : '('. $delZsp->bisstunde. ')') + . ''; + + $this->load->model('system/Log_model', 'LogModel'); + return $this->LogModel->insert(array( + 'mitarbeiter_uid' => $this->_uid, + 'beschreibung' => substr($beschreibung, 0, 64), + 'sql' => $delQry + )); + } +} diff --git a/application/helpers/hlp_sancho_helper.php b/application/helpers/hlp_sancho_helper.php index 1653c44e7..d599e40bc 100644 --- a/application/helpers/hlp_sancho_helper.php +++ b/application/helpers/hlp_sancho_helper.php @@ -74,7 +74,7 @@ function sendSanchoMail($vorlage_kurzbz, $vorlage_data, $to, $subject, $headerIm $body = _parseMailContent('Sancho_Mail_Template', $layout); // Send mail - $ci->maillib->send($from, $to, $subject, $body, $alias = '', $cc, $bcc, $altMessage = '', $bulk = true, $autogenerated = true); + return $ci->maillib->send($from, $to, $subject, $body, $alias = '', $cc, $bcc, $altMessage = '', $bulk = true, $autogenerated = true); } /** diff --git a/application/models/crm/Prestudent_model.php b/application/models/crm/Prestudent_model.php index 5db9a98f1..b7804952e 100644 --- a/application/models/crm/Prestudent_model.php +++ b/application/models/crm/Prestudent_model.php @@ -560,7 +560,7 @@ class Prestudent_model extends DB_Model o.bezeichnung, (CASE WHEN sg.typ = \'b\' THEN ps.prestudent_id - WHEN sg.typ = \'m\' THEN p.prestudent_id + WHEN sg.typ = \'m\' THEN ps.prestudent_id ELSE NULL END) AS prestudent_id FROM public.tbl_prestudent p @@ -581,7 +581,7 @@ class Prestudent_model extends DB_Model return $this->execQuery($query, array($person_id)); } - + /** * Get latest ZGV Bezeichnung of Prestudent. * @@ -593,19 +593,19 @@ class Prestudent_model extends DB_Model { show_error('Prestudent_id is not numeric.'); } - + $language_index = getUserLanguage() == 'German' ? 0 : 1; - + $this->addSelect(' COALESCE( array_to_json(zgvmaster.bezeichnung::varchar[])->>' . $language_index . ', array_to_json(zgv.bezeichnung::varchar[])->>' . $language_index . ' ) AS bezeichnung' ); - + $this->addJoin('bis.tbl_zgv zgv', 'zgv_code', 'LEFT'); $this->addJoin('bis.tbl_zgvmaster zgvmaster', 'zgvmas_code', 'LEFT'); - + return $this->loadWhere(array( 'prestudent_id' => $prestudent_id )); @@ -618,8 +618,9 @@ class Prestudent_model extends DB_Model JOIN public.tbl_prestudent ps USING(prestudent_id) JOIN public.tbl_studiengang sg USING(studiengang_kz) JOIN lehre.tbl_studienplan sp USING(studienplan_id) + JOIN lehre.tbl_studienordnung so USING(studienordnung_id) WHERE ps.person_id = ? - AND UPPER((sg.typ || sg.kurzbz) || ':' || sp.orgform_kurzbz) = ? + AND UPPER(so.studiengangkurzbzlang || ':' || sp.orgform_kurzbz) = ? AND pss.studiensemester_kurzbz = ? AND"; @@ -629,7 +630,7 @@ class Prestudent_model extends DB_Model $query .= " NOT EXISTS"; $query .= " (SELECT 1 FROM public.tbl_prestudentstatus spss - JOIN public.tbl_prestudent sps USING(prestudent_id) + JOIN public.tbl_prestudent sps USING(prestudent_id) WHERE sps.prestudent_id = ps.prestudent_id AND spss.bewerbung_abgeschicktamum IS NOT NULL)"; diff --git a/application/models/organisation/Studiengang_model.php b/application/models/organisation/Studiengang_model.php index e2b3bdfb7..0d0c248a6 100644 --- a/application/models/organisation/Studiengang_model.php +++ b/application/models/organisation/Studiengang_model.php @@ -495,11 +495,12 @@ class Studiengang_model extends DB_Model public function getStudiengaengeWithOrgForm($typ, $semester) { - $query = "SELECT DISTINCT (UPPER(sg.typ || sg.kurzbz || ':' || sp.orgform_kurzbz)) AS Studiengang + $query = "SELECT DISTINCT (UPPER(so.studiengangkurzbzlang || ':' || sp.orgform_kurzbz)) AS Studiengang FROM public.tbl_studiengang sg JOIN lehre.tbl_studienordnung USING (studiengang_kz) JOIN lehre.tbl_studienplan sp USING (studienordnung_id) JOIN lehre.tbl_studienplan_semester spsem USING (studienplan_id) + JOIN lehre.tbl_studienordnung so USING(studienordnung_id) WHERE sp.aktiv = TRUE AND sg.aktiv = TRUE AND sg.typ IN ? AND spsem.studiensemester_kurzbz = ? ORDER BY Studiengang"; diff --git a/application/models/organisation/Studiensemester_model.php b/application/models/organisation/Studiensemester_model.php index 07783cf0d..e7a3d77b1 100644 --- a/application/models/organisation/Studiensemester_model.php +++ b/application/models/organisation/Studiensemester_model.php @@ -13,6 +13,20 @@ class Studiensemester_model extends DB_Model $this->hasSequence = false; } + /** + * Get actual Studiensemester. + * + * @return array + */ + public function getAkt() + { + return $this->loadWhere(array( + 'start <= ' => 'NOW()', + 'ende >= ' => 'NOW()' + ) + ); + } + // Get next study semester public function getNext() { @@ -167,15 +181,13 @@ class Studiensemester_model extends DB_Model if (date_format(date_create($from), 'Y-m-d') > (date_format(date_create($to), 'Y-m-d'))) return success(array()); - $query = "SELECT * - FROM public.tbl_studiensemester - WHERE - (ende > ?::date AND start < ?::date) - OR start = ?::date - OR ende = ?::date - ORDER BY start DESC"; + $query = " + SELECT * + FROM public.tbl_studiensemester + WHERE ( ?::date < ende AND ?::date > start ) + ORDER BY start DESC"; - return $this->execQuery($query, array($from, $to, $from, $to)); + return $this->execQuery($query, array($from, $to)); } /** diff --git a/application/models/ressource/Stundenplandev_model.php b/application/models/ressource/Stundenplandev_model.php index 9fa92ae5e..a498e209b 100644 --- a/application/models/ressource/Stundenplandev_model.php +++ b/application/models/ressource/Stundenplandev_model.php @@ -61,4 +61,98 @@ class Stundenplandev_model extends DB_Model return $this->execQuery($qry, $parametersArray); } + + /** + * Get Stundenplan data. + * + * @param null $lehrveranstaltung_id + * @param null $studiensemester_kurzbz + * @param null $lehreinheit_id + * @param null $mitarbeiter_uid + * @param null $student_uid + * @param false $nurBevorstehende If true, only future data is retrieved. + * @return array|false|stdClass|null + */ + public function getStundenplanData($lehrveranstaltung_id=null, $studiensemester_kurzbz=null, $lehreinheit_id=null, $mitarbeiter_uid=null, $student_uid=null, $nurBevorstehende = false) + { + $params = array(); + + $qry = "SELECT + stpl.datum, min(stpl.stunde) as stundevon, max(stpl.stunde) as stundebis, + stpl.lehreinheit_id, lehrfach.bezeichnung as lehrfach_bezeichnung, + array_agg( + CASE WHEN gruppe_kurzbz is not null THEN gruppe_kurzbz + ELSE (SELECT UPPER(typ || kurzbz) FROM public.tbl_studiengang WHERE studiengang_kz=stpl.studiengang_kz) || COALESCE(stpl.semester,'0') || COALESCE(stpl.verband,'') || COALESCE(stpl.gruppe,'') + END) as gruppen, array_agg(mitarbeiter_uid) as lektoren, + array_agg(ort_kurzbz) as orte, + array_agg(titel) as titel + FROM + lehre.tbl_stundenplandev as stpl + JOIN lehre.tbl_lehreinheit USING(lehreinheit_id) + JOIN lehre.tbl_lehrveranstaltung as lehrfach ON(tbl_lehreinheit.lehrfach_id=lehrfach.lehrveranstaltung_id) + WHERE "; + + if ($lehrveranstaltung_id != '') + { + $qry.=" + lehreinheit_id IN ( + SELECT lehreinheit_id FROM lehre.tbl_lehreinheit + WHERE lehrveranstaltung_id = ? + AND studiensemester_kurzbz = ? + )"; + + $params[]= $lehrveranstaltung_id; + $params[]= $studiensemester_kurzbz; + + } + elseif ($lehreinheit_id!='') + { + $qry.=" lehreinheit_id = ?"; + + $params[]= $lehreinheit_id; + } + elseif ($mitarbeiter_uid != '') + { + $qry.= " + mitarbeiter_uid = ? + AND lehreinheit_id IN ( + SELECT lehreinheit_id + FROM lehre.tbl_lehreinheitmitarbeiter + JOIN lehre.tbl_lehreinheit USING (lehreinheit_id) + WHERE mitarbeiter_uid = ? + AND studiensemester_kurzbz IN ( ? ) + )"; + $params[] = $mitarbeiter_uid; + $params[] = $mitarbeiter_uid; + $params[] = $studiensemester_kurzbz; + } + elseif ($student_uid != '') + { + $qry.=" + lehreinheit_id IN ( + SELECT lehreinheit_id + FROM campus.vw_student_lehrveranstaltung + WHERE uid = ? + AND studiensemester_kurzbz = ? + )"; + + $params[] = $student_uid; + $params[] = $studiensemester_kurzbz; + } + else + return false; + + if($nurBevorstehende) + { + $qry.= " AND stpl.datum >= NOW()::date "; + } + + $qry.= " + GROUP BY stpl.datum, stpl.unr, stpl.lehreinheit_id, lehrfach.bezeichnung + ORDER BY stpl.datum, min(stpl.stunde), stpl.unr, stpl.lehreinheit_id + "; + + return $this->execQuery($qry, $params); + } + } diff --git a/application/models/ressource/Zeitsperre_model.php b/application/models/ressource/Zeitsperre_model.php index 350a7be58..078d29d8b 100644 --- a/application/models/ressource/Zeitsperre_model.php +++ b/application/models/ressource/Zeitsperre_model.php @@ -12,6 +12,47 @@ class Zeitsperre_model extends DB_Model $this->pk = 'zeitsperre_id'; } + /** + * Save or update Zeitsperre. + * + * @param $zeitsperretyp_kurzbz + * @param $mitarbeiter_uid + * @param $vonDatum + * @param $bisDatum + * @param null $vonStunde + * @param null $bisStunde + * @param null $bezeichnung + * @param null $vertretung_uid + * @param null $erreichbarkeit_kurzbz + * @param null $freigabeamum + * @param null $freigabevon + * @return array + */ + public function save($zeitsperretyp_kurzbz, $mitarbeiter_uid, $vonDatum, $bisDatum, + $vonStunde = null, $bisStunde = null, $bezeichnung = null, $vertretung_uid = null, + $erreichbarkeit_kurzbz = null, $freigabeamum = null, $freigabevon = null) + { + return $this->insert(array( + 'zeitsperretyp_kurzbz' => $zeitsperretyp_kurzbz, + 'mitarbeiter_uid' => $mitarbeiter_uid, + 'vondatum' => $vonDatum, + 'bisdatum' => $bisDatum, + 'vonstunde' => $vonStunde, + 'bisstunde' => $bisStunde, + 'bezeichnung' => $bezeichnung, + 'vertretung_uid' => $vertretung_uid, + 'insertvon' => getAuthUID(), + 'insertamum' => (new DateTime())->format('Y-m-d H:i:s'), + 'erreichbarkeit_kurzbz' => $erreichbarkeit_kurzbz, + 'freigabeamum' => $freigabeamum, + 'freigabevon' => $freigabevon + )); + } + + /** + * Delete Zeitsperre. + * @return array|stdClass|null + */ public function deleteEntriesForCurrentDay() { $today = date('Y-m-d'); diff --git a/application/models/ressource/Zeitwunsch_gueltigkeit_model.php b/application/models/ressource/Zeitwunsch_gueltigkeit_model.php new file mode 100644 index 000000000..f26e06d3c --- /dev/null +++ b/application/models/ressource/Zeitwunsch_gueltigkeit_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_zeitwunsch_gueltigkeit'; + $this->pk = 'zeitwunsch_gueltigkeit_id'; + } +} \ No newline at end of file diff --git a/application/views/lehre/anrechnung/requestAnrechnung.php b/application/views/lehre/anrechnung/requestAnrechnung.php index e507d3846..978dd5606 100644 --- a/application/views/lehre/anrechnung/requestAnrechnung.php +++ b/application/views/lehre/anrechnung/requestAnrechnung.php @@ -26,7 +26,8 @@ $this->load->view( 'neu', 'maxZeichen', 'errorBestaetigungFehlt', - 'systemfehler' + 'systemfehler', + 'errorDokumentZuGross' ), 'anrechnung' => array( 'deadlineUeberschritten', @@ -179,7 +180,7 @@ $this->load->view(
load->view( + 'templates/FHC-Header', + array( + 'title' => 'Zeitverfuegbarkeit verwalten', + 'jquery' => true, + 'jqueryui' => true, + 'bootstrap' => true, + 'fontawesome' => true, + 'momentjs' => true, + 'ajaxlib' => true, + 'tabulator' => true, + 'tablewidget' => true, + 'navigationwidget' => true, + 'sbadmintemplate' => true, + 'phrases' => array( + 'global' => array( + 'bis', + 'notiz' + ), + 'ui' => array( + 'systemfehler', + 'keineDatenVorhanden', + 'von', + 'bitteWaehlen', + 'speichern', + 'loeschen', + 'abbrechen' + ), + 'lehre' => array( + 'lektor' + ) + ), + 'widgets' => true, + 'dialoglib' => true, + 'customJSs' => array( + 'public/js/bootstrapper.js', + 'public/js/lehre/lvplanung/zverfueg.js' + ) + ) +); +?> + + +widgetlib->widget('NavigationWidget'); ?> +
+
+ + +
+ +
+ + +
+
+
+ + + +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+ +
+ +
+
+ +
+ +
+ +
+ +
+ +
+
+ +
+ + + +
+
+
+
+ + +
+
+ load->view('lehre/lvplanung/adminZeitverfuegbarkeitData.php'); ?> +
+
+ +
+
+
+ + +load->view('templates/FHC-Footer'); ?> diff --git a/application/views/lehre/lvplanung/adminZeitverfuegbarkeitData.php b/application/views/lehre/lvplanung/adminZeitverfuegbarkeitData.php new file mode 100644 index 000000000..81a683cff --- /dev/null +++ b/application/views/lehre/lvplanung/adminZeitverfuegbarkeitData.php @@ -0,0 +1,70 @@ += ss.start + AND zeitsperretyp_kurzbz = \'ZVerfueg\' + ORDER BY zeitsperre_id, zsp.mitarbeiter_uid + ) as tmp + ORDER BY vondatum DESC +'; + +$filterWidgetArray = array( + 'query' => $qry, + 'tableUniqueId' => 'adminZeitverfuegbarkeit', + 'requiredPermissions' => 'lehre/zeitverfuegbarkeit', + 'datasetRepresentation' => 'tabulator', + 'columnsAliases' => array( + 'ZeitsperreID', + 'UID', + ucfirst($this->p->t('lehre', 'lektor')), + ucfirst($this->p->t('ui', 'von')), + 'VonStunde', + ucfirst($this->p->t('global', 'bis')), + 'BisStunde', + ucfirst($this->p->t('global', 'notiz')) + ), + 'datasetRepOptions' => '{ + layout: "fitColumns", // fit columns to width of table + autoResize: false, // prevent auto resizing of table (false to allow adapting table size when cols are (de-)activated + headerFilterPlaceholder: " ", + index: "zeitsperre_id", // assign specific column as unique id (important for row indexing) + selectable: 1, // allow row selection + tableWidgetHeader: false, + rowSelected: function(row) { + func_rowSelected(row); + }, + rowDeselected: function(row) { + func_rowDeselected(row); + } + }', // tabulator properties + 'datasetRepFieldsDefs' => '{ + zeitsperre_id: {visible:false}, + mitarbeiter_uid: {visible: true, headerFilter:"input"}, + lektor: {visible: true, headerFilter:"input"}, + vondatum: {visible: true, headerFilter:"input"}, + vonstunde: {visible: true, headerFilter:"input"}, + bisdatum: {visible: true, headerFilter:"input"}, + bisstunde: {visible: true, headerFilter:"input"}, + bezeichnung: {visible: true, headerFilter:"input"} + }', // col properties +); + +echo $this->widgetlib->widget('TableWidget', $filterWidgetArray); + +?> diff --git a/application/views/system/infocenter/dokpruefung.php b/application/views/system/infocenter/dokpruefung.php index f7446895c..b184b9a0b 100644 --- a/application/views/system/infocenter/dokpruefung.php +++ b/application/views/system/infocenter/dokpruefung.php @@ -65,7 +65,7 @@ if (!isset($formalReadonly)) : ?> - > formal_geprueft_amum) ? date_format(date_create($dokument->formal_geprueft_amum), 'd.m.Y') : ''; ?> diff --git a/application/views/system/infocenter/infocenterAbgewiesenData.php b/application/views/system/infocenter/infocenterAbgewiesenData.php index dbe0540be..40582a668 100644 --- a/application/views/system/infocenter/infocenterAbgewiesenData.php +++ b/application/views/system/infocenter/infocenterAbgewiesenData.php @@ -14,7 +14,7 @@ $query = ' ps.prestudent_id AS "PreStudentID", p.vorname AS "Vorname", p.nachname AS "Nachname", - sg.kurzbzlang as "Studiengang", + so.studiengangkurzbzlang as "Studiengang", pss.insertamum AS "AbgewiesenAm", ( SELECT l.zeitpunkt @@ -43,6 +43,8 @@ $query = ' JOIN public.tbl_prestudent ps USING(prestudent_id) JOIN public.tbl_person p USING(person_id) JOIN public.tbl_studiengang sg USING(studiengang_kz) + JOIN lehre.tbl_studienplan sp USING(studienplan_id) + JOIN lehre.tbl_studienordnung so USING(studienordnung_id) WHERE pss.status_kurzbz = '. $ABGEWIESENEN_STATUS .' AND pss.studiensemester_kurzbz = '. $STUDIENSEMESTER .' AND (sg.typ IN ('. $STUDIENGANG_TYP .') diff --git a/application/views/system/infocenter/infocenterData.php b/application/views/system/infocenter/infocenterData.php index f3849d622..49cc33326 100644 --- a/application/views/system/infocenter/infocenterData.php +++ b/application/views/system/infocenter/infocenterData.php @@ -137,11 +137,12 @@ LIMIT 1 ) AS "AnzahlAbgeschickt", ( - SELECT ARRAY_TO_STRING(ARRAY_AGG(DISTINCT UPPER(sg.typ || sg.kurzbz) || \':\' || sp.orgform_kurzbz), \', \') + SELECT ARRAY_TO_STRING(ARRAY_AGG(DISTINCT UPPER(so.studiengangkurzbzlang) || \':\' || sp.orgform_kurzbz), \', \') FROM public.tbl_prestudentstatus pss JOIN public.tbl_prestudent ps USING(prestudent_id) JOIN public.tbl_studiengang sg USING(studiengang_kz) JOIN lehre.tbl_studienplan sp USING(studienplan_id) + JOIN lehre.tbl_studienordnung so USING(studienordnung_id) WHERE pss.status_kurzbz = '.$INTERESSENT_STATUS.' AND pss.bewerbung_abgeschicktamum IS NOT NULL -- AND pss.bestaetigtam IS NULL @@ -162,11 +163,12 @@ LIMIT 1 ) AS "StgAbgeschickt", ( - SELECT ARRAY_TO_STRING(ARRAY_AGG(DISTINCT UPPER(sg.typ || sg.kurzbz) || \':\' || sp.orgform_kurzbz), \', \') + SELECT ARRAY_TO_STRING(ARRAY_AGG(DISTINCT UPPER(so.studiengangkurzbzlang) || \':\' || sp.orgform_kurzbz), \', \') FROM public.tbl_prestudentstatus pss JOIN public.tbl_prestudent ps USING(prestudent_id) JOIN public.tbl_studiengang sg USING(studiengang_kz) JOIN lehre.tbl_studienplan sp USING(studienplan_id) + JOIN lehre.tbl_studienordnung so USING(studienordnung_id) WHERE pss.status_kurzbz = '.$INTERESSENT_STATUS.' AND pss.bewerbung_abgeschicktamum IS NULL AND pss.bestaetigtam IS NULL @@ -214,11 +216,12 @@ LIMIT 1 ) AS "AnzahlStgNichtAbgeschickt", ( - SELECT ARRAY_TO_STRING(ARRAY_AGG(DISTINCT UPPER(sg.typ || sg.kurzbz) || \':\' || sp.orgform_kurzbz), \', \') + SELECT ARRAY_TO_STRING(ARRAY_AGG(DISTINCT UPPER(so.studiengangkurzbzlang) || \':\' || sp.orgform_kurzbz), \', \') FROM public.tbl_prestudentstatus pss JOIN public.tbl_prestudent ps USING(prestudent_id) JOIN public.tbl_studiengang sg USING(studiengang_kz) JOIN lehre.tbl_studienplan sp USING(studienplan_id) + JOIN lehre.tbl_studienordnung so USING(studienordnung_id) WHERE pss.status_kurzbz IN ('.$STATUS_KURZBZ.') AND pss.bewerbung_abgeschicktamum IS NULL AND ps.person_id = p.person_id diff --git a/application/views/system/infocenter/infocenterFreigegebenData.php b/application/views/system/infocenter/infocenterFreigegebenData.php index 92f062b62..5c0adb165 100644 --- a/application/views/system/infocenter/infocenterFreigegebenData.php +++ b/application/views/system/infocenter/infocenterFreigegebenData.php @@ -106,11 +106,12 @@ $query = ' LIMIT 1 ) AS "AnzahlAbgeschickt", ( - SELECT ARRAY_TO_STRING(ARRAY_AGG(DISTINCT UPPER(sg.typ || sg.kurzbz || \':\' || sp.orgform_kurzbz)), \', \') + SELECT ARRAY_TO_STRING(ARRAY_AGG(DISTINCT UPPER(so.studiengangkurzbzlang) || \':\' || sp.orgform_kurzbz), \', \') FROM public.tbl_prestudentstatus pss JOIN public.tbl_prestudent ps USING(prestudent_id) JOIN public.tbl_studiengang sg USING(studiengang_kz) JOIN lehre.tbl_studienplan sp USING(studienplan_id) + JOIN lehre.tbl_studienordnung so USING(studienordnung_id) WHERE pss.status_kurzbz = '.$INTERESSENT_STATUS.' AND pss.bewerbung_abgeschicktamum IS NOT NULL AND ps.person_id = p.person_id @@ -128,11 +129,12 @@ $query = ' LIMIT 1 ) AS "StgAbgeschickt", ( - SELECT ARRAY_TO_STRING(ARRAY_AGG(DISTINCT UPPER(sg.typ || sg.kurzbz) || \':\' || sp.orgform_kurzbz), \', \') + SELECT ARRAY_TO_STRING(ARRAY_AGG(DISTINCT UPPER(so.studiengangkurzbzlang) || \':\' || sp.orgform_kurzbz), \', \') FROM public.tbl_prestudentstatus pss JOIN public.tbl_prestudent ps USING(prestudent_id) JOIN public.tbl_studiengang sg USING(studiengang_kz) JOIN lehre.tbl_studienplan sp USING(studienplan_id) + JOIN lehre.tbl_studienordnung so USING(studienordnung_id) WHERE pss.status_kurzbz IN ('.$STATUS_KURZBZ.') AND ps.person_id = p.person_id diff --git a/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php b/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php index dbc0124bc..1aeac022b 100644 --- a/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php +++ b/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php @@ -85,11 +85,12 @@ $query = ' LIMIT 1 ) AS "AnzahlAbgeschickt", ( - SELECT ARRAY_TO_STRING(ARRAY_AGG(DISTINCT UPPER(sg.typ || sg.kurzbz || \':\' || sp.orgform_kurzbz)), \', \') + SELECT ARRAY_TO_STRING(ARRAY_AGG(DISTINCT UPPER(so.studiengangkurzbzlang) || \':\' || sp.orgform_kurzbz), \', \') FROM public.tbl_prestudentstatus pss JOIN public.tbl_prestudent ps USING(prestudent_id) JOIN public.tbl_studiengang sg USING(studiengang_kz) JOIN lehre.tbl_studienplan sp USING(studienplan_id) + JOIN lehre.tbl_studienordnung so USING(studienordnung_id) WHERE pss.status_kurzbz = '.$INTERESSENT_STATUS.' AND pss.bewerbung_abgeschicktamum IS NOT NULL AND ps.person_id = p.person_id diff --git a/cis/private/lehre/fotoliste.pdf.php b/cis/private/lehre/fotoliste.pdf.php index 3fc04355f..9e7535c04 100644 --- a/cis/private/lehre/fotoliste.pdf.php +++ b/cis/private/lehre/fotoliste.pdf.php @@ -224,8 +224,9 @@ if ($result = $db->db_query($qry)) { else $zusatz = ''; - if ($row->bisio_id != '' && $row->status != 'Incoming' && ($row->bis > $stsemdatumvon || $row->bis == '') && $row->von < $stsemdatumbis) //Outgoing - $zusatz .= '(o)(ab ' . $datum->formatDatum($row->von, 'd.m.Y') . ')'; + if ($row->bisio_id != '' && $row->status != 'Incoming' && ($row->bis > $stsemdatumvon || $row->bis == '') && $row->von < $stsemdatumbis + && (anzahlTage($row->von, $row->bis) >= 30)) //Outgoing + $zusatz .= '(o)(ab '. $datum->formatDatum($row->von, 'd.m.Y'). ')'; if ($row->note == 6) //angerechnet $zusatz .= '(ar)'; diff --git a/cis/private/lehre/notenliste.xls.php b/cis/private/lehre/notenliste.xls.php index 7853600de..ad25a6bc2 100644 --- a/cis/private/lehre/notenliste.xls.php +++ b/cis/private/lehre/notenliste.xls.php @@ -38,6 +38,8 @@ require_once('../../../include/phrasen.class.php'); $uid = get_uid(); + + $sprache = getSprache(); $p = new phrasen($sprache); @@ -112,6 +114,12 @@ else $format_highlight->setBorder(1); $format_highlight->setBorderColor('white'); + $format_highlightright=& $workbook->addFormat(); + $format_highlightright->setFgColor(15); + $format_highlightright->setBorder(1); + $format_highlightright->setBorderColor('white'); + $format_highlightright->setAlign('right'); + $format_border_bottom =& $workbook->addFormat(); $format_border_bottom ->setBottom(2); $format_border_bottom->setBold(); @@ -200,27 +208,32 @@ else $stsemdatumvon = $stsem_obj->start; $stsemdatumbis = $stsem_obj->ende; - $qry = "SELECT - distinct on(nachname, vorname, person_id) vorname, nachname, matrikelnr, person_id, tbl_student.student_uid as uid, - tbl_studentlehrverband.semester, tbl_studentlehrverband.verband, tbl_studentlehrverband.gruppe, - (SELECT status_kurzbz - FROM public.tbl_prestudentstatus - WHERE prestudent_id=tbl_student.prestudent_id - ORDER BY datum DESC, insertamum DESC, ext_id DESC LIMIT 1) as status, - tbl_bisio.bisio_id, tbl_bisio.bis, tbl_bisio.von, - tbl_zeugnisnote.note,tbl_mobilitaet.mobilitaetstyp_kurzbz, - (CASE WHEN bis.tbl_mobilitaet.studiensemester_kurzbz = vw_student_lehrveranstaltung.studiensemester_kurzbz THEN '1' ELSE '' END) as doubledegree - FROM campus.vw_student_lehrveranstaltung JOIN public.tbl_benutzer USING(uid) - JOIN public.tbl_person USING(person_id) JOIN public.tbl_student ON(uid=student_uid) - LEFT JOIN public.tbl_studentlehrverband USING(student_uid,studiensemester_kurzbz) - LEFT JOIN lehre.tbl_zeugnisnote on(vw_student_lehrveranstaltung.lehrveranstaltung_id=tbl_zeugnisnote.lehrveranstaltung_id - AND tbl_zeugnisnote.student_uid=tbl_student.student_uid - AND tbl_zeugnisnote.studiensemester_kurzbz=tbl_studentlehrverband.studiensemester_kurzbz) - LEFT JOIN bis.tbl_bisio ON(uid=tbl_bisio.student_uid) - LEFT JOIN bis.tbl_mobilitaet USING(prestudent_id) + $qry = " + SELECT + distinct on(nachname, vorname, person_id) + vorname, nachname, matrikelnr, person_id, tbl_student.student_uid as uid, + tbl_studentlehrverband.semester, tbl_studentlehrverband.verband, tbl_studentlehrverband.gruppe, + (SELECT status_kurzbz + FROM public.tbl_prestudentstatus + WHERE prestudent_id=tbl_student.prestudent_id + ORDER BY datum DESC, insertamum DESC, ext_id DESC LIMIT 1) as status, + tbl_bisio.bisio_id, tbl_bisio.bis, tbl_bisio.von, + tbl_zeugnisnote.note,tbl_mobilitaet.mobilitaetstyp_kurzbz, + (CASE WHEN bis.tbl_mobilitaet.studiensemester_kurzbz = vw_student_lehrveranstaltung.studiensemester_kurzbz THEN '1' ELSE '' END) as doubledegree, + tbl_note.lkt_ueberschreibbar, tbl_note.anmerkung + FROM + campus.vw_student_lehrveranstaltung JOIN public.tbl_benutzer USING(uid) + JOIN public.tbl_person USING(person_id) JOIN public.tbl_student ON(uid=student_uid) + LEFT JOIN public.tbl_studentlehrverband USING(student_uid,studiensemester_kurzbz) + LEFT JOIN lehre.tbl_zeugnisnote on(vw_student_lehrveranstaltung.lehrveranstaltung_id=tbl_zeugnisnote.lehrveranstaltung_id + AND tbl_zeugnisnote.student_uid=tbl_student.student_uid + AND tbl_zeugnisnote.studiensemester_kurzbz=tbl_studentlehrverband.studiensemester_kurzbz) + LEFT JOIN bis.tbl_bisio ON(uid=tbl_bisio.student_uid) + LEFT JOIN bis.tbl_mobilitaet USING(prestudent_id) + LEFT JOIN lehre.tbl_note USING(note) WHERE - vw_student_lehrveranstaltung.lehrveranstaltung_id=".$db->db_add_param($lvid, FHC_INTEGER)." AND - vw_student_lehrveranstaltung.studiensemester_kurzbz=".$db->db_add_param($stsem);";"; + vw_student_lehrveranstaltung.lehrveranstaltung_id=".$db->db_add_param($lvid, FHC_INTEGER)." + AND vw_student_lehrveranstaltung.studiensemester_kurzbz=".$db->db_add_param($stsem);";"; if($lehreinheit_id!='') $qry.=" AND vw_student_lehrveranstaltung.lehreinheit_id=".$db->db_add_param($lehreinheit_id, FHC_INTEGER); @@ -243,18 +256,22 @@ else $inc=' (i)'; else $inc=''; - if($elem->bisio_id!='' && $elem->status!='Incoming' && ($elem->bis > $stsemdatumvon || $elem->bis=='') && $elem->von < $stsemdatumbis) //Outgoing - $inc.=' (o)'; - if($elem->note==6) //angerechnet + if($elem->bisio_id != '' && $elem->status != 'Incoming' && ($elem->bis > $stsemdatumvon || $elem->bis == '') + && $elem->von < $stsemdatumbis && (anzahlTage($elem->von, $elem->bis) >= 30)) + $inc.=' (o)'; + + $note = $elem->note; + + if($elem->lkt_ueberschreibbar == 'f') // angerechnet / intern angerechnet / nicht zugelassen { - $inc.=' (ar)'; - $note='ar'; + $inc.= '('. $elem->anmerkung. ')'; + $note = $elem->anmerkung; } if ($elem->mobilitaetstyp_kurzbz !='' && $elem->doubledegree == 1) //dd-Program { - $inc.=' (d.d.)'; + $inc .=' (d.d.)'; } $worksheet->write($lines,1,$elem->uid); @@ -262,7 +279,7 @@ else $worksheet->write($lines,3,$elem->vorname); $worksheet->write($lines,4,'="'.$elem->semester.$elem->verband.$elem->gruppe.'"'); $worksheet->write($lines,5,'="'.trim($elem->matrikelnr).'"',$format_highlight); - $worksheet->write($lines,6,$note,$format_highlight); + $worksheet->write($lines,6, $note, $format_highlightright); $i++; $lines++; } diff --git a/cis/private/profile/zeitsperre_resturlaub.php b/cis/private/profile/zeitsperre_resturlaub.php index aba828241..8e449b12d 100644 --- a/cis/private/profile/zeitsperre_resturlaub.php +++ b/cis/private/profile/zeitsperre_resturlaub.php @@ -266,14 +266,14 @@ function showHideBezeichnungDropDown() if (dd.options[dd.selectedIndex].value == 'DienstV') { var str = ''; @@ -690,7 +690,7 @@ if(count($zeit->result)>0) ".(isset($row_vertretung->kurzbz)?$row_vertretung->kurzbz:'')." ".(isset($erreichbarkeit_arr[$row->erreichbarkeit])?$erreichbarkeit_arr[$row->erreichbarkeit]:'')." ".($row->freigabeamum!=''?'Ja':'').""; - if ($row->zeitsperretyp_kurzbz == 'DienstV') + if ($row->zeitsperretyp_kurzbz == 'DienstV' || $row->zeitsperretyp_kurzbz == 'ZVerfueg') $content_table .= ' '; else if ($row->vondatum < $gesperrt_bis AND in_array($row->zeitsperretyp_kurzbz,$typen_arr)) $content_table .= ' '; @@ -702,7 +702,7 @@ if(count($zeit->result)>0) { $content_table.="\n".$p->t('zeitsperre/loeschen').""; } - elseif($row->zeitsperretyp_kurzbz!='Urlaub') + elseif($row->zeitsperretyp_kurzbz!='Urlaub' && $row->zeitsperretyp_kurzbz != 'ZVerfueg') { $content_table.="\n".$p->t('zeitsperre/loeschen').""; } @@ -762,6 +762,11 @@ if($result = $db->db_query($qry)) { while($row=$db->db_fetch_object($result)) { + if ($row->zeitsperretyp_kurzbz === 'ZVerfueg') + { + continue; + } + if($zeitsperre->zeitsperretyp_kurzbz == $row->zeitsperretyp_kurzbz) $content_form.= ""; else diff --git a/cis/private/profile/zeitwunsch.php b/cis/private/profile/zeitwunsch.php index ff4c35ebd..a448125f6 100644 --- a/cis/private/profile/zeitwunsch.php +++ b/cis/private/profile/zeitwunsch.php @@ -18,6 +18,7 @@ * Authors: Christian Paminger , * Andreas Oesterreicher and * Rudolf Hangl . + * Cristina Hainberger */ /** * @brief bietet die Moeglichkeit zur Anzeige und @@ -29,10 +30,15 @@ require_once('../../../include/globals.inc.php'); require_once('../../../include/functions.inc.php'); require_once('../../../include/datum.class.php'); require_once('../../../include/zeitwunsch.class.php'); +require_once('../../../include/zeitwunsch_gueltigkeit.class.php'); require_once('../../../include/studiensemester.class.php'); +require_once('../../../include/studiengang.class.php'); require_once('../../../include/zeitaufzeichnung_gd.class.php'); require_once('../../../include/benutzer.class.php'); require_once('../../../include/mitarbeiter.class.php'); +require_once('../../../include/lehrveranstaltung.class.php'); +require_once('../../../include/lehreinheit.class.php'); +require_once('../../../include/lehrstunde.class.php'); require_once('../../../include/phrasen.class.php'); require_once('../../../include/sprache.class.php'); @@ -49,63 +55,27 @@ $uid = get_uid(); if(!check_lektor($uid)) die($p->t('global/keineBerechtigungFuerDieseSeite')); - -$PHP_SELF = $_SERVER['PHP_SELF']; - -if(isset($_GET['type'])) - $type=$_GET['type']; - $datum_obj = new datum(); +// Nächstes Studiensemester +$next_ss = new Studiensemester(); +$next_ss->getNextStudiensemester(); + +// Aktuelles Studiensemester +$akt_ss = new Studiensemester(); +$akt_ss->load($akt_ss->getAkt()); + +// Dropdown: Aktuelles/naechstes Studiensemester zum Bearbeiten +$selected_ss = (isset($_GET['stsem']) && is_string($_GET['stsem'])) ? $_GET['stsem'] : $next_ss->studiensemester_kurzbz; // Default: Nächstes Studiensemester + +// Dropdown: Vergangene Studiensemester zum Kopieren +$selected_past_ss = (isset($_GET['pastStsem']) && is_string($_GET['pastStsem'])) ? $_GET['pastStsem'] : null; // Default: null + //Stundentabelleholen if(! $result_stunde=$db->db_query('SELECT * FROM lehre.tbl_stunde ORDER BY stunde')) die($db->db_last_error()); $num_rows_stunde=$db->db_num_rows($result_stunde); -// Zeitwuensche speichern -if (isset($type) && $type=='save') -{ - $zw = new zeitwunsch(); - - for ($t=1;$t<7;$t++) - { - for ($i=0;$i<$num_rows_stunde;$i++) - { - $var='wunsch'.$t.'_'.$i; - if(!isset($_POST[$var])) - continue; - $gewicht=$_POST[$var]; - $stunde=$i+1; - - $zw->mitarbeiter_uid = $uid; - $zw->stunde = $stunde; - $zw->tag = $t; - $zw->gewicht = $gewicht; - $zw->updateamum = date('Y-m-d H:i:s'); - $zw->updatevon = $uid; - - if (!$zw->exists($uid, $stunde, $t)) - { - $zw->new = true; - $zw->insertamum = date('Y-m-d H:i:s'); - $zw->insertvon = $uid; - } - else - $zw->new = false; - - if(!$zw->save()) - echo $zw->errormsg; - } - } -} - -$zw = new zeitwunsch(); -if(!$zw->loadPerson($uid)) - die($zw->errormsg); - -$wunsch = $zw->zeitwunsch; - - // Personendaten $person = new benutzer(); if(!$person->load($uid)) @@ -114,11 +84,10 @@ if(!$person->load($uid)) $ma = new mitarbeiter($uid); $fixangestellt = $ma->fixangestellt; -// Nächstes Studiensemester -$ss = new Studiensemester(); -$ss->getNextStudiensemester(); -$next_ss = $ss->studiensemester_kurzbz; -$current_ss = $ss->getakt(); +// Check, ob Bearbeitung des ZW gesperrt ist. +// Gesperrt, wenn Lektor bereits zugewiesene LVs hat. +// Sperre in jeden Fall aufgehoben, wenn ein ZW kopiert wird. (denn ist eine eventuelle Sperre bereits manuell aufgehoben worden) +$isGesperrt = checkIsVerplant($uid, $selected_ss) && is_null($selected_past_ss); // boolean // Erklärung zu Pausen bei geteilten Arbeitszeiten speichern if (isset($_GET['selbstverwaltete-pause-akt']) && !empty($_GET['submit-akt'])) @@ -127,10 +96,10 @@ if (isset($_GET['selbstverwaltete-pause-akt']) && !empty($_GET['submit-akt'])) $zeitaufzeichnung_gd = new Zeitaufzeichnung_gd(); $zeitaufzeichnung_gd->uid = $uid; - $zeitaufzeichnung_gd->studiensemester_kurzbz = $current_ss; + $zeitaufzeichnung_gd->studiensemester_kurzbz = $akt_ss->studiensemester_kurzbz; $zeitaufzeichnung_gd->selbstverwaltete_pause = $selbstverwaltete_pause; $za_gd = new Zeitaufzeichnung_gd(); - $za_gd->load($uid, $current_ss); + $za_gd->load($uid, $akt_ss->studiensemester_kurzbz); if ($za_gd->uid) { echo 'Bereits eingetragen'; @@ -147,10 +116,10 @@ if (isset($_GET['selbstverwaltete-pause']) && !empty($_GET['submit'])) $zeitaufzeichnung_gd = new Zeitaufzeichnung_gd(); $zeitaufzeichnung_gd->uid = $uid; - $zeitaufzeichnung_gd->studiensemester_kurzbz = $next_ss; + $zeitaufzeichnung_gd->studiensemester_kurzbz = $next_ss->studiensemester_kurzbz; $zeitaufzeichnung_gd->selbstverwaltete_pause = $selbstverwaltete_pause; $za_gd = new Zeitaufzeichnung_gd(); - $za_gd->load($uid, $next_ss); + $za_gd->load($uid, $next_ss->studiensemester_kurzbz); if ($za_gd->uid) { echo 'Bereits eingetragen'; @@ -162,14 +131,302 @@ if (isset($_GET['selbstverwaltete-pause']) && !empty($_GET['submit'])) } +// Zeitwuensche speichern +if (isset($_GET['type']) && $_GET['type'] == 'save') +{ + // Letzte Zeitwunschgueltigkeit (ZWG) holen + $zwg = new Zeitwunsch_gueltigkeit(); + $zwg->getByUID($uid, 1); + $lastZwg = !empty($zwg->result) ? $zwg->result[0] : null; + + // Check, ob letzte ZWG im nächsten Studiensemester startet. D.h. es existiert ein neuer Zeitwunsch in der Zukunft + $lastZwgStartsNextSemester = (!is_null($lastZwg) && $lastZwg->von >= $next_ss->start) ? true : false; + $zw_zwg_id = null; // ZWG ID, die zum Speichern / Updaten des Zeitwunsches uebergeben wird + + // Wenn allererster Zeitwunsch, also noch keine ZWG vorhanden + if (is_null($lastZwg)) + { + // Wenn ZW fuer naechstes Studiensemester ist + if ($selected_ss == $next_ss->studiensemester_kurzbz) + { + // Neue ZWG setzen: von = Start nächstes Studiensemester, bis offen lassen + $zw_zwg_id = insertZWG($uid, $next_ss->start, null); + } + + // Wenn Zeitwunsch fuer aktuelles Studiensemester ist + if ($selected_ss == $akt_ss->studiensemester_kurzbz) + { + // Neue ZWG setzen: von = now(), bis offen lassen + $zw_zwg_id = insertZWG($uid, (new DateTime())->format('Y-m-d H:i:s'), null); + } + } + + // Wenn mindestens eine ZWG vorhanden + if (!is_null($lastZwg)) + { + // Wenn Zeitwunsch fuer naechstes Studiensemester ist + if ($selected_ss == $next_ss->studiensemester_kurzbz) + { + // Wenn naechstes Studiensemester schon eine eigene ZWG hat + if ($lastZwgStartsNextSemester) + { + // Nur Zeitwunsch dieser ZWG updaten + $zw_zwg_id = $lastZwg->zeitwunsch_gueltigkeit_id; + } + + // Wenn naechstes Studiensemester keine eigene ZWG hat + if (!$lastZwgStartsNextSemester) + { + // Fuer bisher letzte ZWG ein Endedatum setzen: bis = Ende aktuelles Studiensemester + updateZWG($uid, $lastZwg->zeitwunsch_gueltigkeit_id, $akt_ss->ende); + + // Neue ZWG setzen: von = Start nächstes Studiensemester, bis offen lassen + $zw_zwg_id = insertZWG($uid, $next_ss->start, null); + } + } + + // Wenn Zeitwunsch fuer aktuelles Studiensemester ist + if ($selected_ss == $akt_ss->studiensemester_kurzbz) + { + /** + * Check, ob aktuelles Studiensemester eine ZWG hat. + * Wenn die allererste ZWG fuer das naechste Studiensemester erstellt wurde, dann hat das + * aktuelle Studiensemester noch keine ZWG. + * */ + $zwg = new Zeitwunsch_gueltigkeit(); + $zwg->getByStudiensemester($uid, $akt_ss->studiensemester_kurzbz); + $akt_ss_zwg = !empty($zwg->result) ? $zwg->result[0] : null; + + // Keine ZWG fuer aktuelles Studiensemester vorhanden. + // Da eine ZWG ID aber schon vorhanden: USER HAT ERSTMALIG MIT NAECHSTEM STUDIENSEMESTER EINTRAG BEGONNEN + if (is_null($akt_ss_zwg)) + { + // Neue ZWG setzen: von = now(), ende = Ende aktuelles Studiensemester + $zw_zwg_id = insertZWG($uid, (new DateTime())->format('Y-m-d H:i:s'), $akt_ss->ende); + } + + // ZWG für aktuelles Studiensemester ist vorhanden --> SPLIT AKTUELLE STUDIENSEMESTER + if ((!is_null($akt_ss_zwg))) + { + // Wenn am selben Tag schon neue ZWG gespeichert wurde, keine neue ZWG anlegen, sondern diese nur updaten + // Verhindert mehrfache Eintraege, wenn oefters zwischengespeichert wird. + if ((new DateTime($akt_ss_zwg->von))->format('Y-m-d') == (new Datetime())->format('Y-m-d')) + { + updateZWG($uid, $akt_ss_zwg->zeitwunsch_gueltigkeit_id, $akt_ss_zwg->bis); + + $zw_zwg_id = $akt_ss_zwg->zeitwunsch_gueltigkeit_id; + } + else + { + // Neue ZWG setzen: von = now(), bis = Bis von ZWG des aktuellen Studiensemesters uebernehmen: + // -> bis ist entweder Ende aktuelles Studiensemester (wenn ZWG für nächstes Studiensemester vorhanden ist) + // -> sonst ist bis null + $zw_zwg_id = insertZWG($uid, (new DateTime())->format('Y-m-d H:i:s'), $akt_ss_zwg->bis); + + // Fuer bisher letzte ZWG das Endedatum auf gestern setzen: bis = gestern + // NOTE: MUSS nach dem insert sein + updateZWG($uid, $akt_ss_zwg->zeitwunsch_gueltigkeit_id, (new DateTime('yesterday'))->format('Y-m-d H:i:s')); + } + } + } + } + + // Insert Zeitwunsch mit Zeitwunsch ZWG ID + if (is_numeric($zw_zwg_id)) + { + $zw = new zeitwunsch(); + + for ($t=1;$t<7;$t++) + { + for ($i=0;$i<$num_rows_stunde;$i++) + { + $var='wunsch'.$t.'_'.$i; + if(!isset($_POST[$var])) + continue; + $gewicht=$_POST[$var]; + $stunde=$i+1; + + $zw->mitarbeiter_uid = $uid; + $zw->stunde = $stunde; + $zw->tag = $t; + $zw->gewicht = $gewicht; + $zw->updateamum = date('Y-m-d H:i:s'); + $zw->updatevon = $uid; + $zw->zeitwunsch_gueltigkeit_id = $zw_zwg_id; + + if (!$zw->exists($uid, $zw_zwg_id, $stunde, $t)) + { + $zw->new = true; + $zw->insertamum = date('Y-m-d H:i:s'); + $zw->insertvon = $uid; + } + else + { + $zw->new = false; + } + + if(!$zw->save()) + echo $zw->errormsg; + } + } + } + + // Wenn speichern möglich ist, dann hat der Lektor entweder keine LVs zugeteilt oder hat aktiv die Bearbeitungssperre + // deaktiviert. Bearbeitungssperre wird gesetzt, wenn isGesperrt true ist. Deshalb hier mit false überschreiben. + $isGesperrt = false; +} + +/** + * Zeitwunschgueltigkeit fuer Tabelle holen. + * Der Zeitwunsch wird anhand der Zeitwunschgueltigkeit (ZWG) des gewaehlten Studiensemesters ermittelt. + * Das Studiensemester wird, je nach Vorhandensein, in dieser Reihenfolge herangezogen: + * 1. Wenn in Dropdown ausgewaehlt: Vergangenes Studiensemester (zum Kopieren von Zeitwunsch) + * 2. Wenn in Dropdown ausgewaehlt: Aktuelles Studiensemester + * 3: Default: Nächstes Studiensemesters + */ +$zwg = new zeitwunsch_gueltigkeit(); +$tmp_ss = is_null($selected_past_ss) ? $selected_ss : $selected_past_ss; +$zwg->getByStudiensemester($uid, $tmp_ss); +$zwg_id = !empty($zwg->result[0]) ? $zwg->result[0]->zeitwunsch_gueltigkeit_id : null; //null, wenn noch kein ZW + +/** + * Zeitwunsch fuer Tabelle holen + * Wenn noch kein Zeitwunsch vorhanden, bleibt die Zeitwunsch Instanz leer + * */ +$zw = new zeitwunsch(); +if (!$zw->loadByZWG($uid, $zwg_id)) +{ + die($zw->errormsg); +} +$wunsch = $zw->zeitwunsch; + +/** + * Init ZWG Objekt zum Erstellen einer neuen ZWG + */ +function insertZWG($uid, $von, $bis) +{ + $zwg = new Zeitwunsch_gueltigkeit(); + $zwg->new = true; + $zwg->mitarbeiter_uid = $uid; + $zwg->von = $von; + $zwg->bis = $bis; + $zwg->insertvon = $uid; + if ($zwg->save()) + { + return $zwg->zeitwunsch_gueltigkeit_id; + } + else + { + die($zwg->errormsg); + } +} + +/** + * Init ZWG Objekt zum Updaten einer bestehenden ZWG + */ +function updateZWG($uid, $zwg_id, $bis) +{ + $zwg = new Zeitwunsch_gueltigkeit(); + $zwg->new = false; + $zwg->zeitwunsch_gueltigkeit_id = $zwg_id; + $zwg->mitarbeiter_uid = $uid; + $zwg->bis = $bis; + $zwg->updatevon = $uid; + + if (!$zwg->save()) + { + die($zwg->errormsg); + } + + return; +} + +/** + * Check, ob Lektor bereits zugewiesene LVs hat + * @param $uid + * @param $studiensemester_kurzbz + * @return bool|void + */ +function checkIsVerplant($uid, $studiensemester_kurzbz) +{ + $lstd = new Lehrstunde(); + if (!$lstd->getStundenplanData('stundenplandev', null, $studiensemester_kurzbz, null, $uid, null, true)) + { + die($lstd->errormsg); + } + + return empty($lstd->result) ? false : true; +} + +/** + * Get Studiengaenge of STG assigend to LVs, to which lector is alredy assigend in + * the given Studiensemester. + * + * @param $uid + * @param $studiensemester_kurzbz + * @return array|void + */ +function getStgOfVerplant($uid, $studiensemester_kurzbz) +{ + $stg_arr = array(); // Mail data for Studiengang + + // Get Stundenplan entries of lector of Studiensemester concerned by Zeitwunschgueltigkeit + $lstd = new Lehrstunde(); + if (!$lstd->getStundenplanData( + 'stundenplandev', + null, + $studiensemester_kurzbz, + null, + $uid, + null, + true)) //...but only from now on + { + die($lstd->errormsg); + } + + // Loop through Stundenplan entries + foreach ($lstd->result as $row) + { + // Get LE of Stundenplan entry + $le = new Lehreinheit($row->lehreinheit_id); + + // GET LV by LE of Stundenplan entry + $lv = new Lehrveranstaltung($le->lehrveranstaltung_id); + + // Build Studiengang array + $stg_arr[] = $lv->studiengang_kz; + } + + // Make Studiengang array unique + return array_unique($stg_arr); +} + +/** + * Get Studiengang eMail Addresses. + * @param $stgKz_arr // Studiengang Kennzeichen Array + * @return array + */ +function getStgMail($stgKz_arr) +{ + $stgMail_arr = array(); + foreach($stgKz_arr as $stgKz) + { + $stg = new Studiengang($stgKz); + $stgMail_arr[]= $stg->email; + } + return $stgMail_arr; +} + ?> <?php echo $p->t('zeitwunsch/zeitwunsch');?> - + + +
- +
- -
-

Zustimmung zur Verplanung in geteilter Arbeitszeit

+

Zustimmung zur Verplanung in geteilter Arbeitszeit

t('zeitwunsch/geteilteArbeitszeit'); + echo '

'; $gd = new zeitaufzeichnung_gd(); - $gd->load($uid, $current_ss); + $gd->load($uid, $akt_ss->studiensemester_kurzbz); if ( ! $gd->uid ) { - echo '

Zustimmung für '.$current_ss.': '; - echo 'ja'; - echo 'nein'; - echo '




'; + echo '
'; + echo '
'; + echo '
'; + echo 'Zustimmung für '.$akt_ss->studiensemester_kurzbz.': '; + echo ''; + echo ''; + echo '
'; + echo '
'; + + echo '
'; + echo '
'; + echo '
'; + + echo '
'; + echo '
'; + echo '
'; } else { $zustimmung = ($gd->selbstverwaltete_pause) ? ' erteilt' : 'abgelehnt'; - echo '

Zustimmung für '.$current_ss.': '.$zustimmung.' am '.$datum_obj->formatDatum($gd->insertamum,'d.m.Y H:i:s').'

'; + echo '

Zustimmung für '.$akt_ss->studiensemester_kurzbz.': '.$zustimmung.' am '.$datum_obj->formatDatum($gd->insertamum,'d.m.Y H:i:s').''; } $gd = new zeitaufzeichnung_gd(); - $gd->load($uid, $next_ss); + $gd->load($uid, $next_ss->studiensemester_kurzbz); if ( ! $gd->uid ) { - echo '

Zustimmung für '.$next_ss.': '; - echo 'ja'; - echo 'nein'; - echo '




'; + echo '
'; + echo '
'; + echo '
'; + echo 'Zustimmung für '.$next_ss->studiensemester_kurzbz.': '; + echo ''; + echo ''; + echo '
'; + echo '
'; + + echo '
'; + echo ''; + echo '
'; + + echo '
'; + echo '
'; + echo '
'; } else { $zustimmung = ($gd->selbstverwaltete_pause) ? ' erteilt' : 'abgelehnt'; - echo '

Zustimmung für '.$next_ss.': '.$zustimmung.' am '.$datum_obj->formatDatum($gd->insertamum,'d.m.Y H:i:s').'

'; + echo '
Zustimmung für '.$next_ss->studiensemester_kurzbz.': '.$zustimmung.' am '.$datum_obj->formatDatum($gd->insertamum,'d.m.Y H:i:s').''; } - //var_dump($gd); ?>

-

-

t('zeitwunsch/zeitwunsch');?>

- ".$p->t('zeitwunsch/zeitwunschVon')." $person->titelpre $person->vorname $person->nachname $person->titelpost
"; - echo $p->t('zeitwunsch/tragenSieInDiesesNormwochenraster')."

"; - echo '
- - '; - echo ''; - for ($i=0;$i<$num_rows_stunde; $i++) - { - $beginn=$db->db_result($result_stunde,$i,'"beginn"'); - $beginn=substr($beginn,0,5); - $ende=$db->db_result($result_stunde,$i,'"ende"'); - $ende=substr($ende,0,5); - $stunde=$db->db_result($result_stunde,$i,'"stunde"'); - echo ""; - } + // FORM Begin + echo ''; + echo ''; + echo ''; - echo ''; + // Mein Zeitwunsch-Semesterplan Dropdown, Default = naechstes Studiensemester + $next_ss_selected = $next_ss->studiensemester_kurzbz == $selected_ss ? 'selected' : ''; + $akt_ss_selected = $akt_ss->studiensemester_kurzbz == $selected_ss ? 'selected' : ''; - for ($j=1; $j<7; $j++) - { - echo ''; - for ($i=0;$i<$num_rows_stunde;$i++) - { - if (isset($wunsch[$j][$i+1])) - $index=$wunsch[$j][$i+1]; - else - $index=1; - //$id='bgcolor'; - //$id.=$index+3; - $bgcolor=$cfgStdBgcolor[$index+3]; - echo ''; - } - echo ''; - } + echo '

'. $p->t('zeitwunsch/gueltigIm'); + echo ''; + echo '


'; - echo ' -
'.$p->t('global/stunde').'
'.$p->t('global/beginn').'
'.$p->t('global/ende').'
$stunde
$beginn
$ende
'.$tagbez[$lang->index][$j].'

- - - '; + // Tabelle Zeitwunsch-Semesterplan + echo ''; + // Tabelle Kopfzeile + echo ''; + echo ''; + for ($i=0;$i<$num_rows_stunde; $i++) + { + $beginn=$db->db_result($result_stunde,$i,'"beginn"'); + $beginn=substr($beginn,0,5); + $ende=$db->db_result($result_stunde,$i,'"ende"'); + $ende=substr($ende,0,5); + $stunde=$db->db_result($result_stunde,$i,'"stunde"'); + echo ""; + } + echo ''; + // Tabelle Zellen + for ($j=1; $j<7; $j++) + { + echo ''; + for ($i=0;$i<$num_rows_stunde;$i++) + { + if (isset($wunsch[$j][$i+1])) + $index=$wunsch[$j][$i+1]; + else + $index=1; // Defaultwert, wenn kein Zeitwunsch vorhanden - if($zw->updateamum!='') - { - echo ''.$p->t('zeitwunsch/letzteAenderung').': '.$datum_obj->formatDatum($zw->updateamum,'d.m.Y H:i:s').' '.$p->t('zeitwunsch/von').' '.$zw->updatevon.''; - } - ?> + $bgcolor=$cfgStdBgcolor[$index+3]; + echo ''; + } + echo ''; + } + echo '
'.$p->t('global/stunde').'
'.$p->t('global/beginn').'
'.$p->t('global/ende').'
$stunde
$beginn
$ende
'.$tagbez[$lang->index][$j].'
'; -
+ // Zeitwunsch aendern / kopieren + echo '
'; + echo '
'; + echo ''. $p->t('zeitwunsch/erklaerungstext'). '
'; + echo '
'; + echo '
'; // end col-xs-12 + echo '
'; // end row -
+ echo '
'; -

t('zeitwunsch/erklärung');?>:

+ echo '
'; + // Radiobuttons aendern / kopieren + $radioChangeChecked = is_null($selected_past_ss) ? 'checked' : ''; + $radioCopyChecked = !is_null($selected_past_ss) ? 'checked' : ''; - "; - echo $p->t('zeitwunsch/formularZumEintragenDerZeitsperren', array($href)); - ?> - -

t('zeitwunsch/kontrollierenSieIhreZeitwuensche');?>!

-

- - - - - - - - - - - - - - - - - - - - - - -
t('zeitwunsch/wert');?> -
t('zeitwunsch/bedeutung');?>
-
-
2
-
  t('zeitwunsch/hierMoechteIchUnterrichten');?>
-
1
-
  t('zeitwunsch/hierKannIchUnterrichten');?>
-
-1
-
  t('zeitwunsch/nurInNotfaellen');?>
-
-2
-
  t('zeitwunsch/hierAufGarKeinenFall');?>
-

t('zeitwunsch/folgendePunkteSindZuBeachten');?>:

-
    -
  1. t('zeitwunsch/verwendenSieDenWertNur');?>
  2. -
  3. t('zeitwunsch/sperrenSieNurTermine');?>
  4. -
  5. t('zeitwunsch/esSolltenFuerJedeStunde');?>
  6. -
-

t('lvplan/fehlerUndFeedback');?> t('lvplan/lvKoordinationsstelle');?>.

-
-
+ echo '
'; + echo ''.$p->t('zeitwunsch/fuer', array($selected_ss)). ''; + echo ''; + echo ''; + if ($isGesperrt) + { + echo ''.$p->t('zeitwunsch/stundenBereitsVerplant', array($selected_ss)). ''; + } + echo '
'; + echo '
'; // end col-xs-9 + + echo '
'; + echo ''. $p->t('zeitwunsch/werteAuf1setzen'). '
'; + echo ''. $p->t('global/aenderungenZuruecksetzen'). '

'; + echo '
'; // end col-xs-3 + + $divChangeHidden = !is_null($selected_past_ss) || $isGesperrt ? 'hidden' : ''; + $divCopyHidden = is_null($selected_past_ss) || $isGesperrt ? 'hidden' : ''; + $divisGesperrtHidden = $isGesperrt ? '' : 'hidden'; + + echo '
'; + echo '
'; + echo '' . $p->t('zeitwunsch/tragenSieInDiesesNormwochenraster') .''; + echo '
'; // end col + echo '
'; + // BLANK + echo '
'; // end col + echo '
'; // end divChangeZWG + + echo '
'; + echo '
'; + echo '' . $p->t('zeitwunsch/kopierenText') .''; + echo '
'; // end col + + $studiensemester = new Studiensemester(); + $tmp_ss = $selected_ss == $akt_ss->studiensemester_kurzbz ? $studiensemester->getPrevious() : $akt_ss->studiensemester_kurzbz; + $studiensemester->load($tmp_ss); + + $zwg = new Zeitwunsch_gueltigkeit(); + $zwg->getByUID($uid, 4, true, $studiensemester->ende); + $past_zwg_arr = $zwg->result; + echo '
'; + echo ''; + echo '
'; // end col + echo '
'; // end divCopyZWG + + echo '
'; + + // Mail Adressen der Studiengaenge, wo Lektor ueber eine LV bereits verplant ist + $stgKzOfVerplant_arr = getStgOfVerplant($uid, $selected_ss); + $stgMail_arr = getStgMail($stgKzOfVerplant_arr); + + echo '
'; + echo '
'; + echo '
'; + echo ''. $p->t("zeitwunsch/bearbeitungDeaktiviert"). ': '; + echo $p->t("zeitwunsch/bearbeitungDeaktiviertText", array($selected_ss, implode($stgMail_arr, '; '))). ' + '. $p->t("zeitwunsch/bearbeitungAktivieren"). '
+ '. $p->t("zeitwunsch/kompetenzfeldWirdInformiert") . ' + '; + echo '
'; // end panel heading + echo '
'; // end panel + echo '
'; // end col + echo '
'; // end divisGesperrt + + // Speichern - Button + echo '
'; + echo ''; + echo '
'; + + echo ''; // end row + echo '
'; + ?> + + + +
+
+ t('zeitwunsch/folgendePunkteSindZuBeachten');?>: +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + +
t('zeitwunsch/wert');?> +
t('zeitwunsch/bedeutung');?>
+
+
2
+
  t('zeitwunsch/hierMoechteIchUnterrichten');?>
+
1
+
  t('zeitwunsch/hierKannIchUnterrichten');?>
+
-1
+
  t('zeitwunsch/nurInNotfaellen');?>
+
-2
+
  t('zeitwunsch/hierAufGarKeinenFall');?>
+
+
+ + +
+
+

t('zeitsperre/zeitsperren');?>:

+ "; + echo $p->t('zeitwunsch/formularZumEintragenDerZeitsperren', array($href)); + ?> +
+
+ + + + + diff --git a/composer.json b/composer.json index 4d1c2a896..14e2ab141 100644 --- a/composer.json +++ b/composer.json @@ -313,5 +313,12 @@ }, "config": { "bin-dir": "vendor/bin" + }, + "require-dev": { + "squizlabs/php_codesniffer": "3.6.*", + "phpmd/phpmd": "2.*", + "phpmetrics/phpmetrics": "2.*", + "sebastian/phpcpd": "3.*" } } + diff --git a/composer.lock b/composer.lock index 6fc201986..ea8f24af0 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": "ab181b377c4128ccde03cc50571b7ab6", - "content-hash": "e19ca762a6a929e69ae3b0e649fa4f6d", + "hash": "7e7441d3ba7b9b2be1f647b9bfc2c941", + "content-hash": "d59d1c1f4957fc2e3dc019cbb99b5aa2", "packages": [ { "name": "BlackrockDigital/startbootstrap-sb-admin-2", @@ -1323,16 +1323,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "2.0.36", + "version": "2.0.37", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "a97547126396548c224703a267a30af1592be146" + "reference": "c812fbb4d6b4d7f30235ab7298a12f09ba13b37c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/a97547126396548c224703a267a30af1592be146", - "reference": "a97547126396548c224703a267a30af1592be146", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/c812fbb4d6b4d7f30235ab7298a12f09ba13b37c", + "reference": "c812fbb4d6b4d7f30235ab7298a12f09ba13b37c", "shasum": "" }, "require": { @@ -1410,7 +1410,7 @@ "x.509", "x509" ], - "time": "2022-01-30 08:48:36" + "time": "2022-04-04 04:57:45" }, { "name": "rmariuzzo/jquery-checkboxes", @@ -2065,7 +2065,1111 @@ "time": "2007-12-17 09:04:44" } ], - "packages-dev": [], + "packages-dev": [ + { + "name": "composer/pcre", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/composer/pcre.git", + "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/pcre/zipball/67a32d7d6f9f560b726ab25a061b38ff3a80c560", + "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.3", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Pcre\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "keywords": [ + "PCRE", + "preg", + "regex", + "regular expression" + ], + "time": "2022-01-21 20:24:37" + }, + { + "name": "composer/xdebug-handler", + "version": "2.0.5", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "9e36aeed4616366d2b690bdce11f71e9178c579a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/9e36aeed4616366d2b690bdce11f71e9178c579a", + "reference": "9e36aeed4616366d2b690bdce11f71e9178c579a", + "shasum": "" + }, + "require": { + "composer/pcre": "^1", + "php": "^5.3.2 || ^7.0 || ^8.0", + "psr/log": "^1 || ^2 || ^3" + }, + "require-dev": { + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^4.2 || ^5.0 || ^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without Xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], + "time": "2022-02-24 20:20:32" + }, + { + "name": "nikic/php-parser", + "version": "v4.13.2", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "210577fe3cf7badcc5814d99455df46564f3c077" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/210577fe3cf7badcc5814d99455df46564f3c077", + "reference": "210577fe3cf7badcc5814d99455df46564f3c077", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "time": "2021-11-30 19:35:32" + }, + { + "name": "pdepend/pdepend", + "version": "2.10.3", + "source": { + "type": "git", + "url": "https://github.com/pdepend/pdepend.git", + "reference": "da3166a06b4a89915920a42444f707122a1584c9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pdepend/pdepend/zipball/da3166a06b4a89915920a42444f707122a1584c9", + "reference": "da3166a06b4a89915920a42444f707122a1584c9", + "shasum": "" + }, + "require": { + "php": ">=5.3.7", + "symfony/config": "^2.3.0|^3|^4|^5|^6.0", + "symfony/dependency-injection": "^2.3.0|^3|^4|^5|^6.0", + "symfony/filesystem": "^2.3.0|^3|^4|^5|^6.0" + }, + "require-dev": { + "easy-doc/easy-doc": "0.0.0|^1.2.3", + "gregwar/rst": "^1.0", + "phpunit/phpunit": "^4.8.36|^5.7.27", + "squizlabs/php_codesniffer": "^2.0.0" + }, + "bin": [ + "src/bin/pdepend" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "PDepend\\": "src/main/php/PDepend" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Official version of pdepend to be handled with Composer", + "time": "2022-02-23 07:53:09" + }, + { + "name": "phpmd/phpmd", + "version": "2.12.0", + "source": { + "type": "git", + "url": "https://github.com/phpmd/phpmd.git", + "reference": "c0b678ba71902f539c27c14332aa0ddcf14388ec" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpmd/phpmd/zipball/c0b678ba71902f539c27c14332aa0ddcf14388ec", + "reference": "c0b678ba71902f539c27c14332aa0ddcf14388ec", + "shasum": "" + }, + "require": { + "composer/xdebug-handler": "^1.0 || ^2.0 || ^3.0", + "ext-xml": "*", + "pdepend/pdepend": "^2.10.3", + "php": ">=5.3.9" + }, + "require-dev": { + "easy-doc/easy-doc": "0.0.0 || ^1.3.2", + "ext-json": "*", + "ext-simplexml": "*", + "gregwar/rst": "^1.0", + "mikey179/vfsstream": "^1.6.8", + "phpunit/phpunit": "^4.8.36 || ^5.7.27", + "squizlabs/php_codesniffer": "^2.0" + }, + "bin": [ + "src/bin/phpmd" + ], + "type": "library", + "autoload": { + "psr-0": { + "PHPMD\\": "src/main/php" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Manuel Pichler", + "email": "github@manuel-pichler.de", + "homepage": "https://github.com/manuelpichler", + "role": "Project Founder" + }, + { + "name": "Marc Würth", + "email": "ravage@bluewin.ch", + "homepage": "https://github.com/ravage84", + "role": "Project Maintainer" + }, + { + "name": "Other contributors", + "homepage": "https://github.com/phpmd/phpmd/graphs/contributors", + "role": "Contributors" + } + ], + "description": "PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD.", + "homepage": "https://phpmd.org/", + "keywords": [ + "mess detection", + "mess detector", + "pdepend", + "phpmd", + "pmd" + ], + "time": "2022-03-24 13:33:01" + }, + { + "name": "phpmetrics/phpmetrics", + "version": "v2.8.1", + "source": { + "type": "git", + "url": "https://github.com/phpmetrics/PhpMetrics.git", + "reference": "e279f7317390f642339941b693359e9a181817a7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpmetrics/PhpMetrics/zipball/e279f7317390f642339941b693359e9a181817a7", + "reference": "e279f7317390f642339941b693359e9a181817a7", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "nikic/php-parser": "^3|^4", + "php": ">=5.5" + }, + "replace": { + "halleck45/php-metrics": "*", + "halleck45/phpmetrics": "*" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14", + "sebastian/comparator": ">=1.2.3", + "squizlabs/php_codesniffer": "^3.5", + "symfony/dom-crawler": "^3.0 || ^4.0 || ^5.0" + }, + "bin": [ + "bin/phpmetrics" + ], + "type": "library", + "autoload": { + "files": [ + "./src/functions.php" + ], + "psr-0": { + "Hal\\": "./src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jean-François Lépine", + "email": "lepinejeanfrancois@yahoo.fr", + "homepage": "http://www.lepine.pro", + "role": "Copyright Holder" + } + ], + "description": "Static analyzer tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !", + "homepage": "http://www.phpmetrics.org", + "keywords": [ + "analysis", + "qa", + "quality", + "testing" + ], + "time": "2022-03-24 10:19:51" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.9", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2017-02-26 11:10:40" + }, + { + "name": "psr/container", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "time": "2017-02-14 16:28:37" + }, + { + "name": "psr/log", + "version": "1.1.4", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2021-05-03 11:20:27" + }, + { + "name": "sebastian/finder-facade", + "version": "1.2.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/finder-facade.git", + "reference": "4a3174709c2dc565fe5fb26fcf827f6a1fc7b09f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/finder-facade/zipball/4a3174709c2dc565fe5fb26fcf827f6a1fc7b09f", + "reference": "4a3174709c2dc565fe5fb26fcf827f6a1fc7b09f", + "shasum": "" + }, + "require": { + "symfony/finder": "~2.3|~3.0|~4.0", + "theseer/fdomdocument": "~1.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FinderFacade is a convenience wrapper for Symfony's Finder component.", + "homepage": "https://github.com/sebastianbergmann/finder-facade", + "abandoned": true, + "time": "2017-11-18 17:31:49" + }, + { + "name": "sebastian/phpcpd", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpcpd.git", + "reference": "dfed51c1288790fc957c9433e2f49ab152e8a564" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpcpd/zipball/dfed51c1288790fc957c9433e2f49ab152e8a564", + "reference": "dfed51c1288790fc957c9433e2f49ab152e8a564", + "shasum": "" + }, + "require": { + "php": "^5.6|^7.0", + "phpunit/php-timer": "^1.0.6", + "sebastian/finder-facade": "^1.1", + "sebastian/version": "^1.0|^2.0", + "symfony/console": "^2.7|^3.0|^4.0" + }, + "bin": [ + "phpcpd" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Copy/Paste Detector (CPD) for PHP code.", + "homepage": "https://github.com/sebastianbergmann/phpcpd", + "time": "2017-11-16 08:49:28" + }, + { + "name": "sebastian/version", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2016-10-03 07:35:21" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "3.6.2", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "5e4e71592f69da17871dba6e80dd51bce74a351a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/5e4e71592f69da17871dba6e80dd51bce74a351a", + "reference": "5e4e71592f69da17871dba6e80dd51bce74a351a", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "bin": [ + "bin/phpcs", + "bin/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards" + ], + "time": "2021-12-12 21:44:58" + }, + { + "name": "symfony/config", + "version": "v3.4.47", + "source": { + "type": "git", + "url": "https://github.com/symfony/config.git", + "reference": "bc6b3fd3930d4b53a60b42fe2ed6fc466b75f03f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/config/zipball/bc6b3fd3930d4b53a60b42fe2ed6fc466b75f03f", + "reference": "bc6b3fd3930d4b53a60b42fe2ed6fc466b75f03f", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "symfony/filesystem": "~2.8|~3.0|~4.0", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/dependency-injection": "<3.3", + "symfony/finder": "<3.3" + }, + "require-dev": { + "symfony/dependency-injection": "~3.3|~4.0", + "symfony/event-dispatcher": "~3.3|~4.0", + "symfony/finder": "~3.3|~4.0", + "symfony/yaml": "~3.0|~4.0" + }, + "suggest": { + "symfony/yaml": "To use the yaml reference dumper" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Config\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Config Component", + "homepage": "https://symfony.com", + "time": "2020-10-24 10:57:07" + }, + { + "name": "symfony/console", + "version": "v3.4.47", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "a10b1da6fc93080c180bba7219b5ff5b7518fe81" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/a10b1da6fc93080c180bba7219b5ff5b7518fe81", + "reference": "a10b1da6fc93080c180bba7219b5ff5b7518fe81", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "symfony/debug": "~2.8|~3.0|~4.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/dependency-injection": "<3.4", + "symfony/process": "<3.3" + }, + "provide": { + "psr/log-implementation": "1.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~3.3|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/event-dispatcher": "~2.8|~3.0|~4.0", + "symfony/lock": "~3.4|~4.0", + "symfony/process": "~3.3|~4.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Console Component", + "homepage": "https://symfony.com", + "time": "2020-10-24 10:57:07" + }, + { + "name": "symfony/debug", + "version": "v3.4.47", + "source": { + "type": "git", + "url": "https://github.com/symfony/debug.git", + "reference": "ab42889de57fdfcfcc0759ab102e2fd4ea72dcae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/debug/zipball/ab42889de57fdfcfcc0759ab102e2fd4ea72dcae", + "reference": "ab42889de57fdfcfcc0759ab102e2fd4ea72dcae", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "psr/log": "~1.0" + }, + "conflict": { + "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + }, + "require-dev": { + "symfony/http-kernel": "~2.8|~3.0|~4.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Debug\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Debug Component", + "homepage": "https://symfony.com", + "time": "2020-10-24 10:57:07" + }, + { + "name": "symfony/dependency-injection", + "version": "v3.4.47", + "source": { + "type": "git", + "url": "https://github.com/symfony/dependency-injection.git", + "reference": "51d2a2708c6ceadad84393f8581df1dcf9e5e84b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/51d2a2708c6ceadad84393f8581df1dcf9e5e84b", + "reference": "51d2a2708c6ceadad84393f8581df1dcf9e5e84b", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "psr/container": "^1.0" + }, + "conflict": { + "symfony/config": "<3.3.7", + "symfony/finder": "<3.3", + "symfony/proxy-manager-bridge": "<3.4", + "symfony/yaml": "<3.4" + }, + "provide": { + "psr/container-implementation": "1.0" + }, + "require-dev": { + "symfony/config": "~3.3|~4.0", + "symfony/expression-language": "~2.8|~3.0|~4.0", + "symfony/yaml": "~3.4|~4.0" + }, + "suggest": { + "symfony/config": "", + "symfony/expression-language": "For using expressions in service container configuration", + "symfony/finder": "For using double-star glob patterns or when GLOB_BRACE portability is required", + "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them", + "symfony/yaml": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\DependencyInjection\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony DependencyInjection Component", + "homepage": "https://symfony.com", + "time": "2020-10-24 10:57:07" + }, + { + "name": "symfony/filesystem", + "version": "v3.4.47", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "e58d7841cddfed6e846829040dca2cca0ebbbbb3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/e58d7841cddfed6e846829040dca2cca0ebbbbb3", + "reference": "e58d7841cddfed6e846829040dca2cca0ebbbbb3", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "symfony/polyfill-ctype": "~1.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Filesystem Component", + "homepage": "https://symfony.com", + "time": "2020-10-24 10:57:07" + }, + { + "name": "symfony/finder", + "version": "v3.4.47", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "b6b6ad3db3edb1b4b1c1896b1975fb684994de6e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/b6b6ad3db3edb1b4b1c1896b1975fb684994de6e", + "reference": "b6b6ad3db3edb1b4b1c1896b1975fb684994de6e", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Finder Component", + "homepage": "https://symfony.com", + "time": "2020-11-16 17:02:08" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.19.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "b5f7b932ee6fa802fc792eabd77c4c88084517ce" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/b5f7b932ee6fa802fc792eabd77c4c88084517ce", + "reference": "b5f7b932ee6fa802fc792eabd77c4c88084517ce", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.19-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2020-10-23 09:01:57" + }, + { + "name": "theseer/fdomdocument", + "version": "1.6.7", + "source": { + "type": "git", + "url": "https://github.com/theseer/fDOMDocument.git", + "reference": "5cddd4f9076a9a2b85c5135935bba2dcb3ed7574" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/fDOMDocument/zipball/5cddd4f9076a9a2b85c5135935bba2dcb3ed7574", + "reference": "5cddd4f9076a9a2b85c5135935bba2dcb3ed7574", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "lib-libxml": "*", + "php": ">=5.3.3" + }, + "require-dev": { + "php": ">=7.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "lead" + } + ], + "description": "The classes contained within this repository extend the standard DOM to use exceptions at all occasions of errors instead of PHP warnings or notices. They also add various custom methods and shortcuts for convenience and to simplify the usage of DOM.", + "homepage": "https://github.com/theseer/fDOMDocument", + "abandoned": true, + "time": "2022-01-25 23:10:35" + } + ], "aliases": [], "minimum-stability": "stable", "stability-flags": [], diff --git a/config/vilesci.config-default.inc.php b/config/vilesci.config-default.inc.php index cd45e6979..fd03cf844 100644 --- a/config/vilesci.config-default.inc.php +++ b/config/vilesci.config-default.inc.php @@ -254,4 +254,13 @@ define('BIS_STANDORTCODE_LEHRGAENGE', '0'); // bPk Abfrage define('BPK_FUER_ALLE_BENUTZER_ABFRAGEN', false); + +// Bei folgenden Buchungstypen wird ein Anlegen geprüft ob bereits ein Eintrag für diesen Typ vorhanden ist im selben +// Semester und ggf ein Hinweis ausgegeben +define('FAS_DOPPELTE_BUCHUNGSTYPEN_CHECK', serialize( + array('StudiengebuehrAnzahlung', 'Studiengebuehr', 'StudiengebuehrRestzahlung', 'OEH') +)); + +// Spezialnoten die am Zeunigs und Diplomasupplement ignoriert werden +define('ZEUGNISNOTE_NICHT_ANZEIGEN',serialize(array('iar', 'nz'))); ?> diff --git a/content/fas.xul.php b/content/fas.xul.php index 19b24b0f0..d387cb525 100644 --- a/content/fas.xul.php +++ b/content/fas.xul.php @@ -239,7 +239,7 @@ foreach($addon_obj->result as $addon) getAll(); + $stsemobj->getAll('desc'); foreach ($stsemobj->studiensemester as $stsem) { echo " @@ -934,6 +934,9 @@ foreach($addon_obj->result as $addon) oncommand="studiensemesterChange('', 1)" /> + + + diff --git a/content/lvplanung/lehrveranstaltungnotenoverlay.xul.php b/content/lvplanung/lehrveranstaltungnotenoverlay.xul.php index c6bee8942..fda16c07a 100644 --- a/content/lvplanung/lehrveranstaltungnotenoverlay.xul.php +++ b/content/lvplanung/lehrveranstaltungnotenoverlay.xul.php @@ -120,6 +120,10 @@ echo " +