diff --git a/FHC-vendor/jquery-tablesorter/package.json b/FHC-vendor/jquery-tablesorter/package.json index b16fcb45e..110042959 100644 --- a/FHC-vendor/jquery-tablesorter/package.json +++ b/FHC-vendor/jquery-tablesorter/package.json @@ -56,7 +56,7 @@ ] }, "devDependencies": { - "grunt": "^0.4.5", + "grunt": "^1.3.0", "grunt-cli": "~0.1.13", "grunt-contrib-clean": "^0.7.0", "grunt-contrib-concat": "^0.5.1", diff --git a/application/controllers/jobs/LehrauftragJob.php b/application/controllers/jobs/LehrauftragJob.php index 4ba327a2f..7f5754595 100644 --- a/application/controllers/jobs/LehrauftragJob.php +++ b/application/controllers/jobs/LehrauftragJob.php @@ -383,8 +383,8 @@ class LehrauftragJob extends JOB_Controller } // Else if UID exists else { - // Search if studiensemester exists - $ss_index = array_search($data['studiensemester_kurzbz'], array_column($mail_data_arr, 'studiensemester_kurzbz')); + // Search if studiensemester exists inside the existing UID array + $ss_index = array_search($data['studiensemester_kurzbz'], array_column($mail_data_arr[$uid_index], 'studiensemester_kurzbz')); // If studiensemester is new, add studiensemester to existing UID if ($ss_index === false) @@ -394,13 +394,6 @@ class LehrauftragJob extends JOB_Controller $data[$i] ); } - // Else if studiensemester exists - else - { - // Add corresponding data to existing studiensemester of UID - $mail_data_arr[$uid_index]['studiensemester_kurbz'][] = $data[$i]; - } - } } } diff --git a/application/controllers/lehre/lehrauftrag/Lehrauftrag.php b/application/controllers/lehre/lehrauftrag/Lehrauftrag.php index 8a096338e..0fe70a302 100644 --- a/application/controllers/lehre/lehrauftrag/Lehrauftrag.php +++ b/application/controllers/lehre/lehrauftrag/Lehrauftrag.php @@ -270,7 +270,6 @@ class Lehrauftrag extends Auth_Controller private function _sendMail($lehrvertrag_data_arr) { // Cluster data of new lehrvertraege as needed to send mail - $lehrvertrag_data_arr = $this->_cluster_newVertragData($lehrvertrag_data_arr); foreach ($lehrvertrag_data_arr as $lehrvertrag_data) { diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index 12d9a9c4d..44a1cf327 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -93,6 +93,7 @@ class InfoCenter extends Auth_Controller const INTERESSENTSTATUS = 'Interessent'; const ABGEWIESENERSTATUS = 'Abgewiesener'; const BEWERBERSTATUS = 'Bewerber'; + const WARTENDER = 'Wartender'; // Statusgruende for which no Studiengangsfreigabemessage should be sent private $_statusgruendeNoStgFreigabeMessage = array('FIT Programm', 'FIT program', 'FIT programme'); @@ -137,7 +138,9 @@ class InfoCenter extends Auth_Controller 'setOnHold' => 'infocenter:rw', 'removeOnHold' => 'infocenter:rw', 'getStudienjahrEnd' => 'infocenter:r', - 'setNavigationMenuArrayJson' => 'infocenter:r' + 'setNavigationMenuArrayJson' => 'infocenter:r', + 'getAbsageData' => 'infocenter:r', + 'saveAbsageForAll' => 'infocenter:rw' ) ); @@ -715,11 +718,14 @@ class InfoCenter extends Auth_Controller * Saves Absage for Prestudent including the reason for the Absage (statusgrund). * inserts Studiensemester and Ausbildungssemester for the new Absage of (chronologically) last status. */ - public function saveAbsage() + public function saveAbsage($prestudent_id = null, $statusgrund = null) { $json = null; - $prestudent_id = $this->input->post('prestudent_id'); - $statusgrund = $this->input->post('statusgrund'); + if (is_null($prestudent_id)) + $prestudent_id = $this->input->post('prestudent_id'); + + if (is_null($statusgrund)) + $statusgrund = $this->input->post('statusgrund'); $lastStatus = $this->PrestudentstatusModel->getLastStatus($prestudent_id); @@ -728,8 +734,10 @@ class InfoCenter extends Auth_Controller if (hasData($lastStatus) && hasData($statusgrresult)) { - //check if still Interessent and not freigegeben yet - if ($lastStatus->retval[0]->status_kurzbz === self::INTERESSENTSTATUS && !isset($lastStatus->retval[0]->bestaetigtam)) + //check if still Interessent + if ($lastStatus->retval[0]->status_kurzbz === self::INTERESSENTSTATUS + || $lastStatus->retval[0]->status_kurzbz === self::BEWERBERSTATUS + || $lastStatus->retval[0]->status_kurzbz === self::WARTENDER) { $result = $this->PrestudentstatusModel->insert( array( @@ -1760,6 +1768,8 @@ class InfoCenter extends Auth_Controller || isset($zgvpruefung->prestudentstatus->bestaetigtam) || $zgvpruefung->prestudentstatus->status_kurzbz != self::INTERESSENTSTATUS; + $zgvpruefung->abgewiesener = $zgvpruefung->prestudentstatus->status_kurzbz === self::ABGEWIESENERSTATUS; + //wether prestudent was freigegeben for RT/Stg $zgvpruefung->isRtFreigegeben = false; $zgvpruefung->isStgFreigegeben = false; @@ -1841,8 +1851,8 @@ class InfoCenter extends Auth_Controller $this->_sortPrestudents($zgvpruefungen); - $abwstatusgruende = $this->StatusgrundModel->loadWhere(array('status_kurzbz' => self::ABGEWIESENERSTATUS))->retval; - $intstatusgruende = $this->StatusgrundModel->loadWhere(array('status_kurzbz' => self::INTERESSENTSTATUS))->retval; + $abwstatusgruende = $this->StatusgrundModel->getStatus(self::ABGEWIESENERSTATUS, true)->retval; + $intstatusgruende = $this->StatusgrundModel->getStatus(self::INTERESSENTSTATUS)->retval; $data = array ( 'zgvpruefungen' => $zgvpruefungen, @@ -2103,4 +2113,45 @@ class InfoCenter extends Auth_Controller $this->loglib->logError('Studiengang has no mail for sending Freigabe mail'); } } + + public function getAbsageData() + { + $this->load->model('organisation/Studiengang_model', 'StudiengangModel'); + + $statusgruende = $this->StatusgrundModel->getStatus(self::ABGEWIESENERSTATUS, true)->retval; + $studienSemester = $this->variablelib->getVar('infocenter_studiensemester'); + $studiengaenge = $this->StudiengangModel->getStudiengaengeWithOrgForm(['b', 'm'], $studienSemester); + + $data = array ( + 'statusgruende' => $statusgruende, + 'studiengaenge' => $studiengaenge->retval + ); + + $this->outputJsonSuccess($data); + } + + public function saveAbsageForAll() + { + $statusgrund = $this->input->post('statusgrund'); + $studiengang = $this->input->post('studiengang'); + $personen = $this->input->post('personen'); + $studienSemester = $this->variablelib->getVar('infocenter_studiensemester'); + + if ($statusgrund === 'null' || $studiengang === 'null' || empty($personen)) + $this->terminateWithJsonError("Bitte Statusgrund, Studiengang und Personen auswählen."); + + foreach($personen as $person) + { + $prestudent = $this->PrestudentModel->getPrestudentByStudiengangAndPerson($studiengang, $person, $studienSemester); + + if(!hasData($prestudent)) + continue; + + $prestudentData = getData($prestudent); + + $this->saveAbsage($prestudentData[0]->prestudent_id, $statusgrund); + } + + $this->outputJsonSuccess("Success"); + } } diff --git a/application/libraries/LDAPLib.php b/application/libraries/LDAPLib.php index a119af51e..195dddc88 100644 --- a/application/libraries/LDAPLib.php +++ b/application/libraries/LDAPLib.php @@ -220,7 +220,9 @@ class LDAPLib } else // Connection error { - return error(ldap_error($ldapConnection)); + return error( + 'An error occurred while connecting to the LDAP server: '.$ldapConfigs[self::SERVER].':'.$ldapConfigs[self::PORT] + ); } } } diff --git a/application/models/CL/Messages_model.php b/application/models/CL/Messages_model.php index 9ffd12cf6..4975af382 100644 --- a/application/models/CL/Messages_model.php +++ b/application/models/CL/Messages_model.php @@ -612,9 +612,9 @@ class Messages_model extends CI_Model if (!isEmptyString($vorlage_kurzbz)) { $this->load->model('system/Vorlagestudiengang_model', 'VorlagestudiengangModel'); - $this->VorlagestudiengangModel->addOrder('version','DESC'); + $this->VorlagestudiengangModel->addOrder('version', 'DESC'); - $getVorlage = $this->VorlagestudiengangModel->loadWhere(array('vorlage_kurzbz' => $vorlage_kurzbz)); + $getVorlage = $this->VorlagestudiengangModel->loadWhere(array('vorlage_kurzbz' => $vorlage_kurzbz, 'aktiv' => true)); } return $getVorlage; diff --git a/application/models/crm/Prestudent_model.php b/application/models/crm/Prestudent_model.php index 2e014800c..52ba4d9f3 100644 --- a/application/models/crm/Prestudent_model.php +++ b/application/models/crm/Prestudent_model.php @@ -581,4 +581,19 @@ class Prestudent_model extends DB_Model return $this->execQuery($query, array($person_id)); } + + public function getPrestudentByStudiengangAndPerson($studiengang, $person, $studienSemester) + { + $query = "SELECT ps.prestudent_id + 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) + WHERE ps.person_id = ? + AND UPPER((sg.typ || sg.kurzbz) || ':' || sp.orgform_kurzbz) = ? + AND pss.studiensemester_kurzbz = ? + "; + + return $this->execQuery($query, array($person, $studiengang, $studienSemester)); + } } diff --git a/application/models/crm/Statusgrund_model.php b/application/models/crm/Statusgrund_model.php index 4717a7571..7ab17a45b 100644 --- a/application/models/crm/Statusgrund_model.php +++ b/application/models/crm/Statusgrund_model.php @@ -11,4 +11,18 @@ class Statusgrund_model extends DB_Model $this->dbTable = "public.tbl_status_grund"; $this->pk = "statusgrund_id"; } + + public function getStatus($status_kurzbz = null, $aktiv = null) + { + $this->addOrder('bezeichnung_mehrsprachig'); + $where = array(); + if (!is_null($status_kurzbz)) + $where['status_kurzbz'] = $status_kurzbz; + if (!is_null($aktiv)) + $where['aktiv'] = $aktiv; + + $status = $this->loadWhere($where); + + return success($status->retval); + } } diff --git a/application/models/organisation/Studiengang_model.php b/application/models/organisation/Studiengang_model.php index 8b8be0366..41bdabd11 100644 --- a/application/models/organisation/Studiengang_model.php +++ b/application/models/organisation/Studiengang_model.php @@ -481,4 +481,18 @@ class Studiengang_model extends DB_Model return $this->loadWhere($condition); } + + public function getStudiengaengeWithOrgForm($typ, $semester) + { + $query = "SELECT DISTINCT (UPPER(sg.typ || sg.kurzbz || ':' || 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) + WHERE sp.aktiv = TRUE AND sg.aktiv = TRUE AND sg.typ IN ? + AND spsem.studiensemester_kurzbz = ? + ORDER BY Studiengang"; + + return $this->execQuery($query, array($typ, $semester)); + } } diff --git a/application/views/lehre/lehrauftrag/acceptLehrauftrag.php b/application/views/lehre/lehrauftrag/acceptLehrauftrag.php index e87f0945c..521883452 100644 --- a/application/views/lehre/lehrauftrag/acceptLehrauftrag.php +++ b/application/views/lehre/lehrauftrag/acceptLehrauftrag.php @@ -189,7 +189,7 @@ $this->load->view(
- + diff --git a/application/views/lehre/lehrauftrag/acceptLehrauftragData.php b/application/views/lehre/lehrauftrag/acceptLehrauftragData.php index f09eb62a0..92c896ce7 100644 --- a/application/views/lehre/lehrauftrag/acceptLehrauftragData.php +++ b/application/views/lehre/lehrauftrag/acceptLehrauftragData.php @@ -32,7 +32,7 @@ SELECT erteilt, akzeptiert, (SELECT - vorname || \' \' || nachname + nachname || \' \' || vorname FROM public.tbl_person JOIN public.tbl_benutzer benutzer USING (person_id) @@ -48,7 +48,7 @@ SELECT ) ) AS "bestellt_von", (SELECT - vorname || \' \' || nachname + nachname || \' \' || vorname FROM public.tbl_person JOIN public.tbl_benutzer benutzer USING (person_id) @@ -64,7 +64,7 @@ SELECT ) ) AS "erteilt_von", (SELECT - vorname || \' \' || nachname + nachname || \' \' || vorname FROM public.tbl_person JOIN public.tbl_benutzer benutzer USING (person_id) @@ -241,7 +241,7 @@ FROM \'Betreuung\' AS "typ", (betreuerart_kurzbz || \' \' || (SELECT - vorname || \' \' || nachname + nachname || \' \' || vorname FROM PUBLIC.tbl_person JOIN PUBLIC.tbl_benutzer USING (person_id) diff --git a/application/views/lehre/lehrauftrag/approveLehrauftragData.php b/application/views/lehre/lehrauftrag/approveLehrauftragData.php index 88b3eabd0..7c9669ae3 100644 --- a/application/views/lehre/lehrauftrag/approveLehrauftragData.php +++ b/application/views/lehre/lehrauftrag/approveLehrauftragData.php @@ -34,7 +34,7 @@ SELECT erteilt, akzeptiert, (SELECT - vorname || \' \' || nachname + nachname || \' \' || vorname FROM public.tbl_person JOIN public.tbl_benutzer benutzer USING (person_id) @@ -50,7 +50,7 @@ SELECT ) ) AS "bestellt_von", (SELECT - vorname || \' \' || nachname + nachname || \' \' || vorname FROM public.tbl_person JOIN public.tbl_benutzer benutzer USING (person_id) @@ -66,7 +66,7 @@ SELECT ) ) AS "erteilt_von", (SELECT - vorname || \' \' || nachname + nachname || \' \' || vorname FROM public.tbl_person JOIN public.tbl_benutzer benutzer USING (person_id) @@ -128,7 +128,7 @@ FROM ( SELECT /* lehrauftraege also planned with dummies, therefore personalnummer is needed */ - ma.personalnummer, + (ma.personalnummer::text), lema.lehreinheit_id, lv.lehrveranstaltung_id, lv.bezeichnung AS "lv_bezeichnung", @@ -240,7 +240,7 @@ FROM pa.lehreinheit_id, lv.lehrveranstaltung_id, lv.bezeichnung AS "lv_bezeichnung", - pa.projektarbeit_id AS "projektarbeit_id", + (pa.projektarbeit_id::text) AS "projektarbeit_id", le.studiensemester_kurzbz, stg.studiengang_kz, upper(stg.typ || stg.kurzbz) AS "stg_typ_kurzbz", @@ -249,7 +249,7 @@ FROM \'Betreuung\' AS "typ", (betreuerart_kurzbz || \' \' || (SELECT - vorname || \' \' || nachname + nachname || \' \' || vorname FROM PUBLIC.tbl_person JOIN PUBLIC.tbl_benutzer USING (person_id) @@ -268,7 +268,7 @@ FROM ELSE (oe.organisationseinheittyp_kurzbz || \' \' || oe.bezeichnung) END AS "lv_oe_kurzbz", - (nachname || \' \' || vorname) AS "lektor", + (vorname || \' \' || nachname) AS "lektor", TRUNC(pb.stunden, 1) AS "stunden", TRUNC((pb.stunden * pb.stundensatz), 2) AS "betrag", vertrag_id, diff --git a/application/views/lehre/lehrauftrag/cancelledLehrauftragData.php b/application/views/lehre/lehrauftrag/cancelledLehrauftragData.php index 54948fb26..a3efb66b3 100644 --- a/application/views/lehre/lehrauftrag/cancelledLehrauftragData.php +++ b/application/views/lehre/lehrauftrag/cancelledLehrauftragData.php @@ -14,7 +14,7 @@ $query = ' datum AS "storniert", ( SELECT - vorname || \' \' || nachname + nachname || \' \' || vorname FROM public.tbl_person JOIN public.tbl_benutzer benutzer USING (person_id) diff --git a/application/views/lehre/lehrauftrag/orderLehrauftragData.php b/application/views/lehre/lehrauftrag/orderLehrauftragData.php index aea7d5181..1ccfc55a4 100644 --- a/application/views/lehre/lehrauftrag/orderLehrauftragData.php +++ b/application/views/lehre/lehrauftrag/orderLehrauftragData.php @@ -65,7 +65,7 @@ SELECT erteilt, akzeptiert, (SELECT - vorname || \' \' || nachname + nachname || \' \' || vorname FROM public.tbl_person JOIN public.tbl_benutzer benutzer USING (person_id) @@ -81,7 +81,7 @@ SELECT ) ) AS "bestellt_von", (SELECT - vorname || \' \' || nachname + nachname || \' \' || vorname FROM public.tbl_person JOIN public.tbl_benutzer benutzer USING (person_id) @@ -97,7 +97,7 @@ SELECT ) ) AS "erteilt_von", (SELECT - vorname || \' \' || nachname + nachname || \' \' || vorname FROM public.tbl_person JOIN public.tbl_benutzer benutzer USING (person_id) @@ -281,7 +281,7 @@ FROM \'Betreuung\' AS "typ", (betreuerart_kurzbz || \' \' || (SELECT - vorname || \' \' || nachname + nachname || \' \' || vorname FROM PUBLIC.tbl_person JOIN PUBLIC.tbl_benutzer USING (person_id) diff --git a/application/views/lehre/pruefungsprotokollUebersicht.php b/application/views/lehre/pruefungsprotokollUebersicht.php index 35bea7963..c7de8fcd0 100644 --- a/application/views/lehre/pruefungsprotokollUebersicht.php +++ b/application/views/lehre/pruefungsprotokollUebersicht.php @@ -48,6 +48,8 @@ name="period" value="today">p->t('ui','heute'); ?> +
diff --git a/application/views/lehre/pruefungsprotokollUebersichtData.php b/application/views/lehre/pruefungsprotokollUebersichtData.php index dd247c2eb..ff2caa774 100644 --- a/application/views/lehre/pruefungsprotokollUebersichtData.php +++ b/application/views/lehre/pruefungsprotokollUebersichtData.php @@ -19,9 +19,10 @@ FROM WHERE vorsitz='".$UID."' AND ( - '". $PERIOD. "' = 'today' AND datum = NOW()::date OR - '". $PERIOD. "' = 'lastWeek' AND datum = (NOW() - interval '1 week')::date OR - '". $PERIOD. "' = 'all' AND datum >= '2020-05-27' + ('". $PERIOD. "' = 'today' AND datum = NOW()::date) OR + ('". $PERIOD. "' = 'lastWeek' AND datum >= (NOW() - interval '1 week')::date AND datum < NOW()::date) OR + ('". $PERIOD. "' = 'upcoming' AND datum > NOW()::date) OR + ('". $PERIOD. "' = 'all' AND datum >= '2020-05-27') ) ORDER BY datum, nachname, vorname "; diff --git a/application/views/system/infocenter/absageModal.php b/application/views/system/infocenter/absageModal.php new file mode 100644 index 000000000..00298945e --- /dev/null +++ b/application/views/system/infocenter/absageModal.php @@ -0,0 +1,35 @@ + \ No newline at end of file diff --git a/application/views/system/infocenter/infocenter.php b/application/views/system/infocenter/infocenter.php index 4005518a1..38e644846 100644 --- a/application/views/system/infocenter/infocenter.php +++ b/application/views/system/infocenter/infocenter.php @@ -13,6 +13,7 @@ 'ajaxlib' => true, 'filterwidget' => true, 'navigationwidget' => true, + 'dialoglib' => true, 'phrases' => array( 'person' => array('vorname', 'nachname'), 'global' => array('mailAnXversandt'), @@ -40,6 +41,7 @@
load->view('system/infocenter/infocenterData.php'); ?> + load->view('system/infocenter/absageModal.php'); ?>
diff --git a/application/views/system/infocenter/infocenterFreigegeben.php b/application/views/system/infocenter/infocenterFreigegeben.php index 15e73f1b6..4855e5cd6 100644 --- a/application/views/system/infocenter/infocenterFreigegeben.php +++ b/application/views/system/infocenter/infocenterFreigegeben.php @@ -13,6 +13,7 @@ 'ajaxlib' => true, 'filterwidget' => true, 'navigationwidget' => true, + 'dialoglib' => true, 'phrases' => array( 'person' => array('vorname', 'nachname'), 'global' => array('mailAnXversandt'), @@ -40,6 +41,7 @@
load->view('system/infocenter/infocenterFreigegebenData.php'); ?> + load->view('system/infocenter/absageModal.php'); ?>
diff --git a/application/views/system/infocenter/infocenterFreigegebenData.php b/application/views/system/infocenter/infocenterFreigegebenData.php index c3b745cf3..26c30d718 100644 --- a/application/views/system/infocenter/infocenterFreigegebenData.php +++ b/application/views/system/infocenter/infocenterFreigegebenData.php @@ -115,6 +115,12 @@ sg.studiengang_kz in('.$ADDITIONAL_STG.') ) AND pss.studiensemester_kurzbz = '.$STUDIENSEMESTER.' + AND NOT EXISTS ( + SELECT 1 + FROM tbl_prestudentstatus spss + WHERE spss.prestudent_id = ps.prestudent_id + AND spss.status_kurzbz = '.$REJECTED_STATUS.' + ) LIMIT 1 ) AS "StgAbgeschickt", ( diff --git a/application/views/system/infocenter/infocenterReihungstestAbsolviert.php b/application/views/system/infocenter/infocenterReihungstestAbsolviert.php index 79f75885b..f2d838fac 100644 --- a/application/views/system/infocenter/infocenterReihungstestAbsolviert.php +++ b/application/views/system/infocenter/infocenterReihungstestAbsolviert.php @@ -13,6 +13,7 @@ 'ajaxlib' => true, 'filterwidget' => true, 'navigationwidget' => true, + 'dialoglib' => true, 'phrases' => array( 'person' => array('vorname', 'nachname'), 'global' => array('mailAnXversandt'), @@ -40,6 +41,7 @@
load->view('system/infocenter/infocenterReihungstestAbsolviertData.php'); ?> + load->view('system/infocenter/absageModal.php'); ?>
diff --git a/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php b/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php index 9deedb118..81ddd2594 100644 --- a/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php +++ b/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php @@ -84,10 +84,11 @@ LIMIT 1 ) AS "AnzahlAbgeschickt", ( - SELECT ARRAY_TO_STRING(ARRAY_AGG(DISTINCT UPPER(sg.typ || sg.kurzbz || \':\' || sg.orgform_kurzbz)), \', \') + SELECT ARRAY_TO_STRING(ARRAY_AGG(DISTINCT UPPER(sg.typ || sg.kurzbz || \':\' || 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) WHERE pss.status_kurzbz = '.$INTERESSENT_STATUS.' AND pss.bewerbung_abgeschicktamum IS NOT NULL AND ps.person_id = p.person_id diff --git a/application/views/system/infocenter/zgvpruefungen.php b/application/views/system/infocenter/zgvpruefungen.php index a40d5d158..05c94c384 100644 --- a/application/views/system/infocenter/zgvpruefungen.php +++ b/application/views/system/infocenter/zgvpruefungen.php @@ -355,7 +355,7 @@ prestudentstatus->status_kurzbz) && in_array($zgvpruefung->prestudentstatus->status_kurzbz, ['Bewerber', 'Wartender']))) : ?> - prestudentstatus->bewerbung_abgeschicktamum)) - { - $disabled = $disabledStg = 'disabled'; - $disabledTxt = $disabledStgTxt = $this->p->t('infocenter', 'bewerbungMussAbgeschickt'); - } + prestudentstatus->bewerbung_abgeschicktamum)) + { + $disabled = $disabledStg = 'disabled'; + $disabledTxt = $disabledStgTxt = $this->p->t('infocenter', 'bewerbungMussAbgeschickt'); + } - if ($studiengangtyp !== 'b' && $studiengangtyp !== 'm') - { - $disabled = 'disabled'; - $disabledTxt = $this->p->t('infocenter', 'nurBachelorMasterFreigeben'); + if ($studiengangtyp !== 'b' && $studiengangtyp !== 'm') + { + $disabled = 'disabled'; + $disabledTxt = $this->p->t('infocenter', 'nurBachelorMasterFreigeben'); - // FIT-Lehrgänge: exceptions, can be freigegeben in Infocenter - if (!in_array($studiengang_kz, $fit_programme_studiengaenge)) - { - $disabledStg = 'disabled'; - $disabledStgTxt = $this->p->t('infocenter', 'nurBachelorMasterFreigeben'); - } + // FIT-Lehrgänge: exceptions, can be freigegeben in Infocenter + if (!in_array($studiengang_kz, $fit_programme_studiengaenge)) + { + $disabledStg = 'disabled'; + $disabledStgTxt = $this->p->t('infocenter', 'nurBachelorMasterFreigeben'); } - ?> + } + if (!$infoonly) : + ?>
- - + +
+ prestudentstatus->status_kurzbz) && $zgvpruefung->prestudentstatus->status_kurzbz === 'Interessent'): ?> @@ -519,9 +486,66 @@ +
+
+
+ + + + +
+
+
- + + + -
Powered by FH Complete
+
Powered by FH Complete


diff --git a/cis/index_login.php b/cis/index_login.php index 4c4d75f93..74c87f649 100644 --- a/cis/index_login.php +++ b/cis/index_login.php @@ -69,7 +69,7 @@ if(isset($_GET['login'])) -
Powered by FH Complete
+
Powered by FH Complete


diff --git a/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php b/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php index 713b93dc5..407502178 100644 --- a/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php +++ b/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php @@ -12,10 +12,13 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - * Authors: Christian Paminger , + * + * Authors: + * Christian Paminger , * Andreas Oesterreicher and * Rudolf Hangl < rudolf.hangl@technikum-wien.at > * Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at > + * Manuela Thamer */ require_once ('../../../../config/cis.config.inc.php'); require_once ('../../../../config/global.config.inc.php'); @@ -306,6 +309,8 @@ foreach ($noten_obj->result as $row) { if(typeof(typ)=='undefined') typ = 'Termin2'; + var nn = document.getElementById(uid+"_nn").innerHTML; + var vn = document.getElementById(uid+"_vn").innerHTML; var str = "
"; str += ""; @@ -314,7 +319,7 @@ foreach ($noten_obj->result as $row) anlegendiv.style.top = y+"px"; var x = getOffset('x'); x = x+300; anlegendiv.style.left = x+"px"; - str += ""; + str += ""; str += ""; str += " - - '; + + '; // Bereits eingetragene Note ermitteln if ($lvgesamtnote = new lvgesamtnote($lvid, $uid, $stsem)) diff --git a/cis/private/profile/index.php b/cis/private/profile/index.php index dd39cf301..80062a932 100644 --- a/cis/private/profile/index.php +++ b/cis/private/profile/index.php @@ -44,6 +44,7 @@ require_once('../../../include/addon.class.php'); require_once('../../../include/gruppe.class.php'); require_once('../../../include/adresse.class.php'); require_once('../../../include/benutzerberechtigung.class.php'); +require_once('../../../include/bisverwendung.class.php'); $sprache = getSprache(); $p = new phrasen($sprache); @@ -271,6 +272,22 @@ if (!$ansicht) } +if (!$ansicht) +{ + if ($is_employee) + { + $verwendung = new bisverwendung(); + if($verwendung->getLastVerwendung($uid)) + { + if (!$verwendung->hauptberuflich) + { + echo 'Hauptberuf: '. $verwendung->hauptberuf; + } + } + echo "

"; + } +} + if (!$ansicht) { $adresse = new adresse(); diff --git a/cis/private/profile/lva_liste.php b/cis/private/profile/lva_liste.php index 4b0cedc02..6f78cf8c8 100644 --- a/cis/private/profile/lva_liste.php +++ b/cis/private/profile/lva_liste.php @@ -217,7 +217,7 @@ if ($num_rows > 0) && CIS_LV_LEKTORINNENZUTEILUNG_VERTRAGSPRUEFUNG_VON != '') { $vertrag = new vertrag(); - if (!$vertrag->isVertragErteiltLE($row->lehreinheit_id, $stdsem, $user)) + if (!$vertrag->isVertragErteiltLE($row->lehreinheit_id, $stdsem, $uid)) { continue; } diff --git a/cis/private/profile/urlaubsfreigabe.php b/cis/private/profile/urlaubsfreigabe.php index 251e1ee3e..f71d7adda 100644 --- a/cis/private/profile/urlaubsfreigabe.php +++ b/cis/private/profile/urlaubsfreigabe.php @@ -18,6 +18,7 @@ * Authors: Christian Paminger , * Andreas Oesterreicher , * Rudolf Hangl and + * Manuela Thamer */ require_once('../../../config/cis.config.inc.php'); require_once('../../../include/functions.inc.php'); @@ -28,6 +29,13 @@ require_once('../../../include/benutzer.class.php'); require_once('../../../include/mitarbeiter.class.php'); require_once('../../../include/benutzerberechtigung.class.php'); require_once('../../../include/addon.class.php'); +require_once('../../../include/mail.class.php'); +require_once('../../../include/phrasen.class.php'); +require_once('../../../include/globals.inc.php'); +require_once('../../../include/sprache.class.php'); + +$sprache = getSprache(); +$p = new phrasen($sprache); if (!$db = new basis_db()) die('Fehler beim Oeffnen der Datenbankverbindung'); @@ -43,16 +51,16 @@ else { //Bis August das aktuelle Jahr anzeigen //Ab September das naechste - if(date('m')<9) + if (date('m') < 9) $year = date('Y'); else - $year = date('Y')+1; + $year = date('Y') + 1; } -if(isset($_GET['uid'])) - $uid=$_GET['uid']; +if (isset($_GET['uid'])) + $uid = $_GET['uid']; else - $uid=''; + $uid = ''; $datum_obj = new datum(); @@ -98,50 +106,74 @@ echo ' $mitarbeiter = new mitarbeiter(); $mitarbeiter->getUntergebene($user); -if(count($mitarbeiter->untergebene)==0 && !$rechte->isBerechtigt('admin') && !$rechte->isBerechtigt('mitarbeiter/urlaube', null, 'suid')) +if (count($mitarbeiter->untergebene) == 0 && !$rechte->isBerechtigt('admin') && !$rechte->isBerechtigt('mitarbeiter/urlaube', null, 'suid')) die('Es sind Ihnen keine Mitarbeiter zugeteilt für die sie den Urlaub freigeben dürfen'); $untergebene = ''; foreach ($mitarbeiter->untergebene as $row) { - if($untergebene!='') - $untergebene.=','; + if ($untergebene != '') + $untergebene .= ','; $untergebene .= $db->db_add_param($row); } -if($rechte->isBerechtigt('admin') || $rechte->isBerechtigt('mitarbeiter/urlaube', null, 'suid')) +if ($rechte->isBerechtigt('admin') || $rechte->isBerechtigt('mitarbeiter/urlaube', null, 'suid')) { - if($untergebene!='') - $untergebene.=','; + if ($untergebene != '') + $untergebene .= ','; $untergebene .= $db->db_add_param($uid); } $qry = "SELECT * FROM public.tbl_person JOIN public.tbl_benutzer USING(person_id) WHERE uid in($untergebene)"; $mitarbeiter = array(); -if($result = $db->db_query($qry)) +if ($result = $db->db_query($qry)) { - while($row = $db->db_fetch_object($result)) + while ($row = $db->db_fetch_object($result)) { - $mitarbeiter[$row->uid]['vorname']=$row->vorname; - $mitarbeiter[$row->uid]['nachname']=$row->nachname; - $mitarbeiter[$row->uid]['titelpre']=$row->titelpre; - $mitarbeiter[$row->uid]['titelpost']=$row->titelpost; + $mitarbeiter[$row->uid]['vorname'] = $row->vorname; + $mitarbeiter[$row->uid]['nachname'] = $row->nachname; + $mitarbeiter[$row->uid]['titelpre'] = $row->titelpre; + $mitarbeiter[$row->uid]['titelpost'] = $row->titelpost; } } -if($uid!='' && !isset($mitarbeiter[$uid]) && $uid!=$user && !$rechte->isBerechtigt('admin')) +if ($uid != '' && !isset($mitarbeiter[$uid]) && $uid != $user && !$rechte->isBerechtigt('admin')) die('Sie haben keine Berechtigung fuer diesen Mitarbeiter'); //Freigeben eines Urlaubes -if(isset($_GET['action']) && $_GET['action']=='freigabe') +if (isset($_GET['action']) && $_GET['action'] == 'freigabe') { $zeitsperre = new zeitsperre(); - if($zeitsperre->load($_GET['id'])) + if ($zeitsperre->load($_GET['id'])) { - if(isset($mitarbeiter[$zeitsperre->mitarbeiter_uid])) + if (isset($mitarbeiter[$zeitsperre->mitarbeiter_uid])) { $zeitsperre->freigabeamum = date('Y-m-d H:i:s'); $zeitsperre->freigabevon = $user; - if(!$zeitsperre->save(false)) + if (!$zeitsperre->save(false)) + { echo "Fehler bei der Freigabe: $zeitsperre->errormsg"; + } + + //Bestätigungsmail an Mitarbeiter*in + $to = $zeitsperre->mitarbeiter_uid. '@'.DOMAIN; + $person = new person(); + $fullNameVG = $person->getFullNameFromBenutzer($user); + $fullNameMA = $person->getFullNameFromBenutzer($zeitsperre->mitarbeiter_uid); + $from = 'noreply@'.DOMAIN; + $subject = $p->t('urlaubstool/urlaubsfreigabe'). date("d.m.Y", strtotime($zeitsperre->vondatum)). " ". + $p->t('urlaubstool/bis'). " ". date("d.m.Y", strtotime($zeitsperre->bisdatum)); + $text = $p->t('urlaubstool/diesIstEineAutomatischeMail')."\n"; + $text .= $p->t('urlaubstool/urlaubVon')." ".date("d.m.Y", strtotime($zeitsperre->vondatum))." ". + $p->t('urlaubstool/bis')." ".date("d.m.Y", strtotime($zeitsperre->bisdatum)); + $text .= $p->t('urlaubstool/urlaubBis', array($fullNameVG)); + $text .= "\n". "\n". $p->t('urlaubstool/sieKoennenDiesenUnterFolgenderAdresseEinsehen'); + $text .= "\n". APP_ROOT. 'cis/private/profile/urlaubstool.php'; + + $mail = new mail($to, $from, $subject, $text); + + if ($mail->send()) + { + echo "".$p->t('urlaubstool/bestaetigungsmailWurdeVersandt', array($fullNameMA)).""; + } } else { @@ -152,40 +184,38 @@ if(isset($_GET['action']) && $_GET['action']=='freigabe') { echo 'Die Zeitsperre konnte nicht geladen werden'; } - } -//Monat zeichenen +//Monat zeichnen function draw_monat($monat) { global $untergebene, $mitarbeiter, $year, $datum_obj, $uid; - if (!$db = new basis_db()) - die('Fehler beim Oeffnen der Datenbankverbindung'); - + if (!$db = new basis_db()) + die('Fehler beim Oeffnen der Datenbankverbindung'); echo ''; $content_form.= ''; -$content_form.= '"; -$content_form.= ''; $content_form .= ''; -$content_form.= ""; +$content_form.= ""; $content_form.= '
X
t('benotungstool/pruefungAnlegenFuer');?> "+uid+":
t('benotungstool/pruefungAnlegenFuer');?> "+nn+" "+vn+":
t('global/datum');?>:"; str += ""; @@ -1166,8 +1171,8 @@ if (defined("CIS_GESAMTNOTE_PRUEFUNG_MOODLE_LE_NOTE") && CIS_GESAMTNOTE_PRUEFUNG $htmlstring .= '
' . $db->convert_html_chars($uid) . '' . $db->convert_html_chars($data['nachname']) . '' . $db->convert_html_chars($data['vorname']) . '' . $db->convert_html_chars($data['nachname']) . '' . $db->convert_html_chars($data['vorname']) . ''; echo '
'; - echo date('F',mktime(0,0,0,$monat,1,date('Y'))); - echo " ".($monat>8?$year-1:$year); + echo date('F', mktime(0,0,0,$monat,1,date('Y'))); + echo " ".($monat > 8?$year-1:$year); echo '
'; //Alle Anzeigen bei denen das von- oder bisdatum in dieses monat fallen $qry = "SELECT * FROM campus.tbl_zeitsperre WHERE zeitsperretyp_kurzbz='Urlaub' AND ( - (date_part('month', vondatum)='$monat' AND date_part('year', vondatum)='".($monat>8?$year-1:$year)."') + (date_part('month', vondatum)='$monat' AND date_part('year', vondatum)='".($monat > 8?$year - 1:$year)."') OR - (date_part('month', bisdatum)='$monat' AND date_part('year', bisdatum)='".($monat>8?$year-1:$year)."') + (date_part('month', bisdatum)='$monat' AND date_part('year', bisdatum)='".($monat > 8?$year - 1:$year)."') )"; - if($uid=='') - $qry.=" AND mitarbeiter_uid in($untergebene)"; + if($uid == '') + $qry.= " AND mitarbeiter_uid in($untergebene)"; else - $qry.=" AND mitarbeiter_uid=".$db->db_add_param($uid); + $qry.= " AND mitarbeiter_uid=". $db->db_add_param($uid); $qry.="ORDER BY vondatum, mitarbeiter_uid"; - if($result = $db->db_query($qry)) + if ($result = $db->db_query($qry)) { - while($row = $db->db_fetch_object($result)) + while ($row = $db->db_fetch_object($result)) { $vertretung = new benutzer($row->vertretung_uid); $freigabe=''; @@ -207,7 +237,7 @@ function draw_monat($monat) } //Jahr mit Pfeilen zum blaettern anzeigen -if($uid!='') +if ($uid!='') { echo '"; @@ -232,16 +262,16 @@ echo '
'; //Tabelle mit den Monaten ausgeben echo '
'; echo "Alle Mitarbeiter anzeigen
'; $monat=9; -for($i=0;$i<12;$i++) +for($i = 0;$i < 12;$i++) { - if($i%3==0) + if ($i%3 == 0) { echo ''; } draw_monat($monat); $monat++; - if($monat>12) - $monat=1; + if ($monat > 12) + $monat = 1; } echo '
diff --git a/cis/private/profile/zeitsperre_resturlaub.php b/cis/private/profile/zeitsperre_resturlaub.php index 5812d8af6..6ceaff350 100644 --- a/cis/private/profile/zeitsperre_resturlaub.php +++ b/cis/private/profile/zeitsperre_resturlaub.php @@ -200,7 +200,7 @@ function checkdatum() return false; } - var Datum, Tag, Monat,Jahr,vonDatum,bisDatum; + var Datum, Tag, Monat,Jahr,vonDatum,bisDatum, diff; Datum=document.getElementById('vondatum').value; Tag=Datum.substring(0,2); @@ -230,12 +230,23 @@ function checkdatum() bisDatum=Jahr+''+Monat+''+Tag; + diff=bisDatum-vonDatum; + if (vonDatum>bisDatum) { alert('t('zeitsperre/vonDatum');?> '+ document.getElementById('vondatum').value+ ' t('zeitsperre/istGroesserAlsBisDatum');?> '+document.getElementById('bisdatum').value); document.getElementById('vondatum').focus(); return false; } + else if (diff>14) + { + Check = confirm('t('zeitaufzeichnung/zeitraumAuffallendHoch');?>'); + document.getElementById('bisdatum').focus(); + if (Check == false) + return false; + else + return true; + } return true; } @@ -274,6 +285,8 @@ function showHideBezeichnungDropDown() document.getElementById('resturlaub').style.visibility = 'visible'; else document.getElementById('resturlaub').style.visibility = 'hidden'; + + showHideStudeDropDown() } function setBisDatum() @@ -281,6 +294,26 @@ function setBisDatum() document.zeitsperre_form.bisdatum.value = document.zeitsperre_form.vondatum.value; } +function showHideStudeDropDown() +{ + var dd = document.zeitsperre_form.zeitsperretyp_kurzbz; + + if (dd.options[dd.selectedIndex].value == 'ZA' + || dd.options[dd.selectedIndex].value == 'Urlaub' + || dd.options[dd.selectedIndex].value == 'Krank' + || dd.options[dd.selectedIndex].value == 'DienstF' + || dd.options[dd.selectedIndex].value == 'DienstV') + { + document.getElementById('vonStd').style.visibility = 'hidden'; + document.getElementById('bisStd').style.visibility = 'hidden'; + } + else + { + document.getElementById('vonStd').style.visibility = 'visible'; + document.getElementById('bisStd').style.visibility = 'visible'; + } +} + @@ -693,7 +726,7 @@ if($result = $db->db_query($qry)) } $content_form.= '
'.$p->t('global/bezeichnung').'
'.$p->t('global/von').' '; +$content_form.= '
'.$p->t('global/von').' '; //dropdown fuer vonstunde $content_form.= $p->t('zeitsperre/stundeInklusive'); @@ -715,7 +748,7 @@ for($i=0;$i<$num_rows_stunde;$i++) $content_form.= "
'.$p->t('global/bis').' '; +$content_form.= '
'.$p->t('global/bis').' '; //dropdown fuer bisstunde $content_form.= $p->t('zeitsperre/stundeInklusive'); $content_form.= " '; if(isset($_GET['type']) && $_GET['type']=='edit') $content_form.= ""; + else $content_form.= ""; $content_form.= '
 
".$p->t('zeitsperre/achtungEsWerdenAlleEingegebenenTage')."
" .$p->t('zeitsperre/achtungEsWerdenAlleEingegebenenTage')."
'; echo ''; @@ -794,3 +828,4 @@ echo '
'; +showHideStudeDropDown();'; ?> diff --git a/cis/private/tools/zeitaufzeichnung.php b/cis/private/tools/zeitaufzeichnung.php index 70874950d..2a7939e17 100644 --- a/cis/private/tools/zeitaufzeichnung.php +++ b/cis/private/tools/zeitaufzeichnung.php @@ -1,5 +1,5 @@ @@ -213,6 +221,7 @@ echo '