diff --git a/application/controllers/lehre/Pruefungsprotokoll.php b/application/controllers/lehre/Pruefungsprotokoll.php index 4d34b08ca..aa3eb4c73 100644 --- a/application/controllers/lehre/Pruefungsprotokoll.php +++ b/application/controllers/lehre/Pruefungsprotokoll.php @@ -215,8 +215,11 @@ class Pruefungsprotokoll extends Auth_Controller if (hasData($abschlusspruefung)) { $abschlusspruefung_data = getData($abschlusspruefung); - if ($this->permissionlib->isBerechtigt('admin') || - (isset($abschlusspruefung_data->studiengang_kz) && $this->permissionlib->isBerechtigt('assistenz', 'suid', $abschlusspruefung_data->studiengang_kz)) + if ($this->permissionlib->isBerechtigt('admin') + || ( + isset($abschlusspruefung_data->studiengang_kz) + && $this->permissionlib->isBerechtigt('assistenz', 'suid', $abschlusspruefung_data->studiengang_kz) + ) || $this->_uid === $abschlusspruefung_data->uid_vorsitz) $result = $abschlusspruefung; else diff --git a/application/models/education/Abschlusspruefung_model.php b/application/models/education/Abschlusspruefung_model.php index 0ba8fd55c..fda196d23 100644 --- a/application/models/education/Abschlusspruefung_model.php +++ b/application/models/education/Abschlusspruefung_model.php @@ -100,12 +100,14 @@ class Abschlusspruefung_model extends DB_Model if (isError($abschlussarbeit)) return $abschlussarbeit; + if (hasData($abschlussarbeit)) { $abschlussarbeit = getData($abschlussarbeit)[0]; $abschlusspruefungdata->projektarbeit_studiengangstyp_name = $abschlussarbeit->projekttyp_kurzbz; $abschlusspruefungdata->abschlussarbeit_titel = $abschlussarbeit->titel; $abschlusspruefungdata->abschlussarbeit_note = $abschlussarbeit->note; + $abschlusspruefungdata->abschlussarbeit_sprache = $abschlussarbeit->sprache_bezeichnung; } } } diff --git a/application/models/education/Projektarbeit_model.php b/application/models/education/Projektarbeit_model.php index 3b1ea55e5..31e6301ba 100644 --- a/application/models/education/Projektarbeit_model.php +++ b/application/models/education/Projektarbeit_model.php @@ -23,9 +23,11 @@ class Projektarbeit_model extends DB_Model */ public function getProjektarbeit($student_uid, $studiengang_kz = null, $studiensemester_kurzbz = null, $projekttyp = null, $final = null) { + $sprache_index = "COALESCE((SELECT index FROM public.tbl_sprache WHERE sprache=" . $this->escape(getUserLanguage()) . " LIMIT 1), 1)"; $qry = "SELECT pa.*, tbl_projekttyp.bezeichnung, tbl_lehreinheit.studiensemester_kurzbz, tbl_lehrveranstaltung.lehrveranstaltung_id, + tbl_sprache.bezeichnung[".$sprache_index."] AS sprache_bezeichnung tbl_firma.name AS firma_name, ( SELECT @@ -44,6 +46,7 @@ class Projektarbeit_model extends DB_Model JOIN lehre.tbl_lehreinheit USING (lehreinheit_id) JOIN lehre.tbl_lehrveranstaltung USING (lehrveranstaltung_id) LEFT JOIN public.tbl_firma USING (firma_id) + LEFT JOIN public.tbl_sprache ON tbl_projektarbeit.sprache = tbl_sprache.sprache WHERE pa.student_uid = ?"; diff --git a/application/views/lehre/pruefungsprotokoll.php b/application/views/lehre/pruefungsprotokoll.php index 3ac23da6a..cdc206377 100644 --- a/application/views/lehre/pruefungsprotokoll.php +++ b/application/views/lehre/pruefungsprotokoll.php @@ -9,22 +9,8 @@ $sitesettings = array( 'ajaxlib' => true, 'sbadmintemplate3' => true, 'phrases' => array( - 'abschlusspruefung' => array( - 'freigegebenAm', - 'pruefungGespeichert', - 'pruefungSpeichernFehler', - 'abschlussbeurteilungLeer', - 'beginnzeitLeer', - 'beginnzeitFormatError', - 'endezeitLeer', - 'endezeitFormatError', - 'endezeitBeforeError', - 'verfNotice' - ), - 'ui' => array( - 'stunde', - 'minute' - ) + 'abschlusspruefung', + 'ui' ), 'customCSSs' => array( 'public/css/sbadmin2/admintemplate_contentonly.css', @@ -37,10 +23,18 @@ $sitesettings = array( ) ); -$this->load->view( - 'templates/FHC-Header', - $sitesettings -); +if(defined('CIS4')){ + $this->load->view( + 'templates/CISVUE-Header', + $sitesettings + ); +}else{ + $this->load->view( + 'templates/FHC-Header', + $sitesettings + ); +} + ?>
@@ -161,6 +155,14 @@ $this->load->view( studiengangstyp == 'Bachelor' ? $this->p->t('abschlusspruefung', 'pruefungsgegenstandBachelor') : $this->p->t('abschlusspruefung', 'pruefungsgegenstandMaster')) ?> + + + p->t('abschlusspruefung', 'spracheDerArbeit') ?>  + + + abschlussarbeit_sprache ?? '' ?> + + p->t('global', 'notizen')); ?> @@ -201,7 +203,9 @@ $this->load->view(

freigabedatum); ?> - +

@@ -236,7 +240,14 @@ $this->load->view(
load->view( - 'templates/FHC-Footer', - $sitesettings -); +if (defined('CIS4')) { + $this->load->view( + 'templates/CISVUE-Footer', + $sitesettings + ); +} else { + $this->load->view( + 'templates/FHC-Footer', + $sitesettings + ); +} \ No newline at end of file diff --git a/public/js/lehre/pruefungsprotokoll.js b/public/js/lehre/pruefungsprotokoll.js index 8af7d6f21..7261e7aff 100644 --- a/public/js/lehre/pruefungsprotokoll.js +++ b/public/js/lehre/pruefungsprotokoll.js @@ -11,11 +11,6 @@ $("document").ready(function() { $("#saveProtocolBtn, #freigebenProtocolBtn").click( function() { - var freigebendata = { - freigeben: false, - password: null - } - var data = { abschlussbeurteilung_kurzbz: $("#abschlussbeurteilung_kurzbz").val(), protokoll: $("#protokoll").val(), @@ -25,11 +20,16 @@ $("document").ready(function() { if ($(this).prop("id") === 'freigebenProtocolBtn') { - freigebendata.freigeben = true; - freigebendata.password = $("#password").val(); + Pruefungsprotokoll.freigebendata.freigeben = true; + Pruefungsprotokoll.freigebendata.password = $("#password").val(); + } + else + { + Pruefungsprotokoll.freigebendata.freigeben = false; + Pruefungsprotokoll.freigebendata.password = null; } - var checkFields = Pruefungsprotokoll.checkFields(data, freigebendata, $("#verfCheck").prop('checked')); + var checkFields = Pruefungsprotokoll.checkFields(data, $("#verfCheck").prop('checked')); $("#protocolform td").removeClass('has-error'); if (checkFields.length > 0) { @@ -50,7 +50,7 @@ $("document").ready(function() { return; } - Pruefungsprotokoll.saveProtokoll($("#abschlusspruefung_id").val(), freigebendata, data); + Pruefungsprotokoll.saveProtokoll($("#abschlusspruefung_id").val(), data); } ) @@ -71,6 +71,10 @@ $("document").ready(function() { var Pruefungsprotokoll = { abschlussbeurteilung_kurzbz: '', + freigebendata: { + freigeben: false, + password: null + }, checkVerfassung: function() { // if student not mentally and physically fit (checkbox), no grade can be set @@ -85,11 +89,11 @@ var Pruefungsprotokoll = { $("#verfNotice").html(FHC_PhrasesLib.t("abschlusspruefung", "verfNotice")); } }, - checkFields: function(data, freigebendata, verfChecked) + checkFields: function(data, verfChecked) { var errors = []; - if (data.abschlussbeurteilung_kurzbz == "" && freigebendata.freigeben === true && verfChecked) + if (data.abschlussbeurteilung_kurzbz == "" && Pruefungsprotokoll.freigebendata.freigeben === true && verfChecked) errors.push({"abschlussbeurteilung_kurzbz": FHC_PhrasesLib.t("abschlusspruefung", "abschlussbeurteilungLeer")}); var zeitregex = /^[0-2][0-9]:[0-5][0-9]$/; @@ -115,15 +119,19 @@ var Pruefungsprotokoll = { return errors; }, + setSaveButtonDisabled: function() + { + $("#saveProtocolBtn").prop("disabled", true).prop("title", FHC_PhrasesLib.t("abschlusspruefung", "bereitsFreigegeben")); + }, // ajax calls // ----------------------------------------------------------------------------------------------------------------- - saveProtokoll: function(abschlusspruefung_id, freigeben, data) + saveProtokoll: function(abschlusspruefung_id, data) { FHC_AjaxClient.ajaxCallPost( CALLED_PATH + '/saveProtokoll', { abschlusspruefung_id: abschlusspruefung_id, - freigebendata: freigeben, + freigebendata: Pruefungsprotokoll.freigebendata, protocoldata: data }, { @@ -133,7 +141,7 @@ var Pruefungsprotokoll = { var dataresponse = FHC_AjaxClient.getData(data); if (dataresponse.freigabedatum) { - $("#saveProtocolBtn").prop("disabled", true); + Pruefungsprotokoll.setSaveButtonDisabled(); $("#freigegebenText").html('  ' + FHC_PhrasesLib.t("abschlusspruefung", "freigegebenAm") + ' ' + dataresponse.freigabedatum) } diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 001c85b8b..8a159dbdc 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -60746,6 +60746,48 @@ I have been informed that I am under no obligation to consent to the transmissio ) ), // CIS4 GESAMTNOTENEINGABE ENDE ------------------------------------------------------------------------------------ + //**************************** Pruefungsprotokolle start + array( + 'app' => 'core', + 'category' => 'abschlusspruefung', + 'phrase' => 'bereitsFreigegeben', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Protokoll ist bereits freigegeben', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Record of examination already approved', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'abschlusspruefung', + 'phrase' => 'spracheDerArbeit', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Sprache der', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Language of', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + //**************************** Pruefungsprotokolle end );