mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
Start Tab Pruefung, Abfrage Pruefungen
This commit is contained in:
@@ -97,6 +97,10 @@ class Config extends FHCAPI_Controller
|
||||
'component' => './Stv/Studentenverwaltung/Details/Noten.js'
|
||||
];
|
||||
*/
|
||||
$result['exam'] = [
|
||||
'title' => $this->p->t('stv', 'tab_exam'),
|
||||
'component' => './Stv/Studentenverwaltung/Details/Pruefung.js'
|
||||
];
|
||||
|
||||
Events::trigger('stv_conf_student', function & () use (&$result) {
|
||||
return $result;
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2024 fhcomplete.org
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* This controller operates between (interface) the JS (GUI) and the back-end
|
||||
* Provides data to the ajax get calls about addresses
|
||||
* This controller works with JSON calls on the HTTP GET or POST and the output is always JSON
|
||||
*/
|
||||
class Pruefung extends FHCAPI_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
//TODO(Manu) Berechtigungen
|
||||
parent::__construct([
|
||||
'getPruefungen' => self::PERM_LOGGED
|
||||
]);
|
||||
|
||||
//Load Models
|
||||
$this->load->model('education/LePruefung_model', 'PruefungModel');
|
||||
}
|
||||
|
||||
public function getPruefungen($student_uid, $studiensemester_kurzbz = null)
|
||||
{
|
||||
$result = $this->PruefungModel->getPruefungenByStudentuid($student_uid);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,4 +11,45 @@ class LePruefung_model extends DB_Model
|
||||
$this->dbTable = 'lehre.tbl_pruefung';
|
||||
$this->pk = 'pruefung_id';
|
||||
}
|
||||
|
||||
/**
|
||||
* CI_STYLE
|
||||
* @param string $student_uid
|
||||
* @param string $studiensemester_kurzbz
|
||||
*
|
||||
* @return stdClass
|
||||
*/
|
||||
public function getPruefungenByStudentuid($student_uid, $studiensemester_kurzbz = null)
|
||||
{
|
||||
$this->addSelect('tbl_pruefung.datum');
|
||||
$this->addSelect("TO_CHAR(tbl_pruefung.datum::timestamp, 'DD.MM.YYYY') AS format_datum");
|
||||
$this->addSelect('tbl_pruefung.anmerkung');
|
||||
$this->addSelect('tbl_pruefung.pruefungstyp_kurzbz');
|
||||
$this->addSelect('tbl_pruefung.pruefung_id');
|
||||
$this->addSelect('tbl_pruefung.lehreinheit_id');
|
||||
$this->addSelect('tbl_pruefung.student_uid');
|
||||
$this->addSelect('tbl_pruefung.mitarbeiter_uid');
|
||||
$this->addSelect('tbl_pruefung.punkte');
|
||||
|
||||
$this->addSelect('tbl_lehrveranstaltung.bezeichnung as lehrveranstaltung_bezeichnung');
|
||||
$this->addSelect('tbl_lehrveranstaltung.lehrveranstaltung_id');
|
||||
$this->addSelect('tbl_note.bezeichnung as note_bezeichnung');
|
||||
$this->addSelect('tbl_pruefungstyp.beschreibung as typ_beschreibung');
|
||||
$this->addSelect('tbl_lehreinheit.studiensemester_kurzbz as studiensemester_kurzbz');
|
||||
|
||||
$this->addJoin('lehre.tbl_lehreinheit', 'lehre.tbl_pruefung.lehreinheit_id=lehre.tbl_lehreinheit.lehreinheit_id');
|
||||
$this->addJoin('lehre.tbl_lehrveranstaltung', 'lehrveranstaltung_id');
|
||||
$this->addJoin('lehre.tbl_note', 'note');
|
||||
$this->addJoin('lehre.tbl_pruefungstyp', 'pruefungstyp_kurzbz');
|
||||
|
||||
if ($studiensemester_kurzbz)
|
||||
$this->db->where("tbl_lehreinheit.studiensemester_kurzbz = ", $studiensemester_kurzbz);
|
||||
|
||||
$this->addOrder('tbl_pruefung.datum', 'DESC');
|
||||
$this->addOrder('tbl_pruefung.pruefung_id', 'DESC');
|
||||
|
||||
return $this->loadWhere([
|
||||
'student_uid' => $student_uid
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
import PruefungList from "./Pruefung/Pruefunglist.js";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
PruefungList
|
||||
},
|
||||
props: {
|
||||
modelValue: Object,
|
||||
config: Object
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pruefungen: []
|
||||
}
|
||||
},
|
||||
template: `
|
||||
<div class="stv-details-pruefung h-100 pb-3">
|
||||
|
||||
{{modelValue}}
|
||||
<fieldset class="overflow-hidden">
|
||||
<!-- <legend>{{this.$p.t('lehre', 'pruefung')}}</legend>-->
|
||||
<pruefung-list ref="pruefungList" :uid="modelValue.uid"></pruefung-list>
|
||||
</fieldset>
|
||||
</div>`
|
||||
};
|
||||
@@ -0,0 +1,101 @@
|
||||
import {CoreFilterCmpt} from "../../../../filter/Filter.js";
|
||||
import FormInput from "../../../../Form/Input.js";
|
||||
|
||||
export default{
|
||||
components: {
|
||||
CoreFilterCmpt,
|
||||
FormInput
|
||||
},
|
||||
inject: {
|
||||
defaultSemester: {
|
||||
from: 'defaultSemester',
|
||||
},
|
||||
},
|
||||
props: {
|
||||
uid: Number
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
tabulatorOptions: {
|
||||
ajaxURL: 'api/frontend/v1/stv/pruefung/getPruefungen/' + this.uid,
|
||||
ajaxRequestFunc: this.$fhcApi.get,
|
||||
ajaxResponse: (url, params, response) => response.data,
|
||||
columns: [
|
||||
{title: "Datum", field: "format_datum"},
|
||||
{title: "Lehrveranstaltung", field: "lehrveranstaltung_bezeichnung"},
|
||||
{title: "Note", field: "note_bezeichnung"},
|
||||
{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: "Mitarbeiter_uid", field: "mitarbeiter_uid", visible:false},
|
||||
{title: "Punkte", field: "punkte", visible:false},
|
||||
],
|
||||
layout: 'fitDataFill',
|
||||
layoutColumnsOnNewData: false,
|
||||
height: 'auto',
|
||||
},
|
||||
tabulatorEvents: [{}],
|
||||
pruefungData: {},
|
||||
filter: false
|
||||
}
|
||||
},
|
||||
computed:{},
|
||||
/* watch: {
|
||||
modelValue() {
|
||||
this.$refs.table.reloadTable();
|
||||
}
|
||||
},*/
|
||||
methods:{ },
|
||||
template: `
|
||||
<div class="stv-details-pruefung-pruefung-list 100 pt-3">
|
||||
|
||||
<div class="justify-content-end pb-3">
|
||||
<form-input
|
||||
container-class="form-switch"
|
||||
type="checkbox"
|
||||
label="Aktuelles Studiensemester Anzeigen"
|
||||
v-model="filter"
|
||||
@update:model-value="setFilter('open')"
|
||||
>
|
||||
</form-input>
|
||||
<!-- <div class="col-lg-3">
|
||||
<form-input
|
||||
container-class="form-switch"
|
||||
type="checkbox"
|
||||
:label="$p.t('stv/konto_filter_current_stg')"
|
||||
v-model="studiengang_kz_intern"
|
||||
:disabled="!stg_kz"
|
||||
@update:model-value="setFilter('current_stg')"
|
||||
>
|
||||
</form-input>
|
||||
</div>-->
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm-6 pt-6">
|
||||
<core-filter-cmpt
|
||||
ref="table"
|
||||
:tabulator-options="tabulatorOptions"
|
||||
table-only
|
||||
:side-menu="false"
|
||||
reload
|
||||
new-btn-show
|
||||
new-btn-label="Pruefung"
|
||||
@click:new="actionNewPruefung"
|
||||
>
|
||||
</core-filter-cmpt>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<p>Form </p>
|
||||
|
||||
aktuelles Sem: {{defaultSemester}}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>`
|
||||
};
|
||||
|
||||
@@ -29300,6 +29300,26 @@ array(
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'stv',
|
||||
'phrase' => 'tab_exam',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Prüfung',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Exam',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
// konto
|
||||
array(
|
||||
'app' => 'core',
|
||||
|
||||
Reference in New Issue
Block a user