mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-11 12:02:26 +00:00
flat table selectAll Handler fix; call checkZuordnung just how we thoughtcrimed it in feature-76667/ProjektarbeitUploadZuordnungErrorMessage
This commit is contained in:
@@ -539,12 +539,23 @@ class Abgabe extends FHCAPI_Controller
|
||||
$assignedStudentUid = getData($res)[0]->uid;
|
||||
|
||||
// A student may only update their own title; assistenz is covered by checkZuordnung
|
||||
$zugeordnet = $this->checkZuordnung($projektarbeit_id, getAuthUID());
|
||||
|
||||
$res = $this->ProjektarbeitModel->getStudentInfoForProjektarbeitId($projektarbeit_id);
|
||||
if(isError($res)) {
|
||||
$this->terminateWithError($this->p->t('abgabetool', 'c4errorLoadingStudentForProjektarbeitID'), 'general');
|
||||
}
|
||||
|
||||
if(!hasData($res)) {
|
||||
$this->terminateWithError($this->p->t('abgabetool', 'c4noAssignedStudentForProjektarbeitID'), 'general');
|
||||
}
|
||||
$data = getData($res)[0];
|
||||
$student_uid = $data->uid;
|
||||
$studiengang_kz = $data->studiengang_kz;
|
||||
|
||||
$zugeordnet = $this->checkZuordnung($projektarbeit_id, getAuthUID(), $student_uid, $studiengang_kz);
|
||||
if (getAuthUID() !== $assignedStudentUid && !$zugeordnet) {
|
||||
$this->terminateWithError($this->p->t('abgabetool', 'c4noZuordnungBetreuerStudent'), 'general');
|
||||
}
|
||||
|
||||
|
||||
|
||||
$result = $this->ProjektarbeitModel->load($projektarbeit_id);
|
||||
$data = getData($result);
|
||||
@@ -1018,7 +1029,20 @@ class Abgabe extends FHCAPI_Controller
|
||||
|
||||
$this->checkProjektarbeitForFinishedStatus($projektarbeit_id);
|
||||
|
||||
$zugeordnet = $this->checkZuordnung($projektarbeit_id, getAuthUID());
|
||||
// load the $student_uid by $projektarbeit_id so we dont need any post params
|
||||
$this->load->model('education/Projektarbeit_model', 'ProjektarbeitModel');
|
||||
$res = $this->ProjektarbeitModel->getStudentInfoForProjektarbeitId($projektarbeit_id);
|
||||
if(isError($res)) {
|
||||
$this->terminateWithError($this->p->t('abgabetool', 'c4errorLoadingStudentForProjektarbeitID'), 'general');
|
||||
}
|
||||
if(!hasData($res)) {
|
||||
$this->terminateWithError($this->p->t('abgabetool', 'c4noAssignedStudentForProjektarbeitID'), 'general');
|
||||
}
|
||||
$data = getData($res)[0];
|
||||
$student_uid = $data->uid;
|
||||
$studiengang_kz = $data->studiengang_kz;
|
||||
|
||||
$zugeordnet = $this->checkZuordnung($projektarbeit_id, getAuthUID(), $student_uid, $studiengang_kz);
|
||||
if (!$zugeordnet) {
|
||||
$this->terminateWithError($this->p->t('abgabetool', 'c4noZuordnungBetreuerStudent'), 'general');
|
||||
}
|
||||
@@ -1127,7 +1151,21 @@ class Abgabe extends FHCAPI_Controller
|
||||
|
||||
$this->checkProjektarbeitForFinishedStatus($this->getProjektarbeitIDForPaabgabeID($paabgabe_id));
|
||||
|
||||
$zugeordnet = $this->checkZuordnungByPaabgabe($paabgabe_id, getAuthUID());
|
||||
$projektarbeit_id = $this->getProjektarbeitIDForPaabgabeID($paabgabe_id);
|
||||
|
||||
$this->load->model('education/Projektarbeit_model', 'ProjektarbeitModel');
|
||||
$res = $this->ProjektarbeitModel->getStudentInfoForProjektarbeitId($projektarbeit_id);
|
||||
if(isError($res)) {
|
||||
$this->terminateWithError($this->p->t('abgabetool', 'c4errorLoadingStudentForProjektarbeitID'), 'general');
|
||||
}
|
||||
if(!hasData($res)) {
|
||||
$this->terminateWithError($this->p->t('abgabetool', 'c4noAssignedStudentForProjektarbeitID'), 'general');
|
||||
}
|
||||
$data = getData($res)[0];
|
||||
$student_uid = $data->uid;
|
||||
$studiengang_kz = $data->studiengang_kz;
|
||||
|
||||
$zugeordnet = $this->checkZuordnungByPaabgabe($paabgabe_id, getAuthUID(), $student_uid, $studiengang_kz);
|
||||
|
||||
if (!$zugeordnet) {
|
||||
$this->terminateWithError($this->p->t('abgabetool', 'c4noZuordnungBetreuerStudent'), 'general');
|
||||
@@ -1610,17 +1648,28 @@ class Abgabe extends FHCAPI_Controller
|
||||
public function sendZweitbetreuerTokenMail() {
|
||||
$projektarbeit_id = $this->input->post('projektarbeit_id');
|
||||
$bperson_id = $this->input->post('bperson_id');
|
||||
$student_uid = $this->input->post('student_uid');
|
||||
|
||||
|
||||
if ($projektarbeit_id === NULL || trim((string)$projektarbeit_id) === ''
|
||||
|| $bperson_id === NULL || trim((string)$bperson_id) === ''
|
||||
|| $student_uid === NULL || trim((string)$student_uid) === '') {
|
||||
|| $bperson_id === NULL || trim((string)$bperson_id) === '') {
|
||||
$this->terminateWithError($this->p->t('global', 'wrongParameters'), 'general');
|
||||
}
|
||||
|
||||
$this->checkProjektarbeitForFinishedStatus($projektarbeit_id);
|
||||
|
||||
$zugeordnet = $this->checkZuordnung($projektarbeit_id, getAuthUID());
|
||||
$res = $this->ProjektarbeitModel->getStudentInfoForProjektarbeitId($projektarbeit_id);
|
||||
if(isError($res)) {
|
||||
$this->terminateWithError($this->p->t('abgabetool', 'c4errorLoadingStudentForProjektarbeitID'), 'general');
|
||||
}
|
||||
|
||||
if(!hasData($res)) {
|
||||
$this->terminateWithError($this->p->t('abgabetool', 'c4noAssignedStudentForProjektarbeitID'), 'general');
|
||||
}
|
||||
$data = getData($res)[0];
|
||||
$student_uid = $data->uid;
|
||||
$studiengang_kz = $data->studiengang_kz;
|
||||
|
||||
$zugeordnet = $this->checkZuordnung($projektarbeit_id, getAuthUID(), $student_uid, $studiengang_kz);
|
||||
if(!$zugeordnet) {
|
||||
$this->terminateWithError($this->p->t('abgabetool', 'c4noZuordnungBetreuerStudent'));
|
||||
}
|
||||
|
||||
@@ -236,7 +236,7 @@ export const AbgabeStudentTimeline = {
|
||||
class="btn btn-link btn-sm p-0 text-muted text-decoration-none d-flex align-items-center gap-1"
|
||||
@click="legendExpanded = !legendExpanded"
|
||||
>
|
||||
<i :class="legendExpanded ? 'fa-solid fa-chevron-up' : 'fa-solid fa-chevron-down'" style="font-size: 0.7rem;"></i>
|
||||
<i :class="legendExpanded ? 'fa-solid fa-chevron-down' : 'fa-solid fa-chevron-right'" style="font-size: 0.7rem;"></i>
|
||||
Legende
|
||||
</button>
|
||||
<div v-show="legendExpanded" class="mt-2">
|
||||
|
||||
@@ -1231,7 +1231,7 @@ export const AbgabetoolAssistenz = {
|
||||
|
||||
// custom select all logic
|
||||
const allowed = rows.filter(r => r.getData().selectable);
|
||||
const selected = rows.every(r => r.isSelected());
|
||||
const selected = allowed.length > 0 && allowed.every(r => r.isSelected());
|
||||
|
||||
if(selected){
|
||||
allowed.forEach(r => r.deselect());
|
||||
@@ -1988,28 +1988,28 @@ export const AbgabetoolAssistenz = {
|
||||
let icon = ''
|
||||
switch(dateStyle) {
|
||||
case 'verspaetet':
|
||||
icon = '<i class="fa-solid fa-triangle-exclamation"></i>'
|
||||
icon = '<i style="color: #000000 !important;" class="fa-solid fa-triangle-exclamation"></i>'
|
||||
break
|
||||
case 'verpasst':
|
||||
icon = '<i class="fa-solid fa-calendar-xmark"></i>'
|
||||
icon = '<i style="color: #000000 !important;" class="fa-solid fa-calendar-xmark"></i>'
|
||||
break
|
||||
case 'abzugeben':
|
||||
icon = '<i class="fa-solid fa-hourglass-half"></i>'
|
||||
icon = '<i style="color: #000000 !important;" class="fa-solid fa-hourglass-half"></i>'
|
||||
break
|
||||
case 'standard':
|
||||
icon = '<i class="fa-solid fa-clock"></i>'
|
||||
icon = '<i style="color: #000000 !important;" class="fa-solid fa-clock"></i>'
|
||||
break
|
||||
case 'abgegeben':
|
||||
icon = '<i class="fa-solid fa-paperclip"></i>'
|
||||
icon = '<i style="color: #000000 !important;" class="fa-solid fa-paperclip"></i>'
|
||||
break
|
||||
case 'beurteilungerforderlich':
|
||||
icon = '<i class="fa-solid fa-list-check"></i>'
|
||||
icon = '<i style="color: #000000 !important;" class="fa-solid fa-list-check"></i>'
|
||||
break
|
||||
case 'bestanden':
|
||||
icon = '<i class="fa-solid fa-check"></i>'
|
||||
icon = '<i style="color: #000000 !important;" class="fa-solid fa-check"></i>'
|
||||
break
|
||||
case 'nichtbestanden':
|
||||
icon = '<i class="fa-solid fa-circle-exclamation"></i>'
|
||||
icon = '<i style="color: #000000 !important;" class="fa-solid fa-circle-exclamation"></i>'
|
||||
break
|
||||
}
|
||||
|
||||
@@ -2407,7 +2407,7 @@ export const AbgabetoolAssistenz = {
|
||||
bodyClass="px-4 py-4">
|
||||
<template v-slot:title>
|
||||
<div>{{ $p.t('abgabetool/c4editTerminserie') }}</div>
|
||||
<div class="text-muted" style="font-size: 0.9rem;">
|
||||
<div style="font-size: 0.9rem;">
|
||||
{{ $p.t('abgabetool/c4nSelected', [selectedDataFlat.length]) }}
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user