mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
Noten anzeigen
This commit is contained in:
@@ -23,6 +23,10 @@ class Config extends FHC_Controller
|
||||
'title' => 'Kontakt',
|
||||
'component' => './Stv/Studentenverwaltung/Details/Kontakt.js'
|
||||
];
|
||||
$result['noten'] = [
|
||||
'title' => 'Noten',
|
||||
'component' => './Stv/Studentenverwaltung/Details/Noten.js'
|
||||
];
|
||||
$result['notizen'] = [
|
||||
'title' => 'Notizen',
|
||||
'component' => './Stv/Studentenverwaltung/Details/Notizen.js'
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Noten extends Auth_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'getZeugnis' => 'student/noten:r'
|
||||
]);
|
||||
|
||||
// Load Libraries
|
||||
$this->load->library('VariableLib', ['uid' => getAuthUID()]);
|
||||
}
|
||||
|
||||
public function getZeugnis($prestudent_id)
|
||||
{
|
||||
$this->load->model('crm/Student_model', 'StudentModel');
|
||||
$this->load->model('education/Zeugnisnote_model', 'ZeugnisnoteModel');
|
||||
|
||||
$result = $this->StudentModel->loadWhere([
|
||||
'prestudent_id' => $prestudent_id
|
||||
]);
|
||||
if (isError($result)) {
|
||||
$this->output->set_status_header(REST_Controller::HTTP_INTERNAL_SERVER_ERROR);
|
||||
return $this->outputJson($result);
|
||||
}
|
||||
if (!hasData($result))
|
||||
return $this->outputJsonSuccess(null);
|
||||
|
||||
$student_uid = current(getData($result))->student_uid;
|
||||
|
||||
$studiensemester_kurzbz = $this->variablelib->getVar('semester_aktuell');
|
||||
|
||||
$result = $this->ZeugnisnoteModel->getZeugnisnoten($student_uid, $studiensemester_kurzbz);
|
||||
if (isError($result)) {
|
||||
$this->output->set_status_header(REST_Controller::HTTP_INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
return $this->outputJson($result);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import NotenZeugnis from './Noten/Zeugnis.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
NotenZeugnis
|
||||
},
|
||||
props: {
|
||||
modelValue: Object
|
||||
},
|
||||
methods: {
|
||||
reload() {
|
||||
this.$refs.zeugnis.$refs.table.reloadTable();
|
||||
}
|
||||
},
|
||||
template: `
|
||||
<div class="stv-details-noten h-100 d-flex flex-column">
|
||||
<noten-zeugnis ref="zeugnis" :student="modelValue"></noten-zeugnis>
|
||||
</div>`
|
||||
};
|
||||
@@ -0,0 +1,72 @@
|
||||
import {CoreFilterCmpt} from "../../../../filter/Filter.js";
|
||||
import {CoreRESTClient} from '../../../../../RESTClient.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
CoreFilterCmpt
|
||||
},
|
||||
props: {
|
||||
student: Object
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
validStudent: true,
|
||||
tabulatorEvents: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
ajaxURL() {
|
||||
return CoreRESTClient._generateRouterURI('components/stv/Noten/getZeugnis/' + this.student.prestudent_id);
|
||||
},
|
||||
tabulatorOptions() {
|
||||
return {
|
||||
ajaxURL: this.ajaxURL,
|
||||
ajaxResponse: (url, params, response) => {
|
||||
if (!response.retval)
|
||||
this.validStudent = false;
|
||||
else
|
||||
this.validStudent = true;
|
||||
return response.retval || [];
|
||||
},
|
||||
columns: [
|
||||
{ field: 'zeugnis', title: 'Zeugnis', formatter: 'tickCross' },
|
||||
{ field: 'lehrveranstaltung_bezeichnung', title: 'Lehrveranstaltung' },
|
||||
{ field: 'note_bezeichnung', title: 'Note' },
|
||||
{ field: 'uebernahmedatum', title: 'Übernahmedatum', visible: false },
|
||||
{ field: 'benotungsdatum', title: 'Benotungsdatum', visible: false },
|
||||
{ field: 'benotungsdatum-iso', title: 'Benotungsdatum ISO', visible: false },
|
||||
{ field: 'studiensemester_kurzbz', title: 'Studiensemester', visible: false },
|
||||
{ field: 'note', title: 'Note Numerisch', visible: false },
|
||||
{ field: 'lehrveranstaltung_id', title: 'Lehrveranstaltung ID', visible: false },
|
||||
{ field: 'studiengang', title: 'Studiengang', visible: false },
|
||||
{ field: 'studiengang_kz', title: 'Studiengang Kennzahl', visible: false },
|
||||
{ field: 'studiengang_lv', title: 'StudiengangLV', visible: false },
|
||||
{ field: 'studiengang_kz_lv', title: 'Studiengang_kzLV', visible: false },
|
||||
{ field: 'semester_lv', title: 'SemesterLV', visible: false },
|
||||
{ field: 'ects_lv', title: 'ECTS', visible: false },
|
||||
{ field: 'lehrform', title: 'Lehrform', visible: false },
|
||||
{ field: 'kurzbz', title: 'Kurzbz', visible: false },
|
||||
{ field: 'punkte', title: 'Punkte', visible: false },
|
||||
{ field: 'lehrveranstaltung_bezeichnung_english', title: 'Englisch', visible: false }
|
||||
],
|
||||
layout: 'fitDataStretch',
|
||||
height: '100%',
|
||||
persistence: true
|
||||
};
|
||||
}
|
||||
},
|
||||
template: `
|
||||
<div class="stv-details-noten-zeugnis h-100 d-flex flex-column">
|
||||
<div v-if="!validStudent">Kein Student</div>
|
||||
<core-filter-cmpt
|
||||
v-else
|
||||
ref="table"
|
||||
:tabulator-options="tabulatorOptions"
|
||||
:tabulator-events="tabulatorEvents"
|
||||
table-only
|
||||
:side-menu="false"
|
||||
reload
|
||||
>
|
||||
</core-filter-cmpt>
|
||||
</div>`
|
||||
};
|
||||
Reference in New Issue
Block a user