mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 16:32:20 +00:00
load projektarbeit.note correctly for mitarbeiter; evaluate projektarbeit termin editability correctly and define a notenarray which does NOT count (currently "Nicht beurteilt" & "Noch nicht eingetragen"). such rules apply for betreuer, assistenz is allowed to do whatever they want since we never defined an actual business process anywhere and people do whatever they want anyways
This commit is contained in:
@@ -26,7 +26,9 @@ $config['RELEVANT_PAABGABETYPEN_SAMMELMAIL_ASSISTENZ'] = ['end'];
|
||||
$config['RELEVANT_PAABGABETYPEN_SAMMELMAIL_STUDENT'] = ['qualgate1', 'qualgate2', 'zwischen', 'note', 'abstract', 'end', 'enda'];
|
||||
//$config['ALLOWED_NOTEN_ABGABETOOL'] = ['Bestanden', 'Nicht bestanden'];
|
||||
$config['ALLOWED_NOTEN_ABGABETOOL'] = [10, 14]; // tbl_note pk
|
||||
|
||||
// benotete projektarbeiten sperren weitere terminanlage & bearbeitung, diese noten sind ausnahmen dieser Regel
|
||||
// wie zB "Nicht beurteilt" & "Noch nicht eingetragen"
|
||||
$config['NONFINAL_NOTEN_ABGABETOOL'] = [7, 9];
|
||||
$config['beurteilung_link_fallback'] = 'addons/fhtw/content/projektbeurteilung/projektbeurteilungDocumentExport.php?projektarbeit_id=?&betreuerart_kurzbz=?&person_id=?';
|
||||
|
||||
$config['PROJEKTARBEITSBEURTEILUNG_MAIL_BASELINK_ERSTBEGUTACHTER'] = 'index.ci.php/extensions/FHC-Core-Projektarbeitsbeurteilung/ProjektarbeitsbeurteilungErstbegutachter';
|
||||
|
||||
@@ -801,7 +801,10 @@ class Abgabe extends FHCAPI_Controller
|
||||
|
||||
$allowed_noten_abgabetool = $this->config->item('ALLOWED_NOTEN_ABGABETOOL');
|
||||
|
||||
$this->terminateWithSuccess(array($noten, $allowed_noten_abgabetool));
|
||||
$nonfinal_noten_abgabetool = $this->config->item('NONFINAL_NOTEN_ABGABETOOL');
|
||||
|
||||
|
||||
$this->terminateWithSuccess(array($noten, $allowed_noten_abgabetool, $nonfinal_noten_abgabetool));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -299,7 +299,7 @@ class Projektarbeit_model extends DB_Model
|
||||
*
|
||||
FROM
|
||||
(SELECT tbl_person.vorname, tbl_person.nachname, tbl_studiengang.typ, tbl_studiengang.kurzbz,
|
||||
tbl_projektarbeit.projekttyp_kurzbz, tbl_projekttyp.bezeichnung, tbl_projektarbeit.titel, tbl_projektarbeit.projektarbeit_id,
|
||||
tbl_projektarbeit.projekttyp_kurzbz, tbl_projekttyp.bezeichnung, tbl_projektarbeit.titel, tbl_projektarbeit.projektarbeit_id, tbl_projektarbeit.note,
|
||||
tbl_projektbetreuer.person_id as betreuer_person_id, tbl_projektbetreuer.betreuerart_kurzbz, tbl_betreuerart.beschreibung AS betreuerart_beschreibung,
|
||||
tbl_benutzer.uid, tbl_student.matrikelnr, tbl_lehreinheit.studiensemester_kurzbz, public.tbl_student.student_uid
|
||||
FROM lehre.tbl_projektarbeit
|
||||
|
||||
@@ -21,6 +21,7 @@ export const AbgabeMitarbeiterDetail = {
|
||||
'abgabeTypeOptions',
|
||||
'abgabetypenBetreuer',
|
||||
'allowedNotenOptions',
|
||||
'notenOptionsNonFinal',
|
||||
'turnitin_link',
|
||||
'old_abgabe_beurteilung_link'
|
||||
],
|
||||
@@ -48,7 +49,7 @@ export const AbgabeMitarbeiterDetail = {
|
||||
label: Vue.computed(() => this.$p.t('abgabetool/c4newAbgabetermin')),
|
||||
icon: "fa fa-plus",
|
||||
command: this.openCreateNewAbgabeModal,
|
||||
disabled: Vue.computed(() => this.projektarbeit?.betreuerart_kurzbz == 'Zweitbegutachter')
|
||||
disabled: Vue.computed(() => !this.getAllowedToCreateNewTermin)
|
||||
},
|
||||
{
|
||||
label: Vue.computed(() => this.$p.t('abgabetool/c4benoten')),
|
||||
@@ -478,6 +479,21 @@ export const AbgabeMitarbeiterDetail = {
|
||||
|
||||
},
|
||||
computed: {
|
||||
getAllowedToCreateNewTermin() {
|
||||
if(this.assistenzMode) return true
|
||||
if(this.projektarbeit?.betreuerart_kurzbz == 'Zweitbegutachter') return false
|
||||
if(this.projektarbeit?.note !== undefined && this.projektarbeit.note !== null) {
|
||||
// check if the note is not defined as a non final projektarbeit note
|
||||
const opt = this.notenOptionsNonFinal.find(opt => opt.note)
|
||||
// if thats the case allow further work
|
||||
if(opt) return true
|
||||
// else the PA is to be considered finished
|
||||
return false
|
||||
}
|
||||
|
||||
// normally should be allowed if no rules apply
|
||||
return true
|
||||
},
|
||||
allowedToSaveZusatzdaten() {
|
||||
return this.form.schlagwoerter.length > 0 && this.form.schlagwoerter_en.length > 0 && this.form.abstract.length > 0 && this.form.abstract_en.length > 0 && this.form.seitenanzahl > 0
|
||||
},
|
||||
@@ -755,9 +771,8 @@ export const AbgabeMitarbeiterDetail = {
|
||||
</div>
|
||||
<div class="row" style="margin-bottom: 12px;">
|
||||
<div class="col-auto">
|
||||
<!-- TODO: tooltip why this button is disabled as zweitbegutachter-->
|
||||
<!-- TODO: fix bug where this button is sometimes correctly disabled, sometimes just wrong when betreuer is both first and second assesor-->
|
||||
<button type="button" :disabled="projektarbeit?.betreuerart_kurzbz == 'Zweitbegutachter'" class="btn btn-primary" @click="openCreateNewAbgabeModal">
|
||||
<!-- TODO: tooltip why this button is disabled-->
|
||||
<button type="button" :disabled="!getAllowedToCreateNewTermin" class="btn btn-primary" @click="openCreateNewAbgabeModal">
|
||||
<i class="fa-solid fa-plus"></i>
|
||||
{{$capitalize( $p.t('abgabetool/c4newAbgabetermin') )}}
|
||||
</button>
|
||||
|
||||
@@ -38,6 +38,7 @@ export const AbgabetoolAssistenz = {
|
||||
return {
|
||||
abgabeTypeOptions: Vue.computed(() => this.abgabeTypeOptions),
|
||||
allowedNotenOptions: Vue.computed(() => this.allowedNotenOptions),
|
||||
notenOptionsNonFinal: Vue.computed(() => this.notenOptionsNonFinal),
|
||||
turnitin_link: Vue.computed(() => this.turnitin_link),
|
||||
old_abgabe_beurteilung_link: Vue.computed(() => this.old_abgabe_beurteilung_link),
|
||||
abgabetypenBetreuer: Vue.computed(() => this.abgabeTypeOptions)
|
||||
@@ -86,6 +87,7 @@ export const AbgabetoolAssistenz = {
|
||||
notenOptions: null,
|
||||
allowedNotenFilterOptions: null,
|
||||
allowedNotenOptions: null,
|
||||
notenOptionsNonFinal: null,
|
||||
serienTermin: Vue.reactive({
|
||||
datum: new Date(),
|
||||
bezeichnung: {
|
||||
@@ -1089,6 +1091,10 @@ export const AbgabetoolAssistenz = {
|
||||
this.allowedNotenOptions = this.notenOptions.filter(
|
||||
opt => res.data[1].includes(opt.note)
|
||||
);
|
||||
|
||||
this.notenOptionsNonFinal = this.notenOptions.filter(
|
||||
opt => res.data[2].includes(opt.note)
|
||||
)
|
||||
}
|
||||
|
||||
this.allowedNotenFilterOptions = [
|
||||
|
||||
@@ -22,6 +22,7 @@ export const AbgabetoolMitarbeiter = {
|
||||
abgabeTypeOptions: Vue.computed(() => this.abgabeTypeOptions),
|
||||
abgabetypenBetreuer: Vue.computed(() => this.abgabetypenBetreuer),
|
||||
allowedNotenOptions: Vue.computed(() => this.allowedNotenOptions),
|
||||
notenOptionsNonFinal: Vue.computed(() => this.notenOptionsNonFinal),
|
||||
turnitin_link: Vue.computed(() => this.turnitin_link),
|
||||
old_abgabe_beurteilung_link: Vue.computed(() => this.old_abgabe_beurteilung_link)
|
||||
}
|
||||
@@ -50,6 +51,7 @@ export const AbgabetoolMitarbeiter = {
|
||||
abgabeTypeOptions: null,
|
||||
notenOptions: null,
|
||||
allowedNotenOptions: null,
|
||||
notenOptionsNonFinal: null,
|
||||
serienTermin: Vue.reactive({
|
||||
datum: new Date(),
|
||||
bezeichnung: {
|
||||
@@ -301,7 +303,15 @@ export const AbgabetoolMitarbeiter = {
|
||||
pa.abgabetermine = res.data[0].retval
|
||||
pa.isCurrent = res.data[1]
|
||||
|
||||
const paIsBenotet = pa.note !== null
|
||||
let paIsBenotet = false
|
||||
if(pa.note !== undefined && pa !== null) {
|
||||
// check if the note is not defined as a non final projektarbeit note
|
||||
const opt = this.notenOptionsNonFinal.find(opt => opt.note)
|
||||
// if thats the case allow further work
|
||||
if(opt) paIsBenotet = false
|
||||
// else the PA is to be considered finished
|
||||
paIsBenotet = true
|
||||
}
|
||||
|
||||
pa.abgabetermine.forEach(termin => {
|
||||
termin.note = this.allowedNotenOptions.find(opt => opt.note == termin.note)
|
||||
@@ -471,6 +481,10 @@ export const AbgabetoolMitarbeiter = {
|
||||
this.allowedNotenOptions = this.notenOptions.filter(
|
||||
opt => res.data[1].includes(opt.note)
|
||||
)
|
||||
|
||||
this.notenOptionsNonFinal = this.notenOptions.filter(
|
||||
opt => res.data[2].includes(opt.note)
|
||||
)
|
||||
}
|
||||
|
||||
}).catch(e => {
|
||||
|
||||
Reference in New Issue
Block a user