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/README.md b/README.md index d5620010a..c5212a353 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # FH-Complete * [FH-Complete Homepage](https://www.fhcomplete.org) -* [Wiki](https://wiki.fhcomplete.org/) +* [Wiki](https://wiki.fhcomplete.info/) * [Changelog](CHANGELOG.md) 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/Pruefungsprotokoll.php b/application/controllers/lehre/Pruefungsprotokoll.php index 467a7dc71..21f50acca 100644 --- a/application/controllers/lehre/Pruefungsprotokoll.php +++ b/application/controllers/lehre/Pruefungsprotokoll.php @@ -220,7 +220,7 @@ class Pruefungsprotokoll extends Auth_Controller $nullfields = array('uhrzeit', 'endezeit', 'abschlussbeurteilung_kurzbz', 'protokoll'); foreach ($data as $idx => $item) { - if (in_array($idx, $nullfields) & $item === '') + if (in_array($idx, $nullfields) && $item === '') $data[$idx] = null; } 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 43de8bb60..7d36690e7 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -70,6 +70,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'); @@ -108,7 +109,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' ) ); @@ -433,11 +436,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); @@ -446,8 +452,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( @@ -1358,6 +1366,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; @@ -1427,8 +1437,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, @@ -1687,4 +1697,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 57c8902b5..195dddc88 100644 --- a/application/libraries/LDAPLib.php +++ b/application/libraries/LDAPLib.php @@ -167,7 +167,7 @@ class LDAPLib } // LDAP connection - $ldapConnection = @ldap_connect($ldapConfigs[self::SERVER], $ldapConfigs[self::PORT]); + $ldapConnection = @ldap_connect($ldapConfigs[self::SERVER].':'.$ldapConfigs[self::PORT]); if ($ldapConnection) // if success { // Sets the LDAP protocol version @@ -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/education/Projektbetreuer_model.php b/application/models/education/Projektbetreuer_model.php index 746e4c052..4da88e344 100644 --- a/application/models/education/Projektbetreuer_model.php +++ b/application/models/education/Projektbetreuer_model.php @@ -41,4 +41,23 @@ class Projektbetreuer_model extends DB_Model return error ('Incorrect parameter type'); } } + + /** + * Get Projektbetreuer data by authentification token + * @param $zugangstoken + * @return object + */ + public function getBetreuerByToken($zugangstoken) + { + $qry = ' + SELECT tbl_projektbetreuer.person_id, tbl_projektbetreuer.projektarbeit_id, student_uid + FROM lehre.tbl_projektbetreuer + JOIN lehre.tbl_projektarbeit USING (projektarbeit_id) + WHERE zugangstoken = ? AND zugangstoken_gueltigbis >= NOW() + ORDER BY tbl_projektbetreuer.insertamum DESC, projektarbeit_id DESC + LIMIT 1 + '; + + return $this->execQuery($qry, array($zugangstoken)); + } } 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/models/person/Benutzer_model.php b/application/models/person/Benutzer_model.php index c1e76ce38..eff1329a6 100644 --- a/application/models/person/Benutzer_model.php +++ b/application/models/person/Benutzer_model.php @@ -13,6 +13,11 @@ class Benutzer_model extends DB_Model $this->hasSequence = false; } + /** + * Gets active Benutzer from person_id + * @param $person_id + * @return object + */ public function getFromPersonId($person_id) { return $this->loadWhere(array('person_id' => $person_id, 'aktiv' => true)); 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 aab69b651..3e14e7323 100644 --- a/application/views/system/infocenter/infocenterFreigegebenData.php +++ b/application/views/system/infocenter/infocenterFreigegebenData.php @@ -114,6 +114,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 22b122bb0..beb4887ae 100644 --- a/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php +++ b/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php @@ -83,10 +83,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 41b549616..2d00a789d 100644 --- a/application/views/system/infocenter/zgvpruefungen.php +++ b/application/views/system/infocenter/zgvpruefungen.php @@ -344,7 +344,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') - { - $disabled = 'disabled'; - $disabledTxt = $this->p->t('infocenter', 'nurBachelorFreigeben'); + if ($studiengangtyp !== 'b') + { + $disabled = 'disabled'; + $disabledTxt = $this->p->t('infocenter', 'nurBachelorFreigeben'); - // FIT-Lehrgänge: exceptions, can be freigegeben in Infocenter - if (!in_array($studiengang_kz, $fit_programme_studiengaenge)) - { - $disabledStg = 'disabled'; - $disabledStgTxt = $this->p->t('infocenter', 'nurBachelorFreigeben'); - } + // FIT-Lehrgänge: exceptions, can be freigegeben in Infocenter + if (!in_array($studiengang_kz, $fit_programme_studiengaenge)) + { + $disabledStg = 'disabled'; + $disabledStgTxt = $this->p->t('infocenter', 'nurBachelorFreigeben'); } - ?> -
-
-
- - - + +
+
+ - -
-
- +
- - + + prestudentstatus->status_kurzbz) && $zgvpruefung->prestudentstatus->status_kurzbz === 'Interessent'): ?> @@ -508,9 +475,69 @@ +
+
+
+ + + + +
+
+
- + + + + -
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/abgabe_lektor_details.php b/cis/private/lehre/abgabe_lektor_details.php index 7022ead1f..9f74d5cf8 100644 --- a/cis/private/lehre/abgabe_lektor_details.php +++ b/cis/private/lehre/abgabe_lektor_details.php @@ -35,6 +35,8 @@ require_once('../../../include/datum.class.php'); require_once('../../../include/mail.class.php'); require_once('../../../include/phrasen.class.php'); require_once('../../../include/projektarbeit.class.php'); +require_once('../../../include/projektbetreuer.class.php'); +require_once('../../../include/sancho.inc.php'); if (!$db = new basis_db()) $db=false; @@ -116,6 +118,68 @@ if($projektarbeit_id==-1) if(!$projektarbeit_obj->load($projektarbeit_id)) die('Fehler beim Laden der Projektarbeit'); $titel = $projektarbeit_obj->titel; +$student_uid = $projektarbeit_obj->student_uid; + +// paarbeit sollte nur ab SS2021 online bewertet werden +$qry_sem="SELECT 1 + FROM lehre.tbl_projektarbeit + JOIN lehre.tbl_lehreinheit USING(lehreinheit_id) + JOIN public.tbl_studiensemester USING(studiensemester_kurzbz) + WHERE projektarbeit_id=".$db->db_add_param($projektarbeit_id, FHC_INTEGER)." + AND tbl_studiensemester.start::date >= (SELECT start FROM public.tbl_studiensemester WHERE studiensemester_kurzbz = 'SS2021')::date + LIMIT 1"; +$result_sem=$db->db_query($qry_sem); +$num_rows_sem = $db->db_num_rows($result_sem); +if($num_rows_sem < 0) +{ + echo "".$p->t('abgabetool/fehlerAktualitaetProjektarbeit')."
 "; +} + +// Zweitbegutachter holen +if($betreuerart=="Erstbegutachter") +{ + $projektbetreuer = new projektbetreuer(); + $alleBegutachter = $projektbetreuer->getProjektbetreuer($projektarbeit_id); + + if ($alleBegutachter) + { + $alleBegutachterResults = $projektbetreuer->result; + + foreach ($alleBegutachterResults as $begutachter) + { + if ($begutachter->betreuerart_kurzbz == "Erstbegutachter") + { + $erstbetreuer_id = $begutachter->person_id; + $zweitbegutachter = $projektbetreuer->getZweitbegutachterWithToken($erstbetreuer_id, $projektarbeit_id, $student_uid); + break; + } + } + + // Mail mit Token an Zweitbegutachter senden + if ($zweitbegutachter && $num_rows_sem >= 1 && isset($_GET['zweitbegutachtertoken'])) + { + $qry_std="SELECT * FROM campus.vw_benutzer where uid=".$db->db_add_param($uid); + if(!$result_std=$db->db_query($qry_std)) + { + echo "Student konnte nicht gefunden werden!
 "; + } + else + { + $row_std=@$db->db_fetch_object($result_std); + $mailres = sendZweitbegutachterMail($zweitbegutachter, $erstbetreuer_id, $row_std); + + if ($mailres) + { + echo "
".$p->t('abgabetool/zweitbegutachterMailGesendet', $zweitbegutachter->email)."
 "; + } + else + { + echo "".$p->t('abgabetool/fehlerMailZweitBegutachter')." Mail: ".$zweitbegutachter->email."
 "; + } + } + } + } +} echo ' @@ -124,6 +188,39 @@ echo ' '.$p->t('abgabetool/abgabetool').' + - - - + + + + + '; -?> - - - - - - + + + '; + include('../../../include/meta/jquery.php'); + include('../../../include/meta/jquery-tablesorter.php'); + echo ' diff --git a/cis/private/tools/zeitaufzeichnung.php b/cis/private/tools/zeitaufzeichnung.php index cf3435059..fcb03ecab 100644 --- a/cis/private/tools/zeitaufzeichnung.php +++ b/cis/private/tools/zeitaufzeichnung.php @@ -1403,7 +1403,7 @@ if ($projekt->getProjekteMitarbeiter($user, true)) echo ''.$p->t("zeitaufzeichnung/organisationseinheiten").' ' + + '' + + '' + + '' + + ''; + + InfocenterPersonDataset.getAbsageData(); + var studienSemesterHtml = ' ' + @@ -60,6 +74,14 @@ var InfocenterPersonDataset = { "
"+studienSemesterHtml+"
"+ "

"); + $("#datasetActionsBottom").append( + "
"+ + "
"+auswahlAbsageToggle+"
"+ + ""+ + "
" + + "
" + + "
" + ) $("button.incStudiensemester").click(function() { InfocenterPersonDataset.changeStudiensemesterUservar(1); }); @@ -68,6 +90,29 @@ var InfocenterPersonDataset = { InfocenterPersonDataset.changeStudiensemesterUservar(-1); }); + $('button.auswahlAbsageBtn').click(function() + { + var idsel = $("#filterTableDataset input:checked[name=PersonId\\[\\]]"); + + if(idsel.length <= 0) + return FHC_DialogLib.alertInfo("Bitte wählen Sie die Personen aus."); + + if($('.absgstatusgrund').val() === 'null' || $('.auswahlAbsageStg').val() === 'null') + return FHC_DialogLib.alertInfo("Bitte den Absagegrund und Studiengang auswählen."); + + $(".absageModalForAll").modal("show"); + }); + + $('#saveAbsageForAll').click(function() + { + InfocenterPersonDataset.saveAbsageForAll(); + }); + + $('a.absageToggle').click(function() + { + $('#absagePunkte').toggle(); + }) + var personcount = 0; FHC_AjaxClient.ajaxCallGet( @@ -203,6 +248,75 @@ var InfocenterPersonDataset = { ); }, + saveAbsageForAll: function() + { + var idsel = $("#filterTableDataset input:checked[name=PersonId\\[\\]]"); + + var statusgrund = $('.absgstatusgrund').val(); + var studiengang = $('.auswahlAbsageStg').val(); + + var personen = []; + + for (var i = 0; i < idsel.length; i++) + { + personen.push($(idsel[i]).val()); + } + + FHC_AjaxClient.ajaxCallPost( + 'system/infocenter/InfoCenter/saveAbsageForAll', + { + 'statusgrund': statusgrund, + 'studiengang': studiengang, + 'personen' : personen + }, + { + successCallback: function(data, textStatus, jqXHR) { + if (FHC_AjaxClient.isError(data)) + FHC_DialogLib.alertError(FHC_AjaxClient.getError(data)); + + if (FHC_AjaxClient.hasData(data)) + FHC_DialogLib.alertSuccess("Erfolgreich gespeichert.") + + $(".absageModalForAll").modal("hide"); + }, + errorCallback: function(jqXHR, textStatus, errorThrown) { + FHC_DialogLib.alertError(textStatus); + } + } + ); + }, + + getAbsageData: function() + { + FHC_AjaxClient.ajaxCallGet( + 'system/infocenter/InfoCenter/getAbsageData', + {}, + { + successCallback: function(data, textStatus, jqXHR) { + if (FHC_AjaxClient.hasData(data)) + { + data = FHC_AjaxClient.getData(data); + $.each(data.statusgruende, function(key, value){ + $('.absgstatusgrund').append($("