diff --git a/application/controllers/jobs/AnrechnungJob.php b/application/controllers/jobs/AnrechnungJob.php new file mode 100644 index 000000000..2868a8052 --- /dev/null +++ b/application/controllers/jobs/AnrechnungJob.php @@ -0,0 +1,87 @@ +load->model('education/Zeugnisnote_model', 'ZeugnisnoteModel'); + } + + /** + * Sets the Grades in FAS to angerechnet if the request was successfull + * @return void + */ + public function setAnrechnungGrades() + { + $this->logInfo('Start Anrechnung Grades Job'); + // get all accepted requests that are not in the grades table yet + + // get all placement tests with incorrect studyplan + $qry = " + SELECT + student_uid, lehrveranstaltung_id, studiensemester_kurzbz, genehmigt_von + FROM + lehre.tbl_anrechnung + JOIN public.tbl_student USING(prestudent_id) + WHERE + genehmigt_von is not null + AND EXISTS( + SELECT 1 FROM lehre.tbl_anrechnung_anrechnungstatus + WHERE anrechnung_id = tbl_anrechnung.anrechnung_id + AND status_kurzbz='approved' + AND datum>=now()-'5 days'::interval + ) + AND NOT EXISTS( + SELECT 1 FROM lehre.tbl_zeugnisnote + WHERE + lehrveranstaltung_id = tbl_anrechnung.lehrveranstaltung_id + AND studiensemester_kurzbz = tbl_anrechnung.studiensemester_kurzbz + AND student_uid = tbl_student.student_uid + ) + "; + + $db = new DB_Model(); + $result_grades = $db->execReadOnlyQuery($qry); + + $cnt = 0; + if (hasData($result_grades)) + { + $grades = getData($result_grades); + foreach ($grades as $anrechnung) + { + $cnt++; + // Set zeugnisnote to angerechnet (= note 6) + $ret = $this->ZeugnisnoteModel->insert(array( + 'lehrveranstaltung_id' => $anrechnung->lehrveranstaltung_id, + 'student_uid' => $anrechnung->student_uid, + 'studiensemester_kurzbz' => $anrechnung->studiensemester_kurzbz, + 'uebernahmedatum' => (new DateTime())->format('Y-m-d H:m:i'), + 'benotungsdatum' => (new DateTime())->format('Y-m-d H:m:i'), + 'note' => 6, + 'insertvon' => $anrechnung->genehmigt_von, + 'bemerkung' => 'Digitale Anrechnung' + ) + ); + } + } + $this->logInfo('End Anrechnung Grades Job', array('Number of Grades added'=>$cnt)); + } +} diff --git a/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php b/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php new file mode 100644 index 000000000..c5e4b94d8 --- /dev/null +++ b/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php @@ -0,0 +1,531 @@ + 'lehre/anrechnung_genehmigen:rw', + 'download' => 'lehre/anrechnung_genehmigen:rw', + 'approve' => 'lehre/anrechnung_genehmigen:rw', + 'reject' => 'lehre/anrechnung_genehmigen:rw', + 'requestRecommendation' => 'lehre/anrechnung_genehmigen:rw' + ) + ); + + // Load models + $this->load->model('education/Anrechnung_model', 'AnrechnungModel'); + $this->load->model('education/Anrechnungstatus_model', 'AnrechnungstatusModel'); + $this->load->model('content/DmsVersion_model', 'DmsVersionModel'); + $this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel'); + $this->load->model('crm/Student_model', 'StudentModel'); + $this->load->model('person/Notiz_model', 'NotizModel'); + $this->load->model('person/Person_model', 'PersonModel'); + $this->load->model('organisation/Studiengang_model', 'StudiengangModel'); + + // Load libraries + $this->load->library('WidgetLib'); + $this->load->library('PermissionLib'); + $this->load->library('AnrechnungLib'); + $this->load->library('DmsLib'); + + // Load helpers + $this->load->helper('form'); + $this->load->helper('url'); + $this->load->helper('hlp_sancho_helper'); + + // Load language phrases + $this->loadPhrases( + array( + 'global', + 'ui', + 'anrechnung', + 'person', + 'lehre', + 'table' + ) + ); + + $this->_setAuthUID(); + + $this->setControllerId(); + } + + public function index() + { + $anrechnung_id = $this->input->get('anrechnung_id'); + + if (!is_numeric($anrechnung_id)) + { + show_error('Missing correct parameter'); + } + + // Check if user is entitled to read the Anrechnung + self::_checkIfEntitledToReadAnrechnung($anrechnung_id); + + // Get Anrechung data + if (!$anrechnungData = getData($this->anrechnunglib->getAnrechnungData($anrechnung_id))) + { + show_error('Missing data for Anrechnung.'); + } + + // Get Empfehlung data + if(!$empfehlungData = getData($this->anrechnunglib->getEmpfehlungData($anrechnung_id))) + { + show_error('Missing data for recommendation'); + } + + // Get Genehmigung data + if(!$genehmigungData = getData($this->anrechnunglib->getGenehmigungData($anrechnung_id))) + { + show_error('Missing data for recommendation'); + } + + $viewData = array( + 'antragData' => $this->anrechnunglib->getAntragData( + $student_uid = $this->StudentModel->getUID($anrechnungData->prestudent_id), + $anrechnungData->studiensemester_kurzbz, + $anrechnungData->lehrveranstaltung_id + ), + 'anrechnungData' => $anrechnungData, + 'empfehlungData' => $empfehlungData, + 'genehmigungData' => $genehmigungData + ); + + $this->load->view('lehre/anrechnung/approveAnrechnungDetail.php', $viewData); + } + + /** + * Approve Anrechnungen. + */ + public function approve() + { + $data = $this->input->post('data'); + + if(isEmptyArray($data)) + { + return $this->outputJsonError('Fehler beim Übertragen der Daten.'); + } + + // Get statusbezeichnung for 'approved' + $this->AnrechnungstatusModel->addSelect('bezeichnung_mehrsprachig'); + $approved = getData($this->AnrechnungstatusModel->load('approved'))[0]; + $approved = getUserLanguage() == 'German' + ? $approved->bezeichnung_mehrsprachig[0] + : $approved->bezeichnung_mehrsprachig[1]; + + if (!$person = getData($this->PersonModel->getByUID($this->_uid))[0]) + { + show_error('Failed retrieving person data'); + } + + foreach ($data as $item) + { + // Approve Anrechnung + if(getData($this->anrechnunglib->approveAnrechnung($item['anrechnung_id']))) + { + $json[]= array( + 'anrechnung_id' => $item['anrechnung_id'], + 'status_kurzbz' => self::ANRECHNUNGSTATUS_APPROVED, + 'status_bezeichnung' => $approved, + 'abgeschlossen_am' => (new DateTime())->format('d.m.Y'), + 'abgeschlossen_von' => $person->vorname. ' '. $person->nachname + ); + + if(!$this->_sendSanchoMailToStudent($item['anrechnung_id'], self::ANRECHNUNGSTATUS_APPROVED)) + { + show_error('Failed sending mail'); + } + } + } + + // Output json to ajax + if (isset($json) && !isEmptyArray($json)) + { + return $this->outputJsonSuccess($json); + } + else + { + return $this->outputJsonError('Es wurden keine Anrechnungen genehmigt.'); + } + } + + /** + * Reject Anrechnungen. + */ + public function reject() + { + $data = $this->input->post('data'); + + if(isEmptyArray($data)) + { + return $this->outputJsonError('Fehler beim Übertragen der Daten.'); + } + + // Get statusbezeichnung for 'rejected' + $this->AnrechnungstatusModel->addSelect('bezeichnung_mehrsprachig'); + $rejected = getData($this->AnrechnungstatusModel->load('rejected'))[0]; + $rejected = getUserLanguage() == 'German' + ? $rejected->bezeichnung_mehrsprachig[0] + : $rejected->bezeichnung_mehrsprachig[1]; + + if (!$person = getData($this->PersonModel->getByUID($this->_uid))[0]) + { + show_error('Failed retrieving person data'); + } + + foreach ($data as $item) + { + // Reject Anrechnung + if(getData($this->anrechnunglib->rejectAnrechnung($item['anrechnung_id'], $item['begruendung']))) + { + $json[]= array( + 'anrechnung_id' => $item['anrechnung_id'], + 'status_kurzbz' => self::ANRECHNUNGSTATUS_REJECTED, + 'status_bezeichnung' => $rejected, + 'abgeschlossen_am' => (new DateTime())->format('d.m.Y'), + 'abgeschlossen_von' => $person->vorname. ' '. $person->nachname + ); + + if(!$this->_sendSanchoMailToStudent($item['anrechnung_id'], self::ANRECHNUNGSTATUS_REJECTED)) + { + show_error('Failed sending mail'); + } + } + } + + // Output json to ajax + if (isset($json) && !isEmptyArray($json)) + { + return $this->outputJsonSuccess($json); + } + else + { + return $this->outputJsonError('Es wurden keine Anrechnungen genehmigt.'); + } + } + + /** + * Request recommendation for Anrechnungen. + */ + public function requestRecommendation() + { + $data = $this->input->post('data'); + + if(isEmptyArray($data)) + { + return $this->outputJsonError('Fehler beim Übertragen der Daten.'); + } + + // Get statusbezeichnung for 'inProgressLektor' + $this->AnrechnungstatusModel->addSelect('bezeichnung_mehrsprachig'); + $inProgressLektor = getData($this->AnrechnungstatusModel->load('inProgressLektor'))[0]; + $inProgressLektor = getUserLanguage() == 'German' + ? $inProgressLektor->bezeichnung_mehrsprachig[0] + : $inProgressLektor->bezeichnung_mehrsprachig[1]; + + foreach ($data as $item) + { + // Approve Anrechnung + if(getData($this->anrechnunglib->requestRecommendation($item['anrechnung_id']))) + { + $json[]= array( + 'anrechnung_id' => $item['anrechnung_id'], + 'status_kurzbz' => self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR, + 'status_bezeichnung' => $inProgressLektor, + 'empfehlung_anrechnung' => null, + 'empfehlung_angefordert_am' => (new DateTime())->format('d.m.Y') + ); + } + } + + // Output json to ajax + if (isset($json) && !isEmptyArray($json)) + { + /** + * Send mails to lectors + * NOTE: mails are sent at the end to ensure sending only ONE mail to each LV-Leitung or lector + * even if they are required for more recommendations + * */ + if (!$this->_sendSanchoMailToLectors($json)) + { + show_error('Failed sending emails'); + } + + return $this->outputJsonSuccess($json); + } + else + { + return $this->outputJsonError('Es wurden keine Empfehlungen angefordert'); + } + } + + /** + * Download and open uploaded document (Nachweisdokument). + */ + public function download() + { + $dms_id = $this->input->get('dms_id'); + + if (!is_numeric($dms_id)) + { + show_error('Wrong parameter'); + } + + // Check if user is entitled to read dms doc + self::_checkIfEntitledToReadDMSDoc($dms_id); + + $this->dmslib->download($dms_id); + } + + /** + * Retrieve the UID of the logged user and checks if it is valid + */ + private function _setAuthUID() + { + $this->_uid = getAuthUID(); + + if (!$this->_uid) show_error('User authentification failed'); + } + + /** + * Check if user is entitled to read this Anrechnung + * @param $anrechnung_id + */ + private function _checkIfEntitledToReadAnrechnung($anrechnung_id) + { + $result = $this->AnrechnungModel->load($anrechnung_id); + + if(!$result = getData($result)[0]) + { + show_error('Failed loading Anrechnung'); + } + + $result = $this->LehrveranstaltungModel->loadWhere(array( + 'lehrveranstaltung_id' => $result->lehrveranstaltung_id + )); + + if(!$result = getData($result)[0]) + { + show_error('Failed loading Lehrveranstaltung'); + } + + // Get STGL + $result = $this->StudiengangModel->getLeitung($result->studiengang_kz); + + if($result = getData($result)[0]) + { + if ($result->uid == $this->_uid) + { + return; + } + } + + show_error('You are not entitled to read this Anrechnung'); + } + + /** + * Check if user is entitled to read dms doc + * @param $dms_id + */ + private function _checkIfEntitledToReadDMSDoc($dms_id) + { + $result = $this->AnrechnungModel->loadWhere(array('dms_id' => $dms_id)); + + if(!$result = getData($result)[0]) + { + show_error('Failed retrieving Anrechnung'); + } + + $result = $this->LehrveranstaltungModel->loadWhere(array( + 'lehrveranstaltung_id' => $result->lehrveranstaltung_id + )); + + if(!$result = getData($result)[0]) + { + show_error('Failed loading Lehrveranstaltung'); + } + + // Get STGL + $result = $this->StudiengangModel->getLeitung($result->studiengang_kz); + + if($result = getData($result)[0]) + { + if ($result->uid == $this->_uid) + { + return; + } + } + + show_error('You are not entitled to read this document'); + } + + /** + * Send mail to student to inform if Anrechnung was approved or rejected + * @param $mail_params + */ + private function _sendSanchoMailToStudent($anrechnung_id, $status_kurzbz) + { + $result = getData($this->anrechnunglib->getStudentData($anrechnung_id))[0]; + + // Get student name and mail address + $to = $result->uid. '@'. DOMAIN; + + $anrede = $result->geschlecht == 'w' ? 'Sehr geehrte Frau ' : 'Sehr geehrter Herr '; + + $text = $status_kurzbz == self::ANRECHNUNGSTATUS_APPROVED + ? 'Ihrem Antrag auf Anerkennung nachgewiesener Kenntnisse der Lehrveranstaltung "'. + $result->lv_bezeichnung. '" wurde stattgegeben.' + : 'wir haben Ihren Antrag auf Anerkennung nachgewiesener Kenntnisse geprüft und können die Lehrveranstaltung "'. + $result->lv_bezeichnung. '" leider nicht anrechnen, weil die Gleichwertigkeit nicht festgestellt werden konnte.'; + + // Prepare mail content + $body_fields = array( + 'anrede_name' => $anrede. $result->vorname. ' '. $result->nachname, + 'text' => $text + ); + + sendSanchoMail( + 'AnrechnungGenehmigen', + $body_fields, + $to, + 'Anerkennung nachgewiesener Kenntnisse: Ihr Antrag ist abgeschlossen' + ); + + return true; + } + + /** + * Send mail to lectors asking for recommendation. (first to LV-Leitung, if not present to all lectors of lv) + * @param $mail_params + * @return bool + */ + private function _sendSanchoMailToLectors($mail_params) + { + // Get Lehrveranstaltungen + $anrechnung_arr = array(); + + foreach ($mail_params as $item) + { + $this->AnrechnungModel->addSelect('lehrveranstaltung_id, studiensemester_kurzbz'); + $anrechnung_arr[]= array( + 'lehrveranstaltung_id' => $this->AnrechnungModel->load($item['anrechnung_id'])->retval[0]->lehrveranstaltung_id, + 'studiensemester_kurzbz' => $this->AnrechnungModel->load($item['anrechnung_id'])->retval[0]->studiensemester_kurzbz + ); + } + + $anrechnung_arr = array_unique($anrechnung_arr, SORT_REGULAR); + + + /** + * Get lectors (prio for LV-Leitung, if not present to all lectors of LV. + * Anyway this function will receive a unique array to avoid sending more mails to one and the same lector. + * **/ + $lector_arr = $this->_getLectors($anrechnung_arr); + + // Send mail to lectors + foreach ($lector_arr as $lector) + { + $to = $lector->uid; + $vorname = $lector->vorname; + + // Get full name of stgl + $this->load->model('person/Person_model', 'PersonModel'); + if (!$stgl_name = getData($this->PersonModel->getFullName($this->_uid))) + { + show_error ('Failed retrieving person'); + } + + // Link to Antrag genehmigen + $url = + CIS_ROOT. 'cis/index.php?menu='. + CIS_ROOT. 'cis/menu.php?content_id=&content='. + CIS_ROOT. index_page(). self::REVIEW_ANRECHNUNG_URI; + + // Prepare mail content + $body_fields = array( + 'vorname' => $vorname, + 'stgl_name' => $stgl_name, + 'link' => anchor($url, 'Anrechnungsanträge Übersicht') + ); + + sendSanchoMail( + 'AnrechnungEmpfehlungAnfordern', + $body_fields, + $to, + 'Anerkennung nachgewiesener Kenntnisse: Deine Empfehlung wird benötigt' + ); + } + return true; + } + + /** + * Get lectors (prio for LV-Leitung, if not present to all lectors of LV. + * Anyway this function will receive a unique array to avoid sending more mails to one and the same lector. + * @param $anrechnung_arr + * @return array + */ + private function _getLectors($anrechnung_arr) + { + $lector_arr = array(); + + // Get lectors + foreach($anrechnung_arr as $anrechnung) + { + $this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel'); + $result = $this->LehrveranstaltungModel->getLecturersByLv($anrechnung['studiensemester_kurzbz'], $anrechnung['lehrveranstaltung_id']); + + if (!$result = getData($result)) + { + show_error('Failed retrieving lectors of Lehrveranstaltung'); + } + + // Check if lv has LV-Leitung + $key = array_search(true, array_column($result, 'lvleiter')); + + // If lv has LV-Leitung, keep only the one + if ($key !== false) + { + $lector_arr[]= $result[$key]; + } + // ...otherwise keep all lectors + else + { + $lector_arr = array_merge($lector_arr, $result); + } + } + + /** + * NOTE: This step is only done to make the array unique by uid, vorname and nachname in the following step + * (e.g. if same lector is ones LV-Leitung and another time not, then array_unique would leave both. + * But we wish to send only one email by to that one person) + * **/ + foreach ($lector_arr as $lector) + { + unset($lector->lvleiter); + } + + // Now make the lector array aka mail receivers unique + $lector_arr = array_unique($lector_arr, SORT_REGULAR); + + return $lector_arr; + + } + +} diff --git a/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php b/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php new file mode 100644 index 000000000..b2d09fbe1 --- /dev/null +++ b/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php @@ -0,0 +1,461 @@ + 'lehre/anrechnung_genehmigen:rw', + 'download' => 'lehre/anrechnung_genehmigen:rw', + 'approve' => 'lehre/anrechnung_genehmigen:rw', + 'reject' => 'lehre/anrechnung_genehmigen:rw', + 'requestRecommendation' => 'lehre/anrechnung_genehmigen:rw' + ) + ); + + // Load models + $this->load->model('education/Anrechnung_model', 'AnrechnungModel'); + $this->load->model('education/Anrechnungstatus_model', 'AnrechnungstatusModel'); + $this->load->model('content/DmsVersion_model', 'DmsVersionModel'); + + // Load libraries + $this->load->library('WidgetLib'); + $this->load->library('PermissionLib'); + $this->load->library('AnrechnungLib'); + $this->load->library('DmsLib'); + + // Load helpers + $this->load->helper('form'); + $this->load->helper('url'); + $this->load->helper('hlp_sancho_helper'); + + // Load language phrases + $this->loadPhrases( + array( + 'global', + 'ui', + 'anrechnung', + 'person', + 'lehre', + 'table' + ) + ); + + $this->_setAuthUID(); + + $this->setControllerId(); + } + + public function index() + { + $studiensemester_kurzbz = $this->input->get('studiensemester'); + + // Retrieve studiengaenge the user is entitled for + if (!$studiengang_kz_arr = $this->permissionlib->getSTG_isEntitledFor(self::BERECHTIGUNG_ANRECHNUNG_GENEHMIGEN)) + { + show_error(getError($studiengang_kz_arr)); + } + + if (!is_string($studiensemester_kurzbz)) + { + $studiensemester = $this->StudiensemesterModel->getNearest(); + if (hasData($studiensemester)) + { + $studiensemester_kurzbz = $studiensemester->retval[0]->studiensemester_kurzbz; + } + elseif (isError($studiensemester)) + { + show_error(getError($studiensemester)); + } + } + + $viewData = array( + 'studiensemester_selected' => $studiensemester_kurzbz, + 'studiengaenge_entitled' => $studiengang_kz_arr + ); + + $this->load->view('lehre/anrechnung/approveAnrechnungUebersicht.php', $viewData); + } + + /** + * Approve Anrechnungen. + */ + public function approve() + { + $data = $this->input->post('data'); + + if(isEmptyArray($data)) + { + return $this->outputJsonError('Fehler beim Übertragen der Daten.'); + } + + // Get statusbezeichnung for 'approved' + $this->AnrechnungstatusModel->addSelect('bezeichnung_mehrsprachig'); + $approved = getData($this->AnrechnungstatusModel->load('approved'))[0]; + $approved = getUserLanguage() == 'German' + ? $approved->bezeichnung_mehrsprachig[0] + : $approved->bezeichnung_mehrsprachig[1]; + + foreach ($data as $item) + { + // Approve Anrechnung + if(getData($this->anrechnunglib->approveAnrechnung($item['anrechnung_id']))) + { + $json[]= array( + 'anrechnung_id' => $item['anrechnung_id'], + 'status_kurzbz' => self::ANRECHNUNGSTATUS_APPROVED, + 'status_bezeichnung' => $approved + ); + + if(!$this->_sendSanchoMailToStudent($item['anrechnung_id'], self::ANRECHNUNGSTATUS_APPROVED)) + { + show_error('Failed sending mail'); + } + } + } + + // Output json to ajax + if (isset($json) && !isEmptyArray($json)) + { + return $this->outputJsonSuccess($json); + } + else + { + return $this->outputJsonError('Es wurden keine Anrechnungen genehmigt.'); + } + } + + /** + * Reject Anrechnungen. + */ + public function reject() + { + $data = $this->input->post('data'); + + if(isEmptyArray($data)) + { + return $this->outputJsonError('Fehler beim Übertragen der Daten.'); + } + + // Get statusbezeichnung for 'rejected' + $this->AnrechnungstatusModel->addSelect('bezeichnung_mehrsprachig'); + $rejected = getData($this->AnrechnungstatusModel->load('rejected'))[0]; + $rejected = getUserLanguage() == 'German' + ? $rejected->bezeichnung_mehrsprachig[0] + : $rejected->bezeichnung_mehrsprachig[1]; + + foreach ($data as $item) + { + // Reject Anrechnung + if(getData($this->anrechnunglib->rejectAnrechnung($item['anrechnung_id'], $item['begruendung']))) + { + $json[]= array( + 'anrechnung_id' => $item['anrechnung_id'], + 'status_kurzbz' => self::ANRECHNUNGSTATUS_REJECTED, + 'status_bezeichnung' => $rejected + ); + + if(!$this->_sendSanchoMailToStudent($item['anrechnung_id'], self::ANRECHNUNGSTATUS_REJECTED)) + { + show_error('Failed sending mail'); + } + } + } + + // Output json to ajax + if (isset($json) && !isEmptyArray($json)) + { + return $this->outputJsonSuccess($json); + } + else + { + return $this->outputJsonError('Es wurden keine Anrechnungen genehmigt.'); + } + } + + /** + * Request recommendation for Anrechnungen. + */ + public function requestRecommendation() + { + $data = $this->input->post('data'); + + if(isEmptyArray($data)) + { + return $this->outputJsonError('Fehler beim Übertragen der Daten.'); + } + + // Get statusbezeichnung for 'inProgressLektor' + $this->AnrechnungstatusModel->addSelect('bezeichnung_mehrsprachig'); + $inProgressLektor = getData($this->AnrechnungstatusModel->load('inProgressLektor'))[0]; + $inProgressLektor = getUserLanguage() == 'German' + ? $inProgressLektor->bezeichnung_mehrsprachig[0] + : $inProgressLektor->bezeichnung_mehrsprachig[1]; + + foreach ($data as $item) + { + // Approve Anrechnung + if(getData($this->anrechnunglib->requestRecommendation($item['anrechnung_id']))) + { + $json[]= array( + 'anrechnung_id' => $item['anrechnung_id'], + 'status_kurzbz' => self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR, + 'status_bezeichnung' => $inProgressLektor, + 'empfehlung_anrechnung' => null + ); + } + } + + // Output json to ajax + if (isset($json) && !isEmptyArray($json)) + { + /** + * Send mails to lectors + * NOTE: mails are sent at the end to ensure sending only ONE mail to each LV-Leitung or lector + * even if they are required for more recommendations + * */ + if (!$this->_sendSanchoMailToLectors($json)) + { + show_error('Failed sending emails'); + } + + return $this->outputJsonSuccess($json); + } + else + { + return $this->outputJsonError('Es wurden keine Empfehlungen angefordert'); + } + } + + /** + * Download and open uploaded document (Nachweisdokument). + */ + public function download() + { + $dms_id = $this->input->get('dms_id'); + + if (!is_numeric($dms_id)) + { + show_error('Wrong parameter'); + } + + // Check if user is entitled to read dms doc + self::_checkIfEntitledToReadDMSDoc($dms_id); + + $this->dmslib->download($dms_id); + } + + + /** + * Retrieve the UID of the logged user and checks if it is valid + */ + private function _setAuthUID() + { + $this->_uid = getAuthUID(); + + if (!$this->_uid) show_error('User authentification failed'); + } + + /** + * Check if user is entitled to read dms doc + * @param $dms_id + */ + private function _checkIfEntitledToReadDMSDoc($dms_id) + { + $result = $this->AnrechnungModel->loadWhere(array('dms_id' => $dms_id)); + + if(!$result = getData($result)[0]) + { + show_error('Failed retrieving Anrechnung'); + } + + $result = $this->LehrveranstaltungModel->loadWhere(array( + 'lehrveranstaltung_id' => $result->lehrveranstaltung_id + )); + + + if(!$result = getData($result)[0]) + { + show_error('Failed loading Lehrveranstaltung'); + } + + // Get STGL + $result = $this->StudiengangModel->getLeitung($result->studiengang_kz); + + if($result = getData($result)[0]) + { + if ($result->uid == $this->_uid) + { + return; + } + } + + show_error('You are not entitled to read this document'); + } + + /** + * Send mail to student to inform if Anrechnung was approved or rejected + * @param $mail_params + */ + private function _sendSanchoMailToStudent($anrechnung_id, $status_kurzbz) + { + $result = getData($this->anrechnunglib->getStudentData($anrechnung_id))[0]; + + // Get student name and mail address + $to = $result->uid. '@'. DOMAIN; + + $anrede = $result->geschlecht == 'w' ? 'Sehr geehrte Frau ' : 'Sehr geehrter Herr '; + + $text = $status_kurzbz == self::ANRECHNUNGSTATUS_APPROVED + ? 'Ihrem Antrag auf Anerkennung nachgewiesener Kenntnisse der Lehrveranstaltung "'. + $result->lv_bezeichnung. '" wurde stattgegeben.' + : 'wir haben Ihren Antrag auf Anerkennung nachgewiesener Kenntnisse geprüft und können die Lehrveranstaltung "'. + $result->lv_bezeichnung. '" leider nicht anrechnen, weil die Gleichwertigkeit nicht festgestellt werden konnte.'; + + // Prepare mail content + $body_fields = array( + 'anrede_name' => $anrede. $result->vorname. ' '. $result->nachname, + 'text' => $text + ); + + sendSanchoMail( + 'AnrechnungGenehmigen', + $body_fields, + $to, + 'Anerkennung nachgewiesener Kenntnisse: Ihr Antrag ist abgeschlossen' + ); + + return true; + } + + /** + * Send mail to lectors asking for recommendation. (first to LV-Leitung, if not present to all lectors of lv) + * @param $mail_params + * @return bool + */ + private function _sendSanchoMailToLectors($mail_params) + { + // Get Lehrveranstaltungen + $anrechnung_arr = array(); + + foreach ($mail_params as $item) + { + $this->AnrechnungModel->addSelect('lehrveranstaltung_id, studiensemester_kurzbz'); + $anrechnung_arr[]= array( + 'lehrveranstaltung_id' => $this->AnrechnungModel->load($item['anrechnung_id'])->retval[0]->lehrveranstaltung_id, + 'studiensemester_kurzbz' => $this->AnrechnungModel->load($item['anrechnung_id'])->retval[0]->studiensemester_kurzbz + ); + } + + $anrechnung_arr = array_unique($anrechnung_arr, SORT_REGULAR); + + + /** + * Get lectors (prio for LV-Leitung, if not present to all lectors of LV. + * Anyway this function will receive a unique array to avoid sending more mails to one and the same lector. + * **/ + $lector_arr = $this->_getLectors($anrechnung_arr); + + // Send mail to lectors + foreach ($lector_arr as $lector) + { + $to = $lector->uid; + $vorname = $lector->vorname; + + // Get full name of stgl + $this->load->model('person/Person_model', 'PersonModel'); + if (!$stgl_name = getData($this->PersonModel->getFullName($this->_uid))) + { + show_error ('Failed retrieving person'); + } + + // Link to Antrag genehmigen + $url = + CIS_ROOT. 'cis/index.php?menu='. + CIS_ROOT. 'cis/menu.php?content_id=&content='. + CIS_ROOT. index_page(). self::REVIEW_ANRECHNUNG_URI; + + // Prepare mail content + $body_fields = array( + 'vorname' => $vorname, + 'stgl_name' => $stgl_name, + 'link' => anchor($url, 'Anrechnungsanträge Übersicht') + ); + + sendSanchoMail( + 'AnrechnungEmpfehlungAnfordern', + $body_fields, + $to, + 'Anerkennung nachgewiesener Kenntnisse: Deine Empfehlung wird benötigt' + ); + } + return true; + } + + /** + * Get lectors (prio for LV-Leitung, if not present to all lectors of LV. + * Anyway this function will receive a unique array to avoid sending more mails to one and the same lector. + * @param $anrechnung_arr + * @return array + */ + private function _getLectors($anrechnung_arr) + { + $lector_arr = array(); + + // Get lectors + foreach($anrechnung_arr as $anrechnung) + { + $this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel'); + $result = $this->LehrveranstaltungModel->getLecturersByLv($anrechnung['studiensemester_kurzbz'], $anrechnung['lehrveranstaltung_id']); + + if (!$result = getData($result)) + { + show_error('Failed retrieving lectors of Lehrveranstaltung'); + } + + // Check if lv has LV-Leitung + $key = array_search(true, array_column($result, 'lvleiter')); + + // If lv has LV-Leitung, keep only the one + if ($key !== false) + { + $lector_arr[]= $result[$key]; + } + // ...otherwise keep all lectors + else + { + $lector_arr = array_merge($lector_arr, $result); + } + } + + /** + * NOTE: This step is only done to make the array unique by uid, vorname and nachname in the following step + * (e.g. if same lector is ones LV-Leitung and another time not, then array_unique would leave both. + * But we wish to send only one email by to that one person) + * **/ + foreach ($lector_arr as $lector) + { + unset($lector->lvleiter); + } + + // Now make the lector array aka mail receivers unique + $lector_arr = array_unique($lector_arr, SORT_REGULAR); + + return $lector_arr; + + } +} \ No newline at end of file diff --git a/application/controllers/lehre/anrechnung/RequestAnrechnung.php b/application/controllers/lehre/anrechnung/RequestAnrechnung.php new file mode 100644 index 000000000..4f589e5f5 --- /dev/null +++ b/application/controllers/lehre/anrechnung/RequestAnrechnung.php @@ -0,0 +1,409 @@ + 'student/anrechnung_beantragen:rw', + 'apply' => 'student/anrechnung_beantragen:rw', + 'download' => 'student/anrechnung_beantragen:rw', + ) + ); + + // Load models + $this->load->model('education/Anrechnung_model', 'AnrechnungModel'); + $this->load->model('content/DmsVersion_model', 'DmsVersionModel'); + + // Load libraries + $this->load->library('WidgetLib'); + $this->load->library('PermissionLib'); + $this->load->library('AnrechnungLib'); + $this->load->library('DmsLib'); + + // Load helpers + $this->load->helper('form'); + $this->load->helper('url'); + $this->load->helper('hlp_sancho_helper'); + + // Load language phrases + $this->loadPhrases( + array( + 'global', + 'ui', + 'anrechnung', + 'person', + 'lehre' + ) + ); + + $this->_setAuthUID(); + + $this->setControllerId(); + } + + public function index() + { + $studiensemester_kurzbz = $this->input->get('studiensemester'); + $lehrveranstaltung_id = $this->input->get('lv_id'); + + if (!is_numeric($lehrveranstaltung_id) || !is_string($studiensemester_kurzbz)) + { + show_error('Missing correct parameter'); + } + + // Check if application deadline is expired + // $is_expired = $this->_checkAntragDeadline($studiensemester_kurzbz); + $is_expired = false; // Set to false until Deadline is defined + + $student = $this->StudentModel->load(array('student_uid' => $this->_uid)); + if (isSuccess($student) && hasData($student)) + { + $prestudent_id = getData($student)[0]->prestudent_id; + } + else + show_error('Cant load User'); + + // Get Anrechung data + $result = $this->anrechnunglib->getAnrechnungDataByLv($lehrveranstaltung_id, $studiensemester_kurzbz, $prestudent_id); + if (!$anrechnungData = getData($result)) + { + show_error(getError($anrechnungData)); + } + + // Dont show who is progressing the application to the student + if ($anrechnungData->status_kurzbz == self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL || + $anrechnungData->status_kurzbz == self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR || + $anrechnungData->status_kurzbz == self::ANRECHNUNGSTATUS_PROGRESSED_BY_KF) + { + $anrechnungData->status = getUserLanguage() == 'German' ? 'in Bearbeitung' : 'in process'; + } + + $antragData = $this->anrechnunglib->getAntragData($this->_uid, $studiensemester_kurzbz, $lehrveranstaltung_id); + + $viewData = array( + 'antragData' => $antragData, + 'anrechnungData' => $anrechnungData, + 'is_expired' => $is_expired, + 'disabled' => $is_expired && empty($anrechnungData->anrechnung_id) || !empty($anrechnungData->anrechnung_id) + ? 'disabled' + : '' + ); + + $this->load->view('lehre/anrechnung/requestAnrechnung.php', $viewData); + } + + /** + * Apply Anrechnungsantrag and send to STGL + */ + public function apply() + { + $anmerkung = $this->input->post('anmerkung'); + $begruendung_id = $this->input->post('begruendung'); + $lehrveranstaltung_id = $this->input->post('lv_id'); + $studiensemester_kurzbz = $this->input->post('studiensemester'); + + if (empty($_FILES['uploadfile']['name'])) + { + show_error('Missing upload file'); + } + + if (!is_numeric($begruendung_id) || !is_numeric($lehrveranstaltung_id) || !is_string($studiensemester_kurzbz)) + { + show_error('Missing correct parameter'); + } + + $student = $this->StudentModel->load(array('student_uid' => $this->_uid)); + if (isSuccess($student) && hasData($student)) + { + $prestudent_id = getData($student)[0]->prestudent_id; + } + else + show_error('Cant load User'); + + $result = $this->_getAnrechnung($lehrveranstaltung_id, $studiensemester_kurzbz, $prestudent_id); + if (hasData($result)) + { + show_error('Der Antrag wurde bereits gestellt'); + } + + // Start DB transaction + $this->db->trans_start(false); + + // Upload document + $dms = array( + 'kategorie_kurzbz' => 'anrechnung', + 'version' => 0, + 'name' => $_FILES['uploadfile']['name'], + 'mimetype' => $_FILES['uploadfile']['type'], + 'insertamum' => (new DateTime())->format('Y-m-d H:i:s'), + 'insertvon' => $this->_uid + ); + + if(isError($uploaddata = $this->dmslib->upload($dms, array('pdf')))) + { + show_error(getError($uploaddata)); + } + + // Get PrestudentID + $result = $this->_loadPrestudent($this->_uid, $studiensemester_kurzbz); + + if (!$prestudent = getData($result)[0]) + { + show_error('Failed retrieving prestudent'); + } + + // Save Anrechnung + $result = $this->AnrechnungModel->insert(array( + 'prestudent_id' => $prestudent->prestudent_id, + 'lehrveranstaltung_id' => $lehrveranstaltung_id, + 'begruendung_id' => $begruendung_id, + 'dms_id' => $uploaddata->retval['dms_id'], + 'studiensemester_kurzbz' => $studiensemester_kurzbz, + 'anmerkung_student' => $anmerkung, + 'insertvon' => $this->_uid + )); + + if (isError($result)) + { + show_error('Failed inserting Anrechnung'); + } + + // Save Anrechnungstatus 'inProgressSTGL' + $result = $this->AnrechnungModel->saveAnrechnungstatus($result->retval, self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL); + + if (isError($result)) + { + show_error('Failed saving Anrechnungstatus'); + } + + // Transaction complete! + $this->db->trans_complete(); + + if ($this->db->trans_status() === false || isError($result)) + { + $this->db->trans_rollback(); + show_error($result->msg, EXIT_ERROR); + } + + // Send mail to STGL + $mail_params = array( + 'studiengang_kz' => $prestudent->studiengang_kz, + 'lehrveranstaltung_id' => $lehrveranstaltung_id + ); + + if(!$this->_sendSanchoMail($mail_params)) + { + show_error('Failed sending mail'); + } + else + { + redirect(site_url(). self::REQUEST_ANRECHNUNG_URI. '?studiensemester='. $studiensemester_kurzbz. '&lv_id='. $lehrveranstaltung_id); + } + } + + /** + * Download and open uploaded document (Nachweisdokument). + */ + public function download() + { + $dms_id = $this->input->get('dms_id'); + + if (!is_numeric($dms_id)) + { + show_error('Wrong parameter'); + } + + // Check if user is entitled to read dms doc + self::_checkIfEntitledToReadDMSDoc($dms_id); + + $this->dmslib->download($dms_id); + } + + /** + * 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'); + } + + /** + * Load Prestudent by uid and Studiensemester. + * @param $uid + * @param $studiensemester_kurzbz + * @return mixed + */ + private function _loadPrestudent($uid, $studiensemester_kurzbz) + { + $this->load->model('crm/Prestudentstatus_model', 'PrestudentstatusModel'); + $this->load->model('crm/Student_model', 'StudentModel'); + + $this->PrestudentstatusModel->addJoin('public.tbl_student', 'prestudent_id'); + return $this->PrestudentstatusModel->loadWhere(array( + 'student_uid' => $uid, + 'studiensemester_kurzbz' => $studiensemester_kurzbz + ) + ); + } + + /** + * Check if application deadline is expired. + * @param $studiensemester_kurzbz + * @return bool True if semester start is more then 1 week ago + * @throws Exception + */ + private function _checkAntragDeadline($studiensemester_kurzbz) + { + $this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel'); + $this->StudiensemesterModel->addSelect('start'); + if (!$start = getData($this->StudiensemesterModel->load($studiensemester_kurzbz))) + { + show_error(getError($start)); + } + + $start = new DateTime($start[0]->start); + $today = new DateTime('today midnight'); + + // True if today > application deadline + return ($today > $start->add((new DateInterval(self::DEADLINE_INTERVAL_NACH_SEMESTERSTART)))); + } + + /** + * Check if user is entitled to read dms doc + * @param $dms_id + */ + private function _checkIfEntitledToReadDMSDoc($dms_id) + { + if (!$student = getData($this->StudentModel->load(array('student_uid' => $this->_uid)))[0]) + { + show_error('Failed loading Student'); + } + + $result = $this->AnrechnungModel->loadWhere(array('dms_id' => $dms_id)); + + if($result = getData($result)[0]) + { + if ($result->prestudent_id == $student->prestudent_id) + { + return; + } + } + + show_error('You are not entitled to read this document'); + } + + /** + * Get Anrechnung by Lehrveranstaltung + * @param $lehrveranstaltung_id + * @return mixed + */ + private function _getAnrechnung($lehrveranstaltung_id, $studiensemester_kurzbz, $prestudent_id) + { + $result = $this->AnrechnungModel->loadWhere(array( + 'lehrveranstaltung_id' => $lehrveranstaltung_id, + 'studiensemester_kurzbz' => $studiensemester_kurzbz, + 'prestudent_id' => $prestudent_id + )); + + if (isError($result)) + { + show_error(getError($result)); + } + + return $result; + } + + /** + * Send mail to STGL (if not available, send to STGL assistance) + * @param $mail_params + */ + private function _sendSanchoMail($mail_params) + { + // Get STGL mail address, if available, otherwise get assistance mail address + list ($to, $vorname) = $this->_getSTGLMailAddress($mail_params['studiengang_kz']); + + // Get full name of student + $this->load->model('person/Person_model', 'PersonModel'); + if (!$student_name = getData($this->PersonModel->getFullName($this->_uid))) + { + show_error ('Failed retrieving person'); + } + + // Get lehrveranstaltung bezeichnung + $this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel'); + if (!$lehrveranstaltung = getData($this->LehrveranstaltungModel->load($mail_params['lehrveranstaltung_id']))[0]) + { + show_error ('Failed retrieving person'); + } + + // Link to Antrag genehmigen + $url = + CIS_ROOT. 'cis/index.php?menu='. + CIS_ROOT. 'cis/menu.php?content_id=&content='. + CIS_ROOT. index_page(). self::APPROVE_ANRECHNUNG_URI; + + // Prepare mail content + $body_fields = array( + 'vorname' => $vorname, + 'student_name' => $student_name, + 'lehrveranstaltung_bezeichnung' => $lehrveranstaltung->bezeichnung, + 'link' => anchor($url, 'Anrechnungsanträge Übersicht') + ); + + sendSanchoMail( + 'AnrechnungAntragStellen', + $body_fields, + $to, + 'Anerkennung nachgewiesener Kenntnisse: Neuer Antrag wurde gestellt' + ); + + return true; + } + + // Get STGL mail address, if available, otherwise get assistance mail address + private function _getSTGLMailAddress($stg_kz) + { + $this->load->model('organisation/Studiengang_model', 'StudiengangModel'); + $result = $this->StudiengangModel->getLeitung($stg_kz); + + // Get STGL mail address, if available + if (hasData($result)) + { + return array( + $result->retval[0]->uid. '@'. DOMAIN, + $result->retval[0]->vorname + ); + } + // ...otherwise get assistance mail address + else + { + $result = $this->StudiengangModel->load($stg_kz); + + if (hasData($result)) + { + return array( + $result->retval[0]->email, + '' + ); + } + } + } +} diff --git a/application/controllers/lehre/anrechnung/ReviewAnrechnungDetail.php b/application/controllers/lehre/anrechnung/ReviewAnrechnungDetail.php new file mode 100644 index 000000000..b9c723eee --- /dev/null +++ b/application/controllers/lehre/anrechnung/ReviewAnrechnungDetail.php @@ -0,0 +1,397 @@ + 'lehre/anrechnung_empfehlen:rw', + 'download' => 'lehre/anrechnung_empfehlen:rw', + 'recommend' => 'lehre/anrechnung_empfehlen:rw', + 'dontRecommend' => 'lehre/anrechnung_empfehlen:rw' + ) + ); + + // Load models + $this->load->model('education/Anrechnung_model', 'AnrechnungModel'); + $this->load->model('education/Anrechnungstatus_model', 'AnrechnungstatusModel'); + $this->load->model('content/DmsVersion_model', 'DmsVersionModel'); + $this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel'); + $this->load->model('crm/Student_model', 'StudentModel'); + $this->load->model('person/Notiz_model', 'NotizModel'); + $this->load->model('person/Person_model', 'PersonModel'); + + // Load libraries + $this->load->library('WidgetLib'); + $this->load->library('PermissionLib'); + $this->load->library('AnrechnungLib'); + $this->load->library('DmsLib'); + + // Load helpers + $this->load->helper('form'); + $this->load->helper('url'); + $this->load->helper('hlp_sancho_helper'); + + // Load language phrases + $this->loadPhrases( + array( + 'global', + 'ui', + 'anrechnung', + 'person', + 'lehre', + 'table' + ) + ); + + $this->_setAuthUID(); + + $this->setControllerId(); + } + + public function index() + { + $anrechnung_id = $this->input->get('anrechnung_id'); + + if (!is_numeric($anrechnung_id)) + { + show_error('Missing correct parameter'); + } + + // Check if user is entitled to read this Anrechnung + self::_checkIfEntitledToReadAnrechnung($anrechnung_id); + + // Get Anrechung data + if (!$anrechnungData = getData($this->anrechnunglib->getAnrechnungData($anrechnung_id))) + { + show_error('Missing data for Anrechnung.'); + } + + // Get Empfehlung data + if(!$empfehlungData = getData($this->anrechnunglib->getEmpfehlungData($anrechnung_id))) + { + show_error('Missing data for recommendation'); + } + + $viewData = array( + 'antragData' => $this->anrechnunglib->getAntragData( + $student_uid = $this->StudentModel->getUID($anrechnungData->prestudent_id), + $anrechnungData->studiensemester_kurzbz, + $anrechnungData->lehrveranstaltung_id + ), + 'anrechnungData' => $anrechnungData, + 'empfehlungData' => $empfehlungData + ); + + $this->load->view('lehre/anrechnung/reviewAnrechnungDetail.php', $viewData); + } + + /** + * Recommend Anrechnungen. + */ + public function recommend() + { + $data = $this->input->post('data'); + + if(isEmptyArray($data)) + { + return $this->outputJsonError('Fehler beim Übertragen der Daten.'); + } + + // Get statusbezeichnung for 'inProgressDP' + $this->AnrechnungstatusModel->addSelect('bezeichnung_mehrsprachig'); + $inProgressDP = getData($this->AnrechnungstatusModel->load('inProgressDP'))[0]; + $inProgressDP = getUserLanguage() == 'German' + ? $inProgressDP->bezeichnung_mehrsprachig[0] + : $inProgressDP->bezeichnung_mehrsprachig[1]; + + if (!$person = getData($this->PersonModel->getByUID($this->_uid))[0]) + { + show_error('Failed retrieving person data'); + } + + foreach ($data as $item) + { + // Approve Anrechnung + if(getData($this->anrechnunglib->recommendAnrechnung($item['anrechnung_id']))) + { + $json[]= array( + 'anrechnung_id' => $item['anrechnung_id'], + 'empfehlung_anrechnung' => 'true', + 'status_kurzbz' => self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL, + 'status_bezeichnung' => $inProgressDP, + 'empfehlung_am' => (new DateTime())->format('d.m.Y'), + 'empfehlung_von' => $person->vorname. ' '. $person->nachname + ); + } + } + + // Output json to ajax + if (isset($json) && !isEmptyArray($json)) + { + /** + * Send mails to STGL (if not present STGL, send to STGL assistance) + * NOTE: mails are sent at the end to ensure sending only one mail to each STGL + * */ + if (!$this->_sendSanchoMails($json, true)) + { + show_error('Failed sending emails'); + } + + return $this->outputJsonSuccess($json); + } + else + { + return $this->outputJsonError('Empfehlungen wurden nicht durchgeführt'); + } + } + + /** + * Dont recommend Anrechnungen. + */ + public function dontRecommend() + { + $data = $this->input->post('data'); + + if(isEmptyArray($data)) + { + return $this->outputJsonError('Fehler beim Übertragen der Daten.'); + } + + // Get statusbezeichnung for 'inProgressDP' + $this->AnrechnungstatusModel->addSelect('bezeichnung_mehrsprachig'); + $inProgressDP = getData($this->AnrechnungstatusModel->load('inProgressDP'))[0]; + $inProgressDP = getUserLanguage() == 'German' + ? $inProgressDP->bezeichnung_mehrsprachig[0] + : $inProgressDP->bezeichnung_mehrsprachig[1]; + + if (!$person = getData($this->PersonModel->getByUID($this->_uid))[0]) + { + show_error('Failed retrieving person data'); + } + + foreach ($data as $item) + { + // Approve Anrechnung + if(getData($this->anrechnunglib->dontRecommendAnrechnung($item['anrechnung_id'], $item['begruendung']))) + { + $json[]= array( + 'anrechnung_id' => $item['anrechnung_id'], + 'empfehlung_anrechnung' => 'false', + 'status_kurzbz' => self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL, + 'status_bezeichnung' => $inProgressDP, + 'empfehlumg_am' => (new DateTime())->format('d.m.Y'), + 'empfehlung_von' => $person->vorname. ' '. $person->nachname + ); + } + } + + // Output json to ajax + if (isset($json) && !isEmptyArray($json)) + { + // Send mails to STGL (if not present STGL, send to STGL assistance) + if (!$this->_sendSanchoMails($json, false)) + { + show_error('Failed sending emails'); + } + + return $this->outputJsonSuccess($json); + } + else + { + return $this->outputJsonError('Empfehlungen wurden nicht durchgeführt'); + } + } + + /** + * Download and open uploaded document (Nachweisdokument). + */ + public function download() + { + $dms_id = $this->input->get('dms_id'); + + if (!is_numeric($dms_id)) + { + show_error('Wrong parameter'); + } + + // Check if user is entitled to read dms doc + self::_checkIfEntitledToReadDMSDoc($dms_id); + + $this->dmslib->download($dms_id); + } + + + /** + * Retrieve the UID of the logged user and checks if it is valid + */ + private function _setAuthUID() + { + $this->_uid = getAuthUID(); + + if (!$this->_uid) show_error('User authentification failed'); + } + + /** + * Check if user is entitled to read dms doc + * @param $dms_id + */ + private function _checkIfEntitledToReadAnrechnung($anrechnung_id) + { + $result = $this->AnrechnungModel->load($anrechnung_id); + + if(!$result = getData($result)[0]) + { + show_error('Failed retrieving Anrechnung'); + } + + $result = $this->LehrveranstaltungModel + ->getLecturersByLv($result->studiensemester_kurzbz, $result->lehrveranstaltung_id); + + if($result = getData($result)) + { + $entitled_lector_arr = array_column($result, 'uid'); + + if (in_array($this->_uid, $entitled_lector_arr)) + { + return; + } + } + + show_error('You are not entitled to read this document'); + } + + /** + * Check if user is entitled to read dms doc + * @param $dms_id + */ + private function _checkIfEntitledToReadDMSDoc($dms_id) + { + $result = $this->AnrechnungModel->loadWhere(array('dms_id' => $dms_id)); + + if(!$result = getData($result)[0]) + { + show_error('Failed retrieving Anrechnung'); + } + + $result = $this->LehrveranstaltungModel + ->getLecturersByLv($result->studiensemester_kurzbz, $result->lehrveranstaltung_id); + + if($result = getData($result)) + { + $entitled_lector_arr = array_column($result, 'uid'); + + if (in_array($this->_uid, $entitled_lector_arr)) + { + return; + } + } + + show_error('You are not entitled to read this document'); + } + + /** + * Send mails to STGL (if not present then to STGL assistance) + * @param $mail_params + * @param $empfehlung + * @return bool + */ + private function _sendSanchoMails($mail_params, $empfehlung) + { + // Get studiengaenge + $studiengang_kz_arr = array(); + + foreach ($mail_params as $item) + { + $this->AnrechnungModel->addSelect('studiengang_kz'); + $this->AnrechnungModel->addJoin('public.tbl_prestudent', 'prestudent_id'); + + $studiengang_kz_arr[]= $this->AnrechnungModel->load($item['anrechnung_id'])->retval[0]->studiengang_kz; + } + + $studiengang_kz_arr = array_unique($studiengang_kz_arr); + + // Send mail to STGL of each studiengang + foreach ($studiengang_kz_arr as $studiengang_kz) + { + // Get STGL mail address, if available, otherwise get assistance mail address + list ($to, $vorname) = $this->_getSTGLMailAddress($studiengang_kz); + + // Get full name of lector + $this->load->model('person/Person_model', 'PersonModel'); + if (!$lector_name = getData($this->PersonModel->getFullName($this->_uid))) + { + show_error ('Failed retrieving person'); + } + + // Link to Antrag genehmigen + $url = + CIS_ROOT. 'cis/index.php?menu='. + CIS_ROOT. 'cis/menu.php?content_id=&content='. + CIS_ROOT. index_page(). self::APPROVE_ANRECHNUNG_URI; + + // Prepare mail content + $body_fields = array( + 'vorname' => $vorname, + 'lektor_name' => $lector_name, + 'empfehlung' => $empfehlung ? 'positive' : 'negative', + 'link' => anchor($url, 'Anrechnungsanträge Übersicht') + ); + + sendSanchoMail( + 'AnrechnungEmpfehlungAbgeben', + $body_fields, + $to, + 'Anerkennung nachgewiesener Kenntnisse: Empfehlung wurde abgegeben' + ); + } + + return true; + } + + // Get STGL mail address, if available, otherwise get assistance mail address + private function _getSTGLMailAddress($stg_kz) + { + $this->load->model('organisation/Studiengang_model', 'StudiengangModel'); + $result = $this->StudiengangModel->getLeitung($stg_kz); + + // Get STGL mail address, if available + if (hasData($result)) + { + return array( + $result->retval[0]->uid. '@'. DOMAIN, + $result->retval[0]->vorname + ); + } + // ...otherwise get assistance mail address + else + { + $result = $this->StudiengangModel->load($stg_kz); + + if (hasData($result)) + { + return array( + $result->retval[0]->email, + '' + ); + } + } + } + +} diff --git a/application/controllers/lehre/anrechnung/ReviewAnrechnungUebersicht.php b/application/controllers/lehre/anrechnung/ReviewAnrechnungUebersicht.php new file mode 100644 index 000000000..005cde97a --- /dev/null +++ b/application/controllers/lehre/anrechnung/ReviewAnrechnungUebersicht.php @@ -0,0 +1,337 @@ + 'lehre/anrechnung_empfehlen:rw', + 'download' => 'lehre/anrechnung_empfehlen:rw', + 'recommend' => 'lehre/anrechnung_empfehlen:rw', + 'dontRecommend' => 'lehre/anrechnung_empfehlen:rw' + ) + ); + + // Load models + $this->load->model('education/Anrechnung_model', 'AnrechnungModel'); + $this->load->model('education/Anrechnungstatus_model', 'AnrechnungstatusModel'); + $this->load->model('content/DmsVersion_model', 'DmsVersionModel'); + $this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel'); + + // Load libraries + $this->load->library('WidgetLib'); + $this->load->library('PermissionLib'); + $this->load->library('AnrechnungLib'); + $this->load->library('DmsLib'); + + // Load helpers + $this->load->helper('form'); + $this->load->helper('url'); + $this->load->helper('hlp_sancho_helper'); + + // Load language phrases + $this->loadPhrases( + array( + 'global', + 'ui', + 'anrechnung', + 'person', + 'lehre', + 'table' + ) + ); + + $this->_setAuthUID(); + + $this->setControllerId(); + } + + public function index() + { + $studiensemester_kurzbz = $this->input->get('studiensemester'); + + if (!is_string($studiensemester_kurzbz)) + { + $studiensemester = $this->StudiensemesterModel->getNearest(); + if (hasData($studiensemester)) + { + $studiensemester_kurzbz = $studiensemester->retval[0]->studiensemester_kurzbz; + } + elseif (isError($studiensemester)) + { + show_error(getError($studiensemester)); + } + } + + $viewData = array( + 'studiensemester_selected' => $studiensemester_kurzbz + ); + + $this->load->view('lehre/anrechnung/reviewAnrechnungUebersicht.php', $viewData); + } + + /** + * Recommend Anrechnungen. + */ + public function recommend() + { + $data = $this->input->post('data'); + + if(isEmptyArray($data)) + { + return $this->outputJsonError('Fehler beim Übertragen der Daten.'); + } + + // Get statusbezeichnung for 'inProgressDP' + $this->AnrechnungstatusModel->addSelect('bezeichnung_mehrsprachig'); + $inProgressDP = getData($this->AnrechnungstatusModel->load('inProgressDP'))[0]; + $inProgressDP = getUserLanguage() == 'German' + ? $inProgressDP->bezeichnung_mehrsprachig[0] + : $inProgressDP->bezeichnung_mehrsprachig[1]; + + foreach ($data as $item) + { + // Approve Anrechnung + if(getData($this->anrechnunglib->recommendAnrechnung($item['anrechnung_id']))) + { + $json[]= array( + 'anrechnung_id' => $item['anrechnung_id'], + 'empfehlung_anrechnung' => 'true', + 'status_kurzbz' => self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL, + 'status_bezeichnung' => $inProgressDP + ); + } + } + + // Output json to ajax + if (isset($json) && !isEmptyArray($json)) + { + /** + * Send mails to STGL (if not present STGL, send to STGL assistance) + * NOTE: mails are sent at the end to ensure sending only one mail to each STGL + * */ + if (!$this->_sendSanchoMails($json, true)) + { + show_error('Failed sending emails'); + } + + return $this->outputJsonSuccess($json); + } + else + { + return $this->outputJsonError('Empfehlungen wurden nicht durchgeführt'); + } + } + + /** + * Dont recommend Anrechnungen. + */ + public function dontRecommend() + { + $data = $this->input->post('data'); + + if(isEmptyArray($data)) + { + return $this->outputJsonError('Fehler beim Übertragen der Daten.'); + } + + // Get statusbezeichnung for 'inProgressDP' + $this->AnrechnungstatusModel->addSelect('bezeichnung_mehrsprachig'); + $inProgressDP = getData($this->AnrechnungstatusModel->load('inProgressDP'))[0]; + $inProgressDP = getUserLanguage() == 'German' + ? $inProgressDP->bezeichnung_mehrsprachig[0] + : $inProgressDP->bezeichnung_mehrsprachig[1]; + + foreach ($data as $item) + { + // Approve Anrechnung + if(getData($this->anrechnunglib + ->dontRecommendAnrechnung($item['anrechnung_id'], $item['begruendung']))) + { + $json[]= array( + 'anrechnung_id' => $item['anrechnung_id'], + 'empfehlung_anrechnung' => 'false', + 'status_kurzbz' => self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL, + 'status_bezeichnung' => $inProgressDP + ); + } + } + + // Output json to ajax + if (isset($json) && !isEmptyArray($json)) + { + // Send mails to STGL (if not present STGL, send to STGL assistance) + if (!$this->_sendSanchoMails($json, false)) + { + show_error('Failed sending emails'); + } + + return $this->outputJsonSuccess($json); + } + else + { + return $this->outputJsonError('Empfehlungen wurden nicht durchgeführt'); + } + } + + /** + * Download and open uploaded document (Nachweisdokument). + */ + public function download() + { + $dms_id = $this->input->get('dms_id'); + + if (!is_numeric($dms_id)) + { + show_error('Wrong parameter'); + } + + // Check if user is entitled to read dms doc + self::_checkIfEntitledToReadDMSDoc($dms_id); + + $this->dmslib->download($dms_id); + } + + + /** + * Retrieve the UID of the logged user and checks if it is valid + */ + private function _setAuthUID() + { + $this->_uid = getAuthUID(); + + if (!$this->_uid) show_error('User authentification failed'); + } + + /** + * Check if user is entitled to read dms doc + * @param $dms_id + */ + private function _checkIfEntitledToReadDMSDoc($dms_id) + { + $result = $this->AnrechnungModel->loadWhere(array('dms_id' => $dms_id)); + + if(!$result = getData($result)[0]) + { + show_error('Failed retrieving Anrechnung'); + } + + $result = $this->LehrveranstaltungModel + ->getLecturersByLv($result->studiensemester_kurzbz, $result->lehrveranstaltung_id); + + if($result = getData($result)) + { + $entitled_lector_arr = array_column($result, 'uid'); + + if (in_array($this->_uid, $entitled_lector_arr)) + { + return; + } + } + + show_error('You are not entitled to read this document'); + } + + /** + * Send mails to STGL (if not present then to STGL assistance) + * @param $mail_params + * @param $empfehlung + * @return bool + */ + private function _sendSanchoMails($mail_params, $empfehlung) + { + // Get studiengaenge + $studiengang_kz_arr = array(); + + foreach ($mail_params as $item) + { + $this->AnrechnungModel->addSelect('studiengang_kz'); + $this->AnrechnungModel->addJoin('public.tbl_prestudent', 'prestudent_id'); + + $studiengang_kz_arr[]= $this->AnrechnungModel->load($item['anrechnung_id'])->retval[0]->studiengang_kz; + } + + $studiengang_kz_arr = array_unique($studiengang_kz_arr); + + // Send mail to STGL of each studiengang + foreach ($studiengang_kz_arr as $studiengang_kz) + { + // Get STGL mail address, if available, otherwise get assistance mail address + list ($to, $vorname) = $this->_getSTGLMailAddress($studiengang_kz); + + // Get full name of lector + $this->load->model('person/Person_model', 'PersonModel'); + if (!$lector_name = getData($this->PersonModel->getFullName($this->_uid))) + { + show_error ('Failed retrieving person'); + } + + // Link to Antrag genehmigen + $url = + CIS_ROOT. 'cis/index.php?menu='. + CIS_ROOT. 'cis/menu.php?content_id=&content='. + CIS_ROOT. index_page(). self::APPROVE_ANRECHNUNG_URI; + + // Prepare mail content + $body_fields = array( + 'vorname' => $vorname, + 'lektor_name' => $lector_name, + 'empfehlung' => $empfehlung ? 'positive' : 'negative', + 'link' => anchor($url, 'Anrechnungsanträge Übersicht') + ); + + sendSanchoMail( + 'AnrechnungEmpfehlungAbgeben', + $body_fields, + $to, + 'Anerkennung nachgewiesener Kenntnisse: Empfehlung wurde abgegeben' + ); + } + + return true; + } + + // Get STGL mail address, if available, otherwise get assistance mail address + private function _getSTGLMailAddress($stg_kz) + { + $this->load->model('organisation/Studiengang_model', 'StudiengangModel'); + $result = $this->StudiengangModel->getLeitung($stg_kz); + + // Get STGL mail address, if available + if (hasData($result)) + { + return array( + $result->retval[0]->uid. '@'. DOMAIN, + $result->retval[0]->vorname + ); + } + // ...otherwise get assistance mail address + else + { + $result = $this->StudiengangModel->load($stg_kz); + + if (hasData($result)) + { + return array( + $result->retval[0]->email, + '' + ); + } + } + } + +} \ No newline at end of file diff --git a/application/libraries/AnrechnungLib.php b/application/libraries/AnrechnungLib.php new file mode 100644 index 000000000..c32b8a91c --- /dev/null +++ b/application/libraries/AnrechnungLib.php @@ -0,0 +1,643 @@ +ci =& get_instance(); + + $this->ci->load->model('education/Anrechnung_model', 'AnrechnungModel'); + $this->ci->load->model('person/Person_model', 'PersonModel'); + $this->ci->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel'); + $this->ci->load->model('organisation/Studiengang_model', 'StudiengangModel'); + $this->ci->load->model('crm/Student_model', 'StudentModel'); + $this->ci->load->model('content/DmsVersion_model', 'DmsVersionModel'); + } + + /** + * Get Antrag data + * @param $uid + * @param $studiensemester_kurzbz + * @param $lv_id + * @return StdClass + */ + public function getAntragData($uid, $studiensemester_kurzbz, $lv_id) + { + $antrag_data = new StdClass(); + + // Get lehrveranstaltung data. Break, if course is not assigned to student. + if(!$lv = getData($this->ci->LehrveranstaltungModel->getLvByStudent($uid, $studiensemester_kurzbz, $lv_id))[0]) + { + show_error('You are not assigned to this course yet.'); + } + + // Get the students personal data + if (!$person = getData($this->ci->PersonModel->getByUid($uid))[0]) + { + show_error('Failed loading person data.'); + } + + // Get the internal personenkennzeichen + if (!$student = getData($this->ci->StudentModel->load(array('student_uid' => $uid)))[0]) + { + show_error(getError($student)); + } + + // Get studiengang bezeichnung + if (!$studiengang = getData($this->ci->StudiengangModel->load($lv->studiengang_kz))[0]) + { + show_error('Failed loading studiengang data.'); + } + + // Get lectors of lehrveranstaltung + $antrag_data->lektoren = array(); + if (!$lv_lektoren = getData($this->ci->LehrveranstaltungModel->getLecturersByLv($studiensemester_kurzbz, $lv_id))) + { + show_error('Failed loading course lectors.'); + } + + // Set the given studiensemester + $antrag_data->lv_id = $lv_id; + $antrag_data->lv_bezeichnung = $lv->bezeichnung; + $antrag_data->ects = $lv->ects; + $antrag_data->studiensemester_kurzbz = $studiensemester_kurzbz; + $antrag_data->vorname = $person->vorname; + $antrag_data->nachname = $person->nachname; + $antrag_data->matrikelnr = $student->matrikelnr; + $antrag_data->stg_bezeichnung = $studiengang->bezeichnung; + $antrag_data->lektoren = $lv_lektoren; + + return $antrag_data; + } + + /** + * Get Anrechnung data, last status and Nachweisdokument dms data. + * @param $anrechnung_id + * @return array + * @throws Exception + */ + public function getAnrechnungData($anrechnung_id) + { + if (!is_numeric($anrechnung_id)) + { + show_error('Incorrect parameter'); + } + + $anrechnung_data = new StdClass(); + + $result = $this->ci->AnrechnungModel->load($anrechnung_id); + + if (isError($result)) + { + show_error(getError($result)); + } + + if ($anrechnung = getData($result)[0]) + { + $anrechnung_data = $this->_setAnrechnungDataObject($anrechnung); + } + + return success($anrechnung_data); + + } + + /** + * Get Anrechnung data by Lehrveranstaltung. Also retrieves last status and Nachweisdokument dms data. + * @param $lehrveranstaltung_id + * @return array + * @throws Exception + */ + public function getAnrechnungDataByLv($lehrveranstaltung_id, $studiensemester_kurzbz, $prestudent_id) + { + $anrechnung_data = new StdClass(); + $anrechnung_data->anrechnung_id = ''; + $anrechnung_data->prestudent_id = ''; + $anrechnung_data->lehrveranstaltung = ''; + $anrechnung_data->begruendung_id = ''; + $anrechnung_data->anmerkung = ''; + $anrechnung_data->dms_id = ''; + $anrechnung_data->insertamum = ''; + $anrechnung_data->insertvon = ''; + $anrechnung_data->studiensemester_kurzbz = ''; + $anrechnung_data->empfehlung = ''; + $anrechnung_data->status_kurzbz = ''; + $anrechnung_data->status = getUserLanguage() == 'German' ? 'neu' : 'new'; + $anrechnung_data->dokumentname = ''; + + $result = $this->ci->AnrechnungModel->loadWhere( + array( + 'lehrveranstaltung_id' => $lehrveranstaltung_id, + 'studiensemester_kurzbz' => $studiensemester_kurzbz, + 'prestudent_id' => $prestudent_id + ) + ); + + if (isError($result)) + { + show_error(getError($result)); + } + + if ($anrechnung = getData($result)[0]) + { + $anrechnung_data = $this->_setAnrechnungDataObject($anrechnung); + } + + return success($anrechnung_data); + } + + /** + * Get students data by Anrechnung + * @param $anrechnung_id + * @return mixed + */ + public function getStudentData($anrechnung_id) + { + if (!is_numeric($anrechnung_id)) + { + show_error('Incorrect parameter'); + } + + $this->ci->AnrechnungModel->addSelect('tbl_benutzer.uid, tbl_prestudent.prestudent_id, tbl_person.person_id, tbl_anrechnung.studiensemester_kurzbz, vorname, nachname, geschlecht, tbl_lehrveranstaltung.bezeichnung AS "lv_bezeichnung"'); + $this->ci->AnrechnungModel->addJoin('public.tbl_prestudent', 'prestudent_id'); + $this->ci->AnrechnungModel->addJoin('public.tbl_student', 'prestudent_id'); + $this->ci->AnrechnungModel->addJoin('public.tbl_benutzer', 'uid=student_uid'); + $this->ci->AnrechnungModel->addJoin('public.tbl_person', 'tbl_benutzer.person_id=tbl_person.person_id'); + $this->ci->AnrechnungModel->addJoin('lehre.tbl_lehrveranstaltung', 'lehrveranstaltung_id'); + + $result = $this->ci->AnrechnungModel->load($anrechnung_id); + + if (isError($result)) + { + show_error(getError($result)); + } + + if (!hasData($result)) + { + show_error('Failed retrieving students data'); + } + + return $result; + } + + /** + * Get Empfehlung data object. + * @param $anrechnung_id + * @return array + * @throws Exception + */ + public function getEmpfehlungData($anrechnung_id) + { + if (!is_numeric($anrechnung_id)) + { + show_error('Incorrect parameter'); + } + + $empfehlung_data = new stdClass(); + $empfehlung_data->empfehlung = null; + $empfehlung_data->empfehlung_von = '-'; + $empfehlung_data->empfehlung_am = '-'; + $empfehlung_data->empfehlung_angefordert_am = '-'; + $empfehlung_data->notiz = ''; // Begruendung, if not recommended + + + if(!$anrechnung = getData($this->ci->AnrechnungModel->load($anrechnung_id))[0]) + { + show_error('Failed loading Anrechnung'); + } + + // Get date, where recommendation was last requested + $result = $this->ci->AnrechnungModel->getLastAnrechnungstatus( + $anrechnung_id, + self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR // when STLG asks for recommendation, status is set to in progress lektor + ); + if ($result = getData($result)[0]) + { + $empfehlung_data->empfehlung_angefordert_am = (new DateTime($result->insertamum))->format('d.m.Y'); + } + + if (is_null($anrechnung->empfehlung_anrechnung)) + { + return success($empfehlung_data); + } + + // If Empfehlung is true or false + if (!is_null($anrechnung->empfehlung_anrechnung)) + { + // Get last lector and date, where recommendation was given + $result = $this->ci->AnrechnungModel->getLastAnrechnungstatus( + $anrechnung_id, + self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL // when lector sends recommendation, status is set to in progress STGL again + ); + if ($result = getData($result)[0]) + { + $empfehlung_datum = (new DateTime($result->insertamum))->format('d.m.Y'); + } + + // Get full name of lector + $result = $this->ci->PersonModel->getByUID($result->insertvon); + if ($result = getData($result)[0]) + { + $empfehlung_von = $result->vorname. ' '. $result->nachname; + } + + $empfehlung_data->empfehlung = $anrechnung->empfehlung_anrechnung; + $empfehlung_data->empfehlung_von = $empfehlung_von; + $empfehlung_data->empfehlung_am = $empfehlung_datum; + } + + // If Empfehlung is false, retrieve also Notiz with Begruendung + if (!$anrechnung->empfehlung_anrechnung) + { + // Get Ablehnungsbegruendung (only set, if Anrechnung was not recommended yet) + $this->ci->load->model('person/Notiz_model', 'NotizModel'); + $result = $this->ci->NotizModel->getNotizByAnrechnung($anrechnung_id, self::ANRECHNUNG_NOTIZTITEL_NOTIZ_BY_LEKTOR); + if ($notiz = getData($result)[0]) + { + $empfehlung_data->notiz = $notiz->text; + } + } + + return success($empfehlung_data); + + } + + /** + * Get Genehmigung data object. + * @param $anrechnung_id + * @return array + * @throws Exception + */ + public function getGenehmigungData($anrechnung_id) + { + if (!is_numeric($anrechnung_id)) + { + show_error('Incorrect parameter'); + } + + $genehmigung_data = new stdClass(); + $genehmigung_data->genehmigung = null; + $genehmigung_data->abgeschlossen_von = '-'; + $genehmigung_data->abgeschlossen_am = '-'; + $genehmigung_data->notiz = ''; // Begruendung, if rejected + + + if(!$anrechnung = getData($this->ci->AnrechnungModel->load($anrechnung_id))[0]) + { + show_error('Failed loading Anrechnung'); + } + + // Get date of approvement or rejection + $result = $this->ci->AnrechnungModel->getApprovedOrRejected($anrechnung_id); + + if (!$result = getData($result)[0]) + { + return success($genehmigung_data); + } + + + $genehmigung_data->genehmigung = $result->status_kurzbz == self::ANRECHNUNGSTATUS_APPROVED + ? true + : false; + $genehmigung_data->abgeschlossen_am = (new DateTime($result->insertamum))->format('d.m.Y'); + + // Get full name of lector + $result = $this->ci->PersonModel->getByUID($result->insertvon); + if ($result = getData($result)[0]) + { + $genehmigung_data->abgeschlossen_von = $result->vorname. ' '. $result->nachname; + } + + + // If Anrechnung was rejected, retrieve also Notiz with Begruendung + if (!$genehmigung_data->genehmigung) + { + // Get Ablehnungsbegruendung (only set, if Anrechnung was not recommended yet) + $this->ci->load->model('person/Notiz_model', 'NotizModel'); + $result = $this->ci->NotizModel->getNotizByAnrechnung($anrechnung_id, self::ANRECHNUNG_NOTIZTITEL_NOTIZ_BY_STGL); + if ($notiz = getData($result)[0]) + { + $genehmigung_data->notiz = $notiz->text; + } + } + + return success($genehmigung_data); + + } + + /** + * Get last Anrechnungstatusbezeichnung in users language. + * @param $anrechnung_id + * @return mixed + */ + public function getLastAnrechnungstatus($anrechnung_id) + { + $result = $this->ci->AnrechnungModel->getLastAnrechnungstatus($anrechnung_id); + + $status_mehrsprachig = getData($result)[0]->bezeichnung_mehrsprachig; + $status = getUserLanguage() == 'German' ? $status_mehrsprachig[0] : $status_mehrsprachig[1]; + + return $status; + } + + /** + * Approve Anrechnung. + * Checks last status of Anrechnung and will only approve if last status is not approved or rejected. + * @param $anrechnung_id + * @return array + * @throws Exception + */ + public function approveAnrechnung($anrechnung_id) + { + // Check last Anrechnungstatus + if (!$result = getData($this->ci->AnrechnungModel->getLastAnrechnungstatus($anrechnung_id))[0]) + { + show_error(getError($result)); + } + + $status_kurzbz = $result->status_kurzbz; + + // Exit if already approved or rejected + if ($status_kurzbz == self::ANRECHNUNGSTATUS_APPROVED || $status_kurzbz == self::ANRECHNUNGSTATUS_REJECTED) + { + return success(false); // dont approve + } + + // Start DB transaction + $this->ci->db->trans_start(false); + + $stgl_uid = getAuthUID(); + + // Insert new status approved + $this->ci->AnrechnungModel->saveAnrechnungstatus($anrechnung_id, self::ANRECHNUNGSTATUS_APPROVED); + + // Update genehmigt von + $this->ci->AnrechnungModel->update( + $anrechnung_id, + array( + 'genehmigt_von' => $stgl_uid + ) + ); + + // Transaction complete + $this->ci->db->trans_complete(); + + if ($this->ci->db->trans_status() === false) + { + $this->ci->db->trans_rollback(); + return error($result->msg, EXIT_ERROR); + } + + return success(true); // approved + } + + /** + * Reject Anrechnung. + * @param $anrechnung_id + * @return array + */ + public function rejectAnrechnung($anrechnung_id, $begruendung) + { + // Check last Anrechnungstatus + if (!$result = getData($this->ci->AnrechnungModel->getLastAnrechnungstatus($anrechnung_id))[0]) + { + show_error(getError($result)); + } + + $status_kurzbz = $result->status_kurzbz; + + // Exit if already approved or rejected + if ($status_kurzbz == self::ANRECHNUNGSTATUS_APPROVED || $status_kurzbz == self::ANRECHNUNGSTATUS_REJECTED) + { + return success(false); // dont reject + } + + // Insert new status rejected + $result = $this->ci->AnrechnungModel->saveAnrechnungstatus($anrechnung_id, self::ANRECHNUNGSTATUS_REJECTED); + + if (isError($result)) + { + show_error(getError($result)); + } + + // Add begruendung as notiz + $this->ci->load->model('person/Notiz_model', 'NotizModel'); + $this->ci->NotizModel->addNotizForAnrechnung( + $anrechnung_id, + self::ANRECHNUNG_NOTIZTITEL_NOTIZ_BY_STGL, + $begruendung, + getAuthUID() + ); + + return success(true); // rejected + } + + /** + * Request recommendation. + * @param $anrechnung_id + * @return array + */ + public function requestRecommendation($anrechnung_id) + { + // Check last Anrechnungstatus + if (!$result = getData($this->ci->AnrechnungModel->getLastAnrechnungstatus($anrechnung_id))[0]) + { + show_error(getError($result)); + } + + $status_kurzbz = $result->status_kurzbz; + + // Exit if already approved or rejected or processed by lector + if ($status_kurzbz == self::ANRECHNUNGSTATUS_APPROVED + || $status_kurzbz == self::ANRECHNUNGSTATUS_REJECTED + || $status_kurzbz == self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR) + { + return success(false); // dont ask for recommendation + } + + // Start DB transaction + $this->ci->db->trans_start(false); + + // Insert new status inProgressLektor + $result = $this->ci->AnrechnungModel->saveAnrechnungstatus($anrechnung_id, self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR); + + /** + * Anyway update empfehlung_anrechnung to be null + * Regardless of what empfehlung_anrechnung was already set (true/false/null), it should be (reset to ) null by + * requesting a (new) recommendation. + * **/ + $this->ci->AnrechnungModel->update( + $anrechnung_id, + array( + 'empfehlung_anrechnung' => null + ) + ); + + // Transaction complete + $this->ci->db->trans_complete(); + + if ($this->ci->db->trans_status() === false) + { + $this->ci->db->trans_rollback(); + return error($result->msg, EXIT_ERROR); + } + + return success(true); // recommended + } + + /** + * Recommend Anrechnung. + * @param $anrechnung_id + * @return array + * @throws Exception + */ + public function recommendAnrechnung($anrechnung_id) + { + // Check last Anrechnungstatus + if (!$result = getData($this->ci->AnrechnungModel->getLastAnrechnungstatus($anrechnung_id))[0]) + { + show_error(getError($result)); + } + + $status_kurzbz = $result->status_kurzbz; + + // Exit if already approved or rejected + if ($status_kurzbz == self::ANRECHNUNGSTATUS_APPROVED || $status_kurzbz == self::ANRECHNUNGSTATUS_REJECTED) + { + return success(false); // dont approve + } + + // Start DB transaction + $this->ci->db->trans_start(false); + + // Insert new status progessed by stgl + $this->ci->AnrechnungModel->saveAnrechnungstatus($anrechnung_id, self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL); + + // Update empfehlung_anrechnung + $this->ci->AnrechnungModel->update( + $anrechnung_id, + array( + 'empfehlung_anrechnung' => true + ) + ); + + // Transaction complete + $this->ci->db->trans_complete(); + + if ($this->ci->db->trans_status() === false) + { + $this->ci->db->trans_rollback(); + return error($result->msg, EXIT_ERROR); + } + + return success(true); // recommended + } + + /** + * Do not recommend Anrechnung. + * @param $anrechnung_id + * @return array + * @throws Exception + */ + public function dontRecommendAnrechnung($anrechnung_id, $begruendung) + { + // Check last Anrechnungstatus + if (!$result = getData($this->ci->AnrechnungModel->getLastAnrechnungstatus($anrechnung_id))[0]) + { + show_error(getError($result)); + } + + $status_kurzbz = $result->status_kurzbz; + + // Exit if already approved or rejected + if ($status_kurzbz == self::ANRECHNUNGSTATUS_APPROVED || $status_kurzbz == self::ANRECHNUNGSTATUS_REJECTED) + { + return success(false); // dont approve + } + + // Start DB transaction + $this->ci->db->trans_start(false); + + // Insert new status progessed by stgl + $this->ci->AnrechnungModel->saveAnrechnungstatus($anrechnung_id, self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL); + + // Update empfehlung_anrechnung + $this->ci->AnrechnungModel->update( + $anrechnung_id, + array( + 'empfehlung_anrechnung' => false + ) + ); + + $lektor_uid = getAuthUID(); + + // Add begruendung as notiz + $this->ci->load->model('person/Notiz_model', 'NotizModel'); + $this->ci->NotizModel->addNotizForAnrechnung( + $anrechnung_id, + self::ANRECHNUNG_NOTIZTITEL_NOTIZ_BY_LEKTOR, + $begruendung, + $lektor_uid + ); + + // Transaction complete + $this->ci->db->trans_complete(); + + if ($this->ci->db->trans_status() === false) + { + $this->ci->db->trans_rollback(); + return error($result->msg, EXIT_ERROR); + } + + return success(true); // recommended + } + + // Return an object with Anrechnungdata + private function _setAnrechnungDataObject($anrechnung) + { + $anrechnung_data = new StdClass(); + + // Get Anrechnung data + $anrechnung_data->anrechnung_id = $anrechnung->anrechnung_id; + $anrechnung_data->prestudent_id = $anrechnung->prestudent_id; + $anrechnung_data->lehrveranstaltung_id = $anrechnung->lehrveranstaltung_id; + $anrechnung_data->begruendung_id = $anrechnung->begruendung_id; + $anrechnung_data->anmerkung = $anrechnung->anmerkung_student; + $anrechnung_data->dms_id = $anrechnung->dms_id; + $anrechnung_data->insertamum = (new DateTime($anrechnung->insertamum))->format('d.m.Y'); + $anrechnung_data->insertvon= $anrechnung->insertvon; + $anrechnung_data->studiensemester_kurzbz= $anrechnung->studiensemester_kurzbz; + $anrechnung_data->empfehlung= $anrechnung->empfehlung_anrechnung; + + // Get last status_kurzbz + $result = $this->ci->AnrechnungModel->getLastAnrechnungstatus($anrechnung->anrechnung_id); + $anrechnung_data->status_kurzbz = $result->retval[0]->status_kurzbz; + + // Get last status bezeichnung in the users language + $anrechnung_data->status = $this->getLastAnrechnungstatus($anrechnung->anrechnung_id); + + + // Get document name + $this->ci->DmsVersionModel->addSelect('name'); + $result = $this->ci->DmsVersionModel->loadWhere(array('dms_id' => $anrechnung->dms_id)); + + if (isError($result)) + { + show_error(getError($result)); + } + + $anrechnung_data->dokumentname = $result->retval[0]->name; + + return $anrechnung_data; + } +} diff --git a/application/libraries/DmsLib.php b/application/libraries/DmsLib.php index f32df5fd1..da0dd84b6 100644 --- a/application/libraries/DmsLib.php +++ b/application/libraries/DmsLib.php @@ -6,6 +6,9 @@ class DmsLib { const FILE_CONTENT_PROPERTY = 'file_content'; + const FILE_INPUT_NAME = 'uploadfile'; // name of the HTML input tag containing the uploaded file + private $UPLOAD_PATH = DMS_PATH; // temporary directory to store the upload file + /** * Object initialization */ @@ -93,6 +96,84 @@ class DmsLib return $result; } + /** + * Uploads a document and saves it to DMS + * @param $dms DMS assoc array + * @param array $allowed_types Default: all. Param example: array(jpg, pdf) + * @return array + */ + public function upload($dms, $allowed_types = array('*')) + { + // Init upload configs + $this->_loadUploadLibrary($allowed_types); + + if (!$this->ci->upload->do_upload(DmsLib::FILE_INPUT_NAME)) + { + return error($this->ci->upload->display_errors()); + } + + $upload_data = $this->ci->upload->data(); // data about the uploaded file + $filename = $upload_data['file_name']; + + // Insert to DMS table + if (!$result = $this->ci->DmsModel->insert($this->ci->DmsModel->filterFields($dms))) + { + return error('Failed inserting to DMS'); + } + $upload_data['dms_id'] = $result->retval; + + // Insert DMS version + if (!$result = $this->ci->DmsVersionModel->insert( + $this->ci->DmsVersionModel->filterFields($dms, $result->retval, $filename))) + { + return error('Failed inserting DMS version'); + } + + // return result of uploaded data + return success($upload_data); // data about the uploaded file + } + + /** + * Download a document + * @param $dms_id + */ + public function download($dms_id) + { + if (!is_numeric($dms_id)) + { + show_error('Wrong parameter'); + } + + $this->ci->DmsVersionModel->addSelect('filename'); + $result = $this->ci->DmsVersionModel->loadWhere(array('dms_id' => $dms_id)); + + if (isError($result)) + { + show_error(getError($result)); + } + + $filename = $result->retval[0]->filename; + $file = DMS_PATH. $filename; + + if (file_exists($file)) + { + $finfo = new finfo(FILEINFO_MIME); + + header('Content-Description: File Transfer'); + header('Content-Type: '.$finfo->file($file)); + header('Expires: 0'); + header('Cache-Control: must-revalidate'); + header('Pragma: public'); + header('Content-Length: ' . filesize($file)); + readfile($file); + exit; + } + else + { + show_error('File does not exist'); + } + } + /** * Saves a Document * @param object $dms DMS Object ot be saved. @@ -302,4 +383,18 @@ class DmsLib return $result; } + + /** + * Loads the upload library of CI + */ + private function _loadUploadLibrary($allowed_types) + { + $config['upload_path'] = $this->UPLOAD_PATH; + $config['allowed_types'] = implode('|', $allowed_types); + $config['overwrite'] = true; + $config['file_name'] = uniqid().'.pdf'; + + $this->ci->load->library('upload', $config); + $this->ci->upload->initialize($config); + } } diff --git a/application/models/crm/Student_model.php b/application/models/crm/Student_model.php index 532658208..4d1c84521 100644 --- a/application/models/crm/Student_model.php +++ b/application/models/crm/Student_model.php @@ -45,4 +45,25 @@ class Student_model extends DB_Model $max += 1; return $matrikelnummer.sprintf("%03d", $max); } + + /** + * Get students UID by PrestudentID. + * @param $prestudent_id + * @return mixed + */ + public function getUID($prestudent_id) + { + $this->addSelect('student_uid'); + + $result = $this->loadWhere( + array('prestudent_id' => $prestudent_id) + ); + + if (!hasData($result)) + { + show_error('Failed getting UID by prestudent_id'); + } + + return $result->retval[0]->student_uid; + } } diff --git a/application/models/education/Anrechnung_model.php b/application/models/education/Anrechnung_model.php index f16310fe4..b4c7de835 100644 --- a/application/models/education/Anrechnung_model.php +++ b/application/models/education/Anrechnung_model.php @@ -11,4 +11,76 @@ class Anrechnung_model extends DB_Model $this->dbTable = 'lehre.tbl_anrechnung'; $this->pk = 'anrechnung_id'; } + + /** + * Save Anrechnungstatus. + * @param $anrechnung_id + * @param $status_kurzbz + * @return array|null + */ + public function saveAnrechnungstatus($anrechnung_id, $status_kurzbz) + { + $qry = ' + INSERT INTO lehre.tbl_anrechnung_anrechnungstatus ( + anrechnung_id, status_kurzbz, insertvon + ) VALUES ( ?, ?, ?); + '; + + return $this->execQuery($qry, array($anrechnung_id, $status_kurzbz, getAuthUID())); + } + + /** + * Get the last inserted Anrechnungstatus + * @param $anrechnung_id + * @return array|null + */ + public function getLastAnrechnungstatus($anrechnung_id, $status_kurzbz = null) + { + if (is_string($status_kurzbz)) + { + $qry = ' + SELECT * + FROM lehre.tbl_anrechnungstatus + JOIN lehre.tbl_anrechnung_anrechnungstatus USING (status_kurzbz) + WHERE anrechnung_id = ? + AND status_kurzbz = ? + ORDER BY insertamum DESC + LIMIT 1 + '; + + return $this->execQuery($qry, array($anrechnung_id, $status_kurzbz)); + } + + + $qry = ' + SELECT * + FROM lehre.tbl_anrechnungstatus + JOIN lehre.tbl_anrechnung_anrechnungstatus USING (status_kurzbz) + WHERE anrechnung_id = ? + ORDER BY insertamum DESC + LIMIT 1 + '; + + return $this->execQuery($qry, array($anrechnung_id)); + } + + /** + * Get status approved / rejected, if present. + * @param $anrechnung_id + * @return array|null + */ + public function getApprovedOrRejected($anrechnung_id) + { + $qry = ' + SELECT * + FROM lehre.tbl_anrechnungstatus + JOIN lehre.tbl_anrechnung_anrechnungstatus USING (status_kurzbz) + WHERE anrechnung_id = ? + AND (status_kurzbz = \'approved\' OR status_kurzbz = \'rejected\') + ORDER BY insertamum DESC + LIMIT 1 + '; + + return $this->execQuery($qry, array($anrechnung_id)); + } } diff --git a/application/models/education/Anrechnungstatus_model.php b/application/models/education/Anrechnungstatus_model.php new file mode 100644 index 000000000..6ae5ffd22 --- /dev/null +++ b/application/models/education/Anrechnungstatus_model.php @@ -0,0 +1,15 @@ +dbTable = 'lehre.tbl_anrechnungstatus'; + $this->pk = 'status_kurzbz'; + } +} diff --git a/application/models/education/Lehrveranstaltung_model.php b/application/models/education/Lehrveranstaltung_model.php index d80d02b41..ef5373f5f 100644 --- a/application/models/education/Lehrveranstaltung_model.php +++ b/application/models/education/Lehrveranstaltung_model.php @@ -273,4 +273,24 @@ class Lehrveranstaltung_model extends DB_Model return $this->execQuery($query, $parametersarray); } + + /** + * Gets Lehrveranstaltung and its Lehreinheiten (multiple rows possible). + * Returns empty array if student has no Lehrveranstaltung. + * @param $uid + * @param $studiensemester_kurzbz + * @param $lehrveranstaltung_id + * @return array|null + */ + public function getLvByStudent($uid, $studiensemester_kurzbz, $lehrveranstaltung_id) + { + $query = ' + SELECT * FROM campus.vw_student_lehrveranstaltung + WHERE uid = ? + AND studiensemester_kurzbz = ? + AND lehrveranstaltung_id = ?; + '; + + return $this->execQuery($query, array($uid, $studiensemester_kurzbz, $lehrveranstaltung_id)); + } } diff --git a/application/models/education/Zeugnisnote_model.php b/application/models/education/Zeugnisnote_model.php index 153a170e1..7ed0e6456 100644 --- a/application/models/education/Zeugnisnote_model.php +++ b/application/models/education/Zeugnisnote_model.php @@ -10,5 +10,6 @@ class Zeugnisnote_model extends DB_Model parent::__construct(); $this->dbTable = 'lehre.tbl_zeugnisnote'; $this->pk = array('studiensemester_kurzbz', 'student_uid', 'lehrveranstaltung_id'); + $this->hasSequence = false; } } diff --git a/application/models/organisation/Studiengang_model.php b/application/models/organisation/Studiengang_model.php index 1c9c6e944..8b8be0366 100644 --- a/application/models/organisation/Studiengang_model.php +++ b/application/models/organisation/Studiengang_model.php @@ -448,4 +448,37 @@ class Studiengang_model extends DB_Model return $this->execQuery($query, array($typ)); } + + /** + * Get Studiengangsleitung + * @param null $studiengang_kz + * @return array + */ + public function getLeitung($studiengang_kz = null) + { + $this->addSelect('uid, studiengang_kz, oe_kurzbz, vorname, nachname, email'); + $this->addJoin('public.tbl_benutzerfunktion', 'oe_kurzbz'); + $this->addJoin('public.tbl_benutzer', 'uid'); + $this->addJoin('public.tbl_person', 'person_id'); + + if (is_null($studiengang_kz)) + { + $condition = ' + funktion_kurzbz = \'Leitung\' + AND ( datum_von <= NOW() OR datum_von IS NULL ) + AND ( datum_bis >= NOW() OR datum_bis IS NULL ) + '; + } + elseif (is_numeric($studiengang_kz)) + { + $condition = ' + funktion_kurzbz = \'Leitung\' + AND ( datum_von <= NOW() OR datum_von IS NULL ) + AND ( datum_bis >= NOW() OR datum_bis IS NULL ) + AND studiengang_kz = ' . $this->db->escape($studiengang_kz, FHC_INTEGER) + ; + } + + return $this->loadWhere($condition); + } } diff --git a/application/models/person/Notiz_model.php b/application/models/person/Notiz_model.php index a5453aaa1..2e09875d8 100644 --- a/application/models/person/Notiz_model.php +++ b/application/models/person/Notiz_model.php @@ -158,6 +158,76 @@ class Notiz_model extends DB_Model return $this->loadWhere(array('person_id' => $person_id, 'titel LIKE' => $titel)); } + + /** + * Add a Notiz for a given Anrechnung + * @param $anrechnung_id + * @param $titel + * @param $text + * @param $verfasser_uid + * @return array + */ + public function addNotizForAnrechnung($anrechnung_id, $titel, $text, $verfasser_uid) + { + // Loads model Notizzuordnung_model + $this->load->model('person/Notizzuordnung_model', 'NotizzuordnungModel'); + + // Start DB transaction + $this->db->trans_start(false); + + $result = $this->insert(array( + 'titel' => $titel, + 'text' => $text, + 'erledigt' => true, + 'verfasser_uid' => $verfasser_uid, + "insertvon" => $verfasser_uid + )); + + if (isSuccess($result)) + { + $notiz_id = $result->retval; + $result = $this->NotizzuordnungModel->insert(array('notiz_id' => $notiz_id, 'anrechnung_id' => $anrechnung_id)); + } + + // Transaction complete! + $this->db->trans_complete(); + + // Check if everything went ok during the transaction + if ($this->db->trans_status() === false || isError($result)) + { + $this->db->trans_rollback(); + $result = error($result->msg, EXIT_ERROR); + } + else + { + $this->db->trans_commit(); + $result = success($notiz_id); + } + + return $result; + } + + /** + * Get Notizen by Anrechnung and title ordered last first + * + * @param $anrechnung_id + * @return array + */ + public function getNotizByAnrechnung($anrechnung_id, $titel = null) + { + $this->addJoin('public.tbl_notizzuordnung', 'notiz_id'); + $this->addOrder('insertamum', 'DESC'); + + if (is_string($titel)) + { + return $this->loadWhere(array( + 'anrechnung_id' => $anrechnung_id, + 'titel' => $titel + )); + } + + return $this->loadWhere(array('anrechnung_id' => $anrechnung_id)); + } // ------------------------------------------------------------------------------------------------------ } diff --git a/application/models/person/Person_model.php b/application/models/person/Person_model.php index d8ddb381c..e005e243c 100644 --- a/application/models/person/Person_model.php +++ b/application/models/person/Person_model.php @@ -191,7 +191,7 @@ class Person_model extends DB_Model */ public function getByUid($uid) { - $this->addSelect('vorname, nachname, gebdatum, person_id'); + $this->addSelect('vorname, nachname, gebdatum, person_id, bpk, matr_nr'); $this->addJoin('tbl_benutzer', 'person_id'); return $this->loadWhere(array('uid' => $uid)); @@ -248,4 +248,19 @@ class Person_model extends DB_Model return $this->execQuery($qry, $parametersArray); } + + /** + * Get full name of given uid. (Vorname Nachname) + * @param $uid + * @return array + */ + public function getFullName($uid) + { + if (!$result = getData($this->getByUid($uid))[0]) + { + show_error('Failed loading person'); + } + + return success($result->vorname. ' '. $result->nachname); + } } diff --git a/application/views/lehre/anrechnung/approveAnrechnungDetail.php b/application/views/lehre/anrechnung/approveAnrechnungDetail.php new file mode 100644 index 000000000..75059ec69 --- /dev/null +++ b/application/views/lehre/anrechnung/approveAnrechnungDetail.php @@ -0,0 +1,359 @@ +load->view( + 'templates/FHC-Header', + array( + 'title' => $this->p->t('anrechnung', 'anrechnungenGenehmigen'), + 'jquery' => true, + 'jqueryui' => true, + 'bootstrap' => true, + 'fontawesome' => true, + 'ajaxlib' => true, + 'dialoglib' => true, + 'phrases' => array( + 'global' => array( + 'anerkennungNachgewiesenerKenntnisse', + 'antragStellen' + ), + 'ui' => array( + 'hilfeZuDieserSeite', + 'hochladen', + 'nichtSelektierbarAufgrundVon', + 'nichtSelektierbarAufgrundVon', + 'systemfehler', + 'bitteMindEinenAntragWaehlen', + 'bitteBegruendungAngeben', + 'empfehlungWurdeAngefordert', + 'anrechnungenWurdenGenehmigt', + 'anrechnungenWurdenAbgelehnt' + ), + 'person' => array( + 'student', + 'personenkennzeichen' + ), + 'lehre' => array( + 'studiensemester', + 'studiengang', + 'lehrveranstaltung', + 'ects', + 'lektor', + ) + ), + 'customCSSs' => array( + 'public/css/Tabulator.css' + ), + 'customJSs' => array( + 'public/js/bootstrapper.js', + 'public/js/lehre/anrechnung/approveAnrechnungDetail.js' + + ) + ) +); +?> + + +
+
+ +
+ +
+ +
+
+
+
+ + +
+
+
+
+ p->t('anrechnung', 'antrag'); ?>  + + + + p->t('anrechnung', 'antragdatum'); ?>: anrechnung_id) ? $anrechnungData->insertamum : '-' ?> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
p->t('person', 'student')); ?>vorname . ' ' . $antragData->nachname; ?>
p->t('person', 'personenkennzeichen'); ?>matrikelnr ?>
p->t('lehre', 'studiensemester')); ?>studiensemester_kurzbz ?>
p->t('lehre', 'studiengang')); ?>stg_bezeichnung ?>
p->t('lehre', 'lehrveranstaltung'); ?>lv_bezeichnung ?>
p->t('lehre', 'ects'); ?>ects ?>
p->t('lehre', 'lektorInnen'); ?> + lektoren) - 1 ?> + lektoren as $key => $lektor): ?> + vorname . ' ' . $lektor->nachname; + echo $key === $len ? '' : ', ' ?> + +
p->t('anrechnung', 'herkunftDerKenntnisse'); ?>anmerkung ?>
p->t('anrechnung', 'nachweisdokumente'); ?> + dokumentname) ?> +
+
+
+
+ +
+
+
+ +
+ +
+ p->t('anrechnung', 'empfehlung'); ?>  + + +p->t('anrechnung', 'empfehlungInfoTooltipText'); ?> + + +
+ p->t('anrechnung', 'empfehlungVon'); ?>: + empfehlung_von ?> +  |  + p->t('anrechnung', 'empfehlungdatum'); ?>: + empfehlung_am ?> +
+
+ +
+ +
+ p->t('anrechnung', 'keineEmpfehlungAngefordert'); ?> +
+ +
+ p->t('anrechnung', 'empfehlungAngefordertNochKeineEmpfehlung'); ?> + + empfehlung_angefordert_am ?> + . +
+ +
+ p->t('anrechnung', 'empfehlungPositivConfirmed'); ?> +
+ +
+
+ p->t('anrechnung', 'empfehlungNegativConfirmed'); ?> +
+
p->t('global', 'begruendung'); ?> + : + notiz) ?> +
+
+
+
+
+
+ +
+
+
+

+ +
+
+ +
+ +
+ p->t('anrechnung', 'genehmigung'); ?>  + + +p->t('anrechnung', 'genehmigungInfoTooltipText'); ?> + + +
+ p->t('anrechnung', 'abgeschlossenVon'); ?>: + abgeschlossen_von ?> +  |  + p->t('anrechnung', 'abschlussdatum'); ?>: + abgeschlossen_am ?> + +
+
+ +
+ +
+ p->t('anrechnung', 'nochKeineGenehmigung'); ?> +
+ +
+ p->t('anrechnung', 'genehmigungPositiv'); ?> +
+ +
+
+ p->t('anrechnung', 'genehmigungNegativ'); ?> +
+
p->t('global', 'begruendung'); ?> + : + notiz) ?> +
+
+
+
+
+ + + +
+
+
+ +
+
+ +
+
+ +
+ + +
+ +
+ +
+
+ Status: + + status; ?> + +
+
+ load->view('lehre/anrechnung/reviewAnrechnungInfo'); ?> +
+
+ +
+
+ + +load->view('templates/FHC-Footer'); ?> diff --git a/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php b/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php new file mode 100644 index 000000000..91d821fde --- /dev/null +++ b/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php @@ -0,0 +1,236 @@ +load->view( + 'templates/FHC-Header', + array( + 'title' => $this->p->t('anrechnung', 'anrechnungenGenehmigen'), + 'jquery' => true, + 'jqueryui' => true, + 'bootstrap' => true, + 'fontawesome' => true, + 'tabulator' => true, + 'ajaxlib' => true, + 'dialoglib' => true, + 'tablewidget' => true, + 'phrases' => array( + 'global' => array( + 'begruendung' + ), + 'anrechnung' => array( + 'nachweisdokumente', + 'empfehlung', + 'confirmTextAntragHatBereitsEmpfehlung', + 'herkunft' + ), + 'ui' => array( + 'anzeigen', + 'alleAnzeigen', + 'hilfeZuDieserSeite', + 'hochladen', + 'spaltenEinstellen', + 'hilfeZuDieserSeite', + 'alleAuswaehlen', + 'alleAbwaehlen', + 'ausgewaehlteZeilen', + 'hilfe', + 'tabelleneinstellungen', + 'keineDatenVorhanden', + 'spaltenEinstellen', + 'ja', + 'nein', + 'nichtSelektierbarAufgrundVon', + 'nichtSelektierbarAufgrundVon', + 'systemfehler', + 'bitteMindEinenAntragWaehlen', + 'bitteBegruendungAngeben', + 'empfehlungWurdeAngefordert', + 'anrechnungenWurdenGenehmigt', + 'anrechnungenWurdenAbgelehnt' + ), + 'person' => array( + 'student', + 'personenkennzeichen', + 'vorname', + 'nachname' + ), + 'lehre' => array( + 'studiensemester', + 'studiengang', + 'lehrveranstaltung', + 'ects', + 'lektor', + ), + 'table' => array( + 'spaltenEinAusblenden', + 'spaltenEinAusblendenMitKlickOeffnen', + 'spaltenEinAusblendenAufEinstellungenKlicken', + 'spaltenEinAusblendenMitKlickAktivieren', + 'spaltenEinAusblendenMitKlickSchliessen', + 'spaltenbreiteVeraendern', + 'spaltenbreiteVeraendernText', + 'spaltenbreiteVeraendernInfotext', + 'zeilenAuswaehlen', + 'zeilenAuswaehlenEinzeln', + 'zeilenAuswaehlenBereich', + 'zeilenAuswaehlenAlle' + ) + ), + 'customJSs' => array( + 'public/js/bootstrapper.js', + 'public/js/lehre/anrechnung/approveAnrechnungUebersicht.js' + ) + ) +); +?> + + +
+
+ +
+ +
+ +
+
+
+
+ widgetlib->widget( + 'Studiensemester_widget', + array( + DropdownWidget::SELECTED_ELEMENT => $studiensemester_selected + ), + array( + 'name' => 'studiensemester', + 'id' => 'studiensemester' + ) + ); + ?> +
+ +
+
+
+ +
+
+ load->view('lehre/anrechnung/approveAnrechnungUebersichtData.php'); ?> +
+
+ +
+ + +
+ +
+ +
+ +
+ +
+
+ + + +
+
+
+
+
+ + +load->view('templates/FHC-Footer'); ?> diff --git a/application/views/lehre/anrechnung/approveAnrechnungUebersichtData.php b/application/views/lehre/anrechnung/approveAnrechnungUebersichtData.php new file mode 100644 index 000000000..0ee3fdc57 --- /dev/null +++ b/application/views/lehre/anrechnung/approveAnrechnungUebersichtData.php @@ -0,0 +1,128 @@ +>' . $LANGUAGE_INDEX . ' AS "status_bezeichnung" + FROM anrechnungen + JOIN lehre.tbl_anrechnungstatus as anrechnungstatus ON (anrechnungstatus.status_kurzbz = anrechnungen.status_kurzbz) + WHERE studiensemester_kurzbz = \'' . $STUDIENSEMESTER . '\' + AND studiengang_kz IN (' . $STUDIENGAENGE_ENTITLED . ') +'; + +$filterWidgetArray = array( + 'query' => $query, + 'tableUniqueId' => 'approveAnrechnungUebersicht', + 'requiredPermissions' => 'lehre/anrechnung_genehmigen', + 'datasetRepresentation' => 'tabulator', + 'columnsAliases' => array( + 'anrechnung_id', + 'lehrveranstaltung_id', + 'begruendung_id', + 'dms_id', + 'studiensemester_kurzbz', + 'studiengang_kz', + ucfirst($this->p->t('lehre', 'studiengang')), + ucfirst($this->p->t('lehre', 'lehrveranstaltung')), + 'ECTS', + ucfirst($this->p->t('person', 'studentIn')), + ucfirst($this->p->t('global', 'begruendung')), + ucfirst($this->p->t('anrechnung', 'nachweisdokumente')), + ucfirst($this->p->t('anrechnung', 'herkunft')), + ucfirst($this->p->t('anrechnung', 'empfehlung')), + 'status_kurzbz', + 'Status' + ), + 'datasetRepOptions' => '{ + height: func_height(this), + layout: "fitColumns", // fit columns to width of table + persistentLayout:true, + persistentSort:true, + autoResize: false, // prevent auto resizing of table (false to allow adapting table size when cols are (de-)activated + headerFilterPlaceholder: " ", + index: "anrechnung_id", // assign specific column as unique id (important for row indexing) + selectable: true, // allow row selection + selectableRangeMode: "click", // allow range selection using shift end click on end of range + selectablePersistence:false, // deselect previously selected rows when table is filtered, sorted or paginated + tableBuilt: function(){ + func_tableBuilt(this); + }, + tableWidgetFooter: { + selectButtons: true + }, + selectableCheck: function(row){ + return func_selectableCheck(row); + }, + rowFormatter:function(row){ + func_rowFormatter(row); + }, + rowUpdated:function(row){ + func_rowUpdated(row); + }, + tooltips: function(cell){ + return func_tooltips(cell); + } + }', // tabulator properties + 'datasetRepFieldsDefs' => '{ + anrechnung_id: {visible: false}, + lehrveranstaltung_id: {visible: false}, + begruendung_id: {visible: false}, + dms_id: {visible: false}, + studiensemester_kurzbz: {visible: false}, + studiengang_kz: {visible: false}, + stg_bezeichnung: {headerFilter:"input"}, + lv_bezeichnung: {headerFilter:"input"}, + ects: {headerFilter:"input", align:"center"}, + student: {headerFilter:"input"}, + begruendung: {headerFilter:"input"}, + dokument_bezeichnung: {headerFilter:"input", formatter:"link", formatterParams:{ + labelField:"dokument_bezeichnung", + url:function(cell){return "'. current_url() .'/download?dms_id=" + cell.getData().dms_id}, + target:"_blank" + }}, + anmerkung_student: {headerFilter:"input"}, + empfehlung_anrechnung: {headerFilter:"input", align:"center", formatter: format_empfehlung_anrechnung, headerFilterFunc: hf_filterTrueFalse}, + status_kurzbz: {visible: false}, + status_bezeichnung: {headerFilter:"input"} + }', // col properties +); + +echo $this->widgetlib->widget('TableWidget', $filterWidgetArray); + +?> \ No newline at end of file diff --git a/application/views/lehre/anrechnung/requestAnrechnung.php b/application/views/lehre/anrechnung/requestAnrechnung.php new file mode 100644 index 000000000..5d6fa9a16 --- /dev/null +++ b/application/views/lehre/anrechnung/requestAnrechnung.php @@ -0,0 +1,242 @@ +load->view( + 'templates/FHC-Header', + array( + 'title' => $this->p->t('anrechnung', 'antragStellen'), + 'jquery' => true, + 'bootstrap' => true, + 'fontawesome' => true, + 'ajaxlib' => true, + 'dialoglib' => true, + 'phrases' => array( + 'global' => array( + 'anerkennungNachgewiesenerKenntnisse', + 'antragStellen' + ), + 'ui' => array( + 'hilfeZuDieserSeite', + 'hochladen' + ), + 'person' => array( + 'student', + 'personenkennzeichen' + ), + 'lehre' => array( + 'studiensemester', + 'studiengang', + 'lehrveranstaltung', + 'ects', + 'lektor', + ) + ), + 'customJSs' => array( + 'public/js/bootstrapper.js', + 'public/js/lehre/anrechnung/requestAnrechnung.js' + + ) + ) +); +?> + + + + +
+
+ +
+ +
+ + 'requestAnrechnung-form'], + ['lv_id' => $antragData->lv_id, 'studiensemester' => $antragData->studiensemester_kurzbz] + ); ?> +
+
+
+
+ +
+
+ +
+
+
+
+ p->t('anrechnung', 'antrag'); ?>  + + + + p->t('anrechnung', 'antragdatum'); ?>: anrechnung_id) ? $anrechnungData->insertamum : '-' ?> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
p->t('person', 'student')); ?>vorname . ' ' . $antragData->nachname; ?>
p->t('person', 'personenkennzeichen'); ?>matrikelnr ?>
p->t('lehre', 'studiensemester')); ?>studiensemester_kurzbz ?>
p->t('lehre', 'studiengang')); ?>stg_bezeichnung ?>
p->t('lehre', 'lehrveranstaltung'); ?>lv_bezeichnung ?>
p->t('lehre', 'ects'); ?>ects ?>
p->t('lehre', 'lektor')); ?> + lektoren) - 1 ?> + lektoren as $key => $lektor): ?> + vorname . ' ' . $lektor->nachname; + echo $key === $len ? '' : ', ' ?> + +
+
+
+
+ +
+
+
+ p->t('anrechnung', 'antragStellenText'); ?>  +
+ +
+
+ +
+
+
+
+ +
+
+
+
+ p->t('anrechnung', 'nachweisdokumente'); ?>  + + + +
+
+
+ > +
+ + + + dms_id)): ?> + dokumentname) ?> + +
+
+
+
+ +
+
+
+
+
+
+ p->t('anrechnung', 'herkunftDerKenntnisse'); ?>  + + + +
+
+ +
+
+
+
+
+
+ +
+ > +
+
+
+
+
+
+
+
+ Status: + + status; ?> + +
+ +
+ p->t('global', 'bearbeitungGesperrt'); ?> + anrechnung_id) ? ': ' . $this->p->t('anrechnung', 'deadlineUeberschritten') : ''; ?> +
+ +
+ load->view('lehre/anrechnung/requestAnrechnungImportant'); ?> +
+
+ +
+
+ + +load->view('templates/FHC-Footer'); ?> diff --git a/application/views/lehre/anrechnung/requestAnrechnungImportant.php b/application/views/lehre/anrechnung/requestAnrechnungImportant.php new file mode 100644 index 000000000..d157b22c2 --- /dev/null +++ b/application/views/lehre/anrechnung/requestAnrechnungImportant.php @@ -0,0 +1,53 @@ +
+ +
+ +
+
+ p->t('anrechnung', 'requestAnrechnungInfoFristenBody'); ?> +
+
+
+ +
+ +
+
+ p->t('anrechnung', 'requestAnrechnungInfoNachweisdokumenteBody'); ?> +
+
+
+ +
+ +
+
+ p->t('anrechnung', 'requestAnrechnungInfoHerkunftKenntnisseBody'); ?> +
+
+
+
\ No newline at end of file diff --git a/application/views/lehre/anrechnung/reviewAnrechnungDetail.php b/application/views/lehre/anrechnung/reviewAnrechnungDetail.php new file mode 100644 index 000000000..455c31e65 --- /dev/null +++ b/application/views/lehre/anrechnung/reviewAnrechnungDetail.php @@ -0,0 +1,278 @@ +load->view( + 'templates/FHC-Header', + array( + 'title' => $this->p->t('anrechnung', 'anrechnungenPruefen'), + 'jquery' => true, + 'jqueryui' => true, + 'bootstrap' => true, + 'fontawesome' => true, + 'ajaxlib' => true, + 'dialoglib' => true, + 'phrases' => array( + 'global' => array( + 'anerkennungNachgewiesenerKenntnisse', + 'antragStellen' + ), + 'ui' => array( + 'hilfeZuDieserSeite', + 'hochladen', + 'nichtSelektierbarAufgrundVon', + 'systemfehler', + 'bitteMindEinenAntragWaehlen', + 'bitteBegruendungAngeben', + 'anrechnungenWurdenEmpfohlen', + 'anrechnungenWurdenNichtEmpfohlen' + ), + 'person' => array( + 'student', + 'personenkennzeichen' + ), + 'lehre' => array( + 'studiensemester', + 'studiengang', + 'lehrveranstaltung', + 'ects', + 'lektor', + ) + ), + 'customCSSs' => array( + 'public/css/Tabulator.css' + ), + 'customJSs' => array( + 'public/js/bootstrapper.js', + 'public/js/lehre/anrechnung/reviewAnrechnungDetail.js' + + ) + ) +); +?> + + +
+
+ +
+ +
+ +
+
+
+
+ + +
+
+
+
+ p->t('anrechnung', 'antrag'); ?> +   + + + + p->t('anrechnung', 'antragdatum'); ?>: anrechnung_id) ? $anrechnungData->insertamum : '-' ?> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
p->t('person', 'student')); ?>vorname . ' ' . $antragData->nachname; ?>
p->t('person', 'personenkennzeichen'); ?>matrikelnr ?>
p->t('lehre', 'studiensemester')); ?>studiensemester_kurzbz ?>
p->t('lehre', 'studiengang')); ?>stg_bezeichnung ?>
p->t('lehre', 'lehrveranstaltung'); ?>lv_bezeichnung ?>
p->t('lehre', 'ects'); ?>ects ?>
p->t('lehre', 'lektorInnen'); ?> + lektoren) - 1 ?> + lektoren as $key => $lektor): ?> + vorname . ' ' . $lektor->nachname; + echo $key === $len ? '' : ', ' ?> + +
p->t('anrechnung', 'herkunftDerKenntnisse'); ?>anmerkung ?>
p->t('anrechnung', 'nachweisdokumente'); ?> + dokumentname) ?> +
+
+
+
+ +
+
+
+
+ p->t('anrechnung', 'empfehlung'); ?> +
+ p->t('anrechnung', 'empfehlungVon'); ?>: + empfehlung_von ?> +  |  + p->t('anrechnung', 'empfehlungdatum'); ?>: + empfehlung_am ?> + +
+
+
+ +
+ p->t('anrechnung', 'nochKeineEmpfehlung'); ?> +
+ +
+ p->t('anrechnung', 'empfehlungPositivConfirmed'); ?> +
+ +
+
+ p->t('anrechnung', 'empfehlungNegativConfirmed'); ?> +
+
p->t('global', 'begruendung'); ?> + : + notiz) ?> +
+
+
+
+
+ + + +
+
+
+
+
+
+
+ +
+ + +
+
+ +
+
+ Status: + + status; ?> + +
+
+ load->view('lehre/anrechnung/reviewAnrechnungInfo'); ?> +
+
+ +
+
+ + +load->view('templates/FHC-Footer'); ?> diff --git a/application/views/lehre/anrechnung/reviewAnrechnungInfo.php b/application/views/lehre/anrechnung/reviewAnrechnungInfo.php new file mode 100644 index 000000000..a89c9c987 --- /dev/null +++ b/application/views/lehre/anrechnung/reviewAnrechnungInfo.php @@ -0,0 +1,66 @@ +
+
+ +
+
+ p->t('anrechnung', 'reviewAnrechnungInfoFristenBody'); ?> +
+
+
+
+ +
+
+ p->t('anrechnung', 'reviewAnrechnungInfoAntragVoraussetungenBody'); ?> +
+
+
+
+ +
+
+ p->t('anrechnung', 'reviewAnrechnungInfoNachweisdokumenteBody'); ?> +
+
+
+
+ +
+
+ p->t('anrechnung', 'reviewAnrechnungInfoHerkunftKenntnisseBody'); ?> +
+
+
+
\ No newline at end of file diff --git a/application/views/lehre/anrechnung/reviewAnrechnungUebersicht.php b/application/views/lehre/anrechnung/reviewAnrechnungUebersicht.php new file mode 100644 index 000000000..55c82b4e3 --- /dev/null +++ b/application/views/lehre/anrechnung/reviewAnrechnungUebersicht.php @@ -0,0 +1,236 @@ +load->view( + 'templates/FHC-Header', + array( + 'title' => $this->p->t('anrechnung', 'anrechnungenPruefen'), + 'jquery' => true, + 'jqueryui' => true, + 'bootstrap' => true, + 'fontawesome' => true, + 'tabulator' => true, + 'ajaxlib' => true, + 'dialoglib' => true, + 'tablewidget' => true, + 'phrases' => array( + 'global' => array( + 'begruendung' + ), + 'anrechnung' => array( + 'nachweisdokumente', + 'empfehlung', + 'herkunft' + ), + 'ui' => array( + 'anzeigen', + 'alleAnzeigen', + 'hilfeZuDieserSeite', + 'hochladen', + 'spaltenEinstellen', + 'hilfeZuDieserSeite', + 'alleAuswaehlen', + 'alleAbwaehlen', + 'ausgewaehlteZeilen', + 'hilfe', + 'tabelleneinstellungen', + 'keineDatenVorhanden', + 'spaltenEinstellen', + 'ja', + 'nein', + 'nichtSelektierbarAufgrundVon', + 'systemfehler', + 'bitteMindEinenAntragWaehlen', + 'bitteBegruendungAngeben', + 'anrechnungenWurdenEmpfohlen', + 'anrechnungenWurdenNichtEmpfohlen' + ), + 'person' => array( + 'student', + 'personenkennzeichen', + 'vorname', + 'nachname' + ), + 'lehre' => array( + 'studiensemester', + 'studiengang', + 'lehrveranstaltung', + 'ects', + 'lektor', + ), + 'table' => array( + 'spaltenEinAusblenden', + 'spaltenEinAusblendenMitKlickOeffnen', + 'spaltenEinAusblendenAufEinstellungenKlicken', + 'spaltenEinAusblendenMitKlickAktivieren', + 'spaltenEinAusblendenMitKlickSchliessen', + 'spaltenbreiteVeraendern', + 'spaltenbreiteVeraendernText', + 'spaltenbreiteVeraendernInfotext', + 'zeilenAuswaehlen', + 'zeilenAuswaehlenEinzeln', + 'zeilenAuswaehlenBereich', + 'zeilenAuswaehlenAlle' + ) + ), + 'customJSs' => array( + 'public/js/bootstrapper.js', + 'public/js/lehre/anrechnung/reviewAnrechnungUebersicht.js' + ) + ) +); +?> + + +
+
+ +
+ +
+ +
+
+
+
+ widgetlib->widget( + 'Studiensemester_widget', + array( + DropdownWidget::SELECTED_ELEMENT => $studiensemester_selected + ), + array( + 'name' => 'studiensemester', + 'id' => 'studiensemester' + ) + ); + ?> +
+ +
+
+
+ +
+
+ load->view('lehre/anrechnung/reviewAnrechnungUebersichtData.php'); ?> +
+
+ +
+ + +
+ +
+ + +
+ +
+ + +
+
+ + +
+
+
+
+
+ + +load->view('templates/FHC-Footer'); ?> + diff --git a/application/views/lehre/anrechnung/reviewAnrechnungUebersichtData.php b/application/views/lehre/anrechnung/reviewAnrechnungUebersichtData.php new file mode 100644 index 000000000..7382df85b --- /dev/null +++ b/application/views/lehre/anrechnung/reviewAnrechnungUebersichtData.php @@ -0,0 +1,138 @@ +>' . $LANGUAGE_INDEX . ' AS "status_bezeichnung" + FROM anrechnungen + JOIN lehre.tbl_anrechnungstatus as anrechnungstatus ON (anrechnungstatus.status_kurzbz = anrechnungen.status_kurzbz) + JOIN lehre.tbl_lehreinheit le USING (lehrveranstaltung_id) + JOIN lehre.tbl_lehreinheitmitarbeiter lema USING (lehreinheit_id) + WHERE anrechnungen.studiensemester_kurzbz = \'' . $STUDIENSEMESTER . '\' + AND le.studiensemester_kurzbz = anrechnungen.studiensemester_kurzbz + AND lema.mitarbeiter_uid = \'' . $LEKTOR_UID . '\' + AND le.lehre = TRUE + AND EXISTS ( + SELECT 1 + FROM lehre.tbl_anrechnung_anrechnungstatus + WHERE anrechnung_id = anrechnungen.anrechnung_id + AND status_kurzbz=\'inProgressLektor\' + ) +'; + +$filterWidgetArray = array( + 'query' => $query, + 'tableUniqueId' => 'approveAnrechnungUebersicht', + 'requiredPermissions' => 'lehre/anrechnung_empfehlen', + 'datasetRepresentation' => 'tabulator', + 'columnsAliases' => array( + 'anrechnung_id', + 'lehrveranstaltung_id', + 'begruendung_id', + 'dms_id', + 'studiensemester_kurzbz', + 'studiengang_kz', + ucfirst($this->p->t('lehre', 'studiengang')), + ucfirst($this->p->t('lehre', 'lehrveranstaltung')), + 'ECTS', + ucfirst($this->p->t('person', 'studentIn')), + ucfirst($this->p->t('global', 'begruendung')), + ucfirst($this->p->t('anrechnung', 'nachweisdokumente')), + ucfirst($this->p->t('anrechnung', 'herkunft')), + ucfirst($this->p->t('anrechnung', 'empfehlung')), + 'status_kurzbz', + 'Status' + ), + 'datasetRepOptions' => '{ + height: func_height(this), + layout: "fitColumns", // fit columns to width of table + persistentLayout:true, + persistentSort:true, + autoResize: false, // prevent auto resizing of table (false to allow adapting table size when cols are (de-)activated + headerFilterPlaceholder: " ", + index: "anrechnung_id", // assign specific column as unique id (important for row indexing) + selectable: true, // allow row selection + selectableRangeMode: "click", // allow range selection using shift end click on end of range + selectablePersistence:false, // deselect previously selected rows when table is filtered, sorted or paginated + tableBuilt: function(){ + func_tableBuilt(this); + }, + tableWidgetFooter: { + selectButtons: true + }, + selectableCheck: function(row){ + return func_selectableCheck(row); + }, + rowFormatter:function(row){ + func_rowFormatter(row); + }, + rowUpdated:function(row){ + func_rowUpdated(row); + }, + tooltips: function(cell){ + return func_tooltips(cell); + } + }', // tabulator properties + 'datasetRepFieldsDefs' => '{ + anrechnung_id: {visible: false}, + lehrveranstaltung_id: {visible: false}, + begruendung_id: {visible: false}, + dms_id: {visible: false}, + studiensemester_kurzbz: {visible: false}, + studiengang_kz: {visible: false}, + stg_bezeichnung: {headerFilter:"input"}, + lv_bezeichnung: {headerFilter:"input"}, + ects: {headerFilter:"input", align:"center"}, + student: {headerFilter:"input"}, + begruendung: {headerFilter:"input"}, + dokument_bezeichnung: {headerFilter:"input", formatter:"link", formatterParams:{ + labelField:"dokument_bezeichnung", + url:function(cell){return "'. current_url() .'/download?dms_id=" + cell.getData().dms_id}, + target:"_blank" + }}, + anmerkung_student: {headerFilter:"input"}, + empfehlung_anrechnung: {headerFilter:"input", align:"center", formatter: format_empfehlung_anrechnung, headerFilterFunc: hf_filterTrueFalse}, + status_kurzbz: {visible: false}, + status_bezeichnung: {headerFilter:"input"} + }', // col properties +); + +echo $this->widgetlib->widget('TableWidget', $filterWidgetArray); + +?> \ No newline at end of file diff --git a/application/widgets/Studiengang_widget.php b/application/widgets/Studiengang_widget.php index 250f2a9bc..78444975a 100644 --- a/application/widgets/Studiengang_widget.php +++ b/application/widgets/Studiengang_widget.php @@ -8,7 +8,7 @@ class Studiengang_widget extends DropdownWidget $this->load->model('organisation/Studiengang_model', 'StudiengangModel'); $this->StudiengangModel->addOrder('kurzbzlang'); - $this->addSelectToModel($this->StudiengangModel, 'studiengang_kz', '\'(\' || upper(typ||kurzbz) || \') \' || tbl_studiengang.bezeichnung'); + $this->addSelectToModel($this->StudiengangModel, 'studiengang_kz', 'upper(typ||kurzbz) || \' - \' || tbl_studiengang.bezeichnung'); // If 'studiengang' (array of specific studiengaenge) is given, retrieve these studiengaenge only if (isset($widgetData['studiengang']) && !empty($widgetData['studiengang'])) diff --git a/cis/private/profile/dokumente.php b/cis/private/profile/dokumente.php index 298383f90..598c65148 100644 --- a/cis/private/profile/dokumente.php +++ b/cis/private/profile/dokumente.php @@ -30,6 +30,7 @@ require_once('../../../include/student.class.php'); require_once('../../../include/akte.class.php'); require_once('../../../include/datum.class.php'); require_once('../../../include/benutzerberechtigung.class.php'); +require_once('../../../include/webservicelog.class.php'); $sprache = getSprache(); $p = new phrasen($sprache); @@ -84,6 +85,19 @@ if(isset($_GET['action']) && $_GET['action']=='download') header("Content-type: $akte->mimetype"); header('Content-Disposition: attachment; filename="'.$akte->titel.'"'); echo base64_decode($akte->inhalt); + + //Log bei einem Download vom Becheid + if ((isset($akte->dokument_kurzbz) && !empty($akte->dokument_kurzbz)) && ($akte->dokument_kurzbz === 'Bescheid' || $akte->dokument_kurzbz === 'BescheidEng')) + { + $log = new Webservicelog(); + $log->webservicetyp_kurzbz = 'content'; + $log->request_id = (isset($akte->akte_id) && !empty($akte->akte_id)) ? $akte->akte_id : NULL; + $log->beschreibung = 'Bescheidbestaetigungsdownload'; + $log->request_data = $_SERVER['QUERY_STRING']; + $log->execute_user = get_uid(); + $log->save(true); + } + exit; } else diff --git a/config/global.config-default.inc.php b/config/global.config-default.inc.php index 496eb73cb..b31447994 100644 --- a/config/global.config-default.inc.php +++ b/config/global.config-default.inc.php @@ -26,6 +26,7 @@ define('CIS_LEHRVERANSTALTUNG_LEISTUNGSUEBERSICHT_ANZEIGEN',true); define('CIS_LEHRVERANSTALTUNG_SEMESTERINFO_ANZEIGEN',true); define('CIS_LEHRVERANSTALTUNG_LEHRFACH_ANZEIGEN',false); define('CIS_LEHRVERANSTALTUNG_GESAMTNOTE_ANZEIGEN', true); +define('CIS_LEHRVERANSTALTUNG_ANRECHNUNG_ANZEIGEN', true); // Im CIS Menue Links bei Modulen anzeigen wenn Lehrauftrag define('CIS_LEHRVERANSTALTUNG_MODULE_LINK',true); diff --git a/content/mitarbeiter/mitarbeiteroverlay.js.php b/content/mitarbeiter/mitarbeiteroverlay.js.php index d0aa4f40d..3495ce3c3 100644 --- a/content/mitarbeiter/mitarbeiteroverlay.js.php +++ b/content/mitarbeiter/mitarbeiteroverlay.js.php @@ -448,9 +448,32 @@ function MitarbeiterDetailDisableFields(val) document.getElementById('mitarbeiter-detail-checkbox-kleriker').disabled=val; } +function MitarbeiterCount() +{ + var tree = document.getElementById('mitarbeiter-tree'); + + //Alle markierten Personen holen + var start = {}; + var end = {}; + var numRanges = tree.view.selection.getRangeCount(); + var anzahl = 0; + + for (var t = 0; t < numRanges; t++) + { + tree.view.selection.getRangeAt(t, start, end); + for (var v = start.value; v <= end.value; v++) + { + anzahl = anzahl + 1; + } + } + return anzahl; +} + function MitarbeiterAuswahl() { - if(!MitarbeiterTreeLoadDataOnSelect) + document.getElementById('mitarbeiter-toolbar-label-anzahl').value = 'Anzahl: ' + MitarbeiterCount(); + + if(!MitarbeiterTreeLoadDataOnSelect) { MitarbeiterTreeLoadDataOnSelect=true; return true; diff --git a/content/student/studentoverlay.js.php b/content/student/studentoverlay.js.php index bea20cb8e..f034ae473 100644 --- a/content/student/studentoverlay.js.php +++ b/content/student/studentoverlay.js.php @@ -952,6 +952,27 @@ function StudentImageInfomail() } } +function StudentCount() +{ + var tree = document.getElementById('student-tree'); + + //Alle markierten Personen holen + var start = {}; + var end = {}; + var numRanges = tree.view.selection.getRangeCount(); + var anzahl = 0; + + for (var t = 0; t < numRanges; t++) + { + tree.view.selection.getRangeAt(t, start, end); + for (var v = start.value; v <= end.value; v++) + { + anzahl = anzahl + 1; + } + } + return anzahl; +} + // **** // * Auswahl eines Studenten // * bei Auswahl eines Studenten wird dieser geladen @@ -959,6 +980,8 @@ function StudentImageInfomail() // **** function StudentAuswahl() { + document.getElementById('student-toolbar-label-anzahl').value = 'Anzahl: ' + StudentCount(); + if(!StudentTreeLoadDataOnSelect) { StudentTreeLoadDataOnSelect=true; diff --git a/include/tw/cis_menu_lv.inc.php b/include/tw/cis_menu_lv.inc.php index b8c42da11..e91431a8e 100644 --- a/include/tw/cis_menu_lv.inc.php +++ b/include/tw/cis_menu_lv.inc.php @@ -421,7 +421,6 @@ function checkZeilenUmbruch() 'link'=>'../../../cms/news.php?studiengang_kz='.urlencode($studiengang_kz).'&semester='.urlencode($semester), 'text'=>$text ); - } if(!defined('CIS_LEHRVERANSTALTUNG_ABMELDUNG_ANZEIGEN') || CIS_LEHRVERANSTALTUNG_ABMELDUNG_ANZEIGEN) @@ -466,6 +465,20 @@ function checkZeilenUmbruch() } } + // Anerkennung nachgewiesener Kenntnisse (Anrechnung) + if((!defined('CIS_LEHRVERANSTALTUNG_ANRECHNUNG_ANZEIGEN') || CIS_LEHRVERANSTALTUNG_ANRECHNUNG_ANZEIGEN) + && $rechte->isBerechtigt('student/anrechnung_beantragen')) + { + $menu[]=array + ( + 'id'=>'core_menu_anerkennungNachgewiesenerKenntnisse', + 'position'=>'128', + 'name'=>$p->t('lehre/anrechnung'), + 'icon'=>'../../../skin/images/button_listen.png', + 'link' => APP_ROOT. 'index.ci.php/lehre/anrechnung/RequestAnrechnung?studiensemester='.urlencode($angezeigtes_stsem).'&lv_id='.urlencode($lvid) + ); + } + //************* Menuepunkte anzeigen **************** diff --git a/locale/de-AT/global.php b/locale/de-AT/global.php index ed46b88d0..586614ece 100644 --- a/locale/de-AT/global.php +++ b/locale/de-AT/global.php @@ -184,7 +184,8 @@ $this->phrasen['global/keineDatenGefunden']='Keine Daten gefunden'; $this->phrasen['global/erfolgreichAngelegt']='Erfolgreich angelegt'; $this->phrasen['global/keineSuchergebnisse']='Es liegen keine Daten zu Ihrer Suchanfrage vor'; $this->phrasen['global/bitteWaehlen']='Bitte wählen Sie'; -$this->phrasen['global/zusaetzlicheInformationen']='Zusätzliche Informationen'; +$this->phrasen['global/zusaetzlicheInformationen']='Zusätzliche Informationen'; + //infrastruktur diff --git a/locale/de-AT/lehre.php b/locale/de-AT/lehre.php index 46633c747..3f44edcb9 100644 --- a/locale/de-AT/lehre.php +++ b/locale/de-AT/lehre.php @@ -40,4 +40,6 @@ $this->phrasen['lehre/nichtzugeteilt']='Sie sind nicht zu dieser Lehrveranstaltu $this->phrasen['lehre/studienordnung']='Studienordnung'; $this->phrasen['lehre/studienplan']='Studienplan'; $this->phrasen['lehre/noteneingabedeaktiviert']='Noteneingabe deaktiviert'; +$this->phrasen['lehre/anerkennungNachgewiesenerKenntnisse']='Anerkennung nachgewiesener Kenntnisse'; +$this->phrasen['lehre/anrechnung']='Anrechnung'; ?> diff --git a/locale/en-US/global.php b/locale/en-US/global.php index f33cb77bb..5fa89acbb 100644 --- a/locale/en-US/global.php +++ b/locale/en-US/global.php @@ -182,7 +182,7 @@ $this->phrasen['global/keineDatenGefunden']='No data found'; $this->phrasen['global/erfolgreichAngelegt']='Created successfully'; $this->phrasen['global/keineSuchergebnisse']='No matches found'; $this->phrasen['global/bitteWaehlen']='Please select'; -$this->phrasen['global/zusaetzlicheInformationen']='Additional Informations'; +$this->phrasen['global/zusaetzlicheInformationen']='Additional Information'; //infrastruktur diff --git a/locale/en-US/lehre.php b/locale/en-US/lehre.php index 3fd6e5cd0..603492c84 100644 --- a/locale/en-US/lehre.php +++ b/locale/en-US/lehre.php @@ -40,4 +40,7 @@ $this->phrasen['lehre/nichtzugeteilt']='Sie sind nicht zu dieser Lehrveranstaltu $this->phrasen['lehre/studienordnung']='Studienordnung'; $this->phrasen['lehre/studienplan']='Studienplan'; $this->phrasen['lehre/noteneingabedeaktiviert']='Grading disabled'; +$this->phrasen['lehre/anerkennungNachgewiesenerKenntnisse']='Crediting for proven knowledge'; +$this->phrasen['lehre/anrechnung']='Exemption'; + ?> diff --git a/public/css/Tabulator.css b/public/css/Tabulator.css index 22eeb4f5c..e9045dc85 100644 --- a/public/css/Tabulator.css +++ b/public/css/Tabulator.css @@ -39,4 +39,34 @@ .btn-select-col-selected { background-color: #e6e6e6; +} + +.btn-w200 +{ + width: 200px; +} + +.btn-mr5 +{ + margin-right: 10px; +} + +.btn-mr10 +{ + margin-right: 10px; +} + +.btn-mr20 +{ + margin-right: 20px; +} + +.btn-mr40 +{ + margin-right: 40px; +} + +.btn-mr50 +{ + margin-right: 50px; } \ No newline at end of file diff --git a/public/js/lehre/anrechnung/approveAnrechnungDetail.js b/public/js/lehre/anrechnung/approveAnrechnungDetail.js new file mode 100644 index 000000000..3b80da205 --- /dev/null +++ b/public/js/lehre/anrechnung/approveAnrechnungDetail.js @@ -0,0 +1,288 @@ +const ANRECHNUNGSTATUS_PROGRESSED_BY_STGL = 'inProgressDP'; +const ANRECHNUNGSTATUS_PROGRESSED_BY_KF = 'inProgressKF'; +const ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR = 'inProgressLektor'; +const ANRECHNUNGSTATUS_APPROVED = 'approved'; +const ANRECHNUNGSTATUS_REJECTED = 'rejected'; + + + +$(function(){ + + const genehmigung_panel = $('#approveAnrechnungDetail-genehmigung-panel'); + const begruendung_panel = $('#approveAnrechnungDetail-begruendung-panel'); + + // Pruefen ob Promise unterstuetzt wird + // Tabulator funktioniert nicht mit IE + var canPromise = !! window.Promise; + if(!canPromise) + { + alert("Diese Seite kann mit ihrem Browser nicht angezeigt werden. Bitte verwenden Sie Firefox, Chrome oder Edge um die Seite anzuzeigen"); + window.location.href='about:blank'; + return; + } + + // Set status alert color + approveAnrechnungDetail.setStatusAlertColor(); + + // Init tooltips + approveAnrechnungDetail.initTooltips(); + + // Ask if Approve Anrechnungen + $("#approveAnrechnungDetail-approve-anrechnung-ask").click(function(){ + + begruendung_panel.css('display', 'none'); + + if (genehmigung_panel.is(":hidden")) + { + // Show begruendung panel if is hidden + genehmigung_panel.slideDown('slow'); + return; + } + }); + + // Approve Anrechnungen + $("#approveAnrechnungDetail-approve-anrechnung-confirm").click(function(){ + + // Get form data + let form_data = $('form').serializeArray(); + + // Prepare data object for ajax call + let data = { + 'data': [{ + 'anrechnung_id' : form_data[0].value + }] + }; + + // Hide genehmigung panel again + genehmigung_panel.slideUp('slow'); + + FHC_AjaxClient.ajaxCallPost( + FHC_JS_DATA_STORAGE_OBJECT.called_path + "/approve", + data, + { + successCallback: function (data, textStatus, jqXHR) + { + if (data.error && data.retval != null) + { + // Print error message + FHC_DialogLib.alertWarning(data.retval); + } + + if (!data.error && data.retval != null) + { + approveAnrechnungDetail.formatGenehmigungIsPositiv( + data.retval[0].abgeschlossen_am, + data.retval[0].abgeschlossen_von, + data.retval[0].status_bezeichnung + ); + } + }, + errorCallback: function (jqXHR, textStatus, errorThrown) + { + FHC_DialogLib.alertError(FHC_PhrasesLib.t("ui", "systemfehler")); + } + } + ); + }); + + // Ask if Reject Anrechnungen + $("#approveAnrechnungDetail-reject-anrechnung-ask").click(function(){ + + genehmigung_panel.css('display', 'none'); + + if (begruendung_panel.is(":hidden")) + { + // Show begruendung panel if is hidden + begruendung_panel.slideDown('slow'); + return; + } + }); + + // Reject Anrechnungen + $("#approveAnrechnungDetail-reject-anrechnung-confirm").click(function(){ + + let begruendung = $('#approveAnrechnungDetail-begruendung').val(); + + // Check if begruendung is given + if (!begruendung.trim()) // empty or white spaces only + { + FHC_DialogLib.alertInfo(FHC_PhrasesLib.t("ui", "bitteBegruendungAngeben")); + return; + } + + // Avoid form redirecting automatically + event.preventDefault(); + + // Get form data + let form_data = $('form').serializeArray(); + + // Prepare data object for ajax call + let data = { + 'data': [{ + 'anrechnung_id' : form_data[0].value, + 'begruendung' : begruendung + }] + } + + // Hide begruendung panel again + begruendung_panel.slideUp('slow'); + + FHC_AjaxClient.ajaxCallPost( + FHC_JS_DATA_STORAGE_OBJECT.called_path + "/reject", + data, + { + successCallback: function (data, textStatus, jqXHR) + { + if (data.error && data.retval != null) + { + // Print error message + FHC_DialogLib.alertWarning(data.retval); + } + + if (!data.error && data.retval != null) + { + approveAnrechnungDetail.formatGenehmigungIsNegativ( + data.retval[0].abgeschlossen_am, + data.retval[0].abgeschlossen_von, + data.retval[0].status_bezeichnung, + begruendung + ); + } + }, + errorCallback: function (jqXHR, textStatus, errorThrown) + { + FHC_DialogLib.alertError(FHC_PhrasesLib.t("ui", "systemfehler")); + } + } + ); + }); + + // Request Recommendation for Anrechnungen + $("#approveAnrechnungDetail-request-recommendation").click(function(){ + + // Get form data + let form_data = $('form').serializeArray(); + + + // Prepare data object for ajax call + let data = { + 'data': [{ + 'anrechnung_id' : form_data[0].value + }] + }; + + FHC_AjaxClient.ajaxCallPost( + FHC_JS_DATA_STORAGE_OBJECT.called_path + "/requestRecommendation", + data, + { + successCallback: function (data, textStatus, jqXHR) + { + if (data.error && data.retval != null) + { + // Print error message + FHC_DialogLib.alertWarning(data.retval); + } + + if (!data.error && data.retval != null) + { + approveAnrechnungDetail.formatEmpfehlungIsRequested( + data.retval[0].empfehlung_angefordert_am, + data.retval[0].status_bezeichnung + ); + } + }, + errorCallback: function (jqXHR, textStatus, errorThrown) + { + FHC_DialogLib.alertError(FHC_PhrasesLib.t("ui", "systemfehler")); + } + } + ); + }); + + // Copy Begruendung into textarea + $(".btn-copyIntoTextarea").click(function(){ + approveAnrechnungDetail.copyIntoTextarea(this); + }) + + // Break Genehmigung abgeben + $('#approveAnrechnungDetail-genehmigung-abbrechen').click(function(){ + genehmigung_panel.slideUp('slow'); + + }) + + // Break Begruendung abgeben + $('#approveAnrechnungDetail-begruendung-abbrechen').click(function(){ + $('#approveAnrechnungDetail-begruendung').val(''); + begruendung_panel.slideUp('slow'); + + }) + + +}); + +var approveAnrechnungDetail = { + setStatusAlertColor: function () { + let status_kurzbz = $('#approveAnrechnungDetail-status_kurzbz').data('status_kurzbz'); + + switch (status_kurzbz) { + case ANRECHNUNGSTATUS_APPROVED: + $('#approveAnrechnungDetail-status_kurzbz').closest('div').addClass('alert-success'); + break; + case ANRECHNUNGSTATUS_REJECTED: + $('#approveAnrechnungDetail-status_kurzbz').closest('div').addClass('alert-danger'); + break; + case '': + $('#approveAnrechnungDetail-status_kurzbz').closest('div').addClass('alert-info'); + break; + default: + $('#approveAnrechnungDetail-status_kurzbz').closest('div').addClass('alert-warning'); + } + }, + initTooltips: function (){ + $('[data-toggle="tooltip"]').tooltip({ + delay: { "show": 200, "hide": 200 }, + html: true + } + ); + }, + copyIntoTextarea: function(elem){ + + // Find closest textarea + let textarea = $(elem).closest('div').find('textarea'); + + // Copy begruendung into textarea + textarea.val($.trim($(elem).parent().find('span:first').text())); + }, + formatEmpfehlungIsRequested: function(empfehlungAngefordertAm, statusBezeichnung) { + $('#approveAnrechnungDetail-empfehlungDetail').children().addClass('hidden'); + $('#approveAnrechnungDetail-empfehlungDetail-empfehlungIsAngefordert').removeClass('hidden'); + $('#approveAnrechnungDetail-empfehlungDetail-empfehlungAngefordertAm').text(empfehlungAngefordertAm); + $('#approveAnrechnungDetail-status_kurzbz').text(statusBezeichnung); + $('#approveAnrechnungDetail-request-recommendation').prop('disabled', true); + $('#approveAnrechnungDetail-approve-anrechnung-ask').prop('disabled', true); + $('#approveAnrechnungDetail-reject-anrechnung-ask').prop('disabled', true); + }, + formatGenehmigungIsPositiv: function(abgeschlossenAm, abgeschlossenVon, statusBezeichnung){ + $('#approveAnrechnungDetail-genehmigungDetail').children().addClass('hidden'); + $('#approveAnrechnungDetail-genehmigungDetail-genehmigungIsPositiv').removeClass('hidden'); + $('#approveAnrechnungDetail-status_kurzbz').text(statusBezeichnung); + $('#approveAnrechnungDetail-status_kurzbz').closest('div').removeClass('alert-warning').addClass('alert-success'); + $('#approveAnrechnungDetail-abgeschlossenAm').text(abgeschlossenAm); + $('#approveAnrechnungDetail-abgeschlossenVon').text(abgeschlossenVon); + $('#approveAnrechnungDetail-request-recommendation').prop('disabled', true); + $('#approveAnrechnungDetail-approve-anrechnung-ask').prop('disabled', true); + $('#approveAnrechnungDetail-reject-anrechnung-ask').prop('disabled', true); + }, + formatGenehmigungIsNegativ: function(abgeschlossenAm, abgeschlossenVon, statusBezeichnung, begruendung){ + $('#approveAnrechnungDetail-genehmigungDetail').children().addClass('hidden'); + $('#approveAnrechnungDetail-genehmigungDetail-genehmigungIsNegativ').removeClass('hidden'); + $('#approveAnrechnungDetail-status_kurzbz').text(statusBezeichnung); + $('#approveAnrechnungDetail-status_kurzbz').closest('div').removeClass('alert-warning').addClass('alert-danger'); + $('#approveAnrechnungDetail-abgeschlossenAm').text(abgeschlossenAm); + $('#approveAnrechnungDetail-abgeschlossenVon').text(abgeschlossenVon); + $('#approveAnrechnungDetail-genehmigungDetail-begruendung').text(begruendung); + $('#approveAnrechnungDetail-request-recommendation').prop('disabled', true); + $('#approveAnrechnungDetail-approve-anrechnung-ask').prop('disabled', true); + $('#approveAnrechnungDetail-reject-anrechnung-ask').prop('disabled', true); + } +} \ No newline at end of file diff --git a/public/js/lehre/anrechnung/approveAnrechnungUebersicht.js b/public/js/lehre/anrechnung/approveAnrechnungUebersicht.js new file mode 100644 index 000000000..28c3b74e1 --- /dev/null +++ b/public/js/lehre/anrechnung/approveAnrechnungUebersicht.js @@ -0,0 +1,462 @@ +const BASE_URL = FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router; +const APPROVE_ANRECHNUNG_DETAIL_URI = "lehre/anrechnung/ApproveAnrechnungDetail"; + +const ANRECHNUNGSTATUS_PROGRESSED_BY_STGL = 'inProgressDP'; +const ANRECHNUNGSTATUS_PROGRESSED_BY_KF = 'inProgressKF'; +const ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR = 'inProgressLektor'; +const ANRECHNUNGSTATUS_APPROVED = 'approved'; +const ANRECHNUNGSTATUS_REJECTED = 'rejected'; + +const COLOR_LIGHTGREY = "#f5f5f5"; + +// TABULATOR FUNCTIONS +// --------------------------------------------------------------------------------------------------------------------- +// Returns relative height (depending on screen size) +function func_height(table){ + return $(window).height() * 0.50; +} + +// Filters boolean values +function hf_filterTrueFalse(headerValue, rowValue){ + + if ('ja'.startsWith(headerValue) || 'yes'.startsWith(headerValue)) + { + return rowValue == 'true'; + } + + if ('nein'.startsWith(headerValue) || 'no'.startsWith(headerValue)) + { + return rowValue == 'false'; + } + + if (headerValue = '-') + { + return rowValue == null; + } +} + +// Adds column details +function func_tableBuilt(table) { + table.addColumn( + { + title: "Details", + field: 'details', + align: "center", + width: 100, + formatter: "link", + formatterParams:{ + label:"Details", + url:function(cell){ + return BASE_URL + "/" + APPROVE_ANRECHNUNG_DETAIL_URI + "?anrechnung_id=" + cell.getData().anrechnung_id + }, + // target:"_blank" + } + }, false, "status" // place column after status + ); +} + +// Formats the rows +function func_rowFormatter(row){ + let status_kurzbz = row.getData().status_kurzbz; + + row.getCells().forEach(function(cell){ + if (status_kurzbz != ANRECHNUNGSTATUS_PROGRESSED_BY_STGL) + { + row.getElement().style["background-color"] = COLOR_LIGHTGREY; // default + } + }); +} + +// Formats row selectable/unselectable +function func_selectableCheck(row){ + let status_kurzbz = row.getData().status_kurzbz; + + return ( + status_kurzbz != ANRECHNUNGSTATUS_APPROVED && + status_kurzbz != ANRECHNUNGSTATUS_REJECTED && + status_kurzbz != ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR + ); +} + +// Performes after row was updated +function func_rowUpdated(row){ + // Refresh row formatters + row.reformat(); + + // Deselect and disable new selection of updated rows + row.deselect(); + row.getElement().style["pointerEvents"] = "none"; + + // ...but leave url links selectable + row.getCell('dokument_bezeichnung').getElement().firstChild.style["pointerEvents"] = "auto"; + row.getCell('details').getElement().firstChild.style["pointerEvents"] = "auto"; +} + +// Returns tooltip +function func_tooltips(cell) { + // Return tooltip if row is unselectable + if (!func_selectableCheck(cell.getRow())){ + return FHC_PhrasesLib.t("ui", "nichtSelektierbarAufgrundVon") + 'Status'; + } +} + +// Formats empfehlung_anrechnung +var format_empfehlung_anrechnung = function(cell, formatterParams){ + return (cell.getValue() == null) + ? '-' + : (cell.getValue() == 'true') + ? FHC_PhrasesLib.t("ui", "ja") + : FHC_PhrasesLib.t("ui", "nein"); +} + +/* + * Hook to overwrite TableWigdgets select-all-button behaviour + * Select all (filtered) rows that are progressed by stg leiter. + * (Ignore rows that are approved, rejected or in request for recommendation) + */ +function tableWidgetHook_selectAllButton(tableWidgetDiv){ + tableWidgetDiv.find("#tableWidgetTabulator").tabulator('getRows', true) + .filter(row => + row.getData().status_kurzbz == ANRECHNUNGSTATUS_PROGRESSED_BY_STGL + ) + .forEach((row => row.select())); +} + + +$(function(){ + + const genehmigung_panel = $('#approveAnrechnungUebersicht-genehmigung-panel'); + const begruendung_panel = $('#approveAnrechnungUebersicht-begruendung-panel'); + + // Pruefen ob Promise unterstuetzt wird + // Tabulator funktioniert nicht mit IE + var canPromise = !! window.Promise; + if(!canPromise) + { + alert("Diese Seite kann mit ihrem Browser nicht angezeigt werden. Bitte verwenden Sie Firefox, Chrome oder Edge um die Seite anzuzeigen"); + window.location.href='about:blank'; + return; + } + + // Redraw table on resize to fit tabulators height to windows height + window.addEventListener('resize', function(){ + $('#tableWidgetTabulator').tabulator('setHeight', $(window).height() * 0.50); + $('#tableWidgetTabulator').tabulator('redraw', true); + }); + + // Set status alert color + approveAnrechnung.setStatusAlertColor(); + + // Show only rows that are in progress by STGL + $("#show-inProgressDP").click(function(){ + $('#tableWidgetTabulator').tabulator('setFilter', + [ + {field: 'status_kurzbz', type: '=', value: ANRECHNUNGSTATUS_PROGRESSED_BY_STGL}, + ] + ); + }); + + // Show only rows with nicht empfohlene + noch nicht genehmigte/abgelehnte anrechnungen + $("#show-not-recommended").click(function(){ + $('#tableWidgetTabulator').tabulator('setFilter', [ + {field: 'status_kurzbz', type: '=', value: ANRECHNUNGSTATUS_PROGRESSED_BY_STGL}, + {field: 'empfehlung_anrechnung', type: '=', value: 'false'}, + ] + ); + }); + + // Show only rows with genehmigte anrechnungen + $("#show-approved").click(function(){ + $('#tableWidgetTabulator').tabulator('setFilter', + [ + {field: 'status_kurzbz', type: '=', value: ANRECHNUNGSTATUS_APPROVED} + ] + ); + }); + + // Show only rows with abgelehnte anrechnungen + $("#show-rejected").click(function(){ + $('#tableWidgetTabulator').tabulator('setFilter', + [ + {field: 'status_kurzbz', type: '=', value: ANRECHNUNGSTATUS_REJECTED} + ] + ); + }); + + /** + * Show all rows: clear filter and blur button + * Bootstrap button remains in activated style, even when clicking various times. + * This function "resets" button style and clear all tabulators filter. + * NOTE: MUST be after all other filters + */ + $(".btn-clearfilter").click(function(){ + if($(this).hasClass('active')) + { + $('#tableWidgetTabulator').tabulator('clearFilter'); + $(this).blur(); + } + }) + + // Ask if Approve Anrechnungen + $("#approveAnrechnungUebersicht-approve-anrechnungen-ask").click(function(){ + + begruendung_panel.css('display', 'none'); + + if (genehmigung_panel.is(":hidden")) + { + // Show begruendung panel if is hidden + genehmigung_panel.slideDown('slow'); + return; + } + }); + + // Approve Anrechnungen + $("#approveAnrechnungUebersicht-approve-anrechnungen-confirm").click(function(){ + + // Get selected rows data + let selected_data = $('#tableWidgetTabulator').tabulator('getSelectedData') + .map(function(data){ + // reduce to necessary fields + return { + 'anrechnung_id' : data.anrechnung_id, + } + }); + + // Alert and exit if no anrechnung is selected + if (selected_data.length == 0) + { + FHC_DialogLib.alertInfo(FHC_PhrasesLib.t("ui", "bitteMindEinenAntragWaehlen")); + return; + } + + // Prepare data object for ajax call + let data = { + 'data': selected_data + }; + + // Hide genehmigung panel again + genehmigung_panel.slideUp('slow'); + + FHC_AjaxClient.ajaxCallPost( + FHC_JS_DATA_STORAGE_OBJECT.called_path + "/approve", + data, + { + successCallback: function (data, textStatus, jqXHR) + { + if (data.error && data.retval != null) + { + // Print error message + FHC_DialogLib.alertWarning(data.retval); + } + + if (!data.error && data.retval != null) + { + // Update status 'genehmigt' + $('#tableWidgetTabulator').tabulator('updateData', data.retval); + + // Print success message + FHC_DialogLib.alertSuccess(FHC_PhrasesLib.t("ui", "anrechnungenWurdenGenehmigt")); + } + }, + errorCallback: function (jqXHR, textStatus, errorThrown) + { + FHC_DialogLib.alertError(FHC_PhrasesLib.t("ui", "systemfehler")); + } + } + ); + }); + + // Ask if Reject Anrechnungen + $("#approveAnrechnungUebersicht-reject-anrechnungen-ask").click(function(){ + + genehmigung_panel.css('display', 'none'); + + if (begruendung_panel.is(":hidden")) + { + // Show begruendung panel if is hidden + begruendung_panel.slideDown('slow'); + return; + } + }); + + // Reject Anrechnungen + $("#approveAnrechnungUebersicht-reject-anrechnungen-confirm").click(function(){ + + let begruendung = $('#approveAnrechnungUebersicht-begruendung').val(); + + genehmigung_panel.css('display', 'none'); + + // Check if begruendung is given + if (!begruendung.trim()) // empty or white spaces only + { + FHC_DialogLib.alertInfo(FHC_PhrasesLib.t("ui", "bitteBegruendungAngeben")); + return; + } + + // Get selected rows data + let selected_data = $('#tableWidgetTabulator').tabulator('getSelectedData') + .map(function(data){ + // reduce to necessary fields + return { + 'anrechnung_id' : data.anrechnung_id, + 'begruendung' : begruendung + } + }); + + // Alert and exit if no anrechnung is selected + if (selected_data.length == 0) + { + FHC_DialogLib.alertInfo(FHC_PhrasesLib.t("ui", "bitteMindEinenAntragWaehlen")); + return; + } + + // Avoid form redirecting automatically + event.preventDefault(); + + // Prepare data object for ajax call + let data = { + 'data': selected_data + }; + + // Hide begruendung panel again + begruendung_panel.slideUp('slow'); + + FHC_AjaxClient.ajaxCallPost( + FHC_JS_DATA_STORAGE_OBJECT.called_path + "/reject", + data, + { + successCallback: function (data, textStatus, jqXHR) + { + if (data.error && data.retval != null) + { + // Print error message + FHC_DialogLib.alertWarning(data.retval); + } + + if (!data.error && data.retval != null) + { + // Update status 'genehmigt' + $('#tableWidgetTabulator').tabulator('updateData', data.retval); + + // Print success message + FHC_DialogLib.alertSuccess(FHC_PhrasesLib.t("ui", "anrechnungenWurdenAbgelehnt")); + } + }, + errorCallback: function (jqXHR, textStatus, errorThrown) + { + FHC_DialogLib.alertError(FHC_PhrasesLib.t("ui", "systemfehler")); + } + } + ); + }); + + // Request Recommendation for Anrechnungen + $("#approveAnrechnungUebersicht-request-recommendation").click(function(){ + // Get selected rows data + let selected_data = $('#tableWidgetTabulator').tabulator('getSelectedData'); + + // If some of selected anrechnungen has already been recommended... + if (selected_data.some((data) => data.empfehlung_anrechnung !== null)) + { + // ...confirm before requesting recommendation + if(!confirm(FHC_PhrasesLib.t("anrechnung", "confirmTextAntragHatBereitsEmpfehlung"))) + { + return; + } + } + + selected_data.map(function(data){ + // reduce to necessary fields + return { + 'anrechnung_id' : data.anrechnung_id, + } + }); + + // Alert and exit if no anrechnung is selected + if (selected_data.length == 0) + { + FHC_DialogLib.alertInfo(FHC_PhrasesLib.t("ui", "bitteMindEinenAntragWaehlen")); + return; + } + + // Prepare data object for ajax call + let data = { + 'data': selected_data + }; + + FHC_AjaxClient.ajaxCallPost( + FHC_JS_DATA_STORAGE_OBJECT.called_path + "/requestRecommendation", + data, + { + successCallback: function (data, textStatus, jqXHR) + { + if (data.error && data.retval != null) + { + // Print error message + FHC_DialogLib.alertWarning(data.retval); + } + + if (!data.error && data.retval != null) + { + // Update status 'genehmigt' + $('#tableWidgetTabulator').tabulator('updateData', data.retval); + + // Print success message + FHC_DialogLib.alertSuccess(FHC_PhrasesLib.t("ui", "empfehlungWurdeAngefordert")); + } + }, + errorCallback: function (jqXHR, textStatus, errorThrown) + { + FHC_DialogLib.alertError(FHC_PhrasesLib.t("ui", "systemfehler")); + } + } + ); + }); + + // Break Genehmigung abgeben + $('#approveAnrechnungUebersicht-empfehlung-abbrechen').click(function(){ + genehmigung_panel.slideUp('slow'); + + }) + + // Break Ablehnung abgeben + $('#approveAnrechnungUebersicht-begruendung-abbrechen').click(function(){ + $('#approveAnrechnungUebersicht-begruendung').val(''); + begruendung_panel.slideUp('slow'); + + }) + + // Copy Begruendung into textarea + $(".btn-copyIntoTextarea").click(function(){ + approveAnrechnung.copyIntoTextarea(this); + }) + +}); + +var approveAnrechnung = { + setStatusAlertColor: function () { + let status_kurzbz = $('#requestAnrechnung-status_kurzbz').data('status_kurzbz'); + + switch (status_kurzbz) { + case ANRECHNUNGSTATUS_APPROVED: + $('#requestAnrechnung-status_kurzbz').closest('div').addClass('alert-success'); + break; + case ANRECHNUNGSTATUS_REJECTED: + $('#requestAnrechnung-status_kurzbz').closest('div').addClass('alert-danger'); + break; + case '': + $('#requestAnrechnung-status_kurzbz').closest('div').addClass('alert-info'); + break; + default: + $('#requestAnrechnung-status_kurzbz').closest('div').addClass('alert-warning'); + } + }, + copyIntoTextarea: function(elem){ + + // Find closest textarea + let textarea = $(elem).closest('div').find('textarea'); + + // Copy begruendung into textarea + textarea.val($.trim($(elem).parent().text())); + } +} \ No newline at end of file diff --git a/public/js/lehre/anrechnung/requestAnrechnung.js b/public/js/lehre/anrechnung/requestAnrechnung.js new file mode 100644 index 000000000..1f9f8b51b --- /dev/null +++ b/public/js/lehre/anrechnung/requestAnrechnung.js @@ -0,0 +1,39 @@ +const ANRECHNUNGSTATUS_APPROVED = 'approved'; +const ANRECHNUNGSTATUS_REJECTED = 'rejected'; + +$(function(){ + // Set status alert color + requestAnrechnung.setStatusAlertColor(); + + // Init tooltips + requestAnrechnung.initTooltips(); + + +}) + +var requestAnrechnung = { + setStatusAlertColor: function () { + let status_kurzbz = $('#requestAnrechnung-status_kurzbz').data('status_kurzbz'); + + switch (status_kurzbz) { + case ANRECHNUNGSTATUS_APPROVED: + $('#requestAnrechnung-status_kurzbz').closest('div').addClass('alert-success'); + break; + case ANRECHNUNGSTATUS_REJECTED: + $('#requestAnrechnung-status_kurzbz').closest('div').addClass('alert-danger'); + break; + case '': + $('#requestAnrechnung-status_kurzbz').closest('div').addClass('alert-info'); + break; + default: + $('#requestAnrechnung-status_kurzbz').closest('div').addClass('alert-warning'); + } + }, + initTooltips: function (){ + $('[data-toggle="tooltip"]').tooltip({ + delay: { "show": 200, "hide": 200 }, + html: true + } + ); + } +} \ No newline at end of file diff --git a/public/js/lehre/anrechnung/reviewAnrechnungDetail.js b/public/js/lehre/anrechnung/reviewAnrechnungDetail.js new file mode 100644 index 000000000..705e6c440 --- /dev/null +++ b/public/js/lehre/anrechnung/reviewAnrechnungDetail.js @@ -0,0 +1,234 @@ +const ANRECHNUNGSTATUS_PROGRESSED_BY_STGL = 'inProgressDP'; +const ANRECHNUNGSTATUS_PROGRESSED_BY_KF = 'inProgressKF'; +const ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR = 'inProgressLektor'; +const ANRECHNUNGSTATUS_APPROVED = 'approved'; +const ANRECHNUNGSTATUS_REJECTED = 'rejected'; + + + +$(function(){ + + const empfehlung_panel = $('#reviewAnrechnungDetail-empfehlung-panel'); + const begruendung_panel = $('#reviewAnrechnungDetail-begruendung-panel'); + + // Pruefen ob Promise unterstuetzt wird + // Tabulator funktioniert nicht mit IE + var canPromise = !! window.Promise; + if(!canPromise) + { + alert("Diese Seite kann mit ihrem Browser nicht angezeigt werden. Bitte verwenden Sie Firefox, Chrome oder Edge um die Seite anzuzeigen"); + window.location.href='about:blank'; + return; + } + + + // Set status alert color + reviewAnrechnung.setStatusAlertColor(); + + // Init tooltips + reviewAnrechnung.initTooltips(); + + // Copy Begruendung into textarea + $(".btn-copyIntoTextarea").click(function(){ + reviewAnrechnung.copyIntoTextarea(this); + }) + + // Ask if Recommend Anrechnung + $("#reviewAnrechnungDetail-recommend-anrechnung-ask").click(function(){ + + begruendung_panel.css('display', 'none'); + + if (empfehlung_panel.is(":hidden")) + { + // Show begruendung panel if is hidden + empfehlung_panel.slideDown('slow'); + return; + } + }); + + // Recommend Anrechnung + $("#reviewAnrechnungDetail-recommend-anrechnung-confirm").click(function(){ + + // Get form data + let form_data = $('form').serializeArray(); + + // Prepare data object for ajax call + let data = { + 'data': [{ + 'anrechnung_id' : form_data[0].value + }] + }; + + // Hide begruendung panel again + empfehlung_panel.slideUp('slow'); + + FHC_AjaxClient.ajaxCallPost( + FHC_JS_DATA_STORAGE_OBJECT.called_path + "/recommend", + data, + { + successCallback: function (data, textStatus, jqXHR) + { + if (data.error && data.retval != null) + { + // Print error message + FHC_DialogLib.alertWarning(data.retval); + } + + if (!data.error && data.retval != null) + { + reviewAnrechnung.formatEmpfehlungIsTrue( + data.retval[0].empfehlung_am, + data.retval[0].empfehlung_von, + data.retval[0].status_bezeichnung + ); + } + }, + errorCallback: function (jqXHR, textStatus, errorThrown) + { + FHC_DialogLib.alertError(FHC_PhrasesLib.t("ui", "systemfehler")); + } + } + ); + }); + + // Ask if Dont recommend Anrechnung + $("#reviewAnrechnungDetail-dont-recommend-anrechnung-ask").click(function(){ + + empfehlung_panel.css('display', 'none'); + + if (begruendung_panel.is(":hidden")) + { + // Show begruendung panel if is hidden + begruendung_panel.slideDown('slow'); + return; + } + }); + + // Dont recommend Anrechnung + $("#reviewAnrechnungDetail-dont-recommend-anrechnung-confirm").click(function(){ + + let begruendung = $('#reviewAnrechnungDetail-begruendung').val(); + + // Check if begruendung is given + if (!begruendung.trim()) // empty or white spaces only + { + FHC_DialogLib.alertInfo(FHC_PhrasesLib.t("ui", "bitteBegruendungAngeben")); + return; + } + + // Avoid form redirecting automatically + event.preventDefault(); + + // Get form data + let form_data = $('form').serializeArray(); + + // Prepare data object for ajax call + let data = { + 'data': [{ + 'anrechnung_id' : form_data[0].value, + 'begruendung' : begruendung + }] + } + + // Hide begruendung panel again + begruendung_panel.slideUp('slow'); + + FHC_AjaxClient.ajaxCallPost( + FHC_JS_DATA_STORAGE_OBJECT.called_path + "/dontRecommend", + data, + { + successCallback: function (data, textStatus, jqXHR) + { + if (data.error && data.retval != null) + { + // Print error message + FHC_DialogLib.alertWarning(data.retval); + } + + if (!data.error && data.retval != null) + { + reviewAnrechnung.formatEmpfehlungIsFalse( + data.retval[0].empfehlung_am, + data.retval[0].empfehlung_von, + data.retval[0].status_bezeichnung, + begruendung + ); + } + }, + errorCallback: function (jqXHR, textStatus, errorThrown) + { + FHC_DialogLib.alertError(FHC_PhrasesLib.t("ui", "systemfehler")); + } + } + ); + }); + + // Break Empfehlung abgeben + $('#reviewAnrechnungDetail-empfehlung-abbrechen').click(function(){ + empfehlung_panel.slideUp('slow'); + + }) + + // Break Begruendung abgeben + $('#reviewAnrechnungDetail-begruendung-abbrechen').click(function(){ + $('#reviewAnrechnungDetail-begruendung').val(''); + begruendung_panel.slideUp('slow'); + }) + + +}); + +var reviewAnrechnung = { + setStatusAlertColor: function () { + let status_kurzbz = $('#reviewAnrechnungDetail-status_kurzbz').data('status_kurzbz'); + + switch (status_kurzbz) { + case ANRECHNUNGSTATUS_APPROVED: + $('#reviewAnrechnungDetail-status_kurzbz').closest('div').addClass('alert-success'); + break; + case ANRECHNUNGSTATUS_REJECTED: + $('#reviewAnrechnungDetail-status_kurzbz').closest('div').addClass('alert-danger'); + break; + case '': + $('#reviewAnrechnungDetail-status_kurzbz').closest('div').addClass('alert-info'); + break; + default: + $('#reviewAnrechnungDetail-status_kurzbz').closest('div').addClass('alert-warning'); + } + }, + initTooltips: function (){ + $('[data-toggle="tooltip"]').tooltip({ + delay: { "show": 200, "hide": 200 }, + html: true + } + ); + + }, + copyIntoTextarea: function(elem){ + + // Find closest textarea + let textarea = $(elem).closest('div').find('textarea'); + + // Copy begruendung into textarea + textarea.val($.trim($(elem).parent().find('span:first').text())); + }, + formatEmpfehlungIsTrue: function(empfehlungAm, emfehlungVon, statusBezeichnung){ + $('#reviewAnrechnungDetail-empfehlungDetail').children().addClass('hidden'); + $('#reviewAnrechnungDetail-empfehlungDetail-empfehlungIsTrue').removeClass('hidden'); + $('#reviewAnrechnungDetail-status_kurzbz').text(statusBezeichnung); + $('#reviewAnrechnungDetail-recommend-anrechnung-ask').prop('disabled', true); + $('#reviewAnrechnungDetail-dont-recommend-anrechnung-ask').prop('disabled', true); + $('#reviewAnrechnungDetail-empfehlungAm').text(empfehlungAm); + $('#reviewAnrechnungDetail-empfehlungVon').text(emfehlungVon); + }, + formatEmpfehlungIsFalse: function(empfehlungAm, emfehlungVon, statusBezeichnung, begruendung){ + $('#reviewAnrechnungDetail-empfehlungDetail').children().addClass('hidden'); + $('#reviewAnrechnungDetail-empfehlungDetail-empfehlungIsFalse').removeClass('hidden'); + $('#reviewAnrechnungDetail-status_kurzbz').text(statusBezeichnung); + $('#reviewAnrechnungDetail-recommend-anrechnung-ask').prop('disabled', true); + $('#reviewAnrechnungDetail-dont-recommend-anrechnung-ask').prop('disabled', true); + $('#reviewAnrechnungDetail-empfehlungAm').text(empfehlungAm); + $('#reviewAnrechnungDetail-empfehlungVon').text(emfehlungVon); + $('#reviewAnrechnungDetail-empfehlungDetail-begruendung').text(begruendung); + } +} \ No newline at end of file diff --git a/public/js/lehre/anrechnung/reviewAnrechnungUebersicht.js b/public/js/lehre/anrechnung/reviewAnrechnungUebersicht.js new file mode 100644 index 000000000..f9bbbc310 --- /dev/null +++ b/public/js/lehre/anrechnung/reviewAnrechnungUebersicht.js @@ -0,0 +1,407 @@ +const BASE_URL = FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router; +const APPROVE_ANRECHNUNG_DETAIL_URI = "lehre/anrechnung/ReviewAnrechnungDetail"; + +const ANRECHNUNGSTATUS_PROGRESSED_BY_STGL = 'inProgressDP'; +const ANRECHNUNGSTATUS_PROGRESSED_BY_KF = 'inProgressKF'; +const ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR = 'inProgressLektor'; +const ANRECHNUNGSTATUS_APPROVED = 'approved'; +const ANRECHNUNGSTATUS_REJECTED = 'rejected'; + +const COLOR_LIGHTGREY = "#f5f5f5"; + +// TABULATOR FUNCTIONS +// --------------------------------------------------------------------------------------------------------------------- +// Returns relative height (depending on screen size) +function func_height(table){ + return $(window).height() * 0.50; +} + +// Filters boolean values +function hf_filterTrueFalse(headerValue, rowValue){ + + if ('ja'.startsWith(headerValue) || 'yes'.startsWith(headerValue)) + { + return rowValue == 'true'; + } + + if ('nein'.startsWith(headerValue) || 'no'.startsWith(headerValue)) + { + return rowValue == 'false'; + } + + if (headerValue = '-') + { + return rowValue == null; + } +} + +// Adds column details +function func_tableBuilt(table) { + table.addColumn( + { + title: "Details", + field: 'details', + align: "center", + width: 100, + formatter: "link", + formatterParams:{ + label:"Details", + url:function(cell){ + return BASE_URL + "/" + APPROVE_ANRECHNUNG_DETAIL_URI + "?anrechnung_id=" + cell.getData().anrechnung_id + } + // target:"_blank" + } + }, false, "status" // place column after status + ); +} + +// Formats the rows +function func_rowFormatter(row){ + let status_kurzbz = row.getData().status_kurzbz; + + row.getCells().forEach(function(cell){ + if (status_kurzbz != ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR) + { + row.getElement().style["background-color"] = COLOR_LIGHTGREY; // default + } + }); +} + +// Formats row selectable/unselectable +function func_selectableCheck(row){ + let status_kurzbz = row.getData().status_kurzbz; + + return ( + status_kurzbz == ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR + ); +} + +// Performes after row was updated +function func_rowUpdated(row){ + // Refresh row formatters + row.reformat(); + + // Deselect and disable new selection of updated rows + row.deselect(); + row.getElement().style["pointerEvents"] = "none"; + + // ...but leave url links selectable + row.getCell('dokument_bezeichnung').getElement().firstChild.style["pointerEvents"] = "auto"; + row.getCell('details').getElement().firstChild.style["pointerEvents"] = "auto"; +} + +// Returns tooltip +function func_tooltips(cell) { + // Return tooltip if row is unselectable + if (!func_selectableCheck(cell.getRow())){ + return FHC_PhrasesLib.t("ui", "nichtSelektierbarAufgrundVon") + 'Status'; + } +} + +// Formats empfehlung_anrechnung +var format_empfehlung_anrechnung = function(cell, formatterParams){ + return (cell.getValue() == null) + ? '-' + : (cell.getValue() == 'true') + ? FHC_PhrasesLib.t("ui", "ja") + : FHC_PhrasesLib.t("ui", "nein"); +} + +/* + * Hook to overwrite TableWigdgets select-all-button behaviour + * Select all (filtered) rows that are progressed by stg leiter. + * (Ignore rows that are approved, rejected or in request for recommendation) + */ +function tableWidgetHook_selectAllButton(tableWidgetDiv){ + tableWidgetDiv.find("#tableWidgetTabulator").tabulator('getRows', true) + .filter(row => + row.getData().status_kurzbz == ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR + ) + .forEach((row => row.select())); +} + + +$(function(){ + + const empfehlung_panel = $('#reviewAnrechnungUebersicht-empfehlung-panel'); + const begruendung_panel = $('#reviewAnrechnungUebersicht-begruendung-panel'); + + // Pruefen ob Promise unterstuetzt wird + // Tabulator funktioniert nicht mit IE + var canPromise = !! window.Promise; + if(!canPromise) + { + alert("Diese Seite kann mit ihrem Browser nicht angezeigt werden. Bitte verwenden Sie Firefox, Chrome oder Edge um die Seite anzuzeigen"); + window.location.href='about:blank'; + return; + } + + // Redraw table on resize to fit tabulators height to windows height + window.addEventListener('resize', function(){ + $('#tableWidgetTabulator').tabulator('setHeight', $(window).height() * 0.50); + $('#tableWidgetTabulator').tabulator('redraw', true); + }); + + // Set status alert color + reviewAnrechnung.setStatusAlertColor(); + + // Show only rows with anrechnungen ohne Empfehlung + $("#show-need-recommendation").click(function(){ + $('#tableWidgetTabulator').tabulator('setFilter', + [ + {field: 'status_kurzbz', type: '=', value: ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR} + ] + ); + }); + + // Show only rows with empfohlene + noch nicht genehmigte/abgelehnte anrechnungen + $("#show-recommended").click(function(){ + $('#tableWidgetTabulator').tabulator('setFilter', + [ + {field: 'status_kurzbz', type: '=', value: ANRECHNUNGSTATUS_PROGRESSED_BY_STGL}, + {field: 'empfehlung_anrechnung', type: '=', value: 'true'} + ] + ); + }); + + // Show only rows with nicht empfohlene + noch nicht genehmigte/abgelehnte anrechnungen + $("#show-not-recommended").click(function(){ + $('#tableWidgetTabulator').tabulator('setFilter', [ + {field: 'status_kurzbz', type: '=', value: ANRECHNUNGSTATUS_PROGRESSED_BY_STGL}, + {field: 'empfehlung_anrechnung', type: '=', value: 'false'}, + ] + ); + }); + + // Show only rows with genehmigte anrechnungen + $("#show-approved").click(function(){ + $('#tableWidgetTabulator').tabulator('setFilter', + [ + {field: 'status_kurzbz', type: '=', value: ANRECHNUNGSTATUS_APPROVED} + ] + ); + }); + + // Show only rows with abgelehnte anrechnungen + $("#show-rejected").click(function(){ + $('#tableWidgetTabulator').tabulator('setFilter', + [ + {field: 'status_kurzbz', type: '=', value: ANRECHNUNGSTATUS_REJECTED} + ] + ); + }); + + /** + * Show all rows: clear filter and blur button + * Bootstrap button remains in activated style, even when clicking various times. + * This function "resets" button style and clear all tabulators filter. + * NOTE: MUST be after all other filters + */ + $(".btn-clearfilter").click(function(){ + if($(this).hasClass('active')) + { + $('#tableWidgetTabulator').tabulator('clearFilter'); + $(this).blur(); + } + }) + + // Ask ifRecommend Anrechnungen + $("#reviewAnrechnungUebersicht-recommend-anrechnungen-ask").click(function(){ + + begruendung_panel.css('display', 'none'); + + if (empfehlung_panel.is(":hidden")) + { + // Show begruendung panel if is hidden + empfehlung_panel.slideDown('slow'); + return; + } + }); + + // Recommend Anrechnungen + $("#reviewAnrechnungUebersicht-recommend-anrechnungen-confirm").click(function(){ + + // Get selected rows data + let selected_data = $('#tableWidgetTabulator').tabulator('getSelectedData') + .map(function(data){ + // reduce to necessary fields + return { + 'anrechnung_id' : data.anrechnung_id, + } + }); + + // Alert and exit if no anrechnung is selected + if (selected_data.length == 0) + { + FHC_DialogLib.alertInfo(FHC_PhrasesLib.t("ui", "bitteMindEinenAntragWaehlen")); + return; + } + + + // Prepare data object for ajax call + let data = { + 'data': selected_data + }; + + // Hide empfehlung panel again + empfehlung_panel.slideUp('slow'); + + FHC_AjaxClient.ajaxCallPost( + FHC_JS_DATA_STORAGE_OBJECT.called_path + "/recommend", + data, + { + successCallback: function (data, textStatus, jqXHR) + { + if (data.error && data.retval != null) + { + // Print error message + FHC_DialogLib.alertWarning(data.retval); + } + + if (!data.error && data.retval != null) + { + // Update status 'genehmigt' + $('#tableWidgetTabulator').tabulator('updateData', data.retval); + + // Print success message + FHC_DialogLib.alertSuccess(FHC_PhrasesLib.t("ui", "anrechnungenWurdenEmpfohlen")); + } + }, + errorCallback: function (jqXHR, textStatus, errorThrown) + { + FHC_DialogLib.alertError(FHC_PhrasesLib.t("ui", "systemfehler")); + } + } + ); + }); + + // Ask if Dont recommend Anrechnungen + $("#reviewAnrechnungUebersicht-dont-recommend-anrechnungen-ask").click(function(){ + + empfehlung_panel.css('display', 'none'); + + if (begruendung_panel.is(":hidden")) + { + // Show begruendung panel if is hidden + begruendung_panel.slideDown('slow'); + return; + } + }); + + // Dont recommend Anrechnungen + $("#reviewAnrechnungUebersicht-dont-recommend-anrechnungen-confirm").click(function(){ + + let begruendung = $('#reviewAnrechnungUebersicht-begruendung').val(); + + empfehlung_panel.css('display', 'none'); + + // Check if begruendung is given + if (!begruendung.trim()) // empty or white spaces only + { + FHC_DialogLib.alertInfo(FHC_PhrasesLib.t("ui", "bitteBegruendungAngeben")); + return; + } + + // Get selected rows data and add begruendung + let selected_data = $('#tableWidgetTabulator').tabulator('getSelectedData') + .map(function(data){ + // reduce to necessary fields + return { + 'anrechnung_id' : data.anrechnung_id, + 'begruendung' : begruendung + } + }); + + // Alert and exit if no anrechnung is selected + if (selected_data.length == 0) + { + FHC_DialogLib.alertInfo(FHC_PhrasesLib.t("ui", "bitteMindEinenAntragWaehlen")); + return; + } + + // Avoid form redirecting automatically + event.preventDefault(); + + // Prepare data object for ajax call + let data = { + 'data': selected_data + }; + + // Hide begruendung panel again + begruendung_panel.slideUp('slow'); + + FHC_AjaxClient.ajaxCallPost( + FHC_JS_DATA_STORAGE_OBJECT.called_path + "/dontRecommend", + data, + { + successCallback: function (data, textStatus, jqXHR) + { + if (data.error && data.retval != null) + { + // Print error message + FHC_DialogLib.alertWarning(data.retval); + } + + if (!data.error && data.retval != null) + { + // Update status 'genehmigt' + $('#tableWidgetTabulator').tabulator('updateData', data.retval); + + // Print success message + FHC_DialogLib.alertSuccess(FHC_PhrasesLib.t("ui", "anrechnungenWurdenNichtEmpfohlen")); + } + }, + errorCallback: function (jqXHR, textStatus, errorThrown) + { + FHC_DialogLib.alertError(FHC_PhrasesLib.t("ui", "systemfehler")); + } + } + ); + }); + + // Break Empfehlung abgeben + $('#reviewAnrechnungUebersicht-empfehlung-abbrechen').click(function(){ + empfehlung_panel.slideUp('slow'); + + }) + + // Break Begruendung abgeben + $('#reviewAnrechnungUebersicht-begruendung-abbrechen').click(function(){ + $('#reviewAnrechnungUebersicht-begruendung').val(''); + begruendung_panel.slideUp('slow'); + + }) + + // Copy Begruendung into textarea + $(".btn-copyIntoTextarea").click(function(){ + reviewAnrechnung.copyIntoTextarea(this); + }) +}); + +var reviewAnrechnung = { + setStatusAlertColor: function () { + let status_kurzbz = $('#reviewAnrechnung-status_kurzbz').data('status_kurzbz'); + + switch (status_kurzbz) { + case ANRECHNUNGSTATUS_APPROVED: + $('#reviewAnrechnung-status_kurzbz').closest('div').addClass('alert-success'); + break; + case ANRECHNUNGSTATUS_REJECTED: + $('#reviewAnrechnung-status_kurzbz').closest('div').addClass('alert-danger'); + break; + case '': + $('#reviewAnrechnung-status_kurzbz').closest('div').addClass('alert-info'); + break; + default: + $('#reviewAnrechnung-status_kurzbz').closest('div').addClass('alert-warning'); + } + }, + copyIntoTextarea: function(elem){ + + // Find closest textarea + let textarea = $(elem).closest('div').find('textarea'); + + // Copy begruendung into textarea + textarea.val($.trim($(elem).parent().text())); + } +} \ No newline at end of file diff --git a/system/dbupdate_3.3.php b/system/dbupdate_3.3.php index 2336ebad4..62beadbce 100644 --- a/system/dbupdate_3.3.php +++ b/system/dbupdate_3.3.php @@ -4465,6 +4465,241 @@ if($result = $db->db_query("SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE } } +// Add column dms_id, studiensemester_kurzbz, anmerkung_student und empfehlung_anrechnung +// Change genehmigt_von and begruendung_id to be NULLABLE +if(!$result = @$db->db_query("SELECT dms_id FROM lehre.tbl_anrechnung")) +{ + $qry = " + ALTER TABLE lehre.tbl_anrechnung ADD COLUMN dms_id bigint; + ALTER TABLE lehre.tbl_anrechnung ADD COLUMN studiensemester_kurzbz varchar(6); + ALTER TABLE lehre.tbl_anrechnung ADD COLUMN anmerkung_student text; + ALTER TABLE lehre.tbl_anrechnung ADD COLUMN empfehlung_anrechnung boolean; + + ALTER TABLE lehre.tbl_anrechnung ADD CONSTRAINT fk_anrechnung_studiensemester FOREIGN KEY (studiensemester_kurzbz) REFERENCES public.tbl_studiensemester(studiensemester_kurzbz) ON DELETE RESTRICT ON UPDATE CASCADE; + ALTER TABLE lehre.tbl_anrechnung ADD CONSTRAINT fk_anrechnung_dms FOREIGN KEY (dms_id) REFERENCES campus.tbl_dms(dms_id) ON DELETE RESTRICT ON UPDATE CASCADE; + + ALTER TABLE lehre.tbl_anrechnung ALTER COLUMN genehmigt_von DROP NOT NULL; + ALTER TABLE lehre.tbl_anrechnung ALTER COLUMN begruendung_id DROP NOT NULL; + ALTER TABLE lehre.tbl_anrechnung ALTER COLUMN insertamum SET DEFAULT NOW(); + "; + + + if(!$db->db_query($qry)) + echo 'lehre.tbl_anrechnung: '.$db->db_last_error().'
'; + else + echo '
lehre.tbl_anrechnung: Neue Spalten dms_id, studiensemester_kurzbz, anmerkung_student und empfehlung_anrechnung hinzugefuegt. Not null constraint entfernt für genehmigt_von und begruendung_id'; +} + +// Add DMS category "anrechnung" +if ($result = @$db->db_query("SELECT 1 FROM campus.tbl_dms_kategorie WHERE kategorie_kurzbz = 'anrechnung';")) +{ + if ($db->db_num_rows($result) == 0) + { + $qry = "INSERT INTO campus.tbl_dms_kategorie ( + kategorie_kurzbz, + bezeichnung, + beschreibung, + parent_kategorie_kurzbz, + oe_kurzbz, + berechtigung_kurzbz + ) VALUES( + 'anrechnung', + 'Anrechnung', + 'Dokumente zur Anrechnung von Lehrveranstaltungen', + 'studium', + 'etw', + NULL + );"; + if (!$db->db_query($qry)) + echo 'campus.tbl_dms_kategorie '.$db->db_last_error().'
'; + else + echo ' campus.tbl_dms_kategorie: Added category "anrechnung"!
'; + } +} + + +// Add DMS category permissiongroup for DMS category "anrechnung" +if ($result = @$db->db_query("SELECT 1 FROM campus.tbl_dms_kategorie_gruppe WHERE kategorie_kurzbz = 'anrechnung';")) +{ + if ($db->db_num_rows($result) == 0) + { + $qry = "INSERT INTO campus.tbl_dms_kategorie_gruppe ( + kategorie_kurzbz, + gruppe_kurzbz, + insertamum, + insertvon + ) VALUES( + 'anrechnung', + 'CMS_LOCK', + NOW(), + 'dbcheck' + );"; + if (!$db->db_query($qry)) + echo 'campus.tbl_dms_kategorie_gruppe '.$db->db_last_error().'
'; + else + echo ' campus.tbl_dms_kategorie_gruppe: Added category group "CMS_LOCK" to category "anrechnung"!
'; + } +} + +// Add table anrechnung_status +if(!$result = @$db->db_query("SELECT 1 FROM lehre.tbl_anrechnungstatus LIMIT 1;")) +{ + $qry = " + CREATE TABLE lehre.tbl_anrechnungstatus + ( + status_kurzbz varchar(32) NOT NULL, + bezeichnung_mehrsprachig varchar(64)[] + ); + + ALTER TABLE lehre.tbl_anrechnungstatus ADD CONSTRAINT pk_anrechnungstatus PRIMARY KEY (status_kurzbz); + + INSERT INTO lehre.tbl_anrechnungstatus(status_kurzbz, bezeichnung_mehrsprachig) VALUES('inProgressDP', '{\"bearbeitet von STG-Leitung\",\"processed by STG-Director\"}'); + INSERT INTO lehre.tbl_anrechnungstatus(status_kurzbz, bezeichnung_mehrsprachig) VALUES('inProgressKF', '{\"bearbeitet von KF-Leitung\",\"processed by KF-Manager\"}'); + INSERT INTO lehre.tbl_anrechnungstatus(status_kurzbz, bezeichnung_mehrsprachig) VALUES('inProgressLektor', '{\"Empfehlung angefordert\",\"recommendation requested\"}'); + INSERT INTO lehre.tbl_anrechnungstatus(status_kurzbz, bezeichnung_mehrsprachig) VALUES('approved', '{\"genehmigt\",\"approved\"}'); + INSERT INTO lehre.tbl_anrechnungstatus(status_kurzbz, bezeichnung_mehrsprachig) VALUES('rejected', '{\"abgelehnt\",\"rejected\"}'); + + GRANT SELECT ON lehre.tbl_anrechnungstatus TO web; + GRANT SELECT, UPDATE, INSERT, DELETE ON lehre.tbl_anrechnungstatus TO vilesci; + "; + + if(!$db->db_query($qry)) + echo 'lehre.tbl_anrechnungstatus: '.$db->db_last_error().'
'; + else + echo ' lehre.tbl_anrechnungstatus: Tabelle hinzugefuegt
'; +} + +// GRANT INSERT, UPDATE, DELETE ON TABLE lehre.tbl_anrechnungstatus TO web; +$qry = 'GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE lehre.tbl_anrechnungstatus TO web;'; +if (!$db->db_query($qry)) + echo 'lehre.tbl_anrechnungstatus '.$db->db_last_error().'
'; +else + echo '
Granted privileges to web on lehre.tbl_anrechnungstatus'; + + +// SEQUENCE seq_anrechnungstatus_status_kurzbz +if ($result = $db->db_query("SELECT 0 FROM pg_class WHERE relname = 'seq_anrechnungstatus_status_kurzbz'")) +{ + if ($db->db_num_rows($result) == 0) + { + $qry = ' + CREATE SEQUENCE lehre.seq_anrechnungstatus_status_kurzbz + START WITH 1 + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; + '; + + if(!$db->db_query($qry)) + echo 'lehre.seq_anrechnungstatus_status_kurzbz '.$db->db_last_error().'
'; + else + echo '
Created sequence: lehre.seq_anrechnungstatus_status_kurzbz'; + + // GRANT SELECT, UPDATE ON SEQUENCE lehre.tbl_anrechnungstatus_status_kurzbz_seq to web; + $qry = 'GRANT SELECT, UPDATE ON SEQUENCE lehre.seq_anrechnungstatus_status_kurzbz TO web;'; + if (!$db->db_query($qry)) + echo 'lehre.seq_anrechnungstatus_status_kurzbz '.$db->db_last_error().'
'; + else + echo '
Granted privileges to vilesci on lehre.seq_anrechnungstatus_status_kurzbz'; + } +} + +// Add table anrechnung_anrechnungstatus +// Für bestehende genehmigte Anrechnungsanträge wird ein Eintrag mit dem Status 'approved' angelegt +if(!$result = @$db->db_query("SELECT 1 FROM lehre.tbl_anrechnung_anrechnungstatus LIMIT 1;")) +{ + $qry = " + CREATE TABLE lehre.tbl_anrechnung_anrechnungstatus + ( + anrechnungstatus_id integer NOT NULL, + anrechnung_id integer, + status_kurzbz varchar(32), + datum date default now(), + insertamum timestamp default now(), + insertvon varchar(32) + ); + + ALTER TABLE lehre.tbl_anrechnung_anrechnungstatus ADD CONSTRAINT pk_anrechnung_anrechnungstatus PRIMARY KEY (anrechnungstatus_id); + ALTER TABLE lehre.tbl_anrechnung_anrechnungstatus ADD CONSTRAINT fk_anrechnung_anrechnungstatus_anrechnung FOREIGN KEY (anrechnung_id) REFERENCES lehre.tbl_anrechnung(anrechnung_id) ON DELETE RESTRICT ON UPDATE CASCADE; + ALTER TABLE lehre.tbl_anrechnung_anrechnungstatus ADD CONSTRAINT fk_anrechnung_anrechnungstatus_anrechnungstatus FOREIGN KEY (status_kurzbz) REFERENCES lehre.tbl_anrechnungstatus (status_kurzbz) ON DELETE RESTRICT ON UPDATE CASCADE; + + CREATE SEQUENCE lehre.seq_anrechnung_anrechnungstatus_anrechnungstatus_id + START WITH 1 + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; + ALTER TABLE lehre.tbl_anrechnung_anrechnungstatus ALTER COLUMN anrechnungstatus_id SET DEFAULT nextval('lehre.seq_anrechnung_anrechnungstatus_anrechnungstatus_id'); + + INSERT INTO lehre.tbl_anrechnung_anrechnungstatus(anrechnung_id, status_kurzbz) SELECT anrechnung_id, 'approved' as status_kurzbz FROM lehre.tbl_anrechnung WHERE genehmigt_von is not null; + + GRANT SELECT ON lehre.tbl_anrechnung_anrechnungstatus TO web; + GRANT SELECT, UPDATE, INSERT, DELETE ON lehre.tbl_anrechnung_anrechnungstatus TO vilesci; + GRANT SELECT, UPDATE ON lehre.seq_anrechnung_anrechnungstatus_anrechnungstatus_id TO vilesci; + "; + + if(!$db->db_query($qry)) + echo 'lehre.tbl_anrechnung_anrechnungstatus: '.$db->db_last_error().'
'; + else + echo ' lehre.tbl_anrechnung_anrechnungstatus: Tabelle hinzugefuegt
'; +} + +// Added Bezeichnung 'berufliche Praxis' to Anrechnungbegruendung +if ($result = @$db->db_query("SELECT 1 FROM lehre.tbl_anrechnung_begruendung WHERE bezeichnung = 'berufliche Praxis';")) +{ + if ($db->db_num_rows($result) == 0) + { + $qry = "INSERT INTO lehre.tbl_anrechnung_begruendung (bezeichnung) VALUES('berufliche Praxis');"; + if (!$db->db_query($qry)) + echo 'lehre.tbl_anrechnung_begruendung '.$db->db_last_error().'
'; + else + echo ' lehre.tbl_anrechnung_begruendung: Added bezeichnung "berufliche Praxis"
'; + } +} + +// Add permission to apply for Anrechnung +if($result = @$db->db_query("SELECT 1 FROM system.tbl_berechtigung WHERE berechtigung_kurzbz = 'student/anrechnung_beantragen';")) +{ + if($db->db_num_rows($result) == 0) + { + $qry = "INSERT INTO system.tbl_berechtigung(berechtigung_kurzbz, beschreibung) VALUES('student/anrechnung_beantragen', 'Anrechnung beantragen');"; + + if(!$db->db_query($qry)) + echo 'system.tbl_berechtigung '.$db->db_last_error().'
'; + else + echo ' system.tbl_berechtigung: Added permission for student/anrechnung_beantragen
'; + } +} + +// Add permission to approve Anrechnung +if($result = @$db->db_query("SELECT 1 FROM system.tbl_berechtigung WHERE berechtigung_kurzbz = 'lehre/anrechnung_genehmigen';")) +{ + if($db->db_num_rows($result) == 0) + { + $qry = "INSERT INTO system.tbl_berechtigung(berechtigung_kurzbz, beschreibung) VALUES('lehre/anrechnung_genehmigen', 'Anrechnung genehmigen');"; + + if(!$db->db_query($qry)) + echo 'system.tbl_berechtigung '.$db->db_last_error().'
'; + else + echo ' system.tbl_berechtigung: Added permission for lehre/anrechnung_genehmigen
'; + } +} + +// Add permission to recommend Anrechnung +if($result = @$db->db_query("SELECT 1 FROM system.tbl_berechtigung WHERE berechtigung_kurzbz = 'lehre/anrechnung_empfehlen';")) +{ + if($db->db_num_rows($result) == 0) + { + $qry = "INSERT INTO system.tbl_berechtigung(berechtigung_kurzbz, beschreibung) VALUES('lehre/anrechnung_empfehlen', 'Anrechnung empfehlen');"; + + if(!$db->db_query($qry)) + echo 'system.tbl_berechtigung '.$db->db_last_error().'
'; + else + echo ' system.tbl_berechtigung: Added permission for lehre/anrechnung_empfehlen
'; + } +} + // *** Pruefung und hinzufuegen der neuen Attribute und Tabellen echo '

Pruefe Tabellen und Attribute!

'; @@ -4571,8 +4806,10 @@ $tabellen=array( "lehre.tbl_abschlusspruefung" => array("abschlusspruefung_id","student_uid","vorsitz","pruefer1","pruefer2","pruefer3","abschlussbeurteilung_kurzbz","akadgrad_id","pruefungstyp_kurzbz","datum","uhrzeit","sponsion","anmerkung","updateamum","updatevon","insertamum","insertvon","ext_id","note","protokoll","endezeit","pruefungsantritt_kurzbz","freigabedatum"), "lehre.tbl_abschlusspruefung_antritt" => array("pruefungsantritt_kurzbz","bezeichnung","bezeichnung_english","sort"), "lehre.tbl_akadgrad" => array("akadgrad_id","akadgrad_kurzbz","studiengang_kz","titel","geschlecht"), - "lehre.tbl_anrechnung" => array("anrechnung_id","prestudent_id","lehrveranstaltung_id","begruendung_id","lehrveranstaltung_id_kompatibel","genehmigt_von","insertamum","insertvon","updateamum","updatevon","ext_id"), + "lehre.tbl_anrechnung" => array("anrechnung_id","prestudent_id","lehrveranstaltung_id","begruendung_id","lehrveranstaltung_id_kompatibel","genehmigt_von","insertamum","insertvon","updateamum","updatevon","ext_id", "dms_id", "studiensemester_kurzbz", "anmerkung_student", "empfehlung_anrechnung"), + "lehre.tbl_anrechnung_anrechnungstatus" => array("anrechnungstatus_id", "anrechnung_id","status_kurzbz","datum", "insertamum","insertvon"), "lehre.tbl_anrechnung_begruendung" => array("begruendung_id","bezeichnung"), + "lehre.tbl_anrechnungstatus" => array("status_kurzbz","bezeichnung_mehrsprachig"), "lehre.tbl_betreuerart" => array("betreuerart_kurzbz","beschreibung","aktiv"), "lehre.tbl_ferien" => array("bezeichnung","studiengang_kz","vondatum","bisdatum"), "lehre.tbl_lehreinheit" => array("lehreinheit_id","lehrveranstaltung_id","studiensemester_kurzbz","lehrfach_id","lehrform_kurzbz","stundenblockung","wochenrythmus","start_kw","raumtyp","raumtypalternativ","sprache","lehre","anmerkung","unr","lvnr","updateamum","updatevon","insertamum","insertvon","ext_id","lehrfach_id_old","gewicht"), diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 727a389e4..cbfbdcdc9 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -48,6 +48,26 @@ $phrases = array( ) ) ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'bearbeitungGesperrt', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Bearbeitung gesperrt', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Locked for editing', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'core', 'category' => 'global', @@ -2471,7 +2491,7 @@ $phrases = array( 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Lektor', + 'text' => 'LektorIn', 'description' => '', 'insertvon' => 'system' ), @@ -7988,7 +8008,2229 @@ Any unusual occurrences 'insertvon' => 'system' ) ) - ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'anerkennungNachgewiesenerKenntnisse', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anerkennung nachgewiesener Kenntnisse', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Recognition of Prior Knowledge', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'anrechnungBeantragen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anrechnung beantragen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Apply', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'antragStellen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Antrag stellen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Apply for Exemption', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'antragsdaten', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Antragsdaten', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Application data', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'nachweisdokumente', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Nachweisdokumente', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Verification Documents', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'person', + 'phrase' => 'personenkennzeichen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Personenkennzeichen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Personal identity number', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'hochladen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Hochladen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Upload', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'antragStellenText', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Ich beantrage die Feststellung der Gleichwertigkeit aufgrund', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'I apply for equivalence to be established on the basis of', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'antragStellenWegenZeugnis', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'eines Zeugnisses (vgl. § 4 Abs. 5 Satzung „Studienrechtliche Bestimmungen / Prüfungsordnung)', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'a certificate (see § 4 para. 5, Statute on Studies Act Provisions / Examination Regulations of the UASTW)', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'antragStellenWegenPraxis', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'der nachgewiesenen beruflichen Praxis ((vgl. § 4 Abs. 6 Satzung „Studienrechtliche Bestimmungen / Prüfungsordnung)', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'professional practice (see § 4 para. 6, Statute on Studies Act Provisions / Examination Regulations of the UASTW)', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'weitereInformationen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Weitere Informationen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Further information', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'antrag', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Antrag', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Application', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'anrechnungIst', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Antrag ist', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Application is', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'deadlineUeberschritten', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Deadline ist überschritten', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Deadline is exceeded', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'antragdatum', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Antragsdatum', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Application date', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'anrechnungenGenehmigen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anrechnungen genehmigen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Approve Applications for Recognition of Prior Knowledge', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'anrechnungGenehmigen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anrechnung genehmigen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Approve application for Recognition of Prior Knowledge', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'empfehlungAnfordern', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Empfehlung anfordern', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Request recommendation', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'genehmigen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Genehmigen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Approve', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'ablehnen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Ablehnen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Reject', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'empfehlung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Empfehlung', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Recommendation', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'begruendung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Begründung', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Reason', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'person', + 'phrase' => 'studentIn', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'StudentIn', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'student', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'nurEmpfohleneAnzeigen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Nur empfohlene anzeigen (die noch genehmigt/abgelehnt werden müssen)', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Show only recommended ones (that need to be approved/rejected)', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'nurNichtEmpfohleneAnzeigen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Nur nicht empfohlene anzeigen (die noch genehmigt/abgelehnt werden müssen)', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Show only not recommended ones (that need to be approved/rejected)', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'nurGenehmigteAnzeigen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Nur genehmigte anzeigen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Show only approved ones', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'nurAbgelehnteAnzeigen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Nur abgelehnte anzeigen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Show only rejected ones', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'nurFehlendeEmpfehlungenAnzeigen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Nur jene anzeigen, wo eine Empfehlung noch fehlt', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Show only those ones that need your recommendation', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'ja', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'ja', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'yes', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'nein', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'nein', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'no', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'anrechnungenPruefen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anrechnungen prüfen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Review Applications for Recognition of Prior Knowledge', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'empfehlen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Empfehlen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Recommend', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'nichtEmpfehlen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Nicht empfehlen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Do not recommend', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'nichtSelektierbarAufgrundVon', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Nicht selektierbar aufgrund von: ', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Not selectable because of: ', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'confirmTextAntragHatBereitsEmpfehlung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Mindestens 1 Antrag enthält bereits eine Empfehlung.\nWollen Sie wirklich für Ihre Auswahl eine Empfehlung anfordern und bereits vorhandene Empfehlungen dabei zurücksetzen?", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "At least one application was already recommended.\nDo you really want to request for recommendation for your selection?", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'herkunftDerKenntnisse', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Herkunft der Kenntnisse', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Origin of previous knowledge', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'herkunft', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Herkunft', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Origins', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'detailsicht', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Detailsicht', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Details', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'lehre', + 'phrase' => 'lektorInnen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'LektorInnen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Lectors', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'empfehlungPositivSubquestion', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Bitte bestätigen Sie: Anrechnung wird empfohlen, weil die Kenntnisse inhaltlich und umfangmäßig gleichwertig sind.", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Please confirm: Recognition and exemption is recommended for this application based on the documents submitted.", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'empfehlungPositivConfirmed', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Anrechnung wird empfohlen, weil die Kenntnisse inhaltlich und umfangmäßig gleichwertig sind.", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Recognition and exemption is recommended based on the documents submitted.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'empfehlungNegativPruefungNichtMoeglich', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anrechnung wird nicht empfohlen, weil die Prüfung der Gleichwertigkeit aus formalen Gründen (z.B. mangelhafte Unterlagen) nicht möglich war.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Equivalence can not be determined because the enclosures contain insufficient information as regards the teaching content.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'empfehlungNegativKenntnisseNichtGleichwertig', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anrechnung wird nicht empfohlen, weil die Kenntnisse inhaltlich und umfangmäßig nicht gleichwertig sind.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Equivalence can not be determined because of the insufficient learning objectives and the length of the course', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'empfehlungdatum', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Empfehlungsdatum', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Recommendation date', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'textUebernehmen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Text übernehmen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Use this text', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'bitteBegruendungAngeben', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Bitte geben Sie eine Begründung für die Ablehnung an und bestätigen danach.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Please give a reason why you do not recommend to approve this applications and confirm.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'moeglicheBegruendungen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Mögliche Begründungen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Possible reasons', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'andereBegruendung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Andere Begründung. Bitte im Notizfeld kurz angeben.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Other reasons. Please briefly state the reasons in the field for comments.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'begruendungWirdFuerAlleUebernommen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Die Begründung wird für alle gewählten Anträge übernommen.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'This reason will be used for all of the selected applications.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'empfehlungNegativConfirmed', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => ' Anrechnung wird nicht empfohlen.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Recognition and exemption is not recommended based on the documents submitted.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'empfehlungVon', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => ' Empfehlung von', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Recommended by', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'empfehlungenPositiv', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Bitte bestätigen Sie: Alle ausgewählten Anrechnungen werden empfohlen, weil die Kenntnisse inhaltlich und umfangmäßig gleichwertig sind.", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Please confirm: Recognition and exemption is recommended for these applications based on the documents submitted.", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'empfehlungenNegativ', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anrechnungen werden nicht empfohlen.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Recognitions and exemptions are not recommended.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'nochKeineEmpfehlung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Es wurde keine Empfehlung abgegeben.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'No request for recommendation.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'genehmigungNegativ', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Antrag wird nicht genehmigt.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Recognition and exemption is rejected based on the documents submitted.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'genehmigungNegativQuestion', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Antrag nicht genehmigen?', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Do you want to reject recognition and exemption for this application?', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'genehmigungenNegativ', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anträge werden nicht genehmigt.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Recognition and exemption are rejected for these applications based on the documents submitted.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'genehmigungenNegativQuestion', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anrechnungen nicht genehmigen?', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Do you want to reject recognition and exemption for these applications?', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'genehmigungNegativPruefungNichtMoeglich', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anrechnung wird nicht genehmigt, weil die Prüfung der Gleichwertigkeit aus formalen Gründen (z.B. mangelhafte Unterlagen) nicht möglich war.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Recognition and exemption is rejected because the enclosures contain insufficient information as regards the teaching content.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'genehmigungNegativKenntnisseNichtGleichwertig', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anrechnung wird nicht genehmigt, weil die Kenntnisse inhaltlich und umfangmäßig nicht gleichwertig sind.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Recognition and exemption is rejected because of the insufficient learning objectives and the length of the course.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'genehmigungenPositiv', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Bitte bestätigen Sie: Alle ausgewählten Anrechnungen werden genehmigt, weil die Kenntnisse inhaltlich und umfangmäßig gleichwertig sind.", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Please confirm: Recognition and exemption is approved for these applications based on the documents submitted.", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'genehmigungenPositivQuestion', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anrechnungen genehmigen?', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Do you want to approve recognition and exemption for these applications?', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'genehmigungPositiv', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anrechnung wird genehmigt, weil die Kenntnisse inhaltlich und umfangmäßig gleichwertig sind.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Recognition and exemption is approved based on the documents submitted.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'genehmigungPositivQuestion', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Antrag genehmigen?', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Do you want to approve recognition and exemption for this application?', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'genehmigungPositivSubquestion', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Bitte bestätigen Sie: Anrechnung wird genehmigt, weil die Kenntnisse inhaltlich und umfangmäßig gleichwertig sind.", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Please confirm: Recognition and exemption is approved for this application based on the documents submitted.", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'keineEmpfehlungAngefordert', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Es wurde noch keine Empfehlung angefordert.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'No recommendation has yet been requested.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'empfehlungAngefordertNochKeineEmpfehlung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Empfehlung wurde angefordert am ', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Recommendation was requested on ', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'genehmigung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Genehmigung', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Approvement', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'abgeschlossenVon', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Abgeschlossen von', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Closed by', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'abschlussdatum', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Abschlussdatum', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Closing date', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'nochKeineGenehmigung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Der Antrag auf Anerkennung der nachgewiesenen Kenntnisse erfordert Ihre Genehmigung / Ablehnung.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'The application is waiting for your approvement.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'uploadTooltipText', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => '

Max. Uploadvolumen: 2MB
Max. Anzahl Dokumente: 1
Tipp: Um mehrere Einzelseiten zu einer Datei zusammenfügen zu können, empfehlen wir Ihnen kostenlose Programme wie bspw. PDF Merge.

', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Max. Uploadvolume: 2MB
Max. document amount: 1
Hint: To combine more than one document we recommend using free pdf merging software like e.g. PDF Merge.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'anrechnungInfoTooltipText', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Wichtig: Bitte die Fristen, Voraussetzungen und Formvorgaben rechts in den Infoboxen beachten.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Important: Please pay attention to the information about deadlines and conditions provided in the right infobox.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'bestaetigen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Bestätigen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Confirm', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'empfehlungPositivQuestion', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anrechnung empfehlen?', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Do you want to recommend recognition and exemption for this application?', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'empfehlungenPositivQuestion', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anrechnungen empfehlen?', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Do you want to recommend recognition and exemption for these applications?', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'empfehlungNegativQuestion', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anrechnung nicht empfehlen?', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Don\'t you want to recommend recognition and exemption for this application?', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'empfehlungenNegativQuestion', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anrechnungen nicht empfehlen?', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Don\'t you want to recommend recognition and exemption for these applications??', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'anrechnungGrundTooltipText', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "
Beantragung aufgrund eines Zeugnisses
+ Bitte laden Sie das Zeugnis und weitere Nachweis-Dokumente (z.B. Syllabus, Lehrpläne, + Modulbeschreibung…) hoch. +

Die folgenden Informationen müssen enthalten sein: Name der das Zeugnis ausstellenden Institution; + Beschreibung der Lehrinhalte und / oder Lernergebnisse; + Zeitlicher Umfang der Lehrveranstaltung (z. B. SWS, ECTS, Unterrichtsstunden…) +

+
Beantragung aufgrund nachgewiesener beruflicher Praxis
+ Soll die Anrechnung auf der Grundlage der beruflichen Praxis erfolgen, laden Sie bitte eine detaillierte + Tätigkeitsbeschreibung hoch. Dies kann durch betriebliche Ausbildungsnachweise und / oder Nachweise von + einschlägigen beruflichen Tätigkeiten mit Zeitangaben (z. B. durch ein qualifiziertes Arbeitszeugnis + oder durch Bestätigungen des Arbeitgebers) erfolgen. +

Falls Sie für den Nachweis der Gleichwertigkeit in Bundesgesetzblättern veröffentlichte Lehrpläne (vgl. HTL, HAK…) verwenden, laden Sie bitte nur die für die Anrechnung relevanten Teile hoch oder markieren Sie diese entsprechend. +

Falls diese Informationen nicht enthalten sind, können wir den Antrag nicht prüfen und er wird abgelehnt. + ", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "
Application for recognition based on a certificate
+ Please upload the certificate and other supporting documents (e.g. syllabus, curricula, module description ...). +

The following information must be included: + name of the institution issuing the certificate; + description of the teaching content and / or learning outcomes; + duration of the course (e.g. ECTS, contact hours per week, total number of hours taught...) +

+
Application for recognition based on professional practice
+ If the exemption is to be based on professional practice, please upload a detailed job description. This can be done through proof of company training and / or proof of relevant occupational activities with time information (e.g. through a qualified job reference or through confirmation from the employer). +

If you use curricula published in federal law gazettes (cf. HTL, HAK ...) to prove equivalence, please upload only the parts relevant for recognition or mark them accordingly. +

If this information is not included, we will not be able to check the application and it will be rejected.", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'anrechnungGrundAllgemeinTooltipText', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Falls Sie für den Nachweis der Gleichwertigkeit in Bundesgesetzblättern veröffentlichte Lehrpläne (vgl. HTL, HAK…) verwenden, laden Sie bitte nur die für die Anrechnung relevanten Teile hoch oder markieren Sie diese entsprechend. +

Falls diese Informationen nicht enthalten sind, können wir den Antrag nicht prüfen und er wird abgelehnt.", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "If you use curricula published in federal law gazettes (cf. HTL, HAK ...) to prove equivalence, please upload only the parts relevant for recognition or mark them accordingly. +

If this information is not included, we will not be able to check the application and it will be rejected.", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'anrechnungGrundZeugnisTooltipText', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "
Beantragung aufgrund eines Zeugnisses
+ Bitte laden Sie das Zeugnis und weitere Nachweis-Dokumente (z.B. Syllabus, Lehrpläne, + Modulbeschreibung…) hoch. +

Die folgenden Informationen müssen enthalten sein: Name der das Zeugnis ausstellenden Institution; + Beschreibung der Lehrinhalte und / oder Lernergebnisse; + Zeitlicher Umfang der Lehrveranstaltung (z. B. SWS, ECTS, Unterrichtsstunden…)", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "
Application for recognition based on a certificate
+ Please upload the certificate and other supporting documents (e.g. syllabus, curricula, module description ...). +

The following information must be included: + name of the institution issuing the certificate; + description of the teaching content and / or learning outcomes; + duration of the course (e.g. ECTS, contact hours per week, total number of hours taught...) + ", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'anrechnungGrundBerufTooltipText', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "
Beantragung aufgrund nachgewiesener beruflicher Praxis
+ Soll die Anrechnung auf der Grundlage der beruflichen Praxis erfolgen, laden Sie bitte eine detaillierte + Tätigkeitsbeschreibung hoch. Dies kann durch betriebliche Ausbildungsnachweise und / oder Nachweise von + einschlägigen beruflichen Tätigkeiten mit Zeitangaben (z. B. durch ein qualifiziertes Arbeitszeugnis + oder durch Bestätigungen des Arbeitgebers) erfolgen.", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "
Application for recognition based on professional practice
+ If the exemption is to be based on professional practice, please upload a detailed job description. This can be done through proof of company training and / or proof of relevant occupational activities with time information (e.g. through a qualified job reference or through confirmation from the employer).", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'requestAnrechnungInfoFristenTitle', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Beantragung: Fristen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Deadlines', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'requestAnrechnungInfoFristenBody', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Bitte laden Sie den Antrag in deutscher oder englischer Sprache für das + +
Die Entscheidung über den Antrag erfolgt in der Regel innerhalb von zwei Wochen ab dem 15. September + bzw. 22. Februar. +

Für jede Lehrveranstaltung ist ein gesonderter Antrag beizubringen.", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Please upload the application in German or English + +
The decision on the application is usually made within two weeks from September 15 (winter semester) or February 22 (summer semester). +

A separate application must be submitted for each course.", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), +array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'requestAnrechnungInfoNachweisdokumenteTitle', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Nachweisdokumente: Voraussetzung', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Prerequisites for Verification Documents', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'requestAnrechnungInfoNachweisdokumenteBody', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Bitte laden Sie mehrere Nachweis-Dokumente zusammengefasst in einem PDF-Dokument hoch. +

Falls Sie für den Nachweis der Gleichwertigkeit in Bundesgesetzblättern veröffentlichte Lehrpläne (vgl. HTL, HAK…) verwenden, + laden Sie bitte nur die für die Anrechnung relevanten Teile hoch oder markieren Sie diese entsprechend. +

Falls diese Informationen nicht enthalten sind, kann der Antrag auch abgelehnt werden.", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Please combine and upload more than one verification document in one PDF document. +

If you use curricula published in federal law gazettes (cf. HTL, HAK ...) to prove equivalence, please upload only the parts relevant for recognition or mark them accordingly. +

If this information is not included, the application might be rejected.", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'requestAnrechnungInfoHerkunftKenntnisseTitle', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Herkunft der Kenntnisse: Angaben', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Prerequisites for Origin of previous Knowledge', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'requestAnrechnungInfoHerkunftKenntnisseBody', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "
Bei Anrechnungen von schulischen bzw. hochschulischen Zeugnissen
+ Bitte geben Sie an, wo Sie die Kenntnisse erworben haben: (Hoch-)Schultyp, Standort, Fachrichtung. + Beispiel Schule: HTL Mödling, Fahrzeugtechnik; Beispiel Hochschule: TU Wien, Bachelor + Wirtschaftsinformatik +
+
Bei Anrechnungen von beruflicher Praxis
+ Bitte geben Sie Unternehmen, Position und Funktion sowie Dauer der Beschäftigung an.", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "
If school or university certificates are to be recognized
+ Please indicate where you acquired the knowledge: type of (university) school, location, subject area. Example school: HTL Mödling, vehicle technology; Example university: Vienna University of Technology, Bachelor of Business Informatics +
+
If professional practice is to be recognized
+ Please state company, position and function as well as length of employment.", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'reviewAnrechnungInfoFristenTitle', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Beantragung: Fristen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Deadlines', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'reviewAnrechnungInfoFristenBody', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Die Entscheidung über den Antrag durch die Studiengangsleitung sollte + ", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "The decision on the application is usually made by the program director + ", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'reviewAnrechnungInfoAntragVoraussetungenTitle', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Antrag: Voraussetzungen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Prerequisites for Application', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'reviewAnrechnungInfoAntragVoraussetungenBody', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Eine Anerkennung setzt voraus, dass die erworbenen Kenntnisse mit dem Inhalt und Umfang der Lehrveranstaltung gleichwertig sind. +

Positiv absolvierte Prüfungen von allgemein- und berufsbildenden höheren Schulen sind anzurechnen, sofern sie hinsichtlich Inhalt und Umfang mit der zu erlassenden Lehrveranstaltung gleichwertig sind (vgl. Satzungsteil Studienrechtliche Bestimmungen / Prüfungsordnung, § 4 Abs. 8). +

+ Umfangmäßige Gleichwertigkeit Schule - Hochschule: +
1 ECTS an der FH Technikum Wien entspricht einem Arbeitsaufwand von 25 Stunden, ein Schulhalbjahr besteht aus ca. 20 Wochen. +
Das heißt eine Unterrichtsstunde pro Woche sind insgesamt ca. 20 Stunden.", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "A prerequisite for recognition is that the knowledge acquired is equivalent to the content and scope of the course. +

Successfully completed examinations from general and vocational secondary schools are to be recognized as long as they are equivalent to the course to be exempted with regard to content and scope (cf. Statute on Studies Act Provisions / Examination Regulations, § 4 Para. 8). +

+ Equivalence school - university in terms of scope: +
1 ECTS at the UAS Technikum Wien corresponds to a workload of 25 hours, a school semester consists of approx. 20 weeks. +
i.e. one teaching hour per week is a total of approx. 20 hours.", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'reviewAnrechnungInfoNachweisdokumenteTitle', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Nachweisdokumente: Voraussetzung', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Prerequisites for Verification Documents', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'reviewAnrechnungInfoNachweisdokumenteBody', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "
Beantragung aufgrund eines Zeugnisses
+ Falls für den Nachweis der Gleichwertigkeit in Bundesgesetzblättern veröffentlichte Lehrpläne (vgl. HTL, HAK…) verwendet werden, sind entweder nur die für die Anrechnung relevanten Teile hochzuladen oder entsprechend zu markieren. +

Die folgenden Informationen müssen enthalten sein: +
    +
  1. Name der das Zeugnis ausstellenden Institution
  2. +
  3. Beschreibung der Lehrinhalte und / oder Lernergebnisse
  4. +
  5. Zeitlicher Umfang der Lehrveranstaltung (z. B. SWS, ECTS, Unterrichtsstunden…)
  6. +
+
+
Beantragung aufgrund nachgewiesener beruflicher Praxis
+ Es wird eine detaillierte Tätigkeitsbeschreibung benötigt. Dies kann durch betriebliche Ausbildungsnachweise und / oder Nachweise von + einschlägigen beruflichen Tätigkeiten mit Zeitangaben (z. B. durch ein qualifiziertes Arbeitszeugnis + oder durch Bestätigungen des Arbeitgebers) erfolgen. +

Falls diese Informationen nicht enthalten sind, kann der Antrag nicht geprüft werden und er wird abgelehnt.", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => '
Application for recognition based on a certificate
+ To prove equivalence of curricula published in federal law gazettes (cf. HTL, HAK ...), only the parts relevant for recognition should be uploaded or marked accordingly. +

The following information must be included: +
    +
  1. name of the institution issuing the certificate
  2. +
  3. description of the teaching content and / or learning outcomes
  4. +
  5. duration of the course (e.g. ECTS, contact hours per week, total number of hours taught...)
  6. +
+
+
Application for recognition based on professional practice
+ If the exemption is to be based on professional practice, an upload of a detailed job description is required. This can be done through proof of company training and / or proof of relevant occupational activities with time information (e.g. through a qualified job reference or through confirmation from the employer). +

If this information is not included, the application can not be checked adequately and it might need to be rejected.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'reviewAnrechnungInfoHerkunftKenntnisseTitle', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Herkunft der Kenntnisse: Angaben', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Prerequisites for Origin of previous Knowledge', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'reviewAnrechnungInfoHerkunftKenntnisseBody', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "
Bei Anrechnungen von schulischen bzw. hochschulischen Zeugnissen
+ Angabe, wo die Kenntnisse erworben worden sind: (Hoch-)Schultyp, Standort, Fachrichtung. Beispiel Schule: HTL Mödling, Fahrzeugtechnik; Beispiel Hochschule: TU Wien, Bachelor + Wirtschaftsinformatik +
+
Bei Anrechnungen von beruflicher Praxis
+ Angabe von Unternehmen, Position und Funktion sowie Dauer der Beschäftigung.", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "
If school or university certificates are to be recognized
+ Indication where the knowledge has been acquired: type of (university) school, location, subject area. Example school: HTL Mödling, vehicle technology; Example university: Vienna University of Technology, Bachelor of Business Informatics +
+
If professional practice is to be recognized
+ Specification of company, position and function as well as length of employment.", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'systemfehler', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Systemfehler
Bitte kontaktieren Sie den Systemadministrator.", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "System Error
Please contact the system administrator.", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'bitteMindEinenAntragWaehlen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Bitte wählen Sie zumindest einen Antrag aus.", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Please select at least one application.", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'bitteBegruendungAngeben', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Bitte geben Sie eine Begr¨ndung an.", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Please provide a reason.", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'anrechnungenWurdenEmpfohlen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => " Anrechnungsanträge wurden empfohlen.", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => " Applications have been recommended.", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'anrechnungenWurdenNichtEmpfohlen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => " Anrechnungsanträge wurden nicht empfohlen.", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => " Applications have not been recommended.", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'anrechnungenWurdenGenehmigt', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => " Anrechnungsanträge wurden genehmigt.", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => " Applications have been approved.", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'anrechnungenWurdenAbgelehnt', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => " Anrechnungsanträge wurden abgelehnt.", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => " Applications have been rejected.", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'empfehlungWurdeAngefordert', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => " Empfehlung wurde angefordert.", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => " Recommendation has been requested.", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'alleInBearbeitungSTGL', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Alle anzeigen, die durch die Studiengangsleitung bearbeitet werden.", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Show all that are processed by the study course director.", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + );