mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
Cleanup tasks: add factory, validations in form, phrases ID
This commit is contained in:
@@ -30,19 +30,19 @@ class Pruefung extends FHCAPI_Controller
|
||||
parent::__construct([
|
||||
'getPruefungen' => ['admin:r', 'assistenz:r'],
|
||||
'loadPruefung' => ['admin:r', 'assistenz:r'],
|
||||
'getTypenPruefungen' => self::PERM_LOGGED,
|
||||
'getLehreinheiten' => self::PERM_LOGGED,
|
||||
'getAllLehreinheiten' => self::PERM_LOGGED,
|
||||
'getLvsByStudent' => self::PERM_LOGGED,
|
||||
'getLvsandLesByStudent' => self::PERM_LOGGED,
|
||||
'getLvsAndMas' => self::PERM_LOGGED,
|
||||
'getMitarbeiterLv' => self::PERM_LOGGED,
|
||||
'getNoten' => self::PERM_LOGGED,
|
||||
'checkZeugnisnoteLv' => self::PERM_LOGGED,
|
||||
'checkTermin1' => self::PERM_LOGGED,
|
||||
'insertPruefung' => ['admin:rw', 'assistenz:rw'],
|
||||
'updatePruefung' =>['admin:rw', 'assistenz:rw'],
|
||||
'deletePruefung' =>['admin:rw', 'assistenz:rw'],
|
||||
'getTypenPruefungen' => ['admin:r', 'assistenz:r'],
|
||||
'getLehreinheiten' => ['admin:r', 'assistenz:r'],
|
||||
'getAllLehreinheiten' => ['admin:r', 'assistenz:r'],
|
||||
'getLvsByStudent' => ['admin:r', 'assistenz:r'],
|
||||
'getLvsandLesByStudent' => ['admin:r', 'assistenz:r'],
|
||||
'getLvsAndMas' => ['admin:r', 'assistenz:r'],
|
||||
'getMitarbeiterLv' => ['admin:r', 'assistenz:r'],
|
||||
'getNoten' => ['admin:r', 'assistenz:r'],
|
||||
'checkZeugnisnoteLv' => ['admin:r', 'assistenz:r'],
|
||||
'checkTermin1' => ['admin:r', 'assistenz:r'],
|
||||
'insertPruefung' => self::PERM_LOGGED,
|
||||
'updatePruefung' =>self::PERM_LOGGED,
|
||||
'deletePruefung' =>self::PERM_LOGGED,
|
||||
]);
|
||||
|
||||
//Load Models
|
||||
@@ -185,30 +185,18 @@ class Pruefung extends FHCAPI_Controller
|
||||
public function insertPruefung()
|
||||
{
|
||||
$authUID = getAuthUID();
|
||||
$lehrveranstaltung_id = $this->input->post('lehrveranstaltung_id');
|
||||
|
||||
$lehreinheit_id = $this->input->post('lehreinheit_id');
|
||||
$student_uid = $this->input->post('student_uid');
|
||||
$mitarbeiter_uid = $this->input->post('mitarbeiter_uid');
|
||||
$datum = $this->input->post('datum');
|
||||
$note = $this->input->post('note');
|
||||
$pruefungstyp_kurzbz = $this->input->post('pruefungstyp_kurzbz');
|
||||
$anmerkung = $this->input->post('anmerkung');
|
||||
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$this->form_validation->set_rules('lehrveranstaltung_id', $this->p->t('lehre', 'lehrveranstaltung'), 'required', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('lehre', 'lehrveranstaltung')]),
|
||||
]);
|
||||
|
||||
$this->form_validation->set_rules('lehreinheit_id', $this->p->t('lehre', 'lehreinheit'), 'required', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('lehre', 'lehreinheit')]),
|
||||
]);
|
||||
|
||||
$this->form_validation->set_rules('pruefungstyp_kurzbz', $this->p->t('lehre', 'pruefung'), 'required', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('global', 'typ')]),
|
||||
]);
|
||||
|
||||
$this->form_validation->set_rules(
|
||||
'datum',
|
||||
$this->p->t('global', 'datum'),
|
||||
@@ -226,7 +214,7 @@ class Pruefung extends FHCAPI_Controller
|
||||
{
|
||||
$this->load->model('education/Lehreinheit_model', 'LehreinheitModel');
|
||||
|
||||
$result = $this->LehreinheitModel->load($lehreinheit_id);
|
||||
$result = $this->LehreinheitModel->load($this->input->post('lehreinheit_id'));
|
||||
|
||||
$lehreinheit = $this->getDataOrTerminateWithError($result);
|
||||
$studiensemester_kurzbz = current($lehreinheit)->studiensemester_kurzbz;
|
||||
@@ -238,13 +226,13 @@ class Pruefung extends FHCAPI_Controller
|
||||
}
|
||||
|
||||
$result = $this->PruefungModel->insert([
|
||||
'lehreinheit_id' => $lehreinheit_id,
|
||||
'student_uid' => $student_uid,
|
||||
'mitarbeiter_uid' => $mitarbeiter_uid,
|
||||
'datum' => $datum,
|
||||
'pruefungstyp_kurzbz' => $pruefungstyp_kurzbz,
|
||||
'note' => $note,
|
||||
'anmerkung' => $anmerkung,
|
||||
'lehreinheit_id' => $this->input->post('lehreinheit_id'),
|
||||
'student_uid' => $this->input->post('student_uid'),
|
||||
'mitarbeiter_uid' => $this->input->post('mitarbeiter_uid'),
|
||||
'datum' => $this->input->post('datum'),
|
||||
'pruefungstyp_kurzbz' => $this->input->post('pruefungstyp_kurzbz'),
|
||||
'note' => $this->input->post('note'),
|
||||
'anmerkung' => $this->input->post('anmerkung'),
|
||||
'insertamum' => date('c'),
|
||||
'insertvon' => $authUID,
|
||||
]);
|
||||
@@ -255,9 +243,9 @@ class Pruefung extends FHCAPI_Controller
|
||||
$this->load->model('education/Zeugnisnote_model', 'ZeugnisnoteModel');
|
||||
|
||||
$result = $this->ZeugnisnoteModel->loadWhere(array(
|
||||
'lehrveranstaltung_id' => $lehrveranstaltung_id,
|
||||
'student_uid' => $student_uid,
|
||||
'studiensemester_kurzbz' => $studiensemester_kurzbz));
|
||||
'lehrveranstaltung_id' => $this->input->post('lehrveranstaltung_id'),
|
||||
'student_uid' => $this->input->post('student_uid'),
|
||||
'studiensemester_kurzbz' => $studiensemester_kurzbz));
|
||||
|
||||
if (isError($result))
|
||||
{
|
||||
@@ -268,12 +256,12 @@ class Pruefung extends FHCAPI_Controller
|
||||
{
|
||||
//insert zeugnisnote, if not existing
|
||||
$result = $this->ZeugnisnoteModel->insert(array(
|
||||
'lehrveranstaltung_id' => $lehrveranstaltung_id,
|
||||
'student_uid' => $student_uid,
|
||||
'lehrveranstaltung_id' => $this->input->post('lehrveranstaltung_id'),
|
||||
'student_uid' => $this->input->post('student_uid'),
|
||||
'studiensemester_kurzbz' => $studiensemester_kurzbz,
|
||||
'note' => $note,
|
||||
'note' => $this->input->post('note'),
|
||||
'uebernahmedatum' => date('c'),
|
||||
'benotungsdatum' => $datum,
|
||||
'benotungsdatum' => $this->input->post('datum'),
|
||||
'insertamum' => date('c'),
|
||||
'insertvon' => $authUID
|
||||
));
|
||||
@@ -288,12 +276,12 @@ class Pruefung extends FHCAPI_Controller
|
||||
$return_code = 0;
|
||||
|
||||
//handling Termin1 if not existing
|
||||
if($pruefungstyp_kurzbz == "Termin2")
|
||||
if($this->input->post('pruefungstyp_kurzbz') == "Termin2")
|
||||
{
|
||||
$resultP = $this->PruefungModel->loadWhere(array(
|
||||
'lehreinheit_id' => $lehreinheit_id,
|
||||
'student_uid' => $student_uid,
|
||||
'pruefungstyp_kurzbz' => 'Termin1'));
|
||||
'lehreinheit_id' => $this->input->post('lehreinheit_id'),
|
||||
'student_uid' => $this->input->post('student_uid'),
|
||||
'pruefungstyp_kurzbz' => 'Termin1'));
|
||||
|
||||
if (isError($resultP))
|
||||
{
|
||||
@@ -306,9 +294,9 @@ class Pruefung extends FHCAPI_Controller
|
||||
$this->ZeugnisnoteModel->addJoin('lehre.tbl_lehreinheit', 'lehrveranstaltung_id');
|
||||
|
||||
$resultP = $this->ZeugnisnoteModel->loadWhere(array(
|
||||
'lehrveranstaltung_id' => $lehrveranstaltung_id,
|
||||
'student_uid' => $student_uid,
|
||||
'lehre.tbl_zeugnisnote.studiensemester_kurzbz' => $studiensemester_kurzbz));
|
||||
'lehrveranstaltung_id' => $this->input->post('lehrveranstaltung_id'),
|
||||
'student_uid' => $this->input->input->post('student_uid'),
|
||||
'lehre.tbl_zeugnisnote.studiensemester_kurzbz' => $studiensemester_kurzbz));
|
||||
if (isError($resultP))
|
||||
{
|
||||
$this->terminateWithError(getError($resultP), self::ERROR_TYPE_GENERAL);
|
||||
@@ -320,9 +308,9 @@ class Pruefung extends FHCAPI_Controller
|
||||
$dataNote = current(getData($resultP));
|
||||
|
||||
$resultN = $this->PruefungModel->insert([
|
||||
'lehreinheit_id' => $lehreinheit_id,
|
||||
'student_uid' => $student_uid,
|
||||
'mitarbeiter_uid' => $mitarbeiter_uid,
|
||||
'lehreinheit_id' => $this->input->post('lehreinheit_id'),
|
||||
'student_uid' => $this->input->post('student_uid'),
|
||||
'mitarbeiter_uid' => $this->input->post('mitarbeiter_uid'),
|
||||
'datum' => $dataNote->benotungsdatum,
|
||||
'pruefungstyp_kurzbz' => 'Termin1',
|
||||
'note' => $dataNote->note,
|
||||
@@ -347,7 +335,7 @@ class Pruefung extends FHCAPI_Controller
|
||||
? $benotungsdatum
|
||||
: $uebernahmedatum;
|
||||
|
||||
if ($checkDate >= $datum && $note !== $note->note)
|
||||
if ($checkDate >= $this->input->post('datum') && $note !== $note->note)
|
||||
{
|
||||
$this->terminateWithSuccess($return_code + 2);
|
||||
}
|
||||
@@ -373,43 +361,17 @@ class Pruefung extends FHCAPI_Controller
|
||||
|
||||
$authUID = getAuthUID();
|
||||
|
||||
$lehreinheit_id = $this->input->post('lehreinheit_id');
|
||||
$student_uid = $this->input->post('student_uid');
|
||||
$mitarbeiter_uid = $this->input->post('mitarbeiter_uid');
|
||||
$datum = $this->input->post('datum');
|
||||
$note = $this->input->post('note');
|
||||
$pruefungstyp_kurzbz = $this->input->post('pruefungstyp_kurzbz');
|
||||
$anmerkung = $this->input->post('anmerkung');
|
||||
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$this->form_validation->set_rules(
|
||||
'lehrveranstaltung_id',
|
||||
$this->p->t('lehre', 'lehrveranstaltung'),
|
||||
'required',
|
||||
[
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('lehre', 'lehrveranstaltung')]),
|
||||
]
|
||||
);
|
||||
|
||||
$this->form_validation->set_rules(
|
||||
'lehreinheit_id',
|
||||
$this->p->t('lehre', 'lehreinheit'),
|
||||
'required',
|
||||
[
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('lehre', 'lehreinheit')]),
|
||||
]
|
||||
);
|
||||
|
||||
$this->form_validation->set_rules(
|
||||
'pruefungstyp_kurzbz',
|
||||
$this->p->t('lehre', 'pruefung'),
|
||||
'required',
|
||||
[
|
||||
$this->form_validation->set_rules('lehrveranstaltung_id', $this->p->t('lehre', 'lehrveranstaltung'), 'required', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('lehre', 'lehrveranstaltung')]),
|
||||
]);
|
||||
$this->form_validation->set_rules('lehreinheit_id', $this->p->t('lehre', 'lehreinheit'), 'required', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('lehre', 'lehreinheit')]),
|
||||
]);
|
||||
$this->form_validation->set_rules('pruefungstyp_kurzbz', $this->p->t('lehre', 'pruefung'), 'required', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => $this->p->t('global', 'typ')]),
|
||||
]
|
||||
);
|
||||
|
||||
]);
|
||||
$this->form_validation->set_rules(
|
||||
'datum',
|
||||
$this->p->t('global', 'datum'),
|
||||
@@ -425,22 +387,22 @@ class Pruefung extends FHCAPI_Controller
|
||||
[
|
||||
'pruefung_id' => $pruefung_id
|
||||
],
|
||||
[ 'lehreinheit_id' => $lehreinheit_id,
|
||||
'student_uid' => $student_uid,
|
||||
'mitarbeiter_uid' => $mitarbeiter_uid,
|
||||
'note' => $note,
|
||||
'pruefungstyp_kurzbz' => $pruefungstyp_kurzbz,
|
||||
'datum' => $datum,
|
||||
'anmerkung' => $anmerkung,
|
||||
[ 'lehreinheit_id' => $this->input->post('lehreinheit_id'),
|
||||
'student_uid' => $this->input->post('student_uid'),
|
||||
'mitarbeiter_uid' => $this->input->post('mitarbeiter_uid'),
|
||||
'note' => $this->input->post('note'),
|
||||
'pruefungstyp_kurzbz' => $this->input->post('pruefungstyp_kurzbz'),
|
||||
'datum' => $this->input->post('datum'),
|
||||
'anmerkung' => $this->input->post('anmerkung'),
|
||||
'updatevon' => $authUID,
|
||||
'updateamum' => date('c'),
|
||||
]
|
||||
);
|
||||
|
||||
$this->getDataOrTerminateWithError($result);
|
||||
|
||||
return $this->outputJsonSuccess(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a pruefung
|
||||
*
|
||||
@@ -449,7 +411,7 @@ class Pruefung extends FHCAPI_Controller
|
||||
* @return success or error
|
||||
*
|
||||
* no impact on lehre.tbl_zeugnisnote
|
||||
*/
|
||||
*/
|
||||
public function deletePruefung($pruefung_id)
|
||||
{
|
||||
$result = $this->PruefungModel->load($pruefung_id);
|
||||
|
||||
@@ -2,12 +2,14 @@ import verband from './stv/verband.js';
|
||||
import students from './stv/students.js';
|
||||
import filter from './stv/filter.js';
|
||||
import konto from './stv/konto.js';
|
||||
import exam from './stv/exam.js';
|
||||
|
||||
export default {
|
||||
verband,
|
||||
students,
|
||||
filter,
|
||||
konto,
|
||||
exam,
|
||||
configStudent() {
|
||||
return this.$fhcApi.get('api/frontend/v1/stv/config/student');
|
||||
},
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
export default {
|
||||
getPruefungen(url, config, params){
|
||||
return this.$fhcApi.get('api/frontend/v1/stv/pruefung/getPruefungen/' + params.id);
|
||||
},
|
||||
loadPruefung(pruefung_id){
|
||||
return this.$fhcApi.get('api/frontend/v1/stv/pruefung/loadPruefung/' + pruefung_id);
|
||||
},
|
||||
getTypenPruefungen(){
|
||||
return this.$fhcApi.get('api/frontend/v1/stv/pruefung/getTypenPruefungen');
|
||||
},
|
||||
getAllLehreinheiten(data){
|
||||
console.log("all Lehreinheiten");
|
||||
return this.$fhcApi.post('api/frontend/v1/stv/pruefung/getAllLehreinheiten/', data)
|
||||
},
|
||||
getLvsByStudent(uid){
|
||||
console.log(uid);
|
||||
return this.$fhcApi.get('api/frontend/v1/stv/pruefung/getLvsByStudent/' + uid)
|
||||
},
|
||||
getLvsandLesByStudent(uid){
|
||||
return this.$fhcApi.get('api/frontend/v1/stv/pruefung/getLvsandLesByStudent/' + uid);
|
||||
},
|
||||
getLvsAndMas(uid){
|
||||
return this.$fhcApi.get('api/frontend/v1/stv/pruefung/getLvsAndMas/' + uid)
|
||||
},
|
||||
getMitarbeiterLv(id){
|
||||
return this.$fhcApi.get('api/frontend/v1/stv/pruefung/getMitarbeiterLv/' + id)
|
||||
},
|
||||
getNoten(){
|
||||
return this.$fhcApi.get('api/frontend/v1/stv/pruefung/getNoten');
|
||||
},
|
||||
checkZeugnisnoteLv(data){
|
||||
return this.$fhcApi.post('api/frontend/v1/stv/pruefung/checkZeugnisnoteLv/', data)
|
||||
},
|
||||
addPruefung(form, data){
|
||||
return this.$fhcApi.post(form,'api/frontend/v1/stv/pruefung/insertPruefung/', data);
|
||||
},
|
||||
updatePruefung(form, id, data){
|
||||
return this.$fhcApi.post(form,'api/frontend/v1/stv/pruefung/updatePruefung/' + id, data);
|
||||
},
|
||||
deletePruefung(id){
|
||||
return this.$fhcApi.post('api/frontend/v1/stv/pruefung/deletePruefung/' + id)
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,13 @@
|
||||
import {CoreFilterCmpt} from "../../../../filter/Filter.js";
|
||||
import FormInput from "../../../../Form/Input.js";
|
||||
import FormForm from '../../../../Form/Form.js';
|
||||
import BsModal from "../../../../Bootstrap/Modal.js";
|
||||
|
||||
export default{
|
||||
components: {
|
||||
CoreFilterCmpt,
|
||||
FormInput,
|
||||
FormForm,
|
||||
BsModal
|
||||
},
|
||||
inject: {
|
||||
@@ -26,21 +28,23 @@ export default{
|
||||
data(){
|
||||
return {
|
||||
tabulatorOptions: {
|
||||
ajaxURL: 'api/frontend/v1/stv/pruefung/getPruefungen/' + this.uid,
|
||||
ajaxRequestFunc: this.$fhcApi.get,
|
||||
ajaxURL: 'dummy',
|
||||
ajaxRequestFunc: this.$fhcApi.factory.stv.exam.getPruefungen,
|
||||
ajaxParams: () => {
|
||||
return {
|
||||
id: this.uid
|
||||
};
|
||||
},
|
||||
ajaxResponse: (url, params, response) => response.data,
|
||||
columns: [
|
||||
//TODO(Manu) remove not needed entries
|
||||
{title: "Datum", field: "format_datum"},
|
||||
{title: "Lehrveranstaltung", field: "lehrveranstaltung_bezeichnung"},
|
||||
{title: "Note", field: "note_bezeichnung"},
|
||||
//{title: "StudSem", field: "studiensemester_kurzbz"}, //just testing
|
||||
{title: "Anmerkung", field: "anmerkung"},
|
||||
{title: "Typ", field: "pruefungstyp_kurzbz"},
|
||||
{title: "PruefungId", field: "pruefung_id", visible: false},
|
||||
{title: "LehreinheitId", field: "lehreinheit_id", visible: false},
|
||||
{title: "Student_uid", field: "student_uid", visible: false},
|
||||
//{title: "LV_id", field: "lehrveranstaltung_id", visible: false}, //just for testing
|
||||
{title: "Mitarbeiter_uid", field: "mitarbeiter_uid", visible: false},
|
||||
{title: "Punkte", field: "punkte", visible: false},
|
||||
{
|
||||
@@ -91,6 +95,7 @@ export default{
|
||||
layout: 'fitDataFill',
|
||||
layoutColumnsOnNewData: false,
|
||||
height: 'auto',
|
||||
persistenceID:'stv-details-pruefung-pruefung-list'
|
||||
},
|
||||
tabulatorEvents: [
|
||||
{
|
||||
@@ -117,10 +122,22 @@ export default{
|
||||
cm.getColumnByField('punkte').component.updateDefinition({
|
||||
title: this.$p.t('exam', 'punkte')
|
||||
});
|
||||
//TODO(Manu) Uncaught TypeError: e.element.after is not a function
|
||||
/* cm.getColumnByField('actions').component.updateDefinition({
|
||||
title: this.$p.t('global', 'actions')
|
||||
});*/
|
||||
cm.getColumnByField('pruefung_id').component.updateDefinition({
|
||||
title: this.$p.t('ui', 'pruefung_id')
|
||||
});
|
||||
cm.getColumnByField('lehreinheit_id').component.updateDefinition({
|
||||
title: this.$p.t('ui', 'lehreinheit_id')
|
||||
});
|
||||
cm.getColumnByField('mitarbeiter_uid').component.updateDefinition({
|
||||
title: this.$p.t('ui', 'mitarbeiter_uid')
|
||||
});
|
||||
cm.getColumnByField('student_uid').component.updateDefinition({
|
||||
title: this.$p.t('ui', 'student_uid')
|
||||
});
|
||||
//Uncaught TypeError: e.element.after is not a function
|
||||
/* cm.getColumnByField('actions').component.updateDefinition({
|
||||
title: this.$p.t('global', 'actions')
|
||||
});*/
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -151,7 +168,7 @@ export default{
|
||||
},
|
||||
methods:{
|
||||
loadPruefung(pruefung_id) {
|
||||
return this.$fhcApi.get('api/frontend/v1/stv/pruefung/loadPruefung/' + pruefung_id)
|
||||
return this.$fhcApi.factory.stv.exam.loadPruefung(pruefung_id)
|
||||
.then(result => {
|
||||
this.pruefungData = result.data;
|
||||
return result;
|
||||
@@ -210,17 +227,16 @@ export default{
|
||||
});
|
||||
},
|
||||
addPruefung(){
|
||||
this.$fhcApi.post('api/frontend/v1/stv/Pruefung/insertPruefung/',
|
||||
this.pruefungData
|
||||
).then(response => {
|
||||
this.checkData = response.data;
|
||||
if (this.checkData === 2 || this.checkData === 5)
|
||||
this.$fhcAlert.alertInfo(this.$p.t('exam', 'hinweis_changeAfterExamDate'));
|
||||
else
|
||||
this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave'));
|
||||
this.hideModal('pruefungModal');
|
||||
this.resetModal();
|
||||
}).catch(this.$fhcAlert.handleSystemError)
|
||||
return this.$fhcApi.factory.stv.exam.addPruefung(this.$refs.examData, this.pruefungData)
|
||||
.then(response => {
|
||||
this.checkData = response.data;
|
||||
if (this.checkData === 2 || this.checkData === 5)
|
||||
this.$fhcAlert.alertInfo(this.$p.t('exam', 'hinweis_changeAfterExamDate'));
|
||||
else
|
||||
this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave'));
|
||||
this.hideModal('pruefungModal');
|
||||
this.resetModal();
|
||||
}).catch(this.$fhcAlert.handleSystemError)
|
||||
.finally(() => {
|
||||
window.scrollTo(0, 0);
|
||||
this.reload();
|
||||
@@ -228,9 +244,8 @@ export default{
|
||||
},
|
||||
updatePruefung(pruefung_id){
|
||||
this.checkChangeAfterExamDate();
|
||||
this.$fhcApi.post('api/frontend/v1/stv/pruefung/updatePruefung/' + pruefung_id,
|
||||
this.pruefungData
|
||||
).then(response => {
|
||||
return this.$fhcApi.factory.stv.exam.updatePruefung(this.$refs.examData, pruefung_id, this.pruefungData)
|
||||
.then(response => {
|
||||
this.checkData = response.data;
|
||||
this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave'));
|
||||
this.hideModal('pruefungModal');
|
||||
@@ -251,26 +266,26 @@ export default{
|
||||
this.showHint = false;
|
||||
},
|
||||
checkChangeAfterExamDate(){
|
||||
const data = {
|
||||
student_uid: this.pruefungData.student_uid,
|
||||
studiensemester_kurzbz: this.pruefungData.studiensemester_kurzbz,
|
||||
lehrveranstaltung_id: this.pruefungData.lehrveranstaltung_id
|
||||
};
|
||||
this.$fhcApi.post('api/frontend/v1/stv/pruefung/checkZeugnisnoteLv/', data)
|
||||
const data = {
|
||||
student_uid: this.pruefungData.student_uid,
|
||||
studiensemester_kurzbz: this.pruefungData.studiensemester_kurzbz,
|
||||
lehrveranstaltung_id: this.pruefungData.lehrveranstaltung_id
|
||||
};
|
||||
return this.$fhcApi.factory.stv.exam.checkZeugnisnoteLv(data)
|
||||
.then(result => {
|
||||
this.zeugnisData = result.data;
|
||||
let checkDate = this.zeugnisData[0].uebernahmedatum === '' ||
|
||||
this.zeugnisData[0].benotungsdatum > this.zeugnisData[0].uebernahmedatum
|
||||
? this.zeugnisData[0].benotungsdatum
|
||||
: this.zeugnisData[0].uebernahmedatum;
|
||||
if (checkDate >= this.pruefungData.datum
|
||||
&& this.pruefungData.note !== this.zeugnisData[0].note) {
|
||||
this.$fhcAlert.alertInfo(this.$p.t('exam', 'hinweis_changeAfterExamDate'));
|
||||
}
|
||||
}).catch(this.$fhcAlert.handleSystemError);
|
||||
this.zeugnisData = result.data;
|
||||
let checkDate = this.zeugnisData[0].uebernahmedatum === '' ||
|
||||
this.zeugnisData[0].benotungsdatum > this.zeugnisData[0].uebernahmedatum
|
||||
? this.zeugnisData[0].benotungsdatum
|
||||
: this.zeugnisData[0].uebernahmedatum;
|
||||
if (checkDate >= this.pruefungData.datum
|
||||
&& this.pruefungData.note !== this.zeugnisData[0].note) {
|
||||
this.$fhcAlert.alertInfo(this.$p.t('exam', 'hinweis_changeAfterExamDate'));
|
||||
}
|
||||
}).catch(this.$fhcAlert.handleSystemError);
|
||||
},
|
||||
deletePruefung(pruefung_id) {
|
||||
this.$fhcApi.post('api/frontend/v1/stv/pruefung/deletePruefung/' + pruefung_id)
|
||||
return this.$fhcApi.factory.stv.exam.deletePruefung(pruefung_id)
|
||||
.then(response => {
|
||||
this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successDelete'));
|
||||
}).catch(this.$fhcAlert.handleSystemError)
|
||||
@@ -289,15 +304,8 @@ export default{
|
||||
reload() {
|
||||
this.$refs.table.reloadTable();
|
||||
},
|
||||
getLvsByStudent(student_uid){
|
||||
return this.$fhcApi.get('api/frontend/v1/stv/pruefung/getLvsByStudent/' + student_uid)
|
||||
.then(result => {
|
||||
this.listLvs = result.data;
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
},
|
||||
getMaFromLv(lv_id){
|
||||
return this.$fhcApi.get('api/frontend/v1/stv/pruefung/getMitarbeiterLv/' + lv_id)
|
||||
return this.$fhcApi.factory.stv.exam.getMitarbeiterLv(lv_id)
|
||||
.then(result => {
|
||||
this.listMas = result.data;
|
||||
})
|
||||
@@ -308,8 +316,7 @@ export default{
|
||||
lv_id: lv_id,
|
||||
studiensemester_kurzbz: studiensemester_kurzbz
|
||||
};
|
||||
|
||||
return this.$fhcApi.post('api/frontend/v1/stv/pruefung/getAllLehreinheiten/', data)
|
||||
return this.$fhcApi.factory.stv.exam.getAllLehreinheiten(data)
|
||||
.then(response => {
|
||||
this.listLes = response.data;
|
||||
})
|
||||
@@ -325,7 +332,7 @@ export default{
|
||||
this.pruefungData.lehrveranstaltung_id,
|
||||
this.pruefungData.studiensemester_kurzbz)
|
||||
.then(() => {
|
||||
}).catch(this.$fhcAlert.handleSystemError);
|
||||
}).catch(this.$fhcAlert.handleSystemError);
|
||||
|
||||
this.$refs.pruefungModal.show();
|
||||
},
|
||||
@@ -339,31 +346,30 @@ export default{
|
||||
},
|
||||
},
|
||||
created(){
|
||||
this.$fhcApi.get('api/frontend/v1/stv/pruefung/getLvsByStudent/' + this.uid)
|
||||
this.$fhcApi.factory.stv.exam.getLvsByStudent(this.uid)
|
||||
.then(result => {
|
||||
this.listLvs = result.data;
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
|
||||
this.$fhcApi.get('api/frontend/v1/stv/pruefung/getLvsandLesByStudent/' + this.uid)
|
||||
this.$fhcApi.factory.stv.exam.getLvsandLesByStudent(this.uid)
|
||||
.then(result => {
|
||||
this.listLvsAndLes = result.data;
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
|
||||
this.$fhcApi.get('api/frontend/v1/stv/pruefung/getLvsAndMas/' + this.uid)
|
||||
this.$fhcApi.factory.stv.exam.getLvsAndMas(this.uid)
|
||||
.then(result => {
|
||||
this.listLvsAndMas = result.data;
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
|
||||
this.$fhcApi.get('api/frontend/v1/stv/pruefung/getTypenPruefungen')
|
||||
this.$fhcApi.factory.stv.exam.getTypenPruefungen()
|
||||
.then(result => {
|
||||
this.listTypesExam = result.data;
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
|
||||
this.$fhcApi.get('api/frontend/v1/stv/pruefung/getNoten')
|
||||
this.$fhcApi.factory.stv.exam.getNoten()
|
||||
.then(result => {
|
||||
this.listMarks = result.data;
|
||||
})
|
||||
@@ -392,7 +398,7 @@ export default{
|
||||
:side-menu="false"
|
||||
reload
|
||||
new-btn-show
|
||||
new-btn-label="Pruefung"
|
||||
:new-btn-label="this.$p.t('lehre', 'pruefung')"
|
||||
@click:new="actionNewPruefung"
|
||||
>
|
||||
</core-filter-cmpt>
|
||||
@@ -404,15 +410,15 @@ export default{
|
||||
<p v-else class="fw-bold mt-3">{{ $p.t('exam', 'edit_pruefung') }}</p>
|
||||
</template>
|
||||
|
||||
<form ref="form-pruefung" @submit.prevent class="row pt-3">
|
||||
<form-form class="row pt-3" ref="examData">
|
||||
<legend>Details</legend>
|
||||
|
||||
<!--DropDown Lehrveranstaltung-->
|
||||
<form-input
|
||||
container-class="mb-3"
|
||||
type="select"
|
||||
name="lehrveranstaltung"
|
||||
:label="$p.t('lehre/lehrveranstaltung')"
|
||||
name="lehrveranstaltung_id"
|
||||
:label="$p.t('lehre/lehrveranstaltung') + ' *'"
|
||||
v-model="pruefungData.lehrveranstaltung_id"
|
||||
@change="actionNewPruefung(pruefungData.lehrveranstaltung_id)"
|
||||
>
|
||||
@@ -429,8 +435,8 @@ export default{
|
||||
<form-input
|
||||
container-class="mb-3"
|
||||
type="select"
|
||||
name="lehreinheit"
|
||||
:label="$p.t('lehre/lehreinheit')"
|
||||
name="lehreinheit_id"
|
||||
:label="$p.t('lehre/lehreinheit') + ' *'"
|
||||
v-model="pruefungData.lehreinheit_id"
|
||||
>
|
||||
<option v-if="!listLes.length" disabled> -- {{ $p.t('exam', 'bitteLvteilWaehlen') }} --</option>
|
||||
@@ -466,8 +472,8 @@ export default{
|
||||
<form-input
|
||||
container-class="mb-3"
|
||||
type="select"
|
||||
name="typ"
|
||||
:label="$p.t('global/typ')"
|
||||
name="pruefungstyp_kurzbz"
|
||||
:label="$p.t('global/typ') + ' *'"
|
||||
v-model="pruefungData.pruefungstyp_kurzbz"
|
||||
@change="checkTypeExam"
|
||||
>
|
||||
@@ -530,7 +536,7 @@ export default{
|
||||
rows="4"
|
||||
>
|
||||
</form-input>
|
||||
</form>
|
||||
</form-form>
|
||||
|
||||
<template #footer>
|
||||
<button type="button" class="btn btn-primary" @click="statusNew ? addPruefung() : updatePruefung(pruefungData.pruefung_id)">{{$p.t('ui', 'speichern')}}</button>
|
||||
|
||||
@@ -30385,7 +30385,28 @@ array(
|
||||
)
|
||||
)
|
||||
),
|
||||
);
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'ui',
|
||||
'phrase' => 'student_uid',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Student UID',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'student UID',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
);
|
||||
|
||||
|
||||
//***** CHECK PHRASES & PHRASENTEXTE in German and English.
|
||||
|
||||
Reference in New Issue
Block a user