mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-11 12:02:26 +00:00
Merge branch 'feature-61164/AbgabetoolQualityGates' into demo
# Conflicts: # application/controllers/api/frontend/v1/Lehre.php # application/models/education/Note_model.php # application/views/CisRouterView/CisRouterView.php # public/css/Cis4/Cis.css # system/phrasesupdate.php
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
|
||||
if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
$config['turnitin_link'] = 'https://technikum-wien.turnitin.com/sso/sp/redwood/saml/5IyfmBr2OcSIaWQTKlFCGj/start';
|
||||
|
||||
$config['old_abgabe_beurteilung_link'] = 'https://moodle.technikum-wien.at/mod/page/view.php?id=1005052';
|
||||
|
||||
@@ -14,7 +14,7 @@ class Abgabetool extends Auth_Controller
|
||||
{
|
||||
parent::__construct([
|
||||
'index' => self::PERM_LOGGED,
|
||||
'getStudentProjektarbeitAbgabeFile' => self::PERM_LOGGED,
|
||||
'getStudentProjektarbeitAbgabeFile' => array('basis/abgabe_student:rw', 'basis/abgabe_lektor:rw', 'basis/abgabe_assistenz:rw'),
|
||||
'Mitarbeiter' => self::PERM_LOGGED,
|
||||
'Student' => self::PERM_LOGGED,
|
||||
'Deadlines' => self::PERM_LOGGED
|
||||
|
||||
@@ -0,0 +1,812 @@
|
||||
<?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');
|
||||
|
||||
class Abgabe extends FHCAPI_Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* Object initialization
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'getConfig' => array('basis/abgabe_assistenz:rw', 'basis/abgabe_lektor:rw'),
|
||||
'getStudentProjektarbeiten' => array('basis/abgabe_assistenz:rw', 'basis/abgabe_student:rw', 'basis/abgabe_lektor:rw'),
|
||||
'getStudentProjektabgaben' => array('basis/abgabe_assistenz:rw', 'basis/abgabe_student:rw', 'basis/abgabe_lektor:rw'),
|
||||
'postStudentProjektarbeitZwischenabgabe' => array('basis/abgabe_assistenz:rw', 'basis/abgabe_student:rw'),
|
||||
'postStudentProjektarbeitEndupload' => array('basis/abgabe_assistenz:rw', 'basis/abgabe_student:rw'),
|
||||
'getMitarbeiterProjektarbeiten' => array('basis/abgabe_assistenz:rw', 'basis/abgabe_lektor:rw'),
|
||||
'postProjektarbeitAbgabe' => array('basis/abgabe_assistenz:rw', 'basis/abgabe_lektor:rw'),
|
||||
'deleteProjektarbeitAbgabe' => array('basis/abgabe_assistenz:rw', 'basis/abgabe_lektor:rw'),
|
||||
'postSerientermin' => array('basis/abgabe_assistenz:rw', 'basis/abgabe_lektor:rw'),
|
||||
'fetchDeadlines' => array('basis/abgabe_assistenz:rw', 'basis/abgabe_lektor:rw'),
|
||||
'getPaAbgabetypen' => self::PERM_LOGGED,
|
||||
'getNoten' => self::PERM_LOGGED
|
||||
]);
|
||||
|
||||
$this->load->library('PhrasesLib');
|
||||
|
||||
$this->loadPhrases(
|
||||
array(
|
||||
'global',
|
||||
'ui',
|
||||
'abgabetool'
|
||||
)
|
||||
);
|
||||
|
||||
$this->load->helper('hlp_sancho_helper');
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* loads config related to abgabetool, found in application/config/abgabe
|
||||
*/
|
||||
public function getConfig() {
|
||||
$this->load->config('abgabe');
|
||||
$old_abgabe_beurteilung_link =$this->config->item('old_abgabe_beurteilung_link');
|
||||
$turnitin_link =$this->config->item('turnitin_link');
|
||||
|
||||
$ret = array(
|
||||
'old_abgabe_beurteilung_link' => $old_abgabe_beurteilung_link,
|
||||
'turnitin_link' => $turnitin_link
|
||||
);
|
||||
|
||||
$this->terminateWithSuccess($ret);
|
||||
}
|
||||
|
||||
/**
|
||||
* fetches all projektabgabetermine for a given projektarbeit_id used in cis4 student abgabetool & lektor abgabetool
|
||||
*/
|
||||
public function getStudentProjektabgaben() {
|
||||
$projektarbeit_id = $this->input->get("projektarbeit_id",TRUE);
|
||||
$this->load->model('education/Projektarbeit_model', 'ProjektarbeitModel');
|
||||
|
||||
if (!isset($projektarbeit_id) || isEmptyString($projektarbeit_id))
|
||||
$this->terminateWithError($this->p->t('global', 'wrongParameters'), 'general');
|
||||
|
||||
$result = $this->ProjektarbeitModel->load($projektarbeit_id);
|
||||
$projektarbeitArr = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
if(count($projektarbeitArr) > 0) {
|
||||
$projektarbeit = $projektarbeitArr[0];
|
||||
} else {
|
||||
$this->terminateWithError($this->p->t('global','projektarbeitNichtGefunden'), 'general');
|
||||
}
|
||||
|
||||
$paIsCurrent = $this->ProjektarbeitModel->projektarbeitIsCurrent($projektarbeit_id);
|
||||
|
||||
$ret = $this->ProjektarbeitModel->getProjektarbeitAbgabetermine($projektarbeit_id);
|
||||
|
||||
$this->terminateWithSuccess(array($ret, $paIsCurrent));
|
||||
}
|
||||
|
||||
/**
|
||||
* fetches all projektarbeiten and betreuer for a given student_uid used in cis4 student abgabetool
|
||||
*/
|
||||
public function getStudentProjektarbeiten()
|
||||
{
|
||||
$uid = $this->input->get("uid",TRUE);
|
||||
|
||||
$this->load->model('ressource/Mitarbeiter_model', 'MitarbeiterModel');
|
||||
$this->load->model('education/Projektarbeit_model', 'ProjektarbeitModel');
|
||||
|
||||
if (!isset($uid) || isEmptyString($uid))
|
||||
$this->terminateWithError($this->p->t('global', 'wrongParameters'), 'general');
|
||||
|
||||
$isZugeteilterBetreuer = count($this->ProjektarbeitModel->checkZuordnung($uid, getAuthUID())->retval) > 0;
|
||||
$this->addMeta('isZugeteilterBetreuer', $isZugeteilterBetreuer);
|
||||
$isMitarbeiter = $this->MitarbeiterModel->isMitarbeiter(getAuthUID());
|
||||
|
||||
if ($isMitarbeiter && $isZugeteilterBetreuer){
|
||||
$result = $this->ProjektarbeitModel->getStudentProjektarbeitenWithBetreuer($uid);
|
||||
} else {
|
||||
$result = $this->ProjektarbeitModel->getStudentProjektarbeitenWithBetreuer(getAuthUID());
|
||||
}
|
||||
|
||||
$projektarbeiten = getData($result);
|
||||
|
||||
if(count($projektarbeiten)) {
|
||||
foreach($projektarbeiten as $pa) {
|
||||
$result = $this->ProjektarbeitModel->getProjektbetreuerEmail($pa->projektarbeit_id);
|
||||
|
||||
$data = getData($result);
|
||||
if(count($data) > 0) {
|
||||
$pa->email = $data[0]->private_email;
|
||||
}
|
||||
if($pa->zweitbetreuer_person_id !== null) {
|
||||
// zweitbetreuer info since the 'getStudentProjektarbeitenWithBetreuer' query got quiete large,
|
||||
// enjoy optimizing that one in 2038. we need this to render a string like
|
||||
// Zweitbegutachter: FH-Prof. PD DI Dr. techn. Vorname Nachname MBA
|
||||
|
||||
$result = $this->ProjektarbeitModel->getProjektbetreuerAnrede($pa->zweitbetreuer_person_id);
|
||||
|
||||
$data = getData($result);
|
||||
if(count($data) > 0) {
|
||||
$pa->zweitbetreuer = $data[0];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$this->terminateWithSuccess(array($projektarbeiten, DOMAIN, $uid));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* projektarbeit - upload for zwischenabgaben in cis4 student abgabetool
|
||||
*/
|
||||
public function postStudentProjektarbeitZwischenabgabe()
|
||||
{
|
||||
|
||||
$projektarbeit_id = $_POST['projektarbeit_id'];
|
||||
$paabgabe_id = $_POST['paabgabe_id'];
|
||||
$student_uid = $_POST['student_uid'];
|
||||
$bperson_id = $_POST['bperson_id'];
|
||||
$paabgabetyp_kurzbz = $_POST['paabgabetyp_kurzbz'];
|
||||
|
||||
if (!isset($projektarbeit_id) || isEmptyString($projektarbeit_id)
|
||||
|| !isset($paabgabe_id) || isEmptyString($paabgabe_id)
|
||||
|| !isset($student_uid) || isEmptyString($student_uid)
|
||||
|| !isset($paabgabetyp_kurzbz) || isEmptyString($paabgabetyp_kurzbz))
|
||||
$this->terminateWithError($this->p->t('global', 'wrongParameters'), 'general');
|
||||
|
||||
if ((isset($_FILES) and isset($_FILES['file']) and ! $_FILES['file']['error'])) {
|
||||
move_uploaded_file($_FILES['file']['tmp_name'], PAABGABE_PATH.$paabgabe_id.'_'.$student_uid.'.pdf');
|
||||
|
||||
if(file_exists(PAABGABE_PATH.$paabgabe_id.'_'.$student_uid.'.pdf')) {
|
||||
|
||||
exec('chmod 640 "'.PAABGABE_PATH.$paabgabe_id.'_'.$student_uid.'.pdf'.'"');
|
||||
|
||||
$this->load->model('education/Paabgabe_model', 'PaabgabeModel');
|
||||
$res = $this->PaabgabeModel->update($paabgabe_id, array(
|
||||
'abgabedatum' => date('Y-m-d'),
|
||||
'updatevon' => getAuthUID(),
|
||||
'updateamum' => date('Y-m-d H:i:s')
|
||||
));
|
||||
|
||||
$this->sendUploadEmail($bperson_id, $projektarbeit_id, $paabgabetyp_kurzbz, $student_uid);
|
||||
$this->terminateWithSuccess($res);
|
||||
} else {
|
||||
$this->terminateWithError('Error moving File');
|
||||
}
|
||||
|
||||
} else {
|
||||
$this->terminateWithError('File missing');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* upload für finale abgaben aka Endupload in cis4 student abgabetool
|
||||
*/
|
||||
public function postStudentProjektarbeitEndupload()
|
||||
{
|
||||
|
||||
$projektarbeit_id = $_POST['projektarbeit_id'];
|
||||
$paabgabe_id = $_POST['paabgabe_id'];
|
||||
$student_uid = $_POST['student_uid'];
|
||||
$sprache = $_POST['sprache'];
|
||||
$abstract = $_POST['abstract'];
|
||||
$abstract_en = $_POST['abstract_en'];
|
||||
$schlagwoerter = $_POST['schlagwoerter'];
|
||||
$schlagwoerter_en = $_POST['schlagwoerter_en'];
|
||||
$seitenanzahl = $_POST['seitenanzahl'];
|
||||
$bperson_id = $_POST['bperson_id'];
|
||||
$paabgabetyp_kurzbz = $_POST['paabgabetyp_kurzbz'];
|
||||
|
||||
if (!isset($projektarbeit_id) || isEmptyString($projektarbeit_id)
|
||||
|| !isset($paabgabe_id) || isEmptyString($paabgabe_id)
|
||||
|| !isset($student_uid) || isEmptyString($student_uid)
|
||||
|| !isset($paabgabetyp_kurzbz) || isEmptyString($paabgabetyp_kurzbz)
|
||||
|| !isset($abstract) || !isset($abstract_en) // endupload zusatzdaten can be empty but should never be null
|
||||
|| !isset($schlagwoerter) || !isset($schlagwoerter_en)
|
||||
|| !isset($seitenanzahl))
|
||||
$this->terminateWithError($this->p->t('global', 'wrongParameters'), 'general');
|
||||
|
||||
if ((isset($_FILES) and isset($_FILES['file']) and ! $_FILES['file']['error'])) {
|
||||
move_uploaded_file($_FILES['file']['tmp_name'], PAABGABE_PATH.$paabgabe_id.'_'.$student_uid.'.pdf');
|
||||
|
||||
if(file_exists(PAABGABE_PATH.$paabgabe_id.'_'.$student_uid.'.pdf')) {
|
||||
|
||||
// Loads Libraries
|
||||
$this->load->library('SignatureLib');
|
||||
|
||||
// Check if the document is signed
|
||||
$signaturVorhanden = true;
|
||||
$signList = SignatureLib::list(PAABGABE_PATH.$paabgabe_id.'_'.$student_uid.'.pdf');
|
||||
if (is_array($signList) && count($signList) > 0)
|
||||
{
|
||||
// The document is signed
|
||||
$uploadedDocumentSigned = 'The document is signed';
|
||||
}
|
||||
elseif ($signList === null)
|
||||
{
|
||||
$uploadedDocumentSigned = 'WARNING: signature server error';
|
||||
}
|
||||
else
|
||||
{
|
||||
$signaturVorhanden = false;
|
||||
$uploadedDocumentSigned = 'No document signature found';
|
||||
}
|
||||
$this->addMeta('signaturInfo', $uploadedDocumentSigned);
|
||||
|
||||
if ($signaturVorhanden === false)
|
||||
{
|
||||
$this->signaturFehltEmail($student_uid);
|
||||
}
|
||||
|
||||
// update projektarbeit cols
|
||||
$this->load->model('education/Projektarbeit_model', 'ProjektarbeitModel');
|
||||
$this->ProjektarbeitModel->updateProjektarbeit($projektarbeit_id,$sprache,$abstract,$abstract_en
|
||||
,$schlagwoerter, $schlagwoerter_en, $seitenanzahl);
|
||||
|
||||
|
||||
// update paabgabe datum
|
||||
$this->load->model('education/Paabgabe_model', 'PaabgabeModel');
|
||||
$res = $this->PaabgabeModel->update($paabgabe_id, array(
|
||||
'abgabedatum' => date('Y-m-d'),
|
||||
'updatevon' => getAuthUID(),
|
||||
'updateamum' => date('Y-m-d H:i:s')
|
||||
));
|
||||
|
||||
$this->sendUploadEmail($bperson_id, $projektarbeit_id, $paabgabetyp_kurzbz, $student_uid);
|
||||
|
||||
$this->terminateWithSuccess($res);
|
||||
} else {
|
||||
$this->terminateWithError('Error moving File');
|
||||
}
|
||||
|
||||
} else {
|
||||
$this->terminateWithError('File missing');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private function signaturFehltEmail($student_uid) {
|
||||
$this->load->model('crm/Student_model', 'StudentModel');
|
||||
$this->load->model('organisation/Studiengang_model', 'StudiengangModel');
|
||||
|
||||
$this->StudentModel->addJoin('public.tbl_benutzer', 'ON (public.tbl_benutzer.uid = public.tbl_student.student_uid)');
|
||||
$this->StudentModel->addJoin('public.tbl_person', 'person_id');
|
||||
|
||||
// $this->StudentModel->load($student_uid); -> this loads all students for some reason
|
||||
$result = $this->StudentModel->loadWhere(array('student_uid' => $student_uid));
|
||||
$this->StudentModel->resetQuery();
|
||||
|
||||
$studentArr = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
if(count($studentArr) > 0) {
|
||||
$student = $studentArr[0];
|
||||
} else {
|
||||
$this->terminateWithError($this->p->t('global','userNichtGefunden'), 'general');
|
||||
}
|
||||
|
||||
$result = $this->StudiengangModel->load($student->studiengang_kz);
|
||||
$studiengangArr = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
if(count($studiengangArr) > 0) {
|
||||
$stg_obj = $studiengangArr[0];
|
||||
} else {
|
||||
$this->terminateWithError($this->p->t('global','fehlerBeimLesenAusDatenbank'), 'general');
|
||||
}
|
||||
|
||||
$subject = 'Abgabe ohne Signatur';
|
||||
$tomail = $stg_obj->email;
|
||||
$data = array(
|
||||
'vorname' => $student->vorname,
|
||||
'nachname' => $student->nachname,
|
||||
'studiengang' => $stg_obj->bezeichnung
|
||||
);
|
||||
|
||||
$mailres = sendSanchoMail(
|
||||
'ParbeitsbeurteilungSiganturFehlt',
|
||||
$data,
|
||||
$tomail,
|
||||
$subject,
|
||||
'sancho_header_min_bw.jpg',
|
||||
'sancho_footer_min_bw.jpg'
|
||||
);
|
||||
}
|
||||
|
||||
private function sendUploadEmail($bperson_id, $projektarbeit_id, $paabgabetyp_kurzbz, $student_uid) {
|
||||
|
||||
$this->load->model('education/Projektarbeit_model', 'ProjektarbeitModel');
|
||||
|
||||
$resBetr = $this->ProjektarbeitModel->getProjektbetreuerAnrede($bperson_id);
|
||||
|
||||
|
||||
$result = $this->ProjektarbeitModel->load($projektarbeit_id);
|
||||
$projektarbeitArr = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
if(count($projektarbeitArr) > 0) {
|
||||
$projektarbeit = $projektarbeitArr[0];
|
||||
} else {
|
||||
$this->terminateWithError($this->p->t('global','projektarbeitNichtGefunden'), 'general');
|
||||
}
|
||||
|
||||
$projektarbeitIsCurrent = $this->ProjektarbeitModel->projektarbeitIsCurrent($projektarbeit_id);
|
||||
if(!$projektarbeitIsCurrent) {
|
||||
$this->terminateWithError($this->p->t('abgabetool','c4fehlerAktualitaetProjektarbeit'), 'general');
|
||||
}
|
||||
|
||||
foreach($resBetr->retval as $betreuerRow) {
|
||||
|
||||
// query student benutzer view for every betreuer row
|
||||
$studentUser = $this->ProjektarbeitModel->getProjektarbeitBenutzer($student_uid)->retval[0];
|
||||
|
||||
// 1. Begutachter mail ohne Token
|
||||
$mail_baselink = APP_ROOT."index.ci.php/extensions/FHC-Core-Projektarbeitsbeurteilung/ProjektarbeitsbeurteilungErstbegutachter";
|
||||
$mail_fulllink = "$mail_baselink?projektarbeit_id=".$projektarbeit_id."&uid=".$studentUser->uid;
|
||||
$projekttyp_kurzbz = $projektarbeit->projekttyp_kurzbz;
|
||||
$subject = $projektarbeit->projekttyp_kurzbz == 'Diplom' ? 'Masterarbeitsbetreuung' : 'Bachelorarbeitsbetreuung';
|
||||
$abgabetyp = $paabgabetyp_kurzbz == 'end' ? 'Endabgabe' : 'Zwischenabgabe';
|
||||
|
||||
$maildata = array();
|
||||
$maildata['geehrt'] = "geehrte".($betreuerRow->anrede=="Herr"?"r":"");
|
||||
$maildata['anrede'] = $betreuerRow->anrede;
|
||||
$maildata['betreuer_voller_name'] = $betreuerRow->first;
|
||||
$maildata['student_anrede'] = $studentUser->anrede;
|
||||
$maildata['student_voller_name'] = trim($studentUser->titelpre." ".$studentUser->vorname." ".$studentUser->nachname." ".$studentUser->titelpost);
|
||||
$maildata['abgabetyp'] = $abgabetyp;
|
||||
$maildata['parbeituebersichtlink'] = "<p><a href='".APP_ROOT."cis/private/lehre/abgabe_lektor_frameset.html'>Zur Projektarbeitsübersicht</a></p>";
|
||||
$maildata['bewertunglink'] = $projektarbeitIsCurrent && $paabgabetyp_kurzbz == 'end' ? "<p><a href='$mail_fulllink'>Zur Beurteilung der Arbeit</a></p>" : "";
|
||||
$maildata['token'] = "";
|
||||
|
||||
$email = $this->getProjektbetreuerEmail($projektarbeit_id);
|
||||
|
||||
if(!$email) $this->terminateWithError($this->p->t('abgabetool', 'fehlerMailBegutachter'), 'general');
|
||||
|
||||
$mailres = sendSanchoMail(
|
||||
'ParbeitsbeurteilungEndupload',
|
||||
$maildata,
|
||||
$email,
|
||||
$subject,
|
||||
'sancho_header_min_bw.jpg',
|
||||
'sancho_footer_min_bw.jpg',
|
||||
get_uid()."@".DOMAIN);
|
||||
|
||||
if(!$mailres)
|
||||
{
|
||||
$this->terminateWithError($this->p->t('abgabetool', 'fehlerMailBegutachter'), 'general');
|
||||
}
|
||||
|
||||
// 2. Begutachter mail, wenn Endabgabe, mit Token wenn extern
|
||||
if ($paabgabetyp_kurzbz == 'end')
|
||||
{
|
||||
// Zweitbegutachter holen
|
||||
$this->load->model('education/Projektbetreuer_model', 'ProjektbetreuerModel');
|
||||
$zweitbegutachterRes = $this->ProjektbetreuerModel->getZweitbegutachterWithToken($bperson_id, $projektarbeit_id, $studentUser->uid);
|
||||
|
||||
$this->addMeta('$zweitbegutachterRes', $zweitbegutachterRes);
|
||||
|
||||
if ($zweitbegutachterRes)
|
||||
{
|
||||
$zweitbegutachterResults = $zweitbegutachterRes->retval;
|
||||
|
||||
foreach ($zweitbegutachterResults as $begutachter)
|
||||
{
|
||||
// token generieren, wenn noch nicht vorhanden und notwendig (wird in methode überprüft)
|
||||
$tokenGenRes = $zweitbegutachter->generateZweitbegutachterToken($begutachter->person_id, $projektarbeit_id);
|
||||
|
||||
if (!$tokenGenRes)
|
||||
{
|
||||
$this->terminateWithError($this->p->t('abgabetool', 'fehlerMailZweitBegutachter'), 'general');
|
||||
}
|
||||
|
||||
$begutachterMitTokenRes = $this->ProjektbetreuerModel->getZweitbegutachterWithToken($bperson_id, $projektarbeit_id, $studentUser->uid, $begutachter->person_id);
|
||||
// $begutachterMitTokenRes = $zweitbegutachterMitToken->getZweitbegutachterWithToken($bperson_id, $projektarbeit_id, $studentUser->uid, $begutachter->person_id);
|
||||
|
||||
if (!$begutachterMitTokenRes)
|
||||
{
|
||||
$this->terminateWithError($this->p->t('abgabetool', 'fehlerMailZweitBegutachter'), 'general');
|
||||
}
|
||||
|
||||
// Email an Zweitbegutachter senden
|
||||
if (isset($zweitbegutachterMitToken->result[0]))
|
||||
{
|
||||
$begutachterMitToken = $zweitbegutachterMitToken->result[0];
|
||||
|
||||
$path = $begutachterMitToken->betreuerart_kurzbz == 'Zweitbegutachter' ? 'ProjektarbeitsbeurteilungZweitbegutachter' : 'ProjektarbeitsbeurteilungErstbegutachter';
|
||||
$mail_baselink = APP_ROOT."index.ci.php/extensions/FHC-Core-Projektarbeitsbeurteilung/$path";
|
||||
$mail_fulllink = "$mail_baselink?projektarbeit_id=".$projektarbeit_id."&uid=".$studentUser->uid;
|
||||
$intern = isset($begutachterMitToken->uid);
|
||||
$mail_link = $intern ? $mail_fulllink : $mail_baselink;
|
||||
|
||||
$zweitbetmaildata = array();
|
||||
$zweitbetmaildata['geehrt'] = "geehrte" . ($begutachterMitToken->anrede == "Herr" ? "r" : "");
|
||||
$zweitbetmaildata['anrede'] = $begutachterMitToken->anrede;
|
||||
$zweitbetmaildata['betreuer_voller_name'] = $begutachterMitToken->voller_name;
|
||||
$zweitbetmaildata['student_anrede'] = $maildata['student_anrede'];
|
||||
$zweitbetmaildata['student_voller_name'] = $maildata['student_voller_name'];
|
||||
$zweitbetmaildata['abgabetyp'] = $abgabetyp;
|
||||
$zweitbetmaildata['parbeituebersichtlink'] = $intern ? $maildata['parbeituebersichtlink'] : "";
|
||||
$zweitbetmaildata['bewertunglink'] = $projektarbeitIsCurrent ? "<p><a href='$mail_link'>Zur Beurteilung der Arbeit</a></p>" : "";
|
||||
$zweitbetmaildata['token'] = $projektarbeitIsCurrent && isset($begutachterMitToken->zugangstoken) && !$intern ? "<p>Zugangstoken: " . $begutachterMitToken->zugangstoken . "</p>" : "";
|
||||
|
||||
|
||||
$mailres = sendSanchoMail(
|
||||
'ParbeitsbeurteilungEndupload',
|
||||
$zweitbetmaildata,
|
||||
$begutachterMitToken->email,
|
||||
$subject,
|
||||
'sancho_header_min_bw.jpg',
|
||||
'sancho_footer_min_bw.jpg',
|
||||
get_uid()."@".DOMAIN
|
||||
);
|
||||
|
||||
if (!$mailres)
|
||||
{
|
||||
$this->terminateWithError($this->p->t('abgabetool', 'fehlerMailBegutachter'), 'general');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function getMitarbeiterProjektarbeiten() {
|
||||
$this->load->model('education/Projektarbeit_model', 'ProjektarbeitModel');
|
||||
|
||||
$boolParamStr = $this->input->get('showall');
|
||||
$trueStrings = ['true', '1'];
|
||||
$falseStrings = ['false', '0'];
|
||||
|
||||
// Handle missing or invalid parameter
|
||||
if ($boolParamStr === null) {
|
||||
$this->terminateWithError($this->p->t('global', 'wrongParameters'), 'general');
|
||||
}
|
||||
$boolParamStrLower = strtolower($boolParamStr);
|
||||
|
||||
if (in_array($boolParamStrLower, $trueStrings, true)) {
|
||||
$showAllBool = true;
|
||||
} elseif (in_array($boolParamStrLower, $falseStrings, true)) {
|
||||
$showAllBool = false;
|
||||
}
|
||||
|
||||
$projektarbeiten = $this->ProjektarbeitModel->getMitarbeiterProjektarbeiten(getAuthUID(), $showAllBool);
|
||||
|
||||
$this->terminateWithSuccess(array($projektarbeiten, DOMAIN));
|
||||
}
|
||||
|
||||
// called by abgabetool/mitarbeiter when adding a new termin
|
||||
public function postProjektarbeitAbgabe() {
|
||||
$projektarbeit_id = $_POST['projektarbeit_id'];
|
||||
$paabgabe_id = $_POST['paabgabe_id'];
|
||||
$paabgabetyp_kurzbz = $_POST['paabgabetyp_kurzbz'];
|
||||
$datum = $_POST['datum'];
|
||||
$fixtermin = $_POST['fixtermin'];
|
||||
$kurzbz = $_POST['kurzbz'];
|
||||
$note = $_POST['note'];
|
||||
$beurteilungsnotiz = $_POST['beurteilungsnotiz'];
|
||||
$upload_allowed = $_POST['upload_allowed'];
|
||||
$betreuer_person_id = $_POST['betreuer_person_id'];
|
||||
|
||||
if (!isset($projektarbeit_id) || isEmptyString($projektarbeit_id)
|
||||
|| !isset($paabgabe_id) || isEmptyString($paabgabe_id)
|
||||
|| !isset($datum) || isEmptyString($datum)
|
||||
|| !isset($kurzbz)
|
||||
|| !isset($paabgabetyp_kurzbz) || isEmptyString($paabgabetyp_kurzbz))
|
||||
$this->terminateWithError($this->p->t('global', 'wrongParameters'), 'general');
|
||||
|
||||
$this->load->model('education/Paabgabe_model', 'PaabgabeModel');
|
||||
|
||||
$existingPaabgabe = null;
|
||||
if($paabgabe_id == -1) {
|
||||
$result = $this->PaabgabeModel->insert(
|
||||
array(
|
||||
'projektarbeit_id' => $projektarbeit_id,
|
||||
'paabgabetyp_kurzbz' => $paabgabetyp_kurzbz,
|
||||
'fixtermin' => $fixtermin,
|
||||
'datum' => $datum,
|
||||
'kurzbz' => $kurzbz,
|
||||
'note' => $note,
|
||||
'beurteilungsnotiz' => $beurteilungsnotiz,
|
||||
'upload_allowed' => $upload_allowed,
|
||||
'insertvon' => getAuthUID(),
|
||||
'insertamum' => date('Y-m-d H:i:s')
|
||||
)
|
||||
);
|
||||
} else {
|
||||
// load existing entry of paabgabe and check if note has changed to negativ, to avoid sending when
|
||||
// only notiz has changed.
|
||||
|
||||
// TODO: what if paabgabe is a qualgate1, is benotet negativ and then its type is changed to gate2?
|
||||
|
||||
$existingResult = $this->PaabgabeModel->load($paabgabe_id);
|
||||
$existingPaabgabeArr = getData($existingResult);
|
||||
if(count($existingPaabgabeArr) > 0) $existingPaabgabe = $existingPaabgabeArr[0];
|
||||
|
||||
$result = $this->PaabgabeModel->update(
|
||||
$paabgabe_id,
|
||||
array(
|
||||
'paabgabetyp_kurzbz' => $paabgabetyp_kurzbz,
|
||||
'datum' => $datum,
|
||||
'kurzbz' => $kurzbz,
|
||||
'note' => $note,
|
||||
'beurteilungsnotiz' => $beurteilungsnotiz,
|
||||
'upload_allowed' => $upload_allowed,
|
||||
'updatevon' => getAuthUID(),
|
||||
'updateamum' => date('Y-m-d H:i:s')
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// check if $paaabgabe is a qual gate and its note is deemed negative
|
||||
// -> send email to student with that info
|
||||
$paabgabe_id = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$result = $this->PaabgabeModel->load($paabgabe_id);
|
||||
$paabgabeArr = $this->getDataOrTerminateWithError($result);
|
||||
$paabgabe = $paabgabeArr[0];
|
||||
// $this->addMeta('paabgabe', $paabgabeArr);
|
||||
|
||||
// check if abgabe even has note
|
||||
if($paabgabe->note) {
|
||||
$this->load->model('education/Note_model', 'NoteModel');
|
||||
$result = $this->NoteModel->load($paabgabe->note);
|
||||
$noteArr = $this->getDataOrTerminateWithError($result);
|
||||
$note = $noteArr[0];
|
||||
if($note->positiv === false) {
|
||||
// $this->addMeta('noteNegativ', true);
|
||||
|
||||
if($existingPaabgabe && $existingPaabgabe->note) {
|
||||
$result = $this->NoteModel->load($paabgabe->note);
|
||||
$noteArr = $this->getDataOrTerminateWithError($result);
|
||||
$note = $noteArr[0];
|
||||
if($note->positiv === false) {
|
||||
// do nothing since this means $beurteilungsnotiz change or smth else
|
||||
} else { // benotung legitimately changed -> email
|
||||
$this->sendQualGateNegativEmail($projektarbeit_id, $betreuer_person_id, $paabgabe);
|
||||
}
|
||||
|
||||
} else { // nothing existing previously -> send that mail
|
||||
$this->sendQualGateNegativEmail($projektarbeit_id, $betreuer_person_id, $paabgabe);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$this->terminateWithSuccess([$paabgabe, $existingPaabgabe]);
|
||||
}
|
||||
|
||||
public function deleteProjektarbeitAbgabe() {
|
||||
$paabgabe_id = $_POST['paabgabe_id'];
|
||||
|
||||
if (!isset($paabgabe_id) || isEmptyString($paabgabe_id))
|
||||
$this->terminateWithError($this->p->t('global', 'wrongParameters'), 'general');
|
||||
|
||||
$this->load->model('education/Paabgabe_model', 'PaabgabeModel');
|
||||
|
||||
$result = $this->PaabgabeModel->load($paabgabe_id);
|
||||
$result = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
if(count($result) == 0)
|
||||
$this->terminateWithError($this->p->t('global', 'wrongParameters'), 'general');
|
||||
|
||||
if($result[0]->insertvon === getAuthUID()) {
|
||||
$result = $this->PaabgabeModel->delete($paabgabe_id);
|
||||
$result = $this->getDataOrTerminateWithError($result);
|
||||
$this->terminateWithSuccess($result);
|
||||
}
|
||||
|
||||
$this->terminateWithError($this->p->t('global', 'wrongParameters'), 'general');
|
||||
}
|
||||
|
||||
/**
|
||||
* endpoint for adding the same paabgabe for multiple projektarbeiten
|
||||
* can be slow for large n since it queries twice per projektarbeit_id
|
||||
*/
|
||||
public function postSerientermin() {
|
||||
$projektarbeit_ids = $_POST['projektarbeit_ids'];
|
||||
$datum = $_POST['datum'];
|
||||
$paabgabetyp_kurzbz = $_POST['paabgabetyp_kurzbz'];
|
||||
$bezeichnung = $_POST['bezeichnung'];
|
||||
$kurzbz = $_POST['kurzbz'];
|
||||
|
||||
if (!isset($projektarbeit_ids) || !is_array($projektarbeit_ids) || empty($projektarbeit_ids)
|
||||
|| !isset($datum) || isEmptyString($datum)
|
||||
|| !isset($kurzbz)
|
||||
|| !isset($bezeichnung) || isEmptyString($bezeichnung)
|
||||
|| !isset($paabgabetyp_kurzbz) || isEmptyString($paabgabetyp_kurzbz))
|
||||
$this->terminateWithError($this->p->t('global', 'wrongParameters'), 'general');
|
||||
|
||||
// old script checks if there already are tbl_paabgabe entries with exact date, type & kurzbz
|
||||
// for each termin - good to check that in principle but should not matter in this place. if necessary
|
||||
// duplicate abgabetermine can be easily deleted manually, also via cronjob@night.
|
||||
|
||||
// since this entry includes the kurzbz string match, it should have only ever mattered when there were
|
||||
// multiple users entering the exact same set of (date, type, kurzbz) - which is a much more narrow case than the
|
||||
// general "saveMultiple" function should handle
|
||||
|
||||
// old script afterwards again queries if user is not the zweitbetreuer of any id - this is blocked in the ui
|
||||
// and should never unintentionally happen
|
||||
|
||||
// TODO: maybe check for betreuer zuordnung?
|
||||
|
||||
$this->load->model('education/Paabgabe_model', 'PaabgabeModel');
|
||||
$this->load->model('education/Projektarbeit_model', 'ProjektarbeitModel');
|
||||
|
||||
$res = [];
|
||||
foreach ($projektarbeit_ids as $projektarbeit_id) {
|
||||
|
||||
$result = $this->PaabgabeModel->insert(
|
||||
array(
|
||||
'projektarbeit_id' => $projektarbeit_id,
|
||||
'paabgabetyp_kurzbz' => $paabgabetyp_kurzbz,
|
||||
'fixtermin' => false,
|
||||
'datum' => $datum,
|
||||
'kurzbz' => $kurzbz,
|
||||
'insertvon' => getAuthUID(),
|
||||
'insertamum' => date('Y-m-d H:i:s')
|
||||
)
|
||||
);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
// $res[] = $data;
|
||||
|
||||
// send mail to student
|
||||
$result = $this->ProjektarbeitModel->getStudentInfoForProjektarbeitId($projektarbeit_id);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
// $this->addMeta('emaildata'.$projektarbeit_id, $data);
|
||||
|
||||
$datetime = new DateTime($datum);
|
||||
$dateEmailFormatted = $datetime->format('d.m.Y');
|
||||
|
||||
$anredeFillString = $data[0]->anrede=="Herr"?"r":"";
|
||||
|
||||
$fullFormattedNameString = trim($data[0]->titelpre." ".$data[0]->vorname." ".$data[0]->nachname." ".$data[0]->titelpost);
|
||||
$res[] = $fullFormattedNameString;
|
||||
|
||||
// Prepare mail content
|
||||
$body_fields = array(
|
||||
'anrede' => $data[0]->anrede,
|
||||
'anredeFillString' => $anredeFillString,
|
||||
'datum' => $dateEmailFormatted,
|
||||
'bezeichnung' => $bezeichnung,
|
||||
'fullFormattedNameString' => $fullFormattedNameString,
|
||||
'kurzbz' => $kurzbz
|
||||
);
|
||||
|
||||
$email = $data[0]->uid."@".DOMAIN;
|
||||
|
||||
sendSanchoMail(
|
||||
'neuerAbgabetermin',
|
||||
$body_fields,
|
||||
$email,
|
||||
$this->p->t('abgabetool', 'neuerTerminBachelorMasterbetreuung')
|
||||
);
|
||||
}
|
||||
|
||||
$this->terminateWithSuccess($res);
|
||||
|
||||
}
|
||||
|
||||
public function fetchDeadlines() {
|
||||
$person_id = $_POST['person_id'];
|
||||
|
||||
if (!isset($person_id) || isEmptyString($person_id))
|
||||
$person_id = getAuthPersonId();
|
||||
|
||||
|
||||
if($person_id !== getAuthPersonId()) {
|
||||
$this->load->library('PermissionLib');
|
||||
$isAdmin = $this->permissionlib->isBerechtigt('admin');
|
||||
if(!$isAdmin) $this->terminateWithError($this->p->t('ui', 'keineBerechtigung'), 'general');
|
||||
}
|
||||
|
||||
$this->load->model('education/Paabgabe_model', 'PaabgabeModel');
|
||||
$result = $this->PaabgabeModel->getDeadlines($person_id);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getPaAbgabetypen() {
|
||||
$this->load->model('education/Paabgabetyp_model', 'PaabgabetypModel');
|
||||
|
||||
$result = $this->PaabgabetypModel->getAll();
|
||||
$paabgabetypen = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
|
||||
$this->terminateWithSuccess($paabgabetypen);
|
||||
}
|
||||
|
||||
private function getProjektbetreuerEmail($projektarbeit_id) {
|
||||
$this->load->model('education/Projektarbeit_model', 'ProjektarbeitModel');
|
||||
$result = $this->ProjektarbeitModel->getProjektbetreuerEmail($projektarbeit_id);
|
||||
$email = $this->getDataOrTerminateWithError($result);
|
||||
return $email[0]->private_email;
|
||||
}
|
||||
|
||||
//TODO: SWITCH TO NOTEN API ONCE NOTENTOOL IS IN MASTER TO AVOID DUPLICATE API
|
||||
|
||||
/**
|
||||
* GET METHOD
|
||||
* returns List of all available & active NotenOptions
|
||||
*/
|
||||
public function getNoten() {
|
||||
$this->load->model('education/Note_model', 'NoteModel');
|
||||
|
||||
$result = $this->NoteModel->getAllActive();
|
||||
$noten = $this->getDataOrTerminateWithError($result);
|
||||
$this->terminateWithSuccess($noten);
|
||||
}
|
||||
|
||||
private function sendQualGateNegativEmail($projektarbeit_id, $betreuer_person_id, $paabgabe) {
|
||||
$this->load->model('education/Projektarbeit_model', 'ProjektarbeitModel');
|
||||
|
||||
$result = $this->ProjektarbeitModel->load($projektarbeit_id);
|
||||
$projektarbeitArr = $this->getDataOrTerminateWithError($result);
|
||||
$projektarbeit = $projektarbeitArr[0];
|
||||
|
||||
$result = $this->ProjektarbeitModel->getProjektbetreuerAnrede($betreuer_person_id);
|
||||
$anredeArr = $this->getDataOrTerminateWithError($result);
|
||||
$anrede = $anredeArr[0];
|
||||
|
||||
$student_uid = $projektarbeit->student_uid;
|
||||
|
||||
$this->load->model('education/Paabgabetyp_model', 'PaabgabetypModel');
|
||||
$result = $this->PaabgabetypModel->load($paabgabe->paabgabetyp_kurzbz);
|
||||
$paabgabetyp_kurzbzArr = $this->getDataOrTerminateWithError($result);
|
||||
$paabgabetyp_kurzbz = $paabgabetyp_kurzbzArr[0];
|
||||
|
||||
// Mail an Student wenn Qualgate negativ beurteilt wurde
|
||||
$this->load->model('crm/Student_model', 'StudentModel');
|
||||
$result = $this->StudentModel->load($paabgabe->paabgabetyp_kurzbz);
|
||||
$studentArr = $this->getDataOrTerminateWithError($result);
|
||||
$student = $studentArr[0];
|
||||
|
||||
if(!$student) {
|
||||
$this->terminateWithError($this->p->t('global','userNichtGefunden'), 'general');
|
||||
}
|
||||
|
||||
$subject = $this->p->t('abgabetool', 'c4qualgateNegativEmailSubject');
|
||||
$tomail = $student_uid.'@'.DOMAIN;
|
||||
|
||||
$datetime = new DateTime($paabgabe->datum);
|
||||
$dateEmailFormatted = $datetime->format('d.m.Y');
|
||||
|
||||
$data = array(
|
||||
'betreuerfullname' => $anrede->first,
|
||||
'qualgatebezeichnung' => $paabgabetyp_kurzbz->bezeichnung,
|
||||
'datum' => $dateEmailFormatted,
|
||||
'projektarbeitname' => $projektarbeit->titel
|
||||
);
|
||||
|
||||
// $this->addMeta('$emaildata', $data);
|
||||
|
||||
$mailres = sendSanchoMail(
|
||||
'QualGateNegativ',
|
||||
$data,
|
||||
$tomail,
|
||||
$subject
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -38,37 +38,9 @@ class Lehre extends FHCAPI_Controller
|
||||
parent::__construct([
|
||||
'lvStudentenMail' => self::PERM_LOGGED,
|
||||
'LV' => self::PERM_LOGGED,
|
||||
'Pruefungen' => self::PERM_LOGGED,
|
||||
'getStudentProjektarbeiten' => self::PERM_LOGGED, // TODO: abgabetool berechtigung?
|
||||
'getStudentProjektabgaben' => self::PERM_LOGGED,
|
||||
'postStudentProjektarbeitZwischenabgabe' => self::PERM_LOGGED,
|
||||
'postStudentProjektarbeitEndupload' => self::PERM_LOGGED,
|
||||
'getMitarbeiterProjektarbeiten' => self::PERM_LOGGED,
|
||||
'postProjektarbeitAbgabe' => self::PERM_LOGGED,
|
||||
'deleteProjektarbeitAbgabe' => self::PERM_LOGGED,
|
||||
'postSerientermin' => self::PERM_LOGGED,
|
||||
'fetchDeadlines' => self::PERM_LOGGED, // TODO: mitarbeiter recht prüfen
|
||||
'getLvViewData' => self::PERM_LOGGED,
|
||||
'getZugewieseneLv' => self::PERM_LOGGED,
|
||||
'getLeForLv' => self::PERM_LOGGED
|
||||
'Pruefungen' => self::PERM_LOGGED
|
||||
]);
|
||||
|
||||
$this->load->library('PhrasesLib');
|
||||
|
||||
$this->loadPhrases(
|
||||
array(
|
||||
'global',
|
||||
'ui',
|
||||
'abgabetool'
|
||||
)
|
||||
);
|
||||
|
||||
$this->load->helper('hlp_sancho_helper');
|
||||
|
||||
require_once(FHCPATH . 'include/studiengang.class.php');
|
||||
require_once(FHCPATH . 'include/student.class.php');
|
||||
require_once(FHCPATH . 'include/projektarbeit.class.php');
|
||||
require_once(FHCPATH . 'include/projektbetreuer.class.php');
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
@@ -128,598 +100,5 @@ class Lehre extends FHCAPI_Controller
|
||||
|
||||
$this->terminateWithSuccess($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* fetches all projektabgabetermine for a given projektarbeit_id used in cis4 student abgabetool
|
||||
*/
|
||||
public function getStudentProjektabgaben() {
|
||||
$projektarbeit_id = $this->input->get("projektarbeit_id",TRUE);
|
||||
|
||||
// TODO: error messages
|
||||
|
||||
if (!isset($projektarbeit_id) || isEmptyString($projektarbeit_id))
|
||||
$this->terminateWithError($this->p->t('global', 'wrongParameters'), 'general');
|
||||
|
||||
$projektarbeit_obj = new projektarbeit();
|
||||
if($projektarbeit_id==-1)
|
||||
$this->terminateWithError($this->p->t('global', 'wrongParameters'), 'general');
|
||||
|
||||
if(!$projektarbeit_obj->load($projektarbeit_id))
|
||||
$this->terminateWithError($this->p->t('global', 'wrongParameters'), 'general');
|
||||
|
||||
$paIsCurrent = $projektarbeit_obj->projektarbeitIsCurrent($projektarbeit_id);
|
||||
|
||||
$this->load->model('education/Projektarbeit_model', 'ProjektarbeitModel');
|
||||
$ret = $this->ProjektarbeitModel->getProjektarbeitAbgabetermine($projektarbeit_id);
|
||||
|
||||
// TODO: fetch zweitbetreuer
|
||||
|
||||
$this->terminateWithSuccess(array($ret, $paIsCurrent));
|
||||
}
|
||||
|
||||
/**
|
||||
* fetches all projektarbeiten and betreuer for a given student_uid used in cis4 student abgabetool
|
||||
*/
|
||||
public function getStudentProjektarbeiten($uid)
|
||||
{
|
||||
$this->load->model('ressource/Mitarbeiter_model', 'MitarbeiterModel');
|
||||
$this->load->model('education/Projektarbeit_model', 'ProjektarbeitModel');
|
||||
|
||||
if (!isset($uid) || isEmptyString($uid))
|
||||
$this->terminateWithError($this->p->t('global', 'wrongParameters'), 'general');
|
||||
|
||||
$isZugeteilterBetreuer = count($this->ProjektarbeitModel->checkZuordnung($uid, getAuthUID())->retval) > 0;
|
||||
$this->addMeta('isZugeteilterBetreuer', $isZugeteilterBetreuer);
|
||||
$isMitarbeiter = $this->MitarbeiterModel->isMitarbeiter(getAuthUID());
|
||||
|
||||
if ($isMitarbeiter && $isZugeteilterBetreuer){
|
||||
$projektarbeiten = $this->ProjektarbeitModel->getStudentProjektarbeitenWithBetreuer($uid);
|
||||
} else {
|
||||
$projektarbeiten = $this->ProjektarbeitModel->getStudentProjektarbeitenWithBetreuer(getAuthUID());
|
||||
}
|
||||
|
||||
$this->terminateWithSuccess(array($projektarbeiten, DOMAIN, $uid));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* projektarbeit - upload for zwischenabgaben in cis4 student abgabetool
|
||||
*/
|
||||
public function postStudentProjektarbeitZwischenabgabe()
|
||||
{
|
||||
|
||||
$projektarbeit_id = $_POST['projektarbeit_id'];
|
||||
$paabgabe_id = $_POST['paabgabe_id'];
|
||||
$student_uid = $_POST['student_uid'];
|
||||
$bperson_id = $_POST['bperson_id'];
|
||||
$paabgabetyp_kurzbz = $_POST['paabgabetyp_kurzbz'];
|
||||
|
||||
if (!isset($projektarbeit_id) || isEmptyString($projektarbeit_id)
|
||||
|| !isset($paabgabe_id) || isEmptyString($paabgabe_id)
|
||||
|| !isset($student_uid) || isEmptyString($student_uid)
|
||||
|| !isset($paabgabetyp_kurzbz) || isEmptyString($paabgabetyp_kurzbz))
|
||||
$this->terminateWithError($this->p->t('global', 'wrongParameters'), 'general');
|
||||
|
||||
if ((isset($_FILES) and isset($_FILES['file']) and ! $_FILES['file']['error'])) {
|
||||
move_uploaded_file($_FILES['file']['tmp_name'], PAABGABE_PATH.$paabgabe_id.'_'.$student_uid.'.pdf');
|
||||
|
||||
if(file_exists(PAABGABE_PATH.$paabgabe_id.'_'.$student_uid.'.pdf')) {
|
||||
|
||||
exec('chmod 640 "'.PAABGABE_PATH.$paabgabe_id.'_'.$student_uid.'.pdf'.'"');
|
||||
|
||||
$this->load->model('education/Paabgabe_model', 'PaabgabeModel');
|
||||
$res = $this->PaabgabeModel->update($paabgabe_id, array(
|
||||
'abgabedatum' => date('Y-m-d'),
|
||||
'updatevon' => getAuthUID(),
|
||||
'updateamum' => date('Y-m-d H:i:s')
|
||||
));
|
||||
|
||||
$this->sendUploadEmail($bperson_id, $projektarbeit_id, $paabgabetyp_kurzbz, $student_uid);
|
||||
$this->terminateWithSuccess($res);
|
||||
} else {
|
||||
$this->terminateWithError('Error moving File');
|
||||
}
|
||||
|
||||
} else {
|
||||
$this->terminateWithError('File missing');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* upload für finale abgaben aka Endupload in cis4 student abgabetool
|
||||
*/
|
||||
public function postStudentProjektarbeitEndupload()
|
||||
{
|
||||
|
||||
$projektarbeit_id = $_POST['projektarbeit_id'];
|
||||
$paabgabe_id = $_POST['paabgabe_id'];
|
||||
$student_uid = $_POST['student_uid'];
|
||||
$sprache = $_POST['sprache'];
|
||||
$abstract = $_POST['abstract'];
|
||||
$abstract_en = $_POST['abstract_en'];
|
||||
$schlagwoerter = $_POST['schlagwoerter'];
|
||||
$schlagwoerter_en = $_POST['schlagwoerter_en'];
|
||||
$seitenanzahl = $_POST['seitenanzahl'];
|
||||
$bperson_id = $_POST['bperson_id'];
|
||||
$paabgabetyp_kurzbz = $_POST['paabgabetyp_kurzbz'];
|
||||
|
||||
if (!isset($projektarbeit_id) || isEmptyString($projektarbeit_id)
|
||||
|| !isset($paabgabe_id) || isEmptyString($paabgabe_id)
|
||||
|| !isset($student_uid) || isEmptyString($student_uid)
|
||||
|| !isset($paabgabetyp_kurzbz) || isEmptyString($paabgabetyp_kurzbz))
|
||||
$this->terminateWithError($this->p->t('global', 'wrongParameters'), 'general');
|
||||
|
||||
// TODO: maybe check for other params aswell?
|
||||
|
||||
if ((isset($_FILES) and isset($_FILES['file']) and ! $_FILES['file']['error'])) {
|
||||
move_uploaded_file($_FILES['file']['tmp_name'], PAABGABE_PATH.$paabgabe_id.'_'.$student_uid.'.pdf');
|
||||
|
||||
if(file_exists(PAABGABE_PATH.$paabgabe_id.'_'.$student_uid.'.pdf')) {
|
||||
|
||||
// Loads Libraries
|
||||
$this->load->library('SignatureLib');
|
||||
|
||||
// Check if the document is signed
|
||||
$signaturVorhanden = true;
|
||||
$signList = SignatureLib::list(PAABGABE_PATH.$paabgabe_id.'_'.$student_uid.'.pdf');
|
||||
if (is_array($signList) && count($signList) > 0)
|
||||
{
|
||||
// The document is signed
|
||||
$uploadedDocumentSigned = 'The document is signed';
|
||||
}
|
||||
elseif ($signList === null)
|
||||
{
|
||||
$uploadedDocumentSigned = 'WARNING: signature server error';
|
||||
}
|
||||
else
|
||||
{
|
||||
$signaturVorhanden = false;
|
||||
$uploadedDocumentSigned = 'No document signature found';
|
||||
}
|
||||
$this->addMeta('signaturInfo', $uploadedDocumentSigned);
|
||||
|
||||
if ($signaturVorhanden === false)
|
||||
{
|
||||
$this->signaturFehltEmail($student_uid);
|
||||
}
|
||||
|
||||
// TODO error handle get data has data the updates
|
||||
// update projektarbeit cols
|
||||
$this->load->model('education/Projektarbeit_model', 'ProjektarbeitModel');
|
||||
$this->ProjektarbeitModel->updateProjektarbeit($projektarbeit_id,$sprache,$abstract,$abstract_en
|
||||
,$schlagwoerter, $schlagwoerter_en, $seitenanzahl);
|
||||
|
||||
|
||||
// update paabgabe datum
|
||||
$this->load->model('education/Paabgabe_model', 'PaabgabeModel');
|
||||
$res = $this->PaabgabeModel->update($paabgabe_id, array(
|
||||
'abgabedatum' => date('Y-m-d'),
|
||||
'updatevon' => getAuthUID(),
|
||||
'updateamum' => date('Y-m-d H:i:s')
|
||||
));
|
||||
|
||||
$this->sendUploadEmail($bperson_id, $projektarbeit_id, $paabgabetyp_kurzbz, $student_uid);
|
||||
|
||||
$this->terminateWithSuccess($res);
|
||||
} else {
|
||||
$this->terminateWithError('Error moving File');
|
||||
}
|
||||
|
||||
} else {
|
||||
$this->terminateWithError('File missing');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private function signaturFehltEmail($student_uid) {
|
||||
|
||||
|
||||
// Mail an Studiengang wenn keine Signatur gefunden wurde
|
||||
$student = new student();
|
||||
if(!$student->load($student_uid))
|
||||
$this->terminateWithError($this->p->t('global','userNichtGefunden'), 'general');
|
||||
|
||||
$stg_obj = new studiengang();
|
||||
if(!$stg_obj->load($student->studiengang_kz))
|
||||
$this->terminateWithError($this->p->t('global','fehlerBeimLesenAusDatenbank'), 'general');
|
||||
|
||||
$subject = 'Abgabe ohne Signatur';
|
||||
$tomail = $stg_obj->email;
|
||||
$data = array(
|
||||
'vorname' => $student->vorname,
|
||||
'nachname' => $student->nachname,
|
||||
'studiengang' => $stg_obj->bezeichnung
|
||||
);
|
||||
|
||||
$mailres = sendSanchoMail(
|
||||
'ParbeitsbeurteilungSiganturFehlt',
|
||||
$data,
|
||||
$tomail,
|
||||
$subject,
|
||||
'sancho_header_min_bw.jpg',
|
||||
'sancho_footer_min_bw.jpg'
|
||||
);
|
||||
}
|
||||
|
||||
private function sendUploadEmail($bperson_id, $projektarbeit_id, $paabgabetyp_kurzbz, $student_uid) {
|
||||
|
||||
$this->load->model('education/Projektarbeit_model', 'ProjektarbeitModel');
|
||||
|
||||
$resBetr = $this->ProjektarbeitModel->getProjektbetreuerAnrede($bperson_id);
|
||||
|
||||
$projektarbeit_obj = new projektarbeit();
|
||||
|
||||
if(!$projektarbeit_obj->load($projektarbeit_id))
|
||||
$this->terminateWithError('Ungueltiger Eintrag');
|
||||
|
||||
$num_rows_sem = $projektarbeit_obj->projektarbeitIsCurrent($projektarbeit_id);
|
||||
|
||||
if( null === $num_rows_sem || false === $num_rows_sem )
|
||||
{
|
||||
$this->terminateWithError($this->p->t('abgabetool','fehlerAktualitaetProjektarbeit'), 'general');
|
||||
}
|
||||
|
||||
foreach($resBetr->retval as $betreuerRow) {
|
||||
|
||||
// query student benutzer view for every betreuer row
|
||||
$studentUser = $this->ProjektarbeitModel->getProjektarbeitBenutzer($student_uid)->retval[0];
|
||||
|
||||
// TODO: hasdata, getData etc
|
||||
|
||||
// 1. Begutachter mail ohne Token
|
||||
$mail_baselink = APP_ROOT."index.ci.php/extensions/FHC-Core-Projektarbeitsbeurteilung/ProjektarbeitsbeurteilungErstbegutachter";
|
||||
$mail_fulllink = "$mail_baselink?projektarbeit_id=".$projektarbeit_id."&uid=".$studentUser->uid;
|
||||
$projekttyp_kurzbz = $projektarbeit_obj->projekttyp_kurzbz;
|
||||
$subject = $projektarbeit_obj->projekttyp_kurzbz == 'Diplom' ? 'Masterarbeitsbetreuung' : 'Bachelorarbeitsbetreuung';
|
||||
$abgabetyp = $paabgabetyp_kurzbz == 'end' ? 'Endabgabe' : 'Zwischenabgabe';
|
||||
|
||||
$maildata = array();
|
||||
$maildata['geehrt'] = "geehrte".($betreuerRow->anrede=="Herr"?"r":"");
|
||||
$maildata['anrede'] = $betreuerRow->anrede;
|
||||
$maildata['betreuer_voller_name'] = $betreuerRow->first;
|
||||
$maildata['student_anrede'] = $studentUser->anrede;
|
||||
$maildata['student_voller_name'] = trim($studentUser->titelpre." ".$studentUser->vorname." ".$studentUser->nachname." ".$studentUser->titelpost);
|
||||
$maildata['abgabetyp'] = $abgabetyp;
|
||||
$maildata['parbeituebersichtlink'] = "<p><a href='".APP_ROOT."cis/private/lehre/abgabe_lektor_frameset.html'>Zur Projektarbeitsübersicht</a></p>";
|
||||
$maildata['bewertunglink'] = $num_rows_sem >= 1 && $paabgabetyp_kurzbz == 'end' ? "<p><a href='$mail_fulllink'>Zur Beurteilung der Arbeit</a></p>" : "";
|
||||
$maildata['token'] = "";
|
||||
|
||||
$mailres = sendSanchoMail(
|
||||
'ParbeitsbeurteilungEndupload',
|
||||
$maildata,
|
||||
$betreuerRow->mitarbeiter_uid."@".DOMAIN,
|
||||
$subject,
|
||||
'sancho_header_min_bw.jpg',
|
||||
'sancho_footer_min_bw.jpg',
|
||||
get_uid()."@".DOMAIN);
|
||||
|
||||
if(!$mailres)
|
||||
{
|
||||
$this->terminateWithError($this->p->t('abgabetool', 'fehlerMailBegutachter'), 'general');
|
||||
}
|
||||
|
||||
// 2. Begutachter mail, wenn Endabgabe, mit Token wenn extern
|
||||
if ($paabgabetyp_kurzbz == 'end')
|
||||
{
|
||||
// Zweitbegutachter holen
|
||||
$zweitbegutachter = new projektbetreuer();
|
||||
$zweitbegutachterRes = $zweitbegutachter->getZweitbegutachterWithToken($bperson_id, $projektarbeit_id, $studentUser->uid);
|
||||
|
||||
if ($zweitbegutachterRes)
|
||||
{
|
||||
$zweitbegutachterResults = $zweitbegutachter->result;
|
||||
|
||||
foreach ($zweitbegutachterResults as $begutachter)
|
||||
{
|
||||
// token generieren, wenn noch nicht vorhanden und notwendig (wird in methode überprüft)
|
||||
$tokenGenRes = $zweitbegutachter->generateZweitbegutachterToken($begutachter->person_id, $projektarbeit_id);
|
||||
|
||||
if (!$tokenGenRes)
|
||||
{
|
||||
$this->terminateWithError($this->p->t('abgabetool', 'fehlerMailZweitBegutachter'), 'general');
|
||||
}
|
||||
|
||||
// Zweitbegutachter (evtl. mit Token) holen
|
||||
$zweitbegutachterMitToken = new projektbetreuer();
|
||||
$begutachterMitTokenRes = $zweitbegutachterMitToken->getZweitbegutachterWithToken($bperson_id, $projektarbeit_id, $studentUser->uid, $begutachter->person_id);
|
||||
|
||||
if (!$begutachterMitTokenRes)
|
||||
{
|
||||
$this->terminateWithError($this->p->t('abgabetool', 'fehlerMailZweitBegutachter'), 'general');
|
||||
}
|
||||
|
||||
// Email an Zweitbegutachter senden
|
||||
if (isset($zweitbegutachterMitToken->result[0]))
|
||||
{
|
||||
$begutachterMitToken = $zweitbegutachterMitToken->result[0];
|
||||
|
||||
$path = $begutachterMitToken->betreuerart_kurzbz == 'Zweitbegutachter' ? 'ProjektarbeitsbeurteilungZweitbegutachter' : 'ProjektarbeitsbeurteilungErstbegutachter';
|
||||
$mail_baselink = APP_ROOT."index.ci.php/extensions/FHC-Core-Projektarbeitsbeurteilung/$path";
|
||||
$mail_fulllink = "$mail_baselink?projektarbeit_id=".$projektarbeit_id."&uid=".$studentUser->uid;
|
||||
$intern = isset($begutachterMitToken->uid);
|
||||
$mail_link = $intern ? $mail_fulllink : $mail_baselink;
|
||||
|
||||
$zweitbetmaildata = array();
|
||||
$zweitbetmaildata['geehrt'] = "geehrte" . ($begutachterMitToken->anrede == "Herr" ? "r" : "");
|
||||
$zweitbetmaildata['anrede'] = $begutachterMitToken->anrede;
|
||||
$zweitbetmaildata['betreuer_voller_name'] = $begutachterMitToken->voller_name;
|
||||
$zweitbetmaildata['student_anrede'] = $maildata['student_anrede'];
|
||||
$zweitbetmaildata['student_voller_name'] = $maildata['student_voller_name'];
|
||||
$zweitbetmaildata['abgabetyp'] = $abgabetyp;
|
||||
$zweitbetmaildata['parbeituebersichtlink'] = $intern ? $maildata['parbeituebersichtlink'] : "";
|
||||
$zweitbetmaildata['bewertunglink'] = $num_rows_sem >= 1 ? "<p><a href='$mail_link'>Zur Beurteilung der Arbeit</a></p>" : "";
|
||||
$zweitbetmaildata['token'] = $num_rows_sem >= 1 && isset($begutachterMitToken->zugangstoken) && !$intern ? "<p>Zugangstoken: " . $begutachterMitToken->zugangstoken . "</p>" : "";
|
||||
|
||||
$mailres = sendSanchoMail(
|
||||
'ParbeitsbeurteilungEndupload',
|
||||
$zweitbetmaildata,
|
||||
$begutachterMitToken->email,
|
||||
$subject,
|
||||
'sancho_header_min_bw.jpg',
|
||||
'sancho_footer_min_bw.jpg',
|
||||
get_uid()."@".DOMAIN
|
||||
);
|
||||
|
||||
if (!$mailres)
|
||||
{
|
||||
$this->terminateWithError($this->p->t('abgabetool', 'fehlerMailBegutachter'), 'general');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function getMitarbeiterProjektarbeiten() {
|
||||
$this->load->model('education/Projektarbeit_model', 'ProjektarbeitModel');
|
||||
|
||||
$boolParamStr = $this->input->get('showall');
|
||||
$trueStrings = ['true', '1'];
|
||||
$falseStrings = ['false', '0'];
|
||||
|
||||
// Handle missing or invalid parameter
|
||||
if ($boolParamStr === null) {
|
||||
$this->terminateWithError($this->p->t('global', 'wrongParameters'), 'general');
|
||||
}
|
||||
$boolParamStrLower = strtolower($boolParamStr);
|
||||
|
||||
if (in_array($boolParamStrLower, $trueStrings, true)) {
|
||||
$showAllBool = true;
|
||||
} elseif (in_array($boolParamStrLower, $falseStrings, true)) {
|
||||
$showAllBool = false;
|
||||
} else {
|
||||
// $this->terminateWithError($this->p->t('global', 'wrongParameters'), 'general');
|
||||
}
|
||||
|
||||
$projektarbeiten = $this->ProjektarbeitModel->getMitarbeiterProjektarbeiten(getAuthUID(), $showAllBool);
|
||||
|
||||
$this->terminateWithSuccess(array($projektarbeiten, DOMAIN));
|
||||
}
|
||||
|
||||
public function postProjektarbeitAbgabe() {
|
||||
$projektarbeit_id = $_POST['projektarbeit_id'];
|
||||
$paabgabe_id = $_POST['paabgabe_id'];
|
||||
$paabgabetyp_kurzbz = $_POST['paabgabetyp_kurzbz'];
|
||||
$datum = $_POST['datum'];
|
||||
$fixtermin = $_POST['fixtermin'];
|
||||
$kurzbz = $_POST['kurzbz'];
|
||||
|
||||
if (!isset($projektarbeit_id) || isEmptyString($projektarbeit_id)
|
||||
|| !isset($paabgabe_id) || isEmptyString($paabgabe_id)
|
||||
|| !isset($datum) || isEmptyString($datum)
|
||||
|| !isset($datum) || isEmptyString($datum)
|
||||
|| !isset($paabgabetyp_kurzbz) || isEmptyString($paabgabetyp_kurzbz))
|
||||
$this->terminateWithError($this->p->t('global', 'wrongParameters'), 'general');
|
||||
|
||||
$this->load->model('education/Paabgabe_model', 'PaabgabeModel');
|
||||
|
||||
if($paabgabe_id == -1) {
|
||||
$result = $this->PaabgabeModel->insert(
|
||||
array(
|
||||
'projektarbeit_id' => $projektarbeit_id,
|
||||
'paabgabetyp_kurzbz' => $paabgabetyp_kurzbz,
|
||||
'fixtermin' => $fixtermin,
|
||||
'datum' => $datum,
|
||||
'kurzbz' => $kurzbz,
|
||||
'insertvon' => getAuthUID(),
|
||||
'insertamum' => date('Y-m-d H:i:s')
|
||||
)
|
||||
);
|
||||
|
||||
$this->terminateWithSuccess($result);
|
||||
} else {
|
||||
$result = $this->PaabgabeModel->update(
|
||||
$paabgabe_id,
|
||||
array(
|
||||
'paabgabetyp_kurzbz' => $paabgabetyp_kurzbz,
|
||||
'datum' => $datum,
|
||||
'kurzbz' => $kurzbz,
|
||||
'updatevon' => getAuthUID(),
|
||||
'updateamum' => date('Y-m-d H:i:s')
|
||||
)
|
||||
);
|
||||
|
||||
$this->terminateWithSuccess($result);
|
||||
}
|
||||
}
|
||||
|
||||
public function deleteProjektarbeitAbgabe() {
|
||||
$paabgabe_id = $_POST['paabgabe_id'];
|
||||
|
||||
if (!isset($paabgabe_id) || isEmptyString($paabgabe_id))
|
||||
$this->terminateWithError($this->p->t('global', 'wrongParameters'), 'general');
|
||||
|
||||
$this->load->model('education/Paabgabe_model', 'PaabgabeModel');
|
||||
|
||||
$result = $this->PaabgabeModel->load($paabgabe_id);
|
||||
$result = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
if(count($result) == 0)
|
||||
$this->terminateWithError($this->p->t('global', 'wrongParameters'), 'general');
|
||||
|
||||
// TODO: berechtigung?
|
||||
if($result[0]->insertvon === getAuthUID()) {
|
||||
$result = $this->PaabgabeModel->delete($paabgabe_id);
|
||||
$result = $this->getDataOrTerminateWithError($result);
|
||||
$this->terminateWithSuccess($result);
|
||||
}
|
||||
|
||||
$this->terminateWithError($this->p->t('global', 'wrongParameters'), 'general');
|
||||
}
|
||||
|
||||
/**
|
||||
* endpoint for adding the same paabgabe for multiple projektarbeiten
|
||||
* can be slow for large n since it queries twice per projektarbeit_id
|
||||
*/
|
||||
public function postSerientermin() {
|
||||
$projektarbeit_ids = $_POST['projektarbeit_ids'];
|
||||
$datum = $_POST['datum'];
|
||||
$paabgabetyp_kurzbz = $_POST['paabgabetyp_kurzbz'];
|
||||
$bezeichnung = $_POST['bezeichnung'];
|
||||
$kurzbz = $_POST['kurzbz'];
|
||||
|
||||
if (!isset($projektarbeit_ids) || !is_array($projektarbeit_ids) || empty($projektarbeit_ids)
|
||||
|| !isset($datum) || isEmptyString($datum)
|
||||
|| !isset($kurzbz) || isEmptyString($kurzbz)
|
||||
|| !isset($bezeichnung) || isEmptyString($bezeichnung)
|
||||
|| !isset($paabgabetyp_kurzbz) || isEmptyString($paabgabetyp_kurzbz))
|
||||
$this->terminateWithError($this->p->t('global', 'wrongParameters'), 'general');
|
||||
|
||||
// old script checks if there already are tbl_paabgabe entries with exact date, type & kurzbz
|
||||
// for each termin - good to check that in principle but should not matter in this place. if necessary
|
||||
// duplicate abgabetermine can be easily deleted manually, also via cronjob@night.
|
||||
|
||||
// since this entry includes the kurzbz string match, it should have only ever mattered when there were
|
||||
// multiple users entering the exact same set of (date, type, kurzbz) - which is a much more narrow case than the
|
||||
// general "saveMultiple" function should handle
|
||||
|
||||
// old script afterwards again queries if user is not the zweitbetreuer of any id - this is blocked in the ui
|
||||
// and should never unintentionally happen
|
||||
|
||||
// TODO: check berechtigung &/|| zuordnung?
|
||||
|
||||
$this->load->model('education/Paabgabe_model', 'PaabgabeModel');
|
||||
$this->load->model('education/Projektarbeit_model', 'ProjektarbeitModel');
|
||||
|
||||
$res = [];
|
||||
foreach ($projektarbeit_ids as $projektarbeit_id) {
|
||||
|
||||
$result = $this->PaabgabeModel->insert(
|
||||
array(
|
||||
'projektarbeit_id' => $projektarbeit_id,
|
||||
'paabgabetyp_kurzbz' => $paabgabetyp_kurzbz,
|
||||
'fixtermin' => false,
|
||||
'datum' => $datum,
|
||||
'kurzbz' => $kurzbz,
|
||||
'insertvon' => getAuthUID(),
|
||||
'insertamum' => date('Y-m-d H:i:s')
|
||||
)
|
||||
);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
// $res[] = $data;
|
||||
|
||||
// send mail to student
|
||||
$result = $this->ProjektarbeitModel->getStudentInfoForProjektarbeitId($projektarbeit_id);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
// $this->addMeta('emaildata'.$projektarbeit_id, $data);
|
||||
|
||||
$datetime = new DateTime($datum);
|
||||
$dateEmailFormatted = $datetime->format('d.m.Y');
|
||||
|
||||
$anredeFillString = $data[0]->anrede=="Herr"?"r":"";
|
||||
|
||||
$fullFormattedNameString = trim($data[0]->titelpre." ".$data[0]->vorname." ".$data[0]->nachname." ".$data[0]->titelpost);
|
||||
$res[] = $fullFormattedNameString;
|
||||
|
||||
// Prepare mail content
|
||||
$body_fields = array(
|
||||
'anrede' => $data[0]->anrede,
|
||||
'anredeFillString' => $anredeFillString,
|
||||
'datum' => $dateEmailFormatted,
|
||||
'bezeichnung' => $bezeichnung,
|
||||
'fullFormattedNameString' => $fullFormattedNameString,
|
||||
'kurzbz' => $kurzbz
|
||||
);
|
||||
|
||||
$email = $data[0]->uid."@".DOMAIN;
|
||||
|
||||
sendSanchoMail(
|
||||
'neuerAbgabetermin',
|
||||
$body_fields,
|
||||
$email,
|
||||
$this->p->t('abgabetool', 'neuerTerminBachelorMasterbetreuung')
|
||||
);
|
||||
}
|
||||
|
||||
$this->terminateWithSuccess($res);
|
||||
|
||||
}
|
||||
|
||||
public function fetchDeadlines() {
|
||||
$person_id = $_POST['person_id'];
|
||||
|
||||
if (!isset($person_id) || isEmptyString($person_id))
|
||||
$person_id = getAuthPersonId();
|
||||
|
||||
if($person_id !== getAuthPersonId()) {
|
||||
$this->load->library('PermissionLib');
|
||||
$isAdmin = $this->permissionlib->isBerechtigt('admin');
|
||||
if(!$isAdmin) $this->terminateWithError($this->p->t('ui', 'keineBerechtigung'), 'general');
|
||||
}
|
||||
|
||||
$this->load->model('education/Paabgabe_model', 'PaabgabeModel');
|
||||
$result = $this->PaabgabeModel->getDeadlines($person_id);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* fetches all assigned lehrveranstaltungen of a mitarbeiter for a given semester
|
||||
* @param mixed $uid
|
||||
* @param mixed $sem_kurzbz
|
||||
* @return void
|
||||
*/
|
||||
public function getZugewieseneLv() {
|
||||
$uid = $this->input->get("uid",TRUE);
|
||||
$sem_kurzbz = $this->input->get("sem_kurzbz",TRUE);
|
||||
|
||||
// TODO: error messages
|
||||
|
||||
if(!isset($sem_kurzbz) || isEmptyString($sem_kurzbz))
|
||||
$this->terminateWithError($this->p->t('global', 'wrongParameters'), 'general');
|
||||
|
||||
if (!isset($uid) || isEmptyString($uid))
|
||||
$uid = getAuthUID();
|
||||
|
||||
// querying other ma_uids data requires admin permission
|
||||
if($uid !== getAuthUID()) {
|
||||
$this->load->library('PermissionLib');
|
||||
$isAdmin = $this->permissionlib->isBerechtigt('admin');
|
||||
if(!$isAdmin) $this->terminateWithError($this->p->t('ui', 'keineBerechtigung'), 'general');
|
||||
}
|
||||
|
||||
$this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel');
|
||||
$result = $this->LehrveranstaltungModel->getLvForLektorInSemester($sem_kurzbz, $uid);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getLeForLv() {
|
||||
$lv_id = $this->input->get("lv_id",TRUE);
|
||||
$sem_kurzbz = $this->input->get("sem_kurzbz",TRUE);
|
||||
|
||||
$this->load->model('education/Lehreinheit_model', 'LehreinheitModel');
|
||||
|
||||
// $this->terminateWithSuccess($this->LehreinheitModel->getLesForLv($lv_id, $sem_kurzbz));
|
||||
$this->terminateWithSuccess($this->LehreinheitModel->getAllLehreinheitenForLvaAndMaUid($lv_id, getAuthUID(), $sem_kurzbz));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -11,14 +11,12 @@ class Note_model extends DB_Model
|
||||
$this->dbTable = 'lehre.tbl_note';
|
||||
$this->pk = 'note';
|
||||
}
|
||||
|
||||
|
||||
public function getAllActive() {
|
||||
$qry ="SELECT *
|
||||
FROM lehre.tbl_note
|
||||
WHERE aktiv = true";
|
||||
|
||||
|
||||
return $this->execReadOnlyQuery($qry);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -11,4 +11,10 @@ class Paabgabetyp_model extends DB_Model
|
||||
$this->dbTable = 'campus.tbl_paabgabetyp';
|
||||
$this->pk = 'paabgabetyp_kurzbz';
|
||||
}
|
||||
|
||||
public function getAll() {
|
||||
$qry = "SELECT * FROM campus.tbl_paabgabetyp";
|
||||
|
||||
return $this->execReadOnlyQuery($qry);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,28 +97,26 @@ class Projektarbeit_model extends DB_Model
|
||||
*/
|
||||
public function getStudentProjektarbeitenWithBetreuer($studentUID)
|
||||
{
|
||||
$betreuerQuery = "
|
||||
SELECT
|
||||
$betreuerQuery = "SELECT * FROM (SELECT DISTINCT ON(projektarbeit_id)
|
||||
vorname as bvorname,
|
||||
nachname as bnachname,
|
||||
titelpre as btitelpre,
|
||||
titelpost AS btitelpost,
|
||||
titelpost AS btitelpost,
|
||||
tbl_betreuerart.beschreibung AS betreuerart_beschreibung,
|
||||
|
||||
(SELECT person_id
|
||||
FROM lehre.tbl_projektbetreuer
|
||||
(SELECT person_id
|
||||
FROM lehre.tbl_projektbetreuer
|
||||
WHERE projektarbeit_id=tbl_projektarbeit.projektarbeit_id
|
||||
AND betreuerart_kurzbz IN ('Zweitbetreuer', 'Zweitbegutachter') LIMIT 1) AS zweitbetreuer_person_id,
|
||||
(SELECT betreuerart_kurzbz
|
||||
FROM lehre.tbl_projektbetreuer
|
||||
AND betreuerart_kurzbz IN ('Zweitbetreuer', 'Zweitbegutachter') LIMIT 1) AS zweitbetreuer_person_id,
|
||||
(SELECT betreuerart_kurzbz
|
||||
FROM lehre.tbl_projektbetreuer
|
||||
WHERE projektarbeit_id=tbl_projektarbeit.projektarbeit_id
|
||||
AND betreuerart_kurzbz IN ('Zweitbetreuer', 'Zweitbegutachter') LIMIT 1) AS zweitbetreuer_betreuerart_kurzbz,
|
||||
(SELECT tbl_betreuerart.beschreibung
|
||||
FROM lehre.tbl_projektbetreuer JOIN lehre.tbl_betreuerart USING(betreuerart_kurzbz)
|
||||
AND betreuerart_kurzbz IN ('Zweitbetreuer', 'Zweitbegutachter') LIMIT 1) AS zweitbetreuer_betreuerart_kurzbz,
|
||||
(SELECT tbl_betreuerart.beschreibung
|
||||
FROM lehre.tbl_projektbetreuer JOIN lehre.tbl_betreuerart USING(betreuerart_kurzbz)
|
||||
WHERE projektarbeit_id=tbl_projektarbeit.projektarbeit_id
|
||||
AND betreuerart_kurzbz IN ('Zweitbetreuer', 'Zweitbegutachter', 'Senatsmitglied') LIMIT 1) AS zweitbetreuer_betreuerart_beschreibung,
|
||||
|
||||
AND betreuerart_kurzbz IN ('Zweitbetreuer', 'Zweitbegutachter', 'Senatsmitglied') LIMIT 1) AS zweitbetreuer_betreuerart_beschreibung,
|
||||
|
||||
tbl_betreuerart.betreuerart_kurzbz,
|
||||
person_id as bperson_id,
|
||||
projektarbeit_id,
|
||||
@@ -126,7 +124,8 @@ class Projektarbeit_model extends DB_Model
|
||||
lehre.tbl_lehreinheit.studiensemester_kurzbz,
|
||||
lehre.tbl_lehrveranstaltung.studiengang_kz,
|
||||
public.tbl_studiengang.kurzbzlang,
|
||||
lehre.tbl_projektbetreuer.note as note,
|
||||
lehre.tbl_projektarbeit.note as note,
|
||||
lehre.tbl_note.bezeichnung as note_bezeichnung,
|
||||
public.tbl_mitarbeiter.mitarbeiter_uid,
|
||||
lehre.tbl_projektarbeit.titel as titel,
|
||||
lehre.tbl_projektarbeit.sprache as sprache,
|
||||
@@ -135,7 +134,8 @@ class Projektarbeit_model extends DB_Model
|
||||
lehre.tbl_projektarbeit.schlagwoerter as schlagwoerter,
|
||||
lehre.tbl_projektarbeit.schlagwoerter_en as schlagwoerter_en,
|
||||
lehre.tbl_projektarbeit.abstract as abstract,
|
||||
lehre.tbl_projektarbeit.abstract_en as abstract_en,
|
||||
lehre.tbl_projektarbeit.abstract_en as abstract_en,
|
||||
lehre.tbl_projektarbeit.insertamum as insertamum,
|
||||
(SELECT abgeschicktvon FROM extension.tbl_projektarbeitsbeurteilung WHERE projektarbeit_id = tbl_projektarbeit.projektarbeit_id AND betreuer_person_id = tbl_projektbetreuer.person_id) AS babgeschickt,
|
||||
(SELECT abgeschicktvon FROM extension.tbl_projektarbeitsbeurteilung WHERE projektarbeit_id = tbl_projektarbeit.projektarbeit_id AND betreuerart_kurzbz IN ('Zweitbetreuer', 'Zweitbegutachter') LIMIT 1) AS zweitbetreuer_abgeschickt,
|
||||
(SELECT datum FROM campus.tbl_paabgabe WHERE paabgabetyp_kurzbz = 'end' AND abgabedatum IS NOT NULL AND projektarbeit_id = tbl_projektarbeit.projektarbeit_id LIMIT 1) AS abgegeben
|
||||
@@ -146,15 +146,17 @@ class Projektarbeit_model extends DB_Model
|
||||
LEFT JOIN public.tbl_benutzer USING(person_id)
|
||||
LEFT JOIN lehre.tbl_projekttyp USING (projekttyp_kurzbz)
|
||||
LEFT JOIN lehre.tbl_betreuerart USING(betreuerart_kurzbz)
|
||||
LEFT JOIN lehre.tbl_lehreinheit USING(lehreinheit_id)
|
||||
LEFT JOIN lehre.tbl_lehrveranstaltung USING(lehrveranstaltung_id)
|
||||
LEFT JOIN public.tbl_mitarbeiter ON(public.tbl_mitarbeiter.mitarbeiter_uid = public.tbl_benutzer.uid)
|
||||
LEFT JOIN public.tbl_studiengang USING(studiengang_kz)
|
||||
WHERE
|
||||
tbl_projektarbeit.student_uid = ? AND
|
||||
LEFT JOIN lehre.tbl_lehreinheit USING(lehreinheit_id)
|
||||
LEFT JOIN lehre.tbl_lehrveranstaltung USING(lehrveranstaltung_id)
|
||||
LEFT JOIN public.tbl_mitarbeiter ON(public.tbl_mitarbeiter.mitarbeiter_uid = public.tbl_benutzer.uid)
|
||||
LEFT JOIN public.tbl_studiengang USING(studiengang_kz)
|
||||
LEFT JOIN lehre.tbl_note ON(lehre.tbl_projektarbeit.note = lehre.tbl_note.note)
|
||||
WHERE
|
||||
tbl_projektarbeit.student_uid = ? AND mitarbeiter_uid IS NOT NULL AND
|
||||
(projekttyp_kurzbz='Bachelor' OR projekttyp_kurzbz='Diplom')
|
||||
AND betreuerart_kurzbz IN ('Betreuer', 'Begutachter', 'Erstbegutachter', 'Senatsvorsitz')";
|
||||
|
||||
AND betreuerart_kurzbz IN ('Betreuer', 'Begutachter', 'Erstbegutachter', 'Senatsvorsitz')) as base
|
||||
ORDER BY insertamum DESC";
|
||||
|
||||
return $this->execReadOnlyQuery($betreuerQuery, array($studentUID));
|
||||
}
|
||||
|
||||
@@ -167,6 +169,9 @@ class Projektarbeit_model extends DB_Model
|
||||
campus.tbl_paabgabe.fixtermin,
|
||||
campus.tbl_paabgabe.kurzbz,
|
||||
campus.tbl_paabgabe.datum,
|
||||
campus.tbl_paabgabe.note,
|
||||
campus.tbl_paabgabe.upload_allowed,
|
||||
campus.tbl_paabgabe.beurteilungsnotiz,
|
||||
campus.tbl_paabgabetyp.paabgabetyp_kurzbz,
|
||||
campus.tbl_paabgabetyp.bezeichnung,
|
||||
campus.tbl_paabgabe.abgabedatum,
|
||||
@@ -187,7 +192,28 @@ class Projektarbeit_model extends DB_Model
|
||||
WHERE public.tbl_person.person_id= ?";
|
||||
|
||||
return $this->execReadOnlyQuery($qry_betr, [$bperson_id]);
|
||||
}
|
||||
|
||||
public function getProjektbetreuerEmail($projektarbeit_id) {
|
||||
$qry = "SELECT (
|
||||
SELECT kontakt
|
||||
FROM public.tbl_kontakt
|
||||
WHERE kontakttyp = 'email'
|
||||
AND person_id = pers.person_id
|
||||
ORDER BY
|
||||
CASE WHEN zustellung THEN 0 ELSE 1 END,
|
||||
insertamum DESC NULLS LAST
|
||||
LIMIT 1
|
||||
) AS private_email
|
||||
FROM lehre.tbl_projektarbeit pa
|
||||
JOIN lehre.tbl_projektbetreuer USING (projektarbeit_id)
|
||||
JOIN public.tbl_person pers USING (person_id)
|
||||
LEFT JOIN public.tbl_benutzer ben USING (person_id)
|
||||
LEFT JOIN public.tbl_mitarbeiter ma ON ben.uid = ma.mitarbeiter_uid
|
||||
WHERE (ben.aktiv OR ben.aktiv IS NULL)
|
||||
AND projektarbeit_id = ?";
|
||||
|
||||
return $this->execReadOnlyQuery($qry, [$projektarbeit_id]);
|
||||
}
|
||||
|
||||
public function getProjektarbeitBenutzer($uid) {
|
||||
@@ -223,7 +249,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_projektbetreuer.betreuerart_kurzbz, tbl_betreuerart.beschreibung AS betreuerart_beschreibung,
|
||||
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
|
||||
FROM lehre.tbl_projektarbeit
|
||||
LEFT JOIN lehre.tbl_projektbetreuer using(projektarbeit_id)
|
||||
@@ -261,4 +287,121 @@ class Projektarbeit_model extends DB_Model
|
||||
|
||||
return $this->execReadOnlyQuery($qry, array($projektarbeit_id));
|
||||
}
|
||||
|
||||
/**
|
||||
* Prüft ob Projektarbeit aktuell ist (also zurzeit online bewertet wird).
|
||||
* @param $projektarbeit_id
|
||||
* @return boolean
|
||||
*/
|
||||
public function projektarbeitIsCurrent($projektarbeit_id) {
|
||||
$version = $this->getVersion($projektarbeit_id);
|
||||
// paarbeit sollte nur ab einem Studiensemester online bewertet werden
|
||||
return $version === null ? null : $version->isCurrent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Holt sich Version der Projektarbeit.
|
||||
* Liefert auch mit, ob die Version die aktuellste ist.
|
||||
* z.B.: Masterarbeiten waren ab der Änderung zur Gewichtung der Punkte aktuell,
|
||||
* Bachelorarbeiten waren ab dem Umstieg auf das Online Beurteilungsformular aktuell.
|
||||
* @param $projektarbeit_id
|
||||
* @return objekt mit Versionsinfo, null im Fehlerfall
|
||||
*/
|
||||
private function getVersion($projektarbeit_id) {
|
||||
$_versions_query = array(
|
||||
'Diplom' => array(
|
||||
'SS2025',
|
||||
'SS2023',
|
||||
'SS2022'
|
||||
),
|
||||
'Others' => array(
|
||||
'SS2025',
|
||||
'SS2022',
|
||||
)
|
||||
);
|
||||
|
||||
$_versions_check = array(
|
||||
'Diplom' => array(
|
||||
'SS2025' => 3,
|
||||
'SS2023' => 2,
|
||||
'SS2022' => 1
|
||||
),
|
||||
'Others' => array(
|
||||
'SS2025' => 2,
|
||||
'SS2022' => 1
|
||||
)
|
||||
);
|
||||
|
||||
// paarbeit sollte nur ab einem Studiensemester online bewertet werden
|
||||
$qry="
|
||||
SELECT
|
||||
CASE
|
||||
WHEN semesters_diplom.studiensemester_kurzbz IS NOT NULL
|
||||
THEN semesters_diplom.studiensemester_kurzbz
|
||||
ELSE semesters.studiensemester_kurzbz
|
||||
END AS version_studiensemester_kurzbz,
|
||||
pa.projekttyp_kurzbz
|
||||
FROM
|
||||
lehre.tbl_projektarbeit pa
|
||||
JOIN lehre.tbl_lehreinheit USING(lehreinheit_id)
|
||||
JOIN public.tbl_studiensemester sem USING(studiensemester_kurzbz)
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
start, studiensemester_kurzbz
|
||||
FROM
|
||||
public.tbl_studiensemester
|
||||
WHERE
|
||||
studiensemester_kurzbz IN ?
|
||||
) semesters ON sem.start >= semesters.start AND pa.projekttyp_kurzbz <> 'Diplom'
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
start, studiensemester_kurzbz
|
||||
FROM
|
||||
public.tbl_studiensemester
|
||||
WHERE
|
||||
studiensemester_kurzbz IN ?
|
||||
) semesters_diplom ON sem.start >= semesters_diplom.start AND pa.projekttyp_kurzbz = 'Diplom'
|
||||
WHERE
|
||||
projektarbeit_id = ?
|
||||
ORDER BY
|
||||
semesters.start DESC, semesters_diplom.start DESC
|
||||
LIMIT 1";
|
||||
|
||||
$resultociniBambini = $this->execReadOnlyQuery($qry, array($_versions_query['Others'], $_versions_query['Diplom'], $projektarbeit_id));
|
||||
|
||||
if(hasData($resultociniBambini)) {
|
||||
$data = getData($resultociniBambini);
|
||||
if(count($data) > 0) {
|
||||
$row = $data[0];
|
||||
|
||||
// known project types
|
||||
if (isset($_versions_check[$row->projekttyp_kurzbz][$row->version_studiensemester_kurzbz]))
|
||||
{
|
||||
$row->versionNumber = $_versions_check[$row->projekttyp_kurzbz][$row->version_studiensemester_kurzbz];
|
||||
$row->isCurrent =
|
||||
$_versions_check[$row->projekttyp_kurzbz][$row->version_studiensemester_kurzbz]
|
||||
== max($_versions_check[$row->projekttyp_kurzbz]);
|
||||
|
||||
}
|
||||
elseif (isset($_versions_check['Others'][$row->version_studiensemester_kurzbz]))
|
||||
{
|
||||
$row->versionNumber = $_versions_check['Others'][$row->version_studiensemester_kurzbz];
|
||||
$row->isCurrent =
|
||||
$_versions_check['Others'][$row->version_studiensemester_kurzbz]
|
||||
== max($_versions_check['Others']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$row->isCurrent = false;
|
||||
$row->versionNumber = 0;
|
||||
}
|
||||
return $row;
|
||||
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,18 +22,20 @@ $includesArray = array(
|
||||
'public/css/components/FilterComponent.css',
|
||||
'public/css/components/Profil.css',
|
||||
'public/css/components/FormUnderline.css',
|
||||
'public/css/components/abgabetool/abgabe.css',
|
||||
'public/css/Cis4/Cms.css',
|
||||
'public/css/Cis4/Studium.css',
|
||||
),
|
||||
'customJSs' => array(
|
||||
'vendor/npm-asset/primevue/accordion/accordion.min.js',
|
||||
'vendor/npm-asset/primevue/accordiontab/accordiontab.min.js',
|
||||
'vendor/npm-asset/primevue/inputnumber/inputnumber.min.js',
|
||||
'vendor/npm-asset/primevue/textarea/textarea.min.js',
|
||||
'vendor/npm-asset/primevue/checkbox/checkbox.min.js',
|
||||
'vendor/npm-asset/primevue/inputnumber/inputnumber.min.js',
|
||||
'vendor/npm-asset/primevue/speeddial/speeddial.min.js',
|
||||
'vendor/npm-asset/primevue/textarea/textarea.min.js',
|
||||
'vendor/moment/luxonjs/luxon.min.js',
|
||||
'vendor/npm-asset/primevue/password/password.js',
|
||||
'vendor/npm-asset/primevue/multiselect/multiselect.js'
|
||||
'vendor/npm-asset/primevue/password/password.min.js',
|
||||
'vendor/npm-asset/primevue/multiselect/multiselect.min.js'
|
||||
),
|
||||
'customJSModules' => array(
|
||||
'public/js/apps/Dashboard/Fhc.js',
|
||||
|
||||
@@ -871,4 +871,10 @@ html {
|
||||
font-size: x-large;
|
||||
bottom: 6px;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.bordered-modal {
|
||||
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||
border-radius: 0.5rem;
|
||||
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
@@ -0,0 +1,140 @@
|
||||
/* Base Header */
|
||||
.verpasst-header {
|
||||
background-color: var(--fhc-red-70);
|
||||
font-weight: 600;
|
||||
border-radius: 6px;
|
||||
padding: 0px 0px 0px 32px;
|
||||
transition: background-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
|
||||
box-shadow: 0 1px 2px rgba(0,0,0,0.08);
|
||||
}
|
||||
|
||||
/* Hover State */
|
||||
.verpasst-header:hover {
|
||||
background-color: var(--fhc-red-60);
|
||||
box-shadow: 0 2px 6px rgba(0,0,0,0.12);
|
||||
}
|
||||
|
||||
/* Active / Expanded State */
|
||||
.p-accordion-tab-active > .verpasst-header {
|
||||
background-color: var(--fhc-red-50);
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
/* Hover State Active*/
|
||||
.p-accordion-tab-active > .verpasst-header:hover {
|
||||
background-color: var(--fhc-red-60);
|
||||
box-shadow: 0 2px 6px rgba(0,0,0,0.12);
|
||||
}
|
||||
|
||||
/* Base Header */
|
||||
.abzugeben-header {
|
||||
background-color: var(--fhc-yellow-70);
|
||||
font-weight: 600;
|
||||
border-radius: 6px;
|
||||
padding: 0px 0px 0px 32px;
|
||||
transition: background-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
|
||||
box-shadow: 0 1px 2px rgba(0,0,0,0.08);
|
||||
}
|
||||
|
||||
/* Hover State */
|
||||
.abzugeben-header:hover {
|
||||
background-color: var(--fhc-yellow-60);
|
||||
box-shadow: 0 2px 6px rgba(0,0,0,0.12);
|
||||
}
|
||||
|
||||
/* Active / Expanded State */
|
||||
.p-accordion-tab-active > .abzugeben-header {
|
||||
background-color: var(--fhc-yellow-50);
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
/* Hover State Active*/
|
||||
.p-accordion-tab-active > .abzugeben-header:hover {
|
||||
background-color: var(--fhc-yellow-60);
|
||||
box-shadow: 0 2px 6px rgba(0,0,0,0.12);
|
||||
}
|
||||
|
||||
/* Base Header */
|
||||
.verspaetet-header {
|
||||
background-color: var(--fhc-pink-70);
|
||||
font-weight: 600;
|
||||
border-radius: 6px;
|
||||
padding: 0px 0px 0px 32px;
|
||||
transition: background-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
|
||||
box-shadow: 0 1px 2px rgba(0,0,0,0.08);
|
||||
}
|
||||
|
||||
/* Hover State */
|
||||
.verspaetet-header:hover {
|
||||
background-color: var(--fhc-pink-60);
|
||||
box-shadow: 0 2px 6px rgba(0,0,0,0.12);
|
||||
}
|
||||
|
||||
/* Active / Expanded State */
|
||||
.p-accordion-tab-active > .verspaetet-header {
|
||||
background-color: var(--fhc-pink-50);
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
/* Hover State Active*/
|
||||
.p-accordion-tab-active > .verspaetet-header:hover {
|
||||
background-color: var(--fhc-pink-60);
|
||||
box-shadow: 0 2px 6px rgba(0,0,0,0.12);
|
||||
}
|
||||
|
||||
/* Base Header */
|
||||
.abgegeben-header {
|
||||
background-color: var(--fhc-green-70);
|
||||
font-weight: 600;
|
||||
border-radius: 6px;
|
||||
padding: 0px 0px 0px 32px;
|
||||
transition: background-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
|
||||
box-shadow: 0 1px 2px rgba(0,0,0,0.08);
|
||||
}
|
||||
|
||||
/* Hover State */
|
||||
.abgegeben-header:hover {
|
||||
background-color: var(--fhc-green-60);
|
||||
box-shadow: 0 2px 6px rgba(0,0,0,0.12);
|
||||
}
|
||||
|
||||
/* Active / Expanded State */
|
||||
.p-accordion-tab-active > .abgegeben-header {
|
||||
background-color: var(--fhc-green-50);
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
/* Hover State Active*/
|
||||
.p-accordion-tab-active > .abgegeben-header:hover {
|
||||
background-color: var(--fhc-green-60);
|
||||
box-shadow: 0 2px 6px rgba(0,0,0,0.12);
|
||||
}
|
||||
|
||||
/* Base Header */
|
||||
.standard-header {
|
||||
background-color: var(--fhc-white-70);
|
||||
font-weight: 600;
|
||||
border-radius: 6px;
|
||||
padding: 0px 0px 0px 32px;
|
||||
transition: background-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
|
||||
box-shadow: 0 1px 2px rgba(0,0,0,0.08);
|
||||
}
|
||||
|
||||
/* Hover State */
|
||||
.standard-header:hover {
|
||||
background-color: var(--fhc-white-60);
|
||||
box-shadow: 0 2px 6px rgba(0,0,0,0.12);
|
||||
}
|
||||
|
||||
/* Active / Expanded State */
|
||||
.p-accordion-tab-active > .standard-header {
|
||||
background-color: var(--fhc-white-50);
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
/* Hover State Active*/
|
||||
.p-accordion-tab-active > .standard-header:hover {
|
||||
background-color: var(--fhc-white-60);
|
||||
box-shadow: 0 2px 6px rgba(0,0,0,0.12);
|
||||
}
|
||||
|
||||
@@ -38,11 +38,54 @@
|
||||
--fhc-blue-primary: #006095;
|
||||
--fhc-blue-primary-highlight: #0086CB;
|
||||
|
||||
--fhc-red-10: #842029;
|
||||
--fhc-red-20: #800000;
|
||||
/* --- Green --- */
|
||||
--fhc-green-5: rgb(240, 250, 240);
|
||||
--fhc-green-10: rgb(220, 245, 220);
|
||||
--fhc-green-20: rgb(190, 235, 190);
|
||||
--fhc-green-30: rgb(150, 220, 150);
|
||||
--fhc-green-40: rgb(110, 200, 110);
|
||||
--fhc-green-50: rgb(70, 170, 70);
|
||||
--fhc-green-60: rgb(50, 145, 50);
|
||||
--fhc-green-70: rgb(35, 120, 35);
|
||||
--fhc-green-80: rgb(25, 95, 25);
|
||||
--fhc-green-90: rgb(15, 70, 15);
|
||||
|
||||
--fhc-green-10: #008000;
|
||||
/* --- Red --- */
|
||||
--fhc-red-5: rgb(255, 245, 246);
|
||||
--fhc-red-10: rgb(255, 225, 228);
|
||||
--fhc-red-20: rgb(250, 190, 195);
|
||||
--fhc-red-30: rgb(240, 150, 160);
|
||||
--fhc-red-40: rgb(225, 110, 120);
|
||||
--fhc-red-50: rgb(200, 70, 85);
|
||||
--fhc-red-60: rgb(170, 50, 65);
|
||||
--fhc-red-70: rgb(140, 35, 50);
|
||||
--fhc-red-80: rgb(110, 20, 35);
|
||||
--fhc-red-90: rgb(85, 10, 25);
|
||||
|
||||
/* --- Yellow --- */
|
||||
--fhc-yellow-5: rgb(255, 255, 240);
|
||||
--fhc-yellow-10: rgb(255, 250, 210);
|
||||
--fhc-yellow-20: rgb(255, 240, 160);
|
||||
--fhc-yellow-30: rgb(255, 225, 100);
|
||||
--fhc-yellow-40: rgb(250, 210, 50);
|
||||
--fhc-yellow-50: rgb(240, 190, 0);
|
||||
--fhc-yellow-60: rgb(220, 165, 0);
|
||||
--fhc-yellow-70: rgb(190, 135, 0);
|
||||
--fhc-yellow-80: rgb(160, 105, 0);
|
||||
--fhc-yellow-90: rgb(120, 75, 0);
|
||||
|
||||
/* --- Pink --- */
|
||||
--fhc-pink-5: rgb(255, 245, 250);
|
||||
--fhc-pink-10: rgb(255, 225, 235);
|
||||
--fhc-pink-20: rgb(250, 195, 215);
|
||||
--fhc-pink-30: rgb(245, 160, 190);
|
||||
--fhc-pink-40: rgb(235, 120, 160);
|
||||
--fhc-pink-50: rgb(220, 80, 130);
|
||||
--fhc-pink-60: rgb(190, 60, 110);
|
||||
--fhc-pink-70: rgb(160, 40, 90);
|
||||
--fhc-pink-80: rgb(130, 25, 70);
|
||||
--fhc-pink-90: rgb(100, 15, 50);
|
||||
|
||||
--fhc-beige-10: rgba(245, 233, 215, 0.5);
|
||||
--fhc-beige-20: rgba(172, 153, 125, 0.5);
|
||||
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
export default {
|
||||
getConfig() {
|
||||
return {
|
||||
method: 'get',
|
||||
url: '/api/frontend/v1/Abgabe/getConfig'
|
||||
};
|
||||
},
|
||||
getStudentProjektarbeiten(uid) {
|
||||
return {
|
||||
method: 'get',
|
||||
url: '/api/frontend/v1/Abgabe/getStudentProjektarbeiten',
|
||||
params: { uid }
|
||||
};
|
||||
},
|
||||
getStudentProjektabgaben(detail) {
|
||||
return {
|
||||
method: 'get',
|
||||
url: '/api/frontend/v1/Abgabe/getStudentProjektabgaben',
|
||||
params: { projektarbeit_id: detail.projektarbeit_id, student_uid: detail.student_uid }
|
||||
};
|
||||
},
|
||||
postStudentProjektarbeitEndupload(formData) {
|
||||
return {
|
||||
method: 'post',
|
||||
url: '/api/frontend/v1/Abgabe/postStudentProjektarbeitEndupload',
|
||||
params: formData,
|
||||
config: {Headers: { "Content-Type": "multipart/form-data" }}
|
||||
};
|
||||
},
|
||||
postStudentProjektarbeitZwischenabgabe(formData) {
|
||||
return {
|
||||
method: 'post',
|
||||
url: '/api/frontend/v1/Abgabe/postStudentProjektarbeitZwischenabgabe',
|
||||
params: formData,
|
||||
config: {Headers: { "Content-Type": "multipart/form-data" }}
|
||||
};
|
||||
},
|
||||
getStudentProjektarbeitAbgabeFile(paabgabe_id, student_uid) {
|
||||
const url = `/Cis/Abgabetool/getStudentProjektarbeitAbgabeFile?paabgabe_id=${paabgabe_id}&student_uid=${student_uid}`;
|
||||
|
||||
window.open(FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router + url)
|
||||
},
|
||||
getMitarbeiterProjektarbeiten(all) {
|
||||
return {
|
||||
method: 'get',
|
||||
url: '/api/frontend/v1/Abgabe/getMitarbeiterProjektarbeiten',
|
||||
params: { showall: all }
|
||||
};
|
||||
},
|
||||
postProjektarbeitAbgabe(termin) {
|
||||
return {
|
||||
method: 'post',
|
||||
url: '/api/frontend/v1/Abgabe/postProjektarbeitAbgabe',
|
||||
params: {
|
||||
paabgabe_id: termin.paabgabe_id,
|
||||
paabgabetyp_kurzbz: termin.bezeichnung.paabgabetyp_kurzbz,
|
||||
datum: termin.datum,
|
||||
note: termin.note_pk,
|
||||
upload_allowed: !!termin.upload_allowed,
|
||||
beurteilungsnotiz: termin.beurteilungsnotiz ?? '',
|
||||
fixtermin: termin.fixtermin,
|
||||
insertvon: termin.insertvon,
|
||||
kurzbz: termin.kurzbz,
|
||||
projektarbeit_id: termin.projektarbeit_id,
|
||||
betreuer_person_id: termin.betreuer_person_id
|
||||
}
|
||||
};
|
||||
},
|
||||
deleteProjektarbeitAbgabe(paabgabe_id) {
|
||||
return {
|
||||
method: 'post',
|
||||
url: '/api/frontend/v1/Abgabe/deleteProjektarbeitAbgabe',
|
||||
params: { paabgabe_id }
|
||||
};
|
||||
},
|
||||
postSerientermin(datum, paabgabetyp_kurzbz, bezeichnung, kurzbz, projektarbeit_ids) {
|
||||
return {
|
||||
method: 'post',
|
||||
url: '/api/frontend/v1/Abgabe/postSerientermin',
|
||||
params: { datum, paabgabetyp_kurzbz, bezeichnung, kurzbz, projektarbeit_ids }
|
||||
};
|
||||
},
|
||||
fetchDeadlines(person_id) {
|
||||
return {
|
||||
method: 'post',
|
||||
url: '/api/frontend/v1/Abgabe/fetchDeadlines',
|
||||
params: { person_id }
|
||||
};
|
||||
},
|
||||
getPaAbgabetypen() {
|
||||
return {
|
||||
method: 'get',
|
||||
url: '/api/frontend/v1/Abgabe/getPaAbgabetypen'
|
||||
};
|
||||
},
|
||||
//TODO: SWITCH TO NOTEN API ONCE NOTENTOOL IS IN MASTER TO AVOID DUPLICATE API
|
||||
getNoten(){
|
||||
return {
|
||||
method: 'get',
|
||||
url: '/api/frontend/v1/Abgabe/getNoten'
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -18,80 +18,5 @@ export default {
|
||||
`/api/frontend/v1/Lehre/Pruefungen/${lehrveranstaltung_id}`
|
||||
, {}
|
||||
);
|
||||
},
|
||||
getStudentProjektarbeiten(uid) {
|
||||
return this.$fhcApi.get(
|
||||
`/api/frontend/v1/Lehre/getStudentProjektarbeiten/${uid}`
|
||||
, {}
|
||||
);
|
||||
},
|
||||
getStudentProjektabgaben(detail) {
|
||||
return this.$fhcApi.get(
|
||||
`/api/frontend/v1/Lehre/getStudentProjektabgaben`
|
||||
, {
|
||||
projektarbeit_id: detail.projektarbeit_id,
|
||||
student_uid: detail.student_uid
|
||||
}
|
||||
);
|
||||
},
|
||||
postStudentProjektarbeitEndupload(formData) {
|
||||
const url = '/api/frontend/v1/Lehre/postStudentProjektarbeitEndupload';
|
||||
const headers = {Headers: { "Content-Type": "multipart/form-data" }}
|
||||
return this.$fhcApi.post(url, formData, headers)
|
||||
},
|
||||
postStudentProjektarbeitZwischenabgabe(formData) {
|
||||
const url = '/api/frontend/v1/Lehre/postStudentProjektarbeitZwischenabgabe';
|
||||
const headers = {Headers: { "Content-Type": "multipart/form-data" }}
|
||||
return this.$fhcApi.post(url, formData, headers)
|
||||
},
|
||||
getStudentProjektarbeitAbgabeFile(paabgabe_id, student_uid) {
|
||||
const url = `/Cis/Abgabetool/getStudentProjektarbeitAbgabeFile?paabgabe_id=${paabgabe_id}&student_uid=${student_uid}`;
|
||||
|
||||
window.location = FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router + url
|
||||
},
|
||||
getMitarbeiterProjektarbeiten(uid, all) {
|
||||
return this.$fhcApi.get(
|
||||
`/api/frontend/v1/Lehre/getMitarbeiterProjektarbeiten?showall=${all}`
|
||||
, {}
|
||||
);
|
||||
},
|
||||
postProjektarbeitAbgabe(termin) {
|
||||
const payload = {
|
||||
paabgabe_id: termin.paabgabe_id,
|
||||
paabgabetyp_kurzbz: termin.bezeichnung.paabgabetyp_kurzbz,
|
||||
datum: termin.datum,
|
||||
fixtermin: termin.fixtermin,
|
||||
insertvon: termin.insertvon,
|
||||
kurzbz: termin.kurzbz,
|
||||
projektarbeit_id: termin.projektarbeit_id
|
||||
}
|
||||
const url = '/api/frontend/v1/Lehre/postProjektarbeitAbgabe';
|
||||
|
||||
return this.$fhcApi.post(url, payload, null)
|
||||
|
||||
},
|
||||
deleteProjektarbeitAbgabe(paabgabe_id) {
|
||||
const payload = {
|
||||
paabgabe_id
|
||||
}
|
||||
const url = '/api/frontend/v1/Lehre/deleteProjektarbeitAbgabe';
|
||||
|
||||
return this.$fhcApi.post(url, payload, null)
|
||||
},
|
||||
postSerientermin(datum, paabgabetyp_kurzbz, bezeichnung, kurzbz, projektarbeit_ids) {
|
||||
const payload = {
|
||||
datum, paabgabetyp_kurzbz, bezeichnung, kurzbz, projektarbeit_ids
|
||||
}
|
||||
const url = '/api/frontend/v1/Lehre/postSerientermin';
|
||||
|
||||
return this.$fhcApi.post(url, payload, null)
|
||||
},
|
||||
fetchDeadlines(person_id) {
|
||||
const payload = {
|
||||
person_id
|
||||
}
|
||||
const url = '/api/frontend/v1/Lehre/fetchDeadlines';
|
||||
|
||||
return this.$fhcApi.post(url, payload, null)
|
||||
}
|
||||
}
|
||||
@@ -234,13 +234,16 @@ const app = Vue.createApp({
|
||||
components: {},
|
||||
computed: {
|
||||
isMobile() {
|
||||
return /Mobi|Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
||||
const smallScreen = window.matchMedia("(max-width: 767px)").matches;
|
||||
const touchCapable = ("ontouchstart" in window) || navigator.maxTouchPoints > 0;
|
||||
return smallScreen;// && touchCapable;
|
||||
}
|
||||
},
|
||||
provide() {
|
||||
return { // provide injectable & watchable language property
|
||||
language: Vue.computed(() => this.$p.user_language),
|
||||
renderers: Vue.computed(() => this.renderers),
|
||||
isMobile: this.isMobile
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import BsModal from '../../Bootstrap/Modal.js';
|
||||
import VueDatePicker from '../../vueDatepicker.js.php';
|
||||
import ApiAbgabe from '../../../api/factory/abgabe.js'
|
||||
|
||||
const today = new Date()
|
||||
export const AbgabeMitarbeiterDetail = {
|
||||
@@ -10,8 +11,12 @@ export const AbgabeMitarbeiterDetail = {
|
||||
Checkbox: primevue.checkbox,
|
||||
Dropdown: primevue.dropdown,
|
||||
Textarea: primevue.textarea,
|
||||
SpeedDial: primevue.speeddial,
|
||||
Accordion: primevue.accordion,
|
||||
AccordionTab: primevue.accordiontab,
|
||||
VueDatePicker
|
||||
},
|
||||
inject: ['abgabeTypeOptions', 'allowedNotenOptions', 'turnitin_link', 'old_abgabe_beurteilung_link', 'isMobile'],
|
||||
props: {
|
||||
projektarbeit: {
|
||||
type: Object,
|
||||
@@ -20,33 +25,32 @@ export const AbgabeMitarbeiterDetail = {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
oldPaBeurteilungLink: 'https://moodle.technikum-wien.at/mod/page/view.php?id=1005052', // TODO: inject from app & app provide link from config
|
||||
showAutomagicModalPhrase: false,
|
||||
sdModel: [],
|
||||
eidAkzeptiert: false,
|
||||
enduploadTermin: null,
|
||||
allActiveLanguages: FHC_JS_DATA_STORAGE_OBJECT.server_languages,
|
||||
// TODO: fetch types
|
||||
allAbgabeTypes: [
|
||||
{
|
||||
paabgabetyp_kurzbz: 'abstract',
|
||||
bezeichnung: 'Entwurf'
|
||||
},
|
||||
{
|
||||
paabgabetyp_kurzbz: 'zwischen',
|
||||
bezeichnung: 'Zwischenabgabe'
|
||||
},
|
||||
{
|
||||
paabgabetyp_kurzbz: 'note',
|
||||
bezeichnung: 'Benotung'
|
||||
},
|
||||
{
|
||||
paabgabetyp_kurzbz: 'end',
|
||||
bezeichnung: 'Endupload'
|
||||
},
|
||||
{
|
||||
paabgabetyp_kurzbz: 'enda',
|
||||
bezeichnung: 'Endabgabe im Sekretariat'
|
||||
}
|
||||
]
|
||||
speedDialItems: [{
|
||||
label: Vue.computed(() => this.$p.t('abgabetool/c4newAbgabetermin')),
|
||||
icon: "fa fa-plus",
|
||||
command: this.openCreateNewAbgabeModal
|
||||
},
|
||||
{
|
||||
label: Vue.computed(() => this.$p.t('abgabetool/c4benoten')),
|
||||
icon: "fa fa-user-check",
|
||||
command: this.openBenotung
|
||||
},
|
||||
{
|
||||
label: Vue.computed(() => this.$p.t('abgabetool/c4plagiatcheck_link')),
|
||||
icon: "fa fa-clipboard-check",
|
||||
command: this.openPlagiatcheck
|
||||
},
|
||||
{
|
||||
label: Vue.computed(() => this.$p.t('abgabetool/c4student_perspective')),
|
||||
icon: "fa fa-eye",
|
||||
command: this.openStudentPage
|
||||
}],
|
||||
newTermin: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -55,45 +59,89 @@ export const AbgabeMitarbeiterDetail = {
|
||||
},
|
||||
saveTermin(termin) {
|
||||
const paabgabe_id = termin.paabgabe_id
|
||||
this.$fhcApi.factory.lehre.postProjektarbeitAbgabe(termin).then( (res) => {
|
||||
termin.note_pk = termin.note?.note ?? null
|
||||
termin.betreuer_person_id = this.projektarbeit.betreuer_person_id
|
||||
return this.$api.call(ApiAbgabe.postProjektarbeitAbgabe(termin)).then( (res) => {
|
||||
if(res?.meta?.status == 'success') {
|
||||
this.$fhcAlert.alertSuccess(this.$p.t('ui/gespeichert'))
|
||||
|
||||
const noteOpt = this.allowedNotenOptions.find(opt => opt.note == res.data[0].note)
|
||||
const newTerminRes = {
|
||||
'allowedToSave': true,
|
||||
'allowedToDelete': true,
|
||||
...res.data[0]
|
||||
}
|
||||
if(newTerminRes.note) newTerminRes.note = noteOpt
|
||||
const existingTerminRes = res.data[1]
|
||||
newTerminRes.bezeichnung = {
|
||||
bezeichnung: termin.bezeichnung?.bezeichnung,
|
||||
paabgabetyp_kurzbz: termin.bezeichnung?.paabgabetyp_kurzbz
|
||||
}
|
||||
|
||||
// only insert new abgabe if we actually created a new one, not when saving/editing existing
|
||||
if(!existingTerminRes){
|
||||
this.projektarbeit.abgabetermine.push(newTerminRes)
|
||||
this.projektarbeit.abgabetermine.sort((a, b) =>new Date(a.datum) - new Date(b.datum))
|
||||
} else {
|
||||
const noteOptExisting = this.allowedNotenOptions.find(opt => opt.note == existingTerminRes.note)
|
||||
existingTerminRes.note = noteOptExisting
|
||||
}
|
||||
|
||||
// negative abgabe -> automagically open new termin modal
|
||||
// really bad feature imo that will be annoying to deal with
|
||||
|
||||
// termin is completely new and has negative note
|
||||
const savedNewWithNegative = !existingTerminRes && !newTerminRes.note?.positiv
|
||||
|
||||
if(paabgabe_id === -1) { // new abgabe has been inserted
|
||||
termin.paabgabe_id = res?.data?.retval
|
||||
|
||||
this.projektarbeit.abgabetermine.push({ // new abgatermin row
|
||||
// termin existed previously + oldTermin had different note/positive note or no note at all
|
||||
const savedExistingNoteAsNegativeAndWasNotNegativeBefore = existingTerminRes && !newTerminRes.note?.positiv && (existingTerminRes.note?.positiv || existingTerminRes.note === undefined)
|
||||
|
||||
const openModalDueToNegativeBeurteilung = savedNewWithNegative || savedExistingNoteAsNegativeAndWasNotNegativeBefore
|
||||
if(openModalDueToNegativeBeurteilung) {
|
||||
this.newTermin = {
|
||||
'paabgabe_id': -1,
|
||||
'projektarbeit_id': this.projektarbeit.projektarbeit_id,
|
||||
'fixtermin': false,
|
||||
'kurzbz': '',
|
||||
'kurzbz': '', // todo kurzbz textfield value vorschlag für qualgates
|
||||
'datum': new Date().toISOString().split('T')[0],
|
||||
'note': this.allowedNotenOptions.find(opt => opt.note == 9),
|
||||
'beurteilungsnotiz': '',
|
||||
'upload_allowed': false,
|
||||
'paabgabetyp_kurzbz': '',
|
||||
'bezeichnung': '',
|
||||
'bezeichnung': this.abgabeTypeOptions.find(opt => opt.paabgabetyp_kurzbz === newTerminRes.paabgabetyp_kurzbz),
|
||||
'abgabedatum': null,
|
||||
'insertvon': this.viewData?.uid ?? '',
|
||||
'allowedToSave': true,
|
||||
'allowedToDelete': true
|
||||
})
|
||||
'insertvon': this.viewData?.uid ?? ''
|
||||
}
|
||||
|
||||
this.showAutomagicModalPhrase = true
|
||||
} else {
|
||||
this.showAutomagicModalPhrase = false
|
||||
}
|
||||
|
||||
|
||||
} else if(res?.meta?.status == 'error'){
|
||||
this.$fhcAlert.alertError()
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
async handleDeleteTermin(termin){
|
||||
if(await this.$fhcAlert.confirm({
|
||||
message: this.$p.t('abgabetool/c4confirm_delete'),
|
||||
acceptLabel: 'Löschen',
|
||||
acceptClass: 'btn btn-danger',
|
||||
rejectLabel: 'Zurück',
|
||||
rejectClass: 'btn btn-outline-secondary'
|
||||
}) === false) {
|
||||
return false
|
||||
} else {
|
||||
this.deleteTermin(termin)
|
||||
}
|
||||
},
|
||||
deleteTermin(termin) {
|
||||
this.$fhcApi.factory.lehre.deleteProjektarbeitAbgabe(termin.paabgabe_id).then( (res) => {
|
||||
this.$api.call(ApiAbgabe.deleteProjektarbeitAbgabe(termin.paabgabe_id)).then( (res) => {
|
||||
if(res?.meta?.status == 'success') {
|
||||
this.$fhcAlert.alertSuccess(this.$p.t('ui/genericDeleted', [this.$p.t('abgabetool/abgabe')]))
|
||||
// this.$p.t('global/tooltipLektorDeleteKontrolle', [this.$entryParams.permissions.kontrolleDeleteMaxReach ])
|
||||
const deletedTerminIndex = this.projektarbeit.abgabetermine.findIndex(t => t.paabgabe_id === termin.paabgabe_id)
|
||||
this.projektarbeit.abgabetermine.splice(deletedTerminIndex, 1)
|
||||
|
||||
|
||||
} else if(res?.meta?.status == 'error'){
|
||||
this.$fhcAlert.alertError()
|
||||
}
|
||||
@@ -108,35 +156,30 @@ export const AbgabeMitarbeiterDetail = {
|
||||
return true;
|
||||
},
|
||||
downloadAbgabe(termin) {
|
||||
this.$fhcApi.factory.lehre.getStudentProjektarbeitAbgabeFile(termin.paabgabe_id, this.projektarbeit.student_uid)
|
||||
this.$api.call(ApiAbgabe.getStudentProjektarbeitAbgabeFile(termin.paabgabe_id, this.projektarbeit.student_uid))
|
||||
},
|
||||
dateDiffInDays(datum, today){
|
||||
const oneDayMs = 1000 * 60 * 60 * 24
|
||||
return Math.round((new Date(datum) - new Date(today)) / oneDayMs)
|
||||
},
|
||||
getDateStyle(termin) {
|
||||
getDateStyle(termin, mode) {
|
||||
const datum = new Date(termin.datum)
|
||||
const abgabedatum = new Date(termin.abgabedatum)
|
||||
|
||||
// todo: rework styling but keep the color pattern logic
|
||||
// https://wiki.fhcomplete.info/doku.php?id=cis:abgabetool_fuer_studierende
|
||||
let color = 'white'
|
||||
let fontColor = 'black'
|
||||
if (termin.abgabedatum === null) {
|
||||
if(datum < today) {
|
||||
color = 'red'
|
||||
fontColor = 'white'
|
||||
return 'verpasst-header'
|
||||
} else if (datum > today && this.dateDiffInDays(datum, today) <= 12) {
|
||||
color = 'yellow'
|
||||
}
|
||||
return 'abzugeben-header'
|
||||
} else {
|
||||
return 'standard-header'
|
||||
}
|
||||
} else if(abgabedatum > datum) {
|
||||
color = 'pink' // aka "hellrot"
|
||||
fontColor = 'white'
|
||||
return 'verspaetet-header'
|
||||
} else {
|
||||
color = 'green'
|
||||
return 'abgegeben-header'
|
||||
}
|
||||
|
||||
return `font-color: ${fontColor} ; background-color: ${color}; border-radius: 50%;`
|
||||
},
|
||||
openBeurteilungLink(link) {
|
||||
window.open(link, '_blank')
|
||||
@@ -147,6 +190,23 @@ export const AbgabeMitarbeiterDetail = {
|
||||
getOptionLabelAbgabetyp(option){
|
||||
return option.bezeichnung
|
||||
},
|
||||
getNotenOptionLabel(option) {
|
||||
return option.bezeichnung
|
||||
},
|
||||
openStudentPage() {
|
||||
const link = FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router
|
||||
+ '/Cis/Abgabetool/Student/' + this.projektarbeit?.student_uid
|
||||
window.open(link, '_blank')
|
||||
},
|
||||
openPlagiatcheck() {
|
||||
const link = this.turnitin_link
|
||||
window.open(link, '_blank')
|
||||
},
|
||||
openBenotung() {
|
||||
const path = this.projektarbeit?.betreuerart_kurzbz == 'Zweitbegutachter' ? 'ProjektarbeitsbeurteilungZweitbegutachter' : 'ProjektarbeitsbeurteilungErstbegutachter'
|
||||
const link = FHC_JS_DATA_STORAGE_OBJECT.app_root + 'index.ci.php/extensions/FHC-Core-Projektarbeitsbeurteilung/' + path
|
||||
window.open(link, '_blank')
|
||||
},
|
||||
formatDate(dateParam) {
|
||||
const date = new Date(dateParam)
|
||||
// handle missing leading 0
|
||||
@@ -158,21 +218,78 @@ export const AbgabeMitarbeiterDetail = {
|
||||
|
||||
return `${day}.${month}.${year}`;
|
||||
},
|
||||
openStudentPage() {
|
||||
const link = FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router
|
||||
+ '/Cis/Abgabetool/Student/' + this.projektarbeit?.student_uid
|
||||
window.open(link, '_blank')
|
||||
getAccTabHeaderForTermin(termin) {
|
||||
let tabTitle = ''
|
||||
|
||||
const datumFormatted = this.formatDate(termin.datum)
|
||||
tabTitle += termin.bezeichnung?.bezeichnung + ' ' + datumFormatted
|
||||
|
||||
return tabTitle
|
||||
},
|
||||
openPlagiatcheck() {
|
||||
// todo: hardcoded turnitin link?
|
||||
const link = "https://technikum-wien.turnitin.com/sso/sp/redwood/saml/5IyfmBr2OcSIaWQTKlFCGj/start"
|
||||
window.open(link, '_blank')
|
||||
openCreateNewAbgabeModal() {
|
||||
if(!this.newTermin) {
|
||||
this.newTermin = {
|
||||
'paabgabe_id': -1,
|
||||
'projektarbeit_id': this.projektarbeit.projektarbeit_id,
|
||||
'fixtermin': false,
|
||||
'kurzbz': '',
|
||||
'datum': new Date().toISOString().split('T')[0],
|
||||
'note': this.allowedNotenOptions.find(opt => opt.note == 9),
|
||||
'beurteilungsnotiz': '',
|
||||
'upload_allowed': false,
|
||||
'paabgabetyp_kurzbz': '',
|
||||
'bezeichnung': this.abgabeTypeOptions.find(opt => opt.paabgabetyp_kurzbz === 'zwischen'),
|
||||
'abgabedatum': null,
|
||||
'insertvon': this.viewData?.uid ?? ''
|
||||
}
|
||||
}
|
||||
console.log(this.$refs.modalContainerCreateNewAbgabe)
|
||||
this.$refs.modalContainerCreateNewAbgabe.show()
|
||||
},
|
||||
openBenotung() {
|
||||
const path = this.projektarbeit?.betreuerart_kurzbz == 'Zweitbegutachter' ? 'ProjektarbeitsbeurteilungZweitbegutachter' : 'ProjektarbeitsbeurteilungErstbegutachter'
|
||||
const link = FHC_JS_DATA_STORAGE_OBJECT.app_root + 'index.ci.php/extensions/FHC-Core-Projektarbeitsbeurteilung/' + path
|
||||
window.open(link, '_blank')
|
||||
validateTermin(termin) {
|
||||
// compare new termin to existing ones to block illegal termin constellations, if they exist
|
||||
|
||||
return true
|
||||
},
|
||||
async handleSaveNewAbgabe(termin) {
|
||||
|
||||
if(!this.validateTermin(termin)) {
|
||||
this.$fhcAlert.alertWarning('invalid termin')
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
await this.saveTermin(termin)
|
||||
|
||||
// determined inside saveTermin api.then()
|
||||
if(this.showAutomagicModalPhrase) {
|
||||
this.$refs.modalContainerCreateNewAbgabe.show()
|
||||
} else {
|
||||
this.$refs.modalContainerCreateNewAbgabe.hide()
|
||||
this.newTermin = {
|
||||
'paabgabe_id': -1,
|
||||
'projektarbeit_id': this.projektarbeit.projektarbeit_id,
|
||||
'fixtermin': false,
|
||||
'kurzbz': '',
|
||||
'datum': new Date().toISOString().split('T')[0],
|
||||
'note': this.allowedNotenOptions.find(opt => opt.note == 9),
|
||||
'beurteilungsnotiz': '',
|
||||
'upload_allowed': false,
|
||||
'paabgabetyp_kurzbz': '',
|
||||
'bezeichnung': this.abgabeTypeOptions.find(opt => opt.paabgabetyp_kurzbz === 'zwischen'),
|
||||
'abgabedatum': null,
|
||||
'insertvon': this.viewData?.uid ?? ''
|
||||
}
|
||||
}
|
||||
},
|
||||
handleChangeAbgabetyp(termin) {
|
||||
// if paabgabetype qualgate is selected, fill out kurzbz textfield with bezeichnung of quality gate so users
|
||||
// are possibly less confused, which is a pursuit in vain
|
||||
if(termin.bezeichnung?.paabgabetyp_kurzbz === 'qualgate1' || termin.bezeichnung?.paabgabetyp_kurzbz === 'qualgate2') {
|
||||
termin.kurzbz = termin.bezeichnung.bezeichnung
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
computed: {
|
||||
getEid() {
|
||||
@@ -186,8 +303,23 @@ export const AbgabeMitarbeiterDetail = {
|
||||
},
|
||||
endUploadVorhanden(){
|
||||
return this.projektarbeit?.abgabetermine.find(abgabe => abgabe.paabgabetyp_kurzbz === 'end' && abgabe.abgabedatum !== null)
|
||||
},
|
||||
qualityGateTerminAvailable() {
|
||||
let qgatefound = false
|
||||
this.projektarbeit?.abgabetermine.forEach(abgabe => {
|
||||
if(abgabe.bezeichnung?.paabgabetyp_kurzbz == 'qualgate1'
|
||||
|| abgabe?.bezeichnung?.paabgabetyp_kurzbz == 'qualgate2') {
|
||||
qgatefound = true
|
||||
}
|
||||
})
|
||||
return qgatefound
|
||||
},
|
||||
getPageWrapperStyle() {
|
||||
return 'position: relative; min-height: 100vh;'
|
||||
},
|
||||
getSpeedDialStyle() {
|
||||
return 'position: static !important;'
|
||||
}
|
||||
|
||||
},
|
||||
created() {
|
||||
|
||||
@@ -196,119 +328,238 @@ export const AbgabeMitarbeiterDetail = {
|
||||
|
||||
},
|
||||
template: `
|
||||
<div v-if="projektarbeit">
|
||||
|
||||
|
||||
<h5>{{$p.t('abgabetool/c4abgabeMitarbeiterbereich')}}</h5>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
<p> {{projektarbeit?.student}}</p>
|
||||
<p> {{projektarbeit?.titel}}</p>
|
||||
<p v-if="projektarbeit?.zweitbegutachter"> {{projektarbeit?.zweitbegutachter}}</p>
|
||||
<bs-modal
|
||||
id="innerModalNewAbgabe"
|
||||
ref="modalContainerCreateNewAbgabe"
|
||||
class="bootstrap-prompt"
|
||||
dialogClass="bordered-modal modal-xl"
|
||||
:backdrop="true"
|
||||
@hideBsModal="console.log('hideBsModal'); showAutomagicModalPhrase=false;"
|
||||
>
|
||||
<template v-slot:title>
|
||||
<div>
|
||||
{{ $p.t('abgabetool/c4newAbgabetermin') }}
|
||||
</div>
|
||||
<div class="col-4 d-flex">
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<button :disabled="!getSemesterBenotbar || !endUploadVorhanden" class="btn btn-secondary border-0" @click="openBenotung" style="width: 80%;">
|
||||
benoten
|
||||
<i style="margin-left: 8px" class="fa-solid fa-user-check"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div class="row" style="width: 90%;">
|
||||
<span v-if="!getSemesterBenotbar" v-html="$p.t('abgabetool/c4aeltereParbeitBenoten', oldPaBeurteilungLink)"></span>
|
||||
<span v-else-if="!endUploadVorhanden">Kein Endupload vorhanden!</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<button v-if="projektarbeit?.betreuerart_kurzbz !== 'Zweitbegutachter'" class="btn btn-secondary border-0" @click="openPlagiatcheck" style="width: 80%;">
|
||||
zur Plagiatsprüfung
|
||||
<i style="margin-left: 8px" class="fa-solid fa-user-check"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<button class="btn btn-secondary border-0" @click="openStudentPage" style="width: 80%;">
|
||||
Studentenansicht
|
||||
<i style="margin-left: 8px" class="fa-solid fa-eye"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="uploadWrapper">
|
||||
<div class="row" style="margin-bottom: 12px;">
|
||||
<div style="width: 100px">{{$p.t('abgabetool/c4fixtermin')}}</div>
|
||||
<div class="col-2">{{$p.t('abgabetool/c4zieldatum')}}</div>
|
||||
<div class="col-2">{{$p.t('abgabetool/c4abgabetyp')}}</div>
|
||||
<div class="col-4">{{$p.t('abgabetool/c4abgabekurzbz')}}</div>
|
||||
<div class="col-1">{{$p.t('abgabetool/c4abgabedatum')}}</div>
|
||||
<div class="col">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!projektarbeit?.abgabetermine?.length">keine Termine gefunden!</div>
|
||||
<div class="row" v-for="termin in projektarbeit.abgabetermine">
|
||||
<div style="width: 100px" class="d-flex justify-content-center align-items-center">
|
||||
<p class="fhc-bullet" :class="{ 'fhc-bullet-red': termin.fixtermin, 'fhc-bullet-green': !termin.fixtermin }"></p>
|
||||
</div>
|
||||
<div class="col-2 d-flex justify-content-center align-items-center">
|
||||
<div :style="getDateStyle(termin)">
|
||||
</template>
|
||||
<template v-slot:default>
|
||||
<div v-if="showAutomagicModalPhrase" class="text-center"><p>{{$p.t('abgabetool/c4abgabeQualGateNegativAddNewAutomagisch')}}</p></div>
|
||||
<!-- minheight to avoid z-index magic for the datepicker inside the modal inside the modal...-->
|
||||
<div v-if="newTermin" style="min-height: 600px">
|
||||
<!-- fixtermin is not an option for lektors-->
|
||||
<!-- <div class="row">-->
|
||||
<!-- <div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4fixtermin')}}</div>-->
|
||||
<!-- <div class="col-8 col-md-9">-->
|
||||
<!-- <Checkbox -->
|
||||
<!-- v-model="newTermin.fixtermin"-->
|
||||
<!-- :binary="true" -->
|
||||
<!-- :pt="{ root: { class: 'ml-auto' }}"-->
|
||||
<!-- >-->
|
||||
<!-- </Checkbox>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div class="row mt-2">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4zieldatum')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
<VueDatePicker
|
||||
style="width: 95%;"
|
||||
v-model="termin.datum"
|
||||
v-model="newTermin.datum"
|
||||
:clearable="false"
|
||||
:disabled="!termin.allowedToSave"
|
||||
:enable-time-picker="false"
|
||||
:format="formatDate"
|
||||
:text-input="true"
|
||||
auto-apply>
|
||||
</VueDatePicker>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2 d-flex justify-content-center align-items-center">
|
||||
<Dropdown
|
||||
:style="{'width': '100%'}"
|
||||
:disabled="!termin.allowedToSave"
|
||||
v-model="termin.bezeichnung"
|
||||
:options="allAbgabeTypes"
|
||||
:optionLabel="getOptionLabelAbgabetyp">
|
||||
</Dropdown>
|
||||
<div class="row mt-2">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4abgabetyp')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
<Dropdown
|
||||
:style="{'width': '100%'}"
|
||||
v-model="newTermin.bezeichnung"
|
||||
@change="handleChangeAbgabetyp(newTermin)"
|
||||
:options="abgabeTypeOptions"
|
||||
:optionLabel="getOptionLabelAbgabetyp"
|
||||
scrollHeight="300px">
|
||||
</Dropdown>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4 d-flex justify-content-center align-items-center">
|
||||
<Textarea style="margin-bottom: 4px;" v-model="termin.kurzbz" rows="3" cols="60" :disabled="!termin.allowedToSave"></Textarea>
|
||||
<div class="row mt-2" v-if="newTermin.bezeichnung?.paabgabetyp_kurzbz === 'qualgate1' || newTermin.bezeichnung?.paabgabetyp_kurzbz === 'qualgate2'">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4note')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
<Dropdown
|
||||
:style="{'width': '100%'}"
|
||||
v-model="newTermin.note"
|
||||
:options="allowedNotenOptions"
|
||||
:optionLabel="getNotenOptionLabel">
|
||||
</Dropdown>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-1 d-flex justify-content-center align-items-center">
|
||||
{{ termin.abgabedatum?.split("-").reverse().join(".") }}
|
||||
<a v-if="termin?.abgabedatum" @click="downloadAbgabe(termin)" style="margin-left:4px; cursor: pointer;">
|
||||
<i class="fa-solid fa-file-pdf"></i>
|
||||
</a>
|
||||
<div class="row mt-2" v-if="newTermin.bezeichnung?.paabgabetyp_kurzbz === 'qualgate1' || newTermin.bezeichnung?.paabgabetyp_kurzbz === 'qualgate2'">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4upload_allowed')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
<Checkbox
|
||||
v-model="newTermin.upload_allowed"
|
||||
:binary="true"
|
||||
:pt="{ root: { class: 'ml-auto' }}"
|
||||
>
|
||||
</Checkbox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2 align-content-center">
|
||||
<div class="row mt-2" v-if="newTermin.bezeichnung?.paabgabetyp_kurzbz === 'qualgate1' || newTermin.bezeichnung?.paabgabetyp_kurzbz === 'qualgate2'">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4notizQualGate')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
<Textarea style="margin-bottom: 4px;" v-model="newTermin.beurteilungsnotiz" :rows=" isMobile ? 2 : 4" :cols=" isMobile ? 30 : 90"></Textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-2">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4abgabekurzbz')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
<Textarea style="margin-bottom: 4px;" v-model="newTermin.kurzbz" :rows=" isMobile ? 2 : 4" :cols=" isMobile ? 30 : 90"></Textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:footer>
|
||||
<button type="button" class="btn btn-primary" @click="handleSaveNewAbgabe(newTermin)">{{ $p.t('abgabetool/c4saveNewAbgabetermin') }}</button>
|
||||
</template>
|
||||
</bs-modal>
|
||||
|
||||
<div v-if="projektarbeit">
|
||||
|
||||
<div style="position: fixed; bottom: 24px; right: 24px; z-index: 9999;">
|
||||
<SpeedDial
|
||||
:style="getSpeedDialStyle"
|
||||
:model="speedDialItems"
|
||||
direction="up"
|
||||
:radius="80"
|
||||
type="linear"
|
||||
buttonClass="p-button-rounded p-button-lg p-button-primary"
|
||||
:tooltipOptions="{ position: 'left' }"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<h5>{{$p.t('abgabetool/c4abgabeMitarbeiterbereich')}}</h5>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<p> {{projektarbeit?.student}}</p>
|
||||
<p> {{projektarbeit?.titel}}</p>
|
||||
<p v-if="projektarbeit?.zweitbegutachter"> {{projektarbeit?.zweitbegutachter}}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Accordion :multiple="true" :activeIndex="[0]">
|
||||
<template v-for="termin in this.projektarbeit?.abgabetermine">
|
||||
<AccordionTab :header="getAccTabHeaderForTermin(termin)" :headerClass="getDateStyle(termin)">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<button v-if="termin.allowedToSave" class="btn btn-primary border-0" @click="saveTermin(termin)">
|
||||
Speichern
|
||||
<i style="margin-left: 8px" class="fa-solid fa-floppy-disk"></i>
|
||||
</button>
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4fixtermin')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
<!-- always keep fixtermin checkbox disabled for mitarbeiter tool -->
|
||||
<Checkbox
|
||||
v-model="termin.fixtermin"
|
||||
disabled
|
||||
:binary="true"
|
||||
:pt="{ root: { class: 'ml-auto' }}"
|
||||
>
|
||||
</Checkbox>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<button v-if="termin.allowedToDelete && termin.paabgabe_id > 0" class="btn btn-primary border-0" @click="deleteTermin(termin)">
|
||||
Löschen
|
||||
<i style="margin-left: 8px" class="fa-solid fa-trash"></i>
|
||||
</div>
|
||||
<div class="row mt-2">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4zieldatum')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
<VueDatePicker
|
||||
v-model="termin.datum"
|
||||
:clearable="false"
|
||||
:disabled="!termin.allowedToSave"
|
||||
:enable-time-picker="false"
|
||||
:format="formatDate"
|
||||
:text-input="true"
|
||||
auto-apply>
|
||||
</VueDatePicker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-2">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4abgabetyp')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
<Dropdown
|
||||
:style="{'width': '100%'}"
|
||||
:disabled="!termin.allowedToSave"
|
||||
v-model="termin.bezeichnung"
|
||||
@change="handleChangeAbgabetyp(termin)"
|
||||
:options="abgabeTypeOptions"
|
||||
:optionLabel="getOptionLabelAbgabetyp">
|
||||
</Dropdown>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-2" v-if="termin.bezeichnung?.paabgabetyp_kurzbz === 'qualgate1' || termin.bezeichnung?.paabgabetyp_kurzbz === 'qualgate2'">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4note')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
<Dropdown
|
||||
:style="{'width': '100%'}"
|
||||
v-model="termin.note"
|
||||
:options="allowedNotenOptions"
|
||||
:optionLabel="getNotenOptionLabel">
|
||||
</Dropdown>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-2" v-if="termin.bezeichnung?.paabgabetyp_kurzbz === 'qualgate1' || termin.bezeichnung?.paabgabetyp_kurzbz === 'qualgate2'">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4upload_allowed')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
<Checkbox
|
||||
v-model="termin.upload_allowed"
|
||||
:binary="true"
|
||||
:pt="{ root: { class: 'ml-auto' }}"
|
||||
>
|
||||
</Checkbox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-2" v-if="termin.bezeichnung?.paabgabetyp_kurzbz === 'qualgate1' || termin.bezeichnung?.paabgabetyp_kurzbz === 'qualgate2'">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4notizQualGate')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
<Textarea style="margin-bottom: 4px;" v-model="termin.beurteilungsnotiz" :rows=" isMobile ? 2 : 4" :cols=" isMobile ? 30 : 90" :disabled="!termin.allowedToSave"></Textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-2">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4abgabekurzbz')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
<Textarea style="margin-bottom: 4px;" v-model="termin.kurzbz" :rows=" isMobile ? 2 : 4" :cols=" isMobile ? 30 : 90" :disabled="!termin.allowedToSave"></Textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-2">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4abgabedatum')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
{{ termin.abgabedatum?.split("-").reverse().join(".") }}
|
||||
<button v-if="termin?.abgabedatum" @click="downloadAbgabe(termin)" class="btn btn-primary">
|
||||
<a> {{$p.t('abgabetool/c4downloadAbgabe')}} <i class="fa fa-file-pdf" style="margin-left:4px; cursor: pointer;"></i></a>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-2">
|
||||
<div class="col-4 col-md-3 fw-bold">
|
||||
<!-- TODO: row description? -->
|
||||
</div>
|
||||
<div class="col-8 col-md-9">
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<button v-if="termin.allowedToSave" style="max-height: 40px;" class="btn btn-primary border-0" @click="saveTermin(termin)">
|
||||
{{ $p.t('abgabetool/c4save') }}
|
||||
<i class="fa-solid fa-floppy-disk"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<button v-if="termin.allowedToDelete && termin.paabgabe_id > 0" style="max-height: 40px;" class="btn btn-danger border-0" @click="handleDeleteTermin(termin)">
|
||||
{{ $p.t('abgabetool/c4delete') }}
|
||||
<i class="fa-solid fa-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</AccordionTab>
|
||||
</template>
|
||||
</Accordion>
|
||||
</div>
|
||||
|
||||
`,
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import Upload from '../../../components/Form/Upload/Dms.js';
|
||||
import BsModal from '../../Bootstrap/Modal.js';
|
||||
import VueDatePicker from '../../vueDatepicker.js.php';
|
||||
import ApiAbgabe from '../../../api/factory/abgabe.js'
|
||||
|
||||
const today = new Date()
|
||||
export const AbgabeStudentDetail = {
|
||||
@@ -12,8 +13,11 @@ export const AbgabeStudentDetail = {
|
||||
Checkbox: primevue.checkbox,
|
||||
Dropdown: primevue.dropdown,
|
||||
Textarea: primevue.textarea,
|
||||
Accordion: primevue.accordion,
|
||||
AccordionTab: primevue.accordiontab,
|
||||
VueDatePicker
|
||||
},
|
||||
inject: ['notenOptions', 'isMobile', 'isViewMode'],
|
||||
props: {
|
||||
projektarbeit: {
|
||||
type: Object,
|
||||
@@ -26,6 +30,7 @@ export const AbgabeStudentDetail = {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
eidAkzeptiert: false,
|
||||
enduploadTermin: null,
|
||||
allActiveLanguages: FHC_JS_DATA_STORAGE_OBJECT.server_languages,
|
||||
@@ -41,16 +46,71 @@ export const AbgabeStudentDetail = {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
validate: function(termin) {
|
||||
async validate(termin, endupload = false) {
|
||||
if(!termin.file.length) {
|
||||
this.$fhcAlert.alertWarning(this.$p.t('global/warningChooseFile'));
|
||||
return false
|
||||
}
|
||||
|
||||
// TODO: define these
|
||||
if(endupload) {
|
||||
// check these input fields for length of entry
|
||||
if(this.form['abstract'].length < 100 && await this.$fhcAlert.confirm({
|
||||
message: this.$p.t('abgabetool/warningShortAbstract'),
|
||||
acceptLabel: this.$p.t('abgabetool/c4AcceptAndProceed'),
|
||||
acceptClass: 'btn btn-danger',
|
||||
rejectLabel: this.$p.t('abgabetool/c4Cancel'),
|
||||
rejectClass: 'btn btn-outline-secondary'
|
||||
}) === false) {
|
||||
return false
|
||||
}
|
||||
|
||||
if(this.form['abstract_en'].length < 100 && await this.$fhcAlert.confirm({
|
||||
message: this.$p.t('abgabetool/warningShortAbstractEn'),
|
||||
acceptLabel: this.$p.t('abgabetool/c4AcceptAndProceed'),
|
||||
acceptClass: 'btn btn-danger',
|
||||
rejectLabel: this.$p.t('abgabetool/c4Cancel'),
|
||||
rejectClass: 'btn btn-outline-secondary'
|
||||
}) === false) {
|
||||
return false
|
||||
}
|
||||
|
||||
if(this.form['schlagwoerter'].length < 50 && await this.$fhcAlert.confirm({
|
||||
message: this.$p.t('abgabetool/warningShortSchlagwoerter'),
|
||||
acceptLabel: this.$p.t('abgabetool/c4AcceptAndProceed'),
|
||||
acceptClass: 'btn btn-danger',
|
||||
rejectLabel: this.$p.t('abgabetool/c4Cancel'),
|
||||
rejectClass: 'btn btn-outline-secondary'
|
||||
}) === false) {
|
||||
return false
|
||||
}
|
||||
|
||||
if(this.form['schlagwoerter_en'].length < 50 && await this.$fhcAlert.confirm({
|
||||
message: this.$p.t('abgabetool/warningShortSchlagwoerterEn'),
|
||||
acceptLabel: this.$p.t('abgabetool/c4AcceptAndProceed'),
|
||||
acceptClass: 'btn btn-danger',
|
||||
rejectLabel: this.$p.t('abgabetool/c4Cancel'),
|
||||
rejectClass: 'btn btn-outline-secondary'
|
||||
}) === false) {
|
||||
return false
|
||||
}
|
||||
|
||||
if(this.form['seitenanzahl'] <= 5 && await this.$fhcAlert.confirm({
|
||||
message: this.$p.t('abgabetool/warningSmallSeitenanzahl'),
|
||||
acceptLabel: this.$p.t('abgabetool/c4AcceptAndProceed'),
|
||||
acceptClass: 'btn btn-danger',
|
||||
rejectLabel: this.$p.t('abgabetool/c4Cancel'),
|
||||
rejectClass: 'btn btn-outline-secondary'
|
||||
}) === false) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
triggerEndupload() {
|
||||
if (!this.validate(this.enduploadTermin))
|
||||
async triggerEndupload() {
|
||||
|
||||
if (!await this.validate(this.enduploadTermin))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -63,7 +123,6 @@ export const AbgabeStudentDetail = {
|
||||
formData.append('student_uid', this.projektarbeit.student_uid)
|
||||
formData.append('bperson_id', this.projektarbeit.bperson_id)
|
||||
|
||||
// TODO: validate/check for null etc.
|
||||
formData.append('sprache', this.form['sprache'].sprache)
|
||||
formData.append('abstract', this.form['abstract'])
|
||||
formData.append('abstract_en', this.form['abstract_en'])
|
||||
@@ -74,15 +133,18 @@ export const AbgabeStudentDetail = {
|
||||
for (let i = 0; i < this.enduploadTermin.file.length; i++) {
|
||||
formData.append('file', this.enduploadTermin.file[i]);
|
||||
}
|
||||
this.$fhcApi.factory.lehre.postStudentProjektarbeitEndupload(formData)
|
||||
this.loading = true
|
||||
this.$api.call(ApiAbgabe.postStudentProjektarbeitEndupload(formData))
|
||||
.then(res => {
|
||||
this.handleUploadRes(res)
|
||||
})
|
||||
this.handleUploadRes(res, this.enduploadTermin)
|
||||
}).finally(()=> {
|
||||
this.loading = false
|
||||
})
|
||||
|
||||
this.$refs.modalContainerEnduploadZusatzdaten.hide()
|
||||
},
|
||||
downloadAbgabe(termin) {
|
||||
this.$fhcApi.factory.lehre.getStudentProjektarbeitAbgabeFile(termin.paabgabe_id, this.projektarbeit.student_uid)
|
||||
this.$api.call(ApiAbgabe.getStudentProjektarbeitAbgabeFile(termin.paabgabe_id, this.projektarbeit.student_uid))
|
||||
},
|
||||
formatDate(dateParam) {
|
||||
const date = new Date(dateParam)
|
||||
@@ -95,9 +157,10 @@ export const AbgabeStudentDetail = {
|
||||
|
||||
return `${day}.${month}.${year}`;
|
||||
},
|
||||
upload(termin) {
|
||||
async upload(termin) {
|
||||
|
||||
if (!this.validate(termin))
|
||||
// only do this on endupload
|
||||
if (! await this.validate(termin))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -117,22 +180,32 @@ export const AbgabeStudentDetail = {
|
||||
for (let i = 0; i < termin.file.length; i++) {
|
||||
formData.append('file', termin.file[i]);
|
||||
}
|
||||
this.$fhcApi.factory.lehre.postStudentProjektarbeitZwischenabgabe(formData)
|
||||
|
||||
this.loading = true
|
||||
this.$api.call(ApiAbgabe.postStudentProjektarbeitZwischenabgabe(formData))
|
||||
.then(res => {
|
||||
this.handleUploadRes(res)
|
||||
})
|
||||
this.handleUploadRes(res, termin)
|
||||
}).finally(()=> {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
},
|
||||
handleUploadRes(res) {
|
||||
handleUploadRes(res, termin) {
|
||||
if(res.meta.status == "success") {
|
||||
this.$fhcAlert.alertSuccess('File erfolgreich hochgeladen')
|
||||
this.$fhcAlert.alertSuccess(this.$p.t('abgabetool/c4fileUploadSuccess'))
|
||||
|
||||
// update 'abgabedatum' for successful upload -> shows the pdf icon and date once set
|
||||
termin.abgabedatum = new Date().toISOString().split('T')[0];
|
||||
|
||||
} else {
|
||||
this.$fhcAlert.alertError('File upload error')
|
||||
this.$fhcAlert.alertError(this.$p.t('abgabetool/c4fileUploadError'))
|
||||
}
|
||||
|
||||
if(res.meta.signaturInfo) {
|
||||
this.$fhcAlert.alertInfo(res.meta.signaturInfo)
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
dateDiffInDays(datum, today){
|
||||
const oneDayMs = 1000 * 60 * 60 * 24
|
||||
@@ -142,34 +215,19 @@ export const AbgabeStudentDetail = {
|
||||
const datum = new Date(termin.datum)
|
||||
const abgabedatum = new Date(termin.abgabedatum)
|
||||
|
||||
// todo: rework styling but keep the color pattern logic
|
||||
// https://wiki.fhcomplete.info/doku.php?id=cis:abgabetool_fuer_studierende
|
||||
let color = 'white'
|
||||
let fontColor = 'black'
|
||||
let icon = '';
|
||||
if (termin.abgabedatum === null) {
|
||||
if(datum < today) {
|
||||
color = 'red'
|
||||
fontColor = 'white'
|
||||
icon = 'fa-triangle-exclamation'
|
||||
return 'verpasst-header'
|
||||
} else if (datum > today && this.dateDiffInDays(datum, today) <= 12) {
|
||||
color = 'yellow'
|
||||
icon = 'fa-circle-exclamation'
|
||||
return 'abzugeben-header'
|
||||
} else {
|
||||
return 'standard-header'
|
||||
}
|
||||
} else if(abgabedatum > datum) {
|
||||
color = 'pink' // aka "hellrot"
|
||||
fontColor = 'white'
|
||||
icon = 'fa-circle-question'
|
||||
return 'verspaetet-header'
|
||||
} else {
|
||||
color = 'green'
|
||||
icon = 'fa-square-check'
|
||||
}
|
||||
|
||||
//return `font-color: ${fontColor} ; background-color: ${color}; border-radius: 50%;`
|
||||
if( typeof mode !== 'undefined' || mode === 'icon') {
|
||||
return icon;
|
||||
} else {
|
||||
return 'abgabe-zieldatum-border-' + color;
|
||||
return 'abgegeben-header'
|
||||
}
|
||||
},
|
||||
openBeurteilungLink(link) {
|
||||
@@ -177,26 +235,48 @@ export const AbgabeStudentDetail = {
|
||||
},
|
||||
getOptionLabel(option) {
|
||||
return option.sprache
|
||||
},
|
||||
getTerminNoteBezeichnung(termin) {
|
||||
const noteOpt = this.notenOptions.find(opt => opt.note == termin.note)
|
||||
return noteOpt ? noteOpt.bezeichnung : ''
|
||||
},
|
||||
getAccTabHeaderForTermin(termin) {
|
||||
let tabTitle = ''
|
||||
|
||||
const datumFormatted = this.formatDate(termin.datum)
|
||||
tabTitle += termin.bezeichnung + ' ' + datumFormatted
|
||||
|
||||
return tabTitle
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
projektarbeit(newVal) {
|
||||
// default select german if projektarbeit sprache was null
|
||||
this.form.sprache = newVal.sprache ? this.allActiveLanguages.find(lang => lang.sprache == newVal.sprache) : this.allActiveLanguages.find(lang => lang.sprache == 'German')
|
||||
this.form.abstract = newVal.abstract
|
||||
this.form.abstract_en = newVal.abstract_en
|
||||
this.form.schlagwoerter = newVal.schlagwoerter
|
||||
this.form.schlagwoerter_en = newVal.schlagwoerter_en
|
||||
this.form.kontrollschlagwoerter = newVal.kontrollschlagwoerter
|
||||
this.form.seitenanzahl = newVal.seitenanzahl
|
||||
this.form.abstract = newVal.abstract ?? ''
|
||||
this.form.abstract_en = newVal.abstract_en ?? ''
|
||||
this.form.schlagwoerter = newVal.schlagwoerter ?? ''
|
||||
this.form.schlagwoerter_en = newVal.schlagwoerter_en ?? ''
|
||||
this.form.kontrollschlagwoerter = newVal.kontrollschlagwoerter ?? ''
|
||||
this.form.seitenanzahl = newVal.seitenanzahl ?? 1
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
getEid() {
|
||||
return this.$p.t('abgabetool/c4eidesstattlicheErklaerung')
|
||||
},
|
||||
getEnduploadErlaubt() {
|
||||
getAllowedToSendEndupload() {
|
||||
return !this.eidAkzeptiert
|
||||
},
|
||||
qualityGateTerminAvailable() {
|
||||
let qgatefound = false
|
||||
this.projektarbeit?.abgabetermine.forEach(abgabe => {
|
||||
if(abgabe.paabgabetyp_kurzbz == 'qualgate1'
|
||||
|| abgabe.paabgabetyp_kurzbz == 'qualgate2') {
|
||||
qgatefound = true
|
||||
}
|
||||
})
|
||||
return qgatefound
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -206,6 +286,11 @@ export const AbgabeStudentDetail = {
|
||||
|
||||
},
|
||||
template: `
|
||||
<div id="loadingOverlay" v-show="loading" style="position: absolute; width: 100vw; height: 100vh; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.5); z-index: 99999999999;">
|
||||
<i class="fa-solid fa-spinner fa-pulse fa-5x"></i>
|
||||
</div>
|
||||
|
||||
|
||||
<div v-if="projektarbeit">
|
||||
|
||||
<h5>{{$p.t('abgabetool/c4abgabeStudentenbereich')}}</h5>
|
||||
@@ -213,67 +298,107 @@ export const AbgabeStudentDetail = {
|
||||
<p> {{projektarbeit?.betreuer}}</p>
|
||||
<p> {{projektarbeit?.titel}}</p>
|
||||
</div>
|
||||
<div id="uploadWrapper">
|
||||
<div class="row" style="margin-bottom: 12px;">
|
||||
<div class="col-1 fw-bold text-center">{{$p.t('abgabetool/c4fixtermin')}}</div>
|
||||
<div class="col-2 fw-bold">{{$p.t('abgabetool/c4zieldatum')}}</div>
|
||||
<div class="col-2 fw-bold">{{$p.t('abgabetool/c4abgabetyp')}}</div>
|
||||
<div class="col-3 fw-bold">{{$p.t('abgabetool/c4abgabekurzbz')}}</div>
|
||||
<div class="col-1 fw-bold text-center">{{$p.t('abgabetool/c4abgabedatum')}}</div>
|
||||
<div class="col-3 fw-bold">
|
||||
{{$p.t('abgabetool/c4fileupload')}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" v-for="termin in projektarbeit.abgabetermine">
|
||||
<div class="col-1 d-flex justify-content-center align-items-start">
|
||||
<i v-if="termin.fixtermin" class="fa-solid fa-2x fa-circle-check fhc-bullet-red"></i>
|
||||
<i v-else="" class="fa-solid fa-2x fa-circle-xmark fhc-bullet-green"></i>
|
||||
<!--
|
||||
<p class="fhc-bullet" :class="{ 'fhc-bullet-red': termin.fixtermin, 'fhc-bullet-green': !termin.fixtermin }"></p>
|
||||
-->
|
||||
</div>
|
||||
<div class="col-2 d-flex justify-content-start align-items-start">
|
||||
<div class="position-relative" :class="getDateStyle(termin)">
|
||||
<VueDatePicker
|
||||
v-model="termin.datum"
|
||||
:clearable="false"
|
||||
:disabled="true"
|
||||
:enable-time-picker="false"
|
||||
:format="formatDate"
|
||||
:text-input="true"
|
||||
auto-apply>
|
||||
</VueDatePicker>
|
||||
<i class="position-absolute abgabe-zieldatum-overlay fa-solid fa-2x" :class="getDateStyle(termin, 'icon')"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2 d-flex justify-content-start align-items-start">{{ termin.bezeichnung }}</div>
|
||||
<div class="col-3 d-flex justify-content-start align-items-start">
|
||||
<Textarea style="margin-bottom: 4px;" v-model="termin.kurzbz" rows="3" cols="45" :disabled="true"></Textarea>
|
||||
</div>
|
||||
<div class="col-1 d-flex flex-column justify-content-start align-items-center">
|
||||
{{ termin.abgabedatum?.split("-").reverse().join(".") }}
|
||||
<a v-if="termin?.abgabedatum" @click="downloadAbgabe(termin)" style="margin-left:4px; cursor: pointer;">
|
||||
<i class="fa-solid fa-3x fa-file-pdf"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-3" v-if="!viewMode">
|
||||
|
||||
<Accordion :multiple="true" :activeIndex="[0]">
|
||||
<template v-for="termin in this.projektarbeit?.abgabetermine">
|
||||
<AccordionTab :header="getAccTabHeaderForTermin(termin)" :headerClass="getDateStyle(termin)">
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
<Upload v-if="termin && termin.allowedToUpload" accept=".pdf" v-model="termin.file"></Upload>
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4fixtermin')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
<Checkbox
|
||||
disabled
|
||||
v-model="termin.fixtermin"
|
||||
:binary="true"
|
||||
:pt="{ root: { class: 'ml-auto' }}"
|
||||
>
|
||||
</Checkbox>
|
||||
<!-- <i v-if="termin.fixtermin" class="fa-solid fa-2x fa-circle-check fhc-bullet-red"></i>-->
|
||||
<!-- <i v-else="" class="fa-solid fa-2x fa-circle-xmark fhc-bullet-green"></i>-->
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<button class="btn btn-primary border-0" @click="upload(termin)" :disabled="!termin.allowedToUpload">
|
||||
Upload
|
||||
<i style="margin-left: 8px" class="fa-solid fa-upload"></i>
|
||||
</div>
|
||||
|
||||
<div class="row mt-2">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4zieldatum')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
<VueDatePicker
|
||||
v-model="termin.datum"
|
||||
:clearable="false"
|
||||
:disabled="true"
|
||||
:enable-time-picker="false"
|
||||
:format="formatDate"
|
||||
:text-input="true"
|
||||
auto-apply>
|
||||
</VueDatePicker>
|
||||
<!-- <i class="position-absolute abgabe-zieldatum-overlay fa-solid fa-2x" :class="getDateStyle(termin, 'icon')"></i>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-2">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4abgabetyp')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
{{ termin.bezeichnung }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-2" v-if="termin.paabgabetyp_kurzbz === 'qualgate1' || termin.paabgabetyp_kurzbz === 'qualgate2'">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4note')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
<div v-if="termin.paabgabetyp_kurzbz === 'qualgate1' || termin.paabgabetyp_kurzbz === 'qualgate2'" class="col-1 d-flex justify-content-start align-items-start">
|
||||
{{ getTerminNoteBezeichnung(termin) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="termin.kurzbz && termin.kurzbz.length > 0" class="row mt-2">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4abgabekurzbz')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
<Textarea style="margin-bottom: 4px;" v-model="termin.kurzbz" :rows=" isMobile ? 2 : 4" :cols=" isMobile ? 25 : 90" :disabled="true"></Textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-2">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4abgabedatum')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
{{ termin.abgabedatum?.split("-").reverse().join(".") }}
|
||||
<button v-if="termin?.abgabedatum" @click="downloadAbgabe(termin)" class="btn btn-primary">
|
||||
<a> {{$p.t('abgabetool/c4downloadAbgabe')}} <i class="fa fa-file-pdf" style="margin-left:4px; cursor: pointer;"></i></a>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-2" v-if="termin.upload_allowed">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4fileupload')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-6 mb-2">
|
||||
<Upload
|
||||
:disabled="!termin?.allowedToUpload || isViewMode"
|
||||
accept=".pdf"
|
||||
v-model="termin.file"
|
||||
></Upload>
|
||||
</div>
|
||||
<div class="col-12 col-sm-6">
|
||||
<button
|
||||
class="btn btn-primary border-0 w-100"
|
||||
@click="upload(termin)"
|
||||
:disabled="!termin.allowedToUpload || isViewMode"
|
||||
>
|
||||
{{$p.t('abgabetool/c4upload')}}
|
||||
<i class="fa-solid fa-upload"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</AccordionTab>
|
||||
</template>
|
||||
</Accordion>
|
||||
</div>
|
||||
|
||||
<bs-modal ref="modalContainerEnduploadZusatzdaten" class="bootstrap-prompt" dialogClass="modal-lg">
|
||||
<bs-modal
|
||||
ref="modalContainerEnduploadZusatzdaten"
|
||||
class="bootstrap-prompt"
|
||||
dialogClass="bordered-modal modal-lg">
|
||||
<template v-slot:title>
|
||||
<div>
|
||||
{{$p.t('abgabetool/c4enduploadZusatzdaten')}}
|
||||
@@ -285,7 +410,7 @@ export const AbgabeStudentDetail = {
|
||||
</div>
|
||||
<div class="row mb-3 align-items-start">
|
||||
|
||||
<p class="ml-4 mr-4">Titel: {{ projektarbeit?.titel }}</p>
|
||||
<p class="ml-4 mr-4">{{$p.t('abgabetool/c4titel')}}: {{ projektarbeit?.titel }}</p>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
@@ -328,14 +453,16 @@ export const AbgabeStudentDetail = {
|
||||
<div class="row mb-3 align-items-start">
|
||||
<div class="row">{{$p.t('abgabetool/c4abstractGer')}}</div>
|
||||
<div class="row">
|
||||
<Textarea v-model="form.abstract" rows="10"></Textarea>
|
||||
<Textarea v-model="form.abstract" rows="10" maxlength="5000"></Textarea>
|
||||
<p>{{ form.abstract?.length ? form.abstract.length : 0 }} / 5000 characters</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3 align-items-start">
|
||||
<div class="row">{{$p.t('abgabetool/c4abstractEng')}}</div>
|
||||
<div class="row">
|
||||
<Textarea v-model="form.abstract_en" rows="10"></Textarea>
|
||||
<Textarea v-model="form.abstract_en" rows="10" maxlength="5000"></Textarea>
|
||||
<p>{{ form.abstract_en?.length ? form.abstract_en.length : 0 }} / 5000 characters</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -368,7 +495,7 @@ export const AbgabeStudentDetail = {
|
||||
|
||||
</template>
|
||||
<template v-slot:footer>
|
||||
<button class="btn btn-primary" :disabled="getEnduploadErlaubt" @click="triggerEndupload">{{$p.t('ui/hochladen')}}</button>
|
||||
<button class="btn btn-primary" :disabled="getAllowedToSendEndupload" @click="triggerEndupload">{{$p.t('ui/hochladen')}}</button>
|
||||
</template>
|
||||
</bs-modal>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ import AbgabeDetail from "./AbgabeMitarbeiterDetail.js";
|
||||
import VerticalSplit from "../../verticalsplit/verticalsplit.js"
|
||||
import BsModal from '../../Bootstrap/Modal.js';
|
||||
import VueDatePicker from '../../vueDatepicker.js.php';
|
||||
import ApiAbgabe from '../../../api/factory/abgabe.js'
|
||||
|
||||
export const AbgabetoolMitarbeiter = {
|
||||
name: "AbgabetoolMitarbeiter",
|
||||
@@ -15,6 +16,14 @@ export const AbgabetoolMitarbeiter = {
|
||||
Textarea: primevue.textarea,
|
||||
VueDatePicker
|
||||
},
|
||||
provide() {
|
||||
return {
|
||||
abgabeTypeOptions: Vue.computed(() => this.abgabeTypeOptions),
|
||||
allowedNotenOptions: Vue.computed(() => this.allowedNotenOptions),
|
||||
turnitin_link: Vue.computed(() => this.turnitin_link),
|
||||
old_abgabe_beurteilung_link: Vue.computed(() => this.old_abgabe_beurteilung_link)
|
||||
}
|
||||
},
|
||||
props: {
|
||||
viewData: {
|
||||
type: Object,
|
||||
@@ -27,31 +36,13 @@ export const AbgabetoolMitarbeiter = {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
turnitin_link: null,
|
||||
old_abgabe_beurteilung_link: null,
|
||||
saving: false,
|
||||
loading: false,
|
||||
// TODO: fetch types
|
||||
allAbgabeTypes: [
|
||||
{
|
||||
paabgabetyp_kurzbz: 'abstract',
|
||||
bezeichnung: 'Entwurf'
|
||||
},
|
||||
{
|
||||
paabgabetyp_kurzbz: 'zwischen',
|
||||
bezeichnung: 'Zwischenabgabe'
|
||||
},
|
||||
{
|
||||
paabgabetyp_kurzbz: 'note',
|
||||
bezeichnung: 'Benotung'
|
||||
},
|
||||
{
|
||||
paabgabetyp_kurzbz: 'end',
|
||||
bezeichnung: 'Endupload'
|
||||
},
|
||||
{
|
||||
paabgabetyp_kurzbz: 'enda',
|
||||
bezeichnung: 'Endabgabe im Sekretariat'
|
||||
}
|
||||
],
|
||||
abgabeTypeOptions: null,
|
||||
notenOptions: null,
|
||||
allowedNotenOptions: null,
|
||||
serienTermin: Vue.reactive({
|
||||
datum: new Date(),
|
||||
bezeichnung: {
|
||||
@@ -72,12 +63,13 @@ export const AbgabetoolMitarbeiter = {
|
||||
tableBuiltResolve: null,
|
||||
tableBuiltPromise: null,
|
||||
abgabeTableOptions: {
|
||||
height: 700,
|
||||
minHeight: 250,
|
||||
index: 'projektarbeit_id',
|
||||
layout: 'fitDataStretch',
|
||||
placeholder: this.$p.t('global/noDataAvailable'),
|
||||
selectable: true,
|
||||
selectableCheck: this.selectionCheck,
|
||||
rowHeight: 80,
|
||||
columns: [
|
||||
{
|
||||
formatter: 'rowSelection',
|
||||
@@ -91,15 +83,15 @@ export const AbgabetoolMitarbeiter = {
|
||||
width: 70
|
||||
},
|
||||
{title: Vue.computed(() => this.$p.t('abgabetool/c4details')), field: 'details', formatter: this.detailFormatter, widthGrow: 1, tooltip: false},
|
||||
{title: Vue.computed(() => this.$p.t('abgabetool/c4personenkennzeichen')), field: 'pkz', formatter: this.pkzTextFormatter, widthGrow: 1, tooltip: false},
|
||||
{title: Vue.computed(() => this.$p.t('abgabetool/c4personenkennzeichen')), headerFilter: true, field: 'pkz', formatter: this.pkzTextFormatter, widthGrow: 1, tooltip: false},
|
||||
{title: Vue.computed(() => this.$p.t('abgabetool/c4kontakt')), field: 'mail', formatter: this.mailFormatter, widthGrow: 1, tooltip: false},
|
||||
{title: Vue.computed(() => this.$p.t('abgabetool/c4vorname')), field: 'vorname', formatter: this.centeredTextFormatter, widthGrow: 1},
|
||||
{title: Vue.computed(() => this.$p.t('abgabetool/c4nachname')), field: 'nachname', formatter: this.centeredTextFormatter, widthGrow: 1},
|
||||
{title: Vue.computed(() => this.$p.t('abgabetool/c4vorname')), field: 'vorname', headerFilter: true, formatter: this.centeredTextFormatter,widthGrow: 1},
|
||||
{title: Vue.computed(() => this.$p.t('abgabetool/c4nachname')), field: 'nachname', headerFilter: true, formatter: this.centeredTextFormatter, widthGrow: 1},
|
||||
{title: Vue.computed(() => this.$p.t('abgabetool/c4projekttyp')), field: 'projekttyp_kurzbz', formatter: this.centeredTextFormatter, widthGrow: 1},
|
||||
{title: Vue.computed(() => this.$p.t('abgabetool/c4stg')), field: 'stg', formatter: this.centeredTextFormatter, widthGrow: 2},
|
||||
{title: Vue.computed(() => this.$p.t('abgabetool/c4sem')), field: 'studiensemester_kurzbz', formatter: this.centeredTextFormatter, widthGrow: 1},
|
||||
{title: Vue.computed(() => this.$p.t('abgabetool/c4titel')), field: 'titel', formatter: this.centeredTextFormatter, maxWidth: 500, widthGrow: 8},
|
||||
{title: Vue.computed(() => this.$p.t('abgabetool/c4betreuerart')), field: 'betreuerart_beschreibung',formatter: this.centeredTextFormatter, widthGrow: 8}
|
||||
{title: Vue.computed(() => this.$p.t('abgabetool/c4stg')), field: 'stg', headerFilter: true, formatter: this.centeredTextFormatter, widthGrow: 1},
|
||||
{title: Vue.computed(() => this.$p.t('abgabetool/c4sem')), field: 'studiensemester_kurzbz', headerFilter: true, formatter: this.centeredTextFormatter, widthGrow: 1},
|
||||
{title: Vue.computed(() => this.$p.t('abgabetool/c4titel')), field: 'titel', headerFilter: true, formatter: this.centeredTextFormatter, maxWidth: 500, widthGrow: 8},
|
||||
{title: Vue.computed(() => this.$p.t('abgabetool/c4betreuerart')), field: 'betreuerart_beschreibung',formatter: this.centeredTextFormatter, widthGrow: 1}
|
||||
],
|
||||
persistence: false,
|
||||
},
|
||||
@@ -176,13 +168,13 @@ export const AbgabetoolMitarbeiter = {
|
||||
},
|
||||
addSeries() {
|
||||
this.saving = true
|
||||
this.$fhcApi.factory.lehre.postSerientermin(
|
||||
this.$api.call(ApiAbgabe.postSerientermin(
|
||||
this.serienTermin.datum.toISOString(),
|
||||
this.serienTermin.bezeichnung.paabgabetyp_kurzbz,
|
||||
this.serienTermin.bezeichnung.bezeichnung,
|
||||
this.serienTermin.kurzbz,
|
||||
this.selectedData?.map(projekt => projekt.projektarbeit_id)
|
||||
).then(res => {
|
||||
)).then(res => {
|
||||
if (res.meta.status === "success" && res.data) {
|
||||
this.$fhcAlert.alertSuccess(this.$p.t('abgabetool/serienTerminGespeichert'))
|
||||
// TODO: sticky lifetime erhöhen um sinnvoll lesen zu können?
|
||||
@@ -214,20 +206,25 @@ export const AbgabetoolMitarbeiter = {
|
||||
const pa = this.projektarbeiten?.retval?.find(projekarbeit => projekarbeit.projektarbeit_id == details.projektarbeit_id)
|
||||
pa.abgabetermine = res.data[0].retval
|
||||
pa.isCurrent = res.data[1]
|
||||
pa.abgabetermine.push({ // new abgatermin row
|
||||
|
||||
'paabgabe_id': -1,
|
||||
'projektarbeit_id': pa.projektarbeit_id,
|
||||
'fixtermin': false,
|
||||
'kurzbz': '',
|
||||
'datum': new Date().toISOString().split('T')[0],
|
||||
'paabgabetyp_kurzbz': '',
|
||||
'bezeichnung': '',
|
||||
'abgabedatum': null,
|
||||
'insertvon': this.viewData?.uid ?? ''
|
||||
|
||||
})
|
||||
|
||||
// pa.abgabetermine.push({ // new abgatermin row
|
||||
//
|
||||
// 'paabgabe_id': -1,
|
||||
// 'projektarbeit_id': pa.projektarbeit_id,
|
||||
// 'fixtermin': false,
|
||||
// 'kurzbz': '',
|
||||
// 'datum': new Date().toISOString().split('T')[0],
|
||||
// 'note': this.allowedNotenOptions.find(opt => opt.note == 9),
|
||||
// 'upload_allowed': false,
|
||||
// 'paabgabetyp_kurzbz': '',
|
||||
// 'bezeichnung': '',
|
||||
// 'abgabedatum': null,
|
||||
// 'insertvon': this.viewData?.uid ?? ''
|
||||
//
|
||||
// })
|
||||
|
||||
pa.abgabetermine.forEach(termin => {
|
||||
termin.note = this.allowedNotenOptions.find(opt => opt.note == termin.note)
|
||||
termin.file = []
|
||||
termin.allowedToSave = termin.insertvon == this.viewData?.uid && pa.betreuerart_kurzbz != 'Zweitbegutachter'
|
||||
termin.allowedToDelete = termin.allowedToSave && !termin.abgabedatum
|
||||
@@ -237,15 +234,12 @@ export const AbgabetoolMitarbeiter = {
|
||||
paabgabetyp_kurzbz: termin.paabgabetyp_kurzbz
|
||||
}
|
||||
})
|
||||
pa.betreuer = this.buildBetreuer(pa)
|
||||
pa.student_uid = details.student_uid
|
||||
pa.student = `${pa.vorname} ${pa.nachname}`
|
||||
|
||||
this.selectedProjektarbeit = pa
|
||||
|
||||
|
||||
this.$refs.verticalsplit.showBoth()
|
||||
|
||||
this.$refs.modalContainerAbgabeDetail.show()
|
||||
|
||||
})
|
||||
},
|
||||
@@ -290,10 +284,6 @@ export const AbgabetoolMitarbeiter = {
|
||||
buildStg(projekt) {
|
||||
return (projekt.typ + projekt.kurzbz)?.toUpperCase()
|
||||
},
|
||||
buildBetreuer(abgabe) {
|
||||
// TODO: preload and insert own titled name of betreuer somehow
|
||||
return abgabe.betreuerart_beschreibung + ': ' + (abgabe.btitelpre ? abgabe.btitelpre + ' ' : '') + abgabe.bvorname + ' ' + abgabe.bnachname + (abgabe.btitelpost ? ' ' + abgabe.btitelpost : '')
|
||||
},
|
||||
setupData(data){
|
||||
this.projektarbeiten = data[0]
|
||||
this.domain = data[1]
|
||||
@@ -321,7 +311,7 @@ export const AbgabetoolMitarbeiter = {
|
||||
this.$refs.abgabeTable.tabulator.setData(d);
|
||||
},
|
||||
loadProjektarbeiten(all = false, callback) {
|
||||
this.$fhcApi.factory.lehre.getMitarbeiterProjektarbeiten(this.viewData?.uid ?? null, all)
|
||||
this.$api.call(ApiAbgabe.getMitarbeiterProjektarbeiten(all))
|
||||
.then(res => {
|
||||
if(res?.data) this.setupData(res.data)
|
||||
}).finally(() => {
|
||||
@@ -332,7 +322,7 @@ export const AbgabetoolMitarbeiter = {
|
||||
},
|
||||
loadAbgaben(details) {
|
||||
return new Promise((resolve) => {
|
||||
this.$fhcApi.factory.lehre.getStudentProjektabgaben(details)
|
||||
this.$api.call(ApiAbgabe.getStudentProjektabgaben(details))
|
||||
.then(res => {
|
||||
resolve(res)
|
||||
})
|
||||
@@ -347,7 +337,7 @@ export const AbgabetoolMitarbeiter = {
|
||||
if(!tableDataSet) return
|
||||
const rect = tableDataSet.getBoundingClientRect();
|
||||
|
||||
this.abgabeTableOptions.height = window.visualViewport.height - rect.top
|
||||
this.abgabeTableOptions.height = window.visualViewport.height - rect.top - 80
|
||||
this.$refs.abgabeTable.tabulator.setHeight(this.abgabeTableOptions.height)
|
||||
},
|
||||
async setupMounted() {
|
||||
@@ -356,8 +346,7 @@ export const AbgabetoolMitarbeiter = {
|
||||
|
||||
this.loadProjektarbeiten()
|
||||
|
||||
|
||||
this.$refs.verticalsplit.collapseBottom()
|
||||
// this.$refs.verticalsplit.collapseBottom()
|
||||
this.calcMaxTableHeight()
|
||||
|
||||
}
|
||||
@@ -369,14 +358,45 @@ export const AbgabetoolMitarbeiter = {
|
||||
|
||||
},
|
||||
created() {
|
||||
|
||||
// fetch config to avoid hard coded links
|
||||
this.$api.call(ApiAbgabe.getConfig()).then(res => {
|
||||
this.turnitin_link = res.data?.turnitin_link
|
||||
this.old_abgabe_beurteilung_link = res.data?.old_abgabe_beurteilung_link
|
||||
}).catch(e => {
|
||||
console.log(e)
|
||||
this.loading = false
|
||||
})
|
||||
|
||||
// fetch noten options
|
||||
//TODO: SWITCH TO NOTEN API ONCE NOTENTOOL IS IN MASTER TO AVOID DUPLICATE API
|
||||
this.$api.call(ApiAbgabe.getNoten()).then(res => {
|
||||
this.notenOptions = res.data
|
||||
// TODO: more sophisticated way to filter for these two, in essence it is still hardcoded
|
||||
this.allowedNotenOptions = this.notenOptions.filter(
|
||||
opt => opt.bezeichnung === 'Bestanden'
|
||||
|| opt.bezeichnung === 'Nicht bestanden'
|
||||
)
|
||||
}).catch(e => {
|
||||
this.loading = false
|
||||
})
|
||||
|
||||
// fetch abgabetypen options
|
||||
this.$api.call(ApiAbgabe.getPaAbgabetypen()).then(res => {
|
||||
this.abgabeTypeOptions = res.data
|
||||
}).catch(e => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
mounted() {
|
||||
this.setupMounted()
|
||||
},
|
||||
template: `
|
||||
<div id="loadingOverlay" v-show="loading || saving" style="position: absolute; width: 100vw; height: 100vh; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.5); z-index: 99999999999;">
|
||||
<i class="fa-solid fa-spinner fa-pulse fa-5x"></i>
|
||||
</div>
|
||||
|
||||
<bs-modal ref="modalContainerAddSeries" class="bootstrap-prompt"
|
||||
dialogClass="modal-lg">
|
||||
dialogClass="modal-lg">
|
||||
<template v-slot:title>
|
||||
<div>
|
||||
{{ $p.t('abgabetool/neueTerminserie') }}
|
||||
@@ -412,7 +432,7 @@ export const AbgabetoolMitarbeiter = {
|
||||
<Dropdown
|
||||
:style="{'width': '100%'}"
|
||||
v-model="serienTermin.bezeichnung"
|
||||
:options="allAbgabeTypes"
|
||||
:options="abgabeTypeOptions"
|
||||
:optionLabel="getOptionLabelAbgabetyp">
|
||||
</Dropdown>
|
||||
</div>
|
||||
@@ -427,56 +447,54 @@ export const AbgabetoolMitarbeiter = {
|
||||
</template>
|
||||
</bs-modal>
|
||||
|
||||
<vertical-split ref="verticalsplit">
|
||||
|
||||
<template #top>
|
||||
<h2>{{$p.t('abgabetool/abgabetoolTitle')}}</h2>
|
||||
<hr>
|
||||
<core-filter-cmpt
|
||||
:title="''"
|
||||
@uuidDefined="handleUuidDefined"
|
||||
ref="abgabeTable"
|
||||
:newBtnShow="true"
|
||||
:newBtnLabel="$p.t('abgabetool/neueTerminserie')"
|
||||
:newBtnDisabled="!selectedData.length"
|
||||
@click:new=openAddSeriesModal
|
||||
:tabulator-options="abgabeTableOptions"
|
||||
:tabulator-events="abgabeTableEventHandlers"
|
||||
tableOnly
|
||||
:sideMenu="false"
|
||||
:useSelectionSpan="false"
|
||||
>
|
||||
<template #actions>
|
||||
<button @click="toggleShowAll(!showAll)" role="button" class="btn btn-secondary ml-2">
|
||||
<i v-show="!showAll" class="fa fa-eye"></i>
|
||||
<i v-show="showAll" class="fa fa-eye-slash"></i>
|
||||
{{ $p.t('abgabetool/showAll') }}
|
||||
</button>
|
||||
|
||||
<button @click="showDeadlines" role="button" class="btn btn-secondary ml-2">
|
||||
<i class="fa fa-hourglass-end"></i>
|
||||
{{ $p.t('abgabetool/showDeadlines') }}
|
||||
</button>
|
||||
|
||||
<div v-show="saving">
|
||||
{{ $p.t('abgabetool/currentlySaving') }} <i class="fa-solid fa-spinner fa-pulse fa-3x"></i>
|
||||
</div>
|
||||
<div v-show="loading">
|
||||
{{ $p.t('abgabetool/currentlyLoading') }} <i class="fa-solid fa-spinner fa-pulse fa-3x"></i>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</core-filter-cmpt>
|
||||
|
||||
</template>
|
||||
<template #bottom>
|
||||
<div v-show="selectedProjektarbeit" ref="selProj">
|
||||
<AbgabeDetail :projektarbeit="selectedProjektarbeit"></AbgabeDetail>
|
||||
<bs-modal ref="modalContainerAbgabeDetail" class="bootstrap-prompt"
|
||||
dialogClass="modal-fullscreen">
|
||||
<template v-slot:title>
|
||||
<div>
|
||||
{{$p.t('abgabetool/c4abgabeMitarbeiterDetailTitle')}}
|
||||
</div>
|
||||
</template>
|
||||
</vertical-split>
|
||||
|
||||
|
||||
<template v-slot:default>
|
||||
<AbgabeDetail :projektarbeit="selectedProjektarbeit"></AbgabeDetail>
|
||||
|
||||
</template>
|
||||
</bs-modal>
|
||||
|
||||
<!-- low max height on this vsplit wrapper to avoid padding scrolls, elements have their inherent height anyways -->
|
||||
<div style="max-height:40vw;">
|
||||
|
||||
<h2>{{$p.t('abgabetool/abgabetoolTitle')}}</h2>
|
||||
<hr>
|
||||
<core-filter-cmpt
|
||||
:title="''"
|
||||
@uuidDefined="handleUuidDefined"
|
||||
ref="abgabeTable"
|
||||
:newBtnShow="true"
|
||||
:newBtnLabel="$p.t('abgabetool/neueTerminserie')"
|
||||
:newBtnDisabled="!selectedData.length"
|
||||
@click:new=openAddSeriesModal
|
||||
:tabulator-options="abgabeTableOptions"
|
||||
:tabulator-events="abgabeTableEventHandlers"
|
||||
tableOnly
|
||||
:sideMenu="false"
|
||||
:useSelectionSpan="false"
|
||||
>
|
||||
<template #actions>
|
||||
<button @click="toggleShowAll(!showAll)" role="button" class="btn btn-secondary ml-2">
|
||||
<i v-show="!showAll" class="fa fa-eye"></i>
|
||||
<i v-show="showAll" class="fa fa-eye-slash"></i>
|
||||
{{ $p.t('abgabetool/showAll') }}
|
||||
</button>
|
||||
|
||||
<button @click="showDeadlines" role="button" class="btn btn-secondary ml-2">
|
||||
<i class="fa fa-hourglass-end"></i>
|
||||
{{ $p.t('abgabetool/showDeadlines') }}
|
||||
</button>
|
||||
|
||||
</template>
|
||||
</core-filter-cmpt>
|
||||
|
||||
</div>
|
||||
`,
|
||||
};
|
||||
|
||||
|
||||
@@ -1,14 +1,24 @@
|
||||
import {CoreFilterCmpt} from "../../../components/filter/Filter.js";
|
||||
import AbgabeDetail from "./AbgabeStudentDetail.js";
|
||||
import VerticalSplit from "../../verticalsplit/verticalsplit.js";
|
||||
import ApiAbgabe from '../../../api/factory/abgabe.js'
|
||||
import BsModal from "../../Bootstrap/Modal.js";
|
||||
|
||||
export const AbgabetoolStudent = {
|
||||
name: "AbgabetoolStudent",
|
||||
components: {
|
||||
CoreFilterCmpt,
|
||||
Accordion: primevue.accordion,
|
||||
AccordionTab: primevue.accordiontab,
|
||||
BsModal,
|
||||
AbgabeDetail,
|
||||
VerticalSplit
|
||||
},
|
||||
inject: ['isMobile'],
|
||||
provide() {
|
||||
return {
|
||||
notenOptions: Vue.computed(() => this.notenOptions),
|
||||
isViewMode: Vue.computed(() => this.isViewMode)
|
||||
}
|
||||
},
|
||||
props: {
|
||||
student_uid_prop: {
|
||||
default: null
|
||||
@@ -24,81 +34,51 @@ export const AbgabetoolStudent = {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tabulatorUuid: Vue.ref(0),
|
||||
notenOptions: null,
|
||||
domain: '',
|
||||
student_uid: null,
|
||||
detail: null,
|
||||
projektarbeiten: null,
|
||||
selectedProjektarbeit: null,
|
||||
tableBuiltResolve: null,
|
||||
tableBuiltPromise: null,
|
||||
abgabeTableOptions: {
|
||||
minHeight: 250,
|
||||
index: 'projektarbeit_id',
|
||||
layout: 'fitColumns',
|
||||
placeholder: this.$p.t('global/noDataAvailable'),
|
||||
columns: [
|
||||
{title: Vue.computed(() => this.$p.t('abgabetool/c4details')), field: 'details', formatter: this.detailFormatter, widthGrow: 1, tooltip: false},
|
||||
{title: Vue.computed(() => this.$p.t('abgabetool/c4beurteilung')), field: 'beurteilung', formatter: this.beurteilungFormatter, widthGrow: 1, tooltip: false},
|
||||
{title: Vue.computed(() => this.$p.t('abgabetool/c4sem')), field: 'sem', formatter: this.centeredTextFormatter, widthGrow: 1},
|
||||
{title: Vue.computed(() => this.$p.t('abgabetool/c4stg')), field: 'stg', formatter: this.centeredTextFormatter, widthGrow: 1},
|
||||
{title: Vue.computed(() => this.$p.t('abgabetool/c4kontakt')), field: 'mail', formatter: this.mailFormatter, widthGrow: 1},
|
||||
{title: Vue.computed(() => this.$p.t('abgabetool/c4betreuer')), field: 'betreuer', formatter: this.centeredTextFormatter,widthGrow: 2},
|
||||
{title: Vue.computed(() => this.$p.t('abgabetool/c4projekttyp')), field: 'typ', formatter: this.centeredTextFormatter, widthGrow: 1},
|
||||
{title: Vue.computed(() => this.$p.t('abgabetool/c4titel')), field: 'titel', formatter: this.centeredTextFormatter, widthGrow: 8}
|
||||
],
|
||||
persistence: false,
|
||||
},
|
||||
abgabeTableEventHandlers: [{
|
||||
event: "tableBuilt",
|
||||
handler: async () => {
|
||||
this.tableBuiltResolve()
|
||||
}
|
||||
},
|
||||
{
|
||||
event: "cellClick",
|
||||
handler: async (e, cell) => {
|
||||
|
||||
if(cell.getColumn().getField() === "details") {
|
||||
const val = cell.getValue()
|
||||
|
||||
if(val.mode === 'detailTermine') {
|
||||
this.setDetailComponent(cell.getValue())
|
||||
} else if (val.mode === 'beurteilungDownload') {
|
||||
const pdfExportLink = FHC_JS_DATA_STORAGE_OBJECT.app_root + 'cis/private/pdfExport.php?xml=projektarbeitsbeurteilung.xml.php&xsl=Projektbeurteilung&betreuerart_kurzbz='+val.betreuerart_kurzbz+'&projektarbeit_id='+val.projektarbeit_id+'&person_id=' + val.betreuer_person_id
|
||||
// const pdfExportLink2 = FHC_JS_DATA_STORAGE_OBJECT.app_root + 'cis/private/lehre/projektbeurteilungDocumentExport.php?betreuerart_kurzbz='+val.betreuerart_kurzbz+'&projektarbeit_id='+val.projektarbeit_id+'&person_id=' + val.betreuer_person_id
|
||||
window.open(pdfExportLink, '_blank')
|
||||
}
|
||||
|
||||
} else if (cell.getColumn().getField() === "beurteilung") {
|
||||
const val = cell.getValue()
|
||||
|
||||
if(val != '-') window.open(val, '_blank')
|
||||
}
|
||||
e.stopPropagation()
|
||||
|
||||
}
|
||||
}
|
||||
]};
|
||||
selectedProjektarbeit: null
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
checkQualityGates(termine) {
|
||||
let qgate1Passed = false
|
||||
let qgate2Passed = false
|
||||
|
||||
termine.forEach(t => {
|
||||
const noteOption = this.notenOptions?.find(opt => opt.note == t.note)
|
||||
if(noteOption && noteOption.positiv) {
|
||||
if(t.paabgabetyp_kurzbz == 'qualgate1') {
|
||||
qgate1Passed = true
|
||||
} else if(t.paabgabetyp_kurzbz == 'qualgate2') {
|
||||
qgate2Passed = true
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
return qgate1Passed && qgate2Passed
|
||||
},
|
||||
isPastDate(date) {
|
||||
return new Date(date) < new Date(Date.now())
|
||||
},
|
||||
setDetailComponent(details){
|
||||
this.loadAbgaben(details).then((res)=> {
|
||||
const pa = this.projektarbeiten?.retval?.find(projekarbeit => projekarbeit.projektarbeit_id == details.projektarbeit_id)
|
||||
const pa = this.projektarbeiten?.find(projekarbeit => projekarbeit.projektarbeit_id == details.projektarbeit_id)
|
||||
pa.abgabetermine = res.data[0].retval
|
||||
pa.abgabetermine.forEach(termin => {
|
||||
termin.file = []
|
||||
termin.allowedToUpload = true
|
||||
|
||||
termin.allowedToUpload = false
|
||||
// termin.datum = '2025-10-16'
|
||||
// TODO: fixtermin logic?
|
||||
if(termin.bezeichnung == 'Endupload' && this.isPastDate(termin.datum)) {
|
||||
if(termin.paabgabetyp_kurzbz == 'enda') {
|
||||
|
||||
// termin.allowedToUpload = false
|
||||
termin.allowedToUpload = !this.isPastDate(termin.datum) && this.checkQualityGates(pa.abgabetermine)
|
||||
} else if(termin.paabgabetyp_kurzbz == 'qualgate1' || termin.paabgabetyp_kurzbz == 'qualgate2') {
|
||||
termin.allowedToUpload = termin.upload_allowed
|
||||
} else {
|
||||
// termin.allowedToUpload = true
|
||||
termin.allowedToUpload = true
|
||||
}
|
||||
|
||||
})
|
||||
@@ -107,55 +87,57 @@ export const AbgabetoolStudent = {
|
||||
|
||||
this.selectedProjektarbeit = pa
|
||||
|
||||
|
||||
this.$refs.verticalsplit.showBoth()
|
||||
this.$refs.modalContainerAbgabeDetail.show()
|
||||
// this.$refs.verticalsplit.showBoth()
|
||||
|
||||
})
|
||||
|
||||
},
|
||||
centeredTextFormatter(cell) {
|
||||
const val = cell.getValue()
|
||||
|
||||
return '<div style="display: flex; justify-content: center; align-items: center; height: 100%">' +
|
||||
return '<div style="display: flex; justify-content: center; align-items: center; height: 100%;">' +
|
||||
'<p style="max-width: 100%; word-wrap: break-word; white-space: normal;">'+val+'</p></div>'
|
||||
},
|
||||
detailFormatter(cell) {
|
||||
const val = cell.getValue()
|
||||
|
||||
if(val.mode === 'detailTermine') {
|
||||
return '<div style="display: flex; justify-content: center; align-items: center; height: 100%">' +
|
||||
return '<div style="display: flex; justify-content: center; align-items: center; height: 100%;">' +
|
||||
'<a><i class="fa fa-folder-open" style="color:#00649C"></i></a></div>'
|
||||
} else if (val.mode === 'beurteilungDownload') {
|
||||
return '<div style="display: flex; justify-content: center; align-items: center; height: 100%">' +
|
||||
return '<div style="display: flex; justify-content: center; align-items: center; height: 100%;">' +
|
||||
'<a><i class="fa fa-file-pdf" style="color:#00649C"></i></a></div>'
|
||||
}
|
||||
},
|
||||
mailFormatter(cell) {
|
||||
const val = cell.getValue()
|
||||
return '<div style="display: flex; justify-content: center; align-items: center; height: 100%">' +
|
||||
return '<div style="display: flex; justify-content: center; align-items: center; height: 100%;">' +
|
||||
'<a href='+val+'><i class="fa fa-envelope" style="color:#00649C"></i></a></div>'
|
||||
},
|
||||
beurteilungFormatter(cell) {
|
||||
const val = cell.getValue()
|
||||
if(val) {
|
||||
return '<div style="display: flex; justify-content: center; align-items: center; height: 100%">' +
|
||||
return '<div style="display: flex; justify-content: center; align-items: center; height: 100%;">' +
|
||||
'<a><i class="fa fa-file-pdf" style="color:#00649C"></i></a></div>'
|
||||
} else return '-'
|
||||
},
|
||||
tableResolve(resolve) {
|
||||
this.tableBuiltResolve = resolve
|
||||
},
|
||||
buildMailToLink(abgabe) {
|
||||
return 'mailto:' + abgabe.mitarbeiter_uid +'@'+ this.domain
|
||||
buildMailToLink(projekt) {
|
||||
if(projekt.mitarbeiter_uid) { // standard
|
||||
return 'mailto:' + projekt.mitarbeiter_uid +'@'+ this.domain
|
||||
} else { // private
|
||||
return 'mailto:' + projekt.email
|
||||
}
|
||||
},
|
||||
buildBetreuer(abgabe) {
|
||||
return abgabe.betreuerart_beschreibung + ': ' + (abgabe.btitelpre ? abgabe.btitelpre + ' ' : '') + abgabe.bvorname + ' ' + abgabe.bnachname + (abgabe.btitelpost ? ' ' + abgabe.btitelpost : '')
|
||||
},
|
||||
setupData(data){
|
||||
this.projektarbeiten = data[0]
|
||||
async setupData(data){
|
||||
// this.projektarbeiten = data[0]
|
||||
this.domain = data[1]
|
||||
this.student_uid = data[2]
|
||||
const d = data[0]?.retval?.map(projekt => {
|
||||
this.projektarbeiten = data[0] ?? null
|
||||
if(!this.projektarbeiten) return
|
||||
this.projektarbeiten = this.projektarbeiten.map(projekt => {
|
||||
let mode = 'detailTermine'
|
||||
|
||||
if (projekt.babgeschickt || projekt.zweitbetreuer_abgeschickt) {
|
||||
@@ -165,6 +147,7 @@ export const AbgabetoolStudent = {
|
||||
}
|
||||
|
||||
return {
|
||||
...projekt,
|
||||
details: {
|
||||
student_uid: this.student_uid,
|
||||
projektarbeit_id: projekt.projektarbeit_id,
|
||||
@@ -181,44 +164,47 @@ export const AbgabetoolStudent = {
|
||||
titel: projekt.titel
|
||||
}
|
||||
})
|
||||
|
||||
this.$refs.abgabeTable.tabulator.setColumns(this.abgabeTableOptions.columns)
|
||||
this.$refs.abgabeTable.tabulator.setData(d);
|
||||
|
||||
},
|
||||
loadProjektarbeiten() {
|
||||
this.$fhcApi.factory.lehre.getStudentProjektarbeiten(this.student_uid_prop || this.viewData?.uid || null)
|
||||
this.$api.call(ApiAbgabe.getStudentProjektarbeiten(this.student_uid_prop || this.viewData?.uid || null))
|
||||
.then(res => {
|
||||
if(res?.data) this.setupData(res.data)
|
||||
})
|
||||
},
|
||||
loadAbgaben(details) {
|
||||
return new Promise((resolve) => {
|
||||
this.$fhcApi.factory.lehre.getStudentProjektabgaben(details)
|
||||
this.$api.call(ApiAbgabe.getStudentProjektabgaben(details))
|
||||
.then(res => {
|
||||
resolve(res)
|
||||
})
|
||||
})
|
||||
},
|
||||
handleUuidDefined(uuid) {
|
||||
this.tabulatorUuid = uuid
|
||||
},
|
||||
calcMaxTableHeight() {
|
||||
const tableID = this.tabulatorUuid ? ('-' + this.tabulatorUuid) : ''
|
||||
const tableDataSet = document.getElementById('filterTableDataset' + tableID);
|
||||
if(!tableDataSet) return
|
||||
const rect = tableDataSet.getBoundingClientRect();
|
||||
|
||||
this.abgabeTableOptions.height = window.visualViewport.height - rect.top
|
||||
this.$refs.abgabeTable.tabulator.setHeight(this.abgabeTableOptions.height)
|
||||
},
|
||||
async setupMounted() {
|
||||
this.tableBuiltPromise = new Promise(this.tableResolve)
|
||||
await this.tableBuiltPromise
|
||||
|
||||
this.loadProjektarbeiten()
|
||||
|
||||
this.$refs.verticalsplit.collapseBottom()
|
||||
//this.calcMaxTableHeight()
|
||||
},
|
||||
getAccTabHeaderForProjektarbeit(projektarbeit) {
|
||||
let title = ''
|
||||
|
||||
title += projektarbeit.titel
|
||||
|
||||
return title
|
||||
},
|
||||
getMailLink(projektarbeit) {
|
||||
if(projektarbeit.email) {
|
||||
return 'mailto:'+projektarbeit.email
|
||||
} else return ''
|
||||
},
|
||||
getNoteBezeichnung(projektarbeit) {
|
||||
if(projektarbeit.note && this.notenOptions) {
|
||||
const noteOpt = this.notenOptions.find(opt => opt.note == projektarbeit.note)
|
||||
return noteOpt?.bezeichnung
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
handleDownloadBeurteilung(projektarbeit) {
|
||||
window.open(projektarbeit.beurteilung)
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -229,35 +215,121 @@ export const AbgabetoolStudent = {
|
||||
return this.student_uid !== this.viewData.uid
|
||||
}
|
||||
},
|
||||
created() {
|
||||
async created() {
|
||||
this.loading = true
|
||||
//TODO: SWITCH TO NOTEN API ONCE NOTENTOOL IS IN MASTER TO AVOID DUPLICATE API
|
||||
await this.$api.call(ApiAbgabe.getNoten()).then(res => {
|
||||
this.notenOptions = res.data
|
||||
}).catch(e => {
|
||||
this.loading = false
|
||||
})
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.setupMounted()
|
||||
},
|
||||
template: `
|
||||
<vertical-split ref="verticalsplit">
|
||||
<template #top>
|
||||
<h2>{{$p.t('abgabetool/abgabetoolTitle')}}</h2>
|
||||
<hr>
|
||||
|
||||
<core-filter-cmpt
|
||||
@uuidDefined="handleUuidDefined"
|
||||
:title="''"
|
||||
ref="abgabeTable"
|
||||
:tabulator-options="abgabeTableOptions"
|
||||
:tabulator-events="abgabeTableEventHandlers"
|
||||
tableOnly
|
||||
:sideMenu="false"
|
||||
/>
|
||||
|
||||
</template>
|
||||
<template #bottom>
|
||||
<div v-show="selectedProjektarbeit">
|
||||
<AbgabeDetail :viewMode="isViewMode" :projektarbeit="selectedProjektarbeit"></AbgabeDetail>
|
||||
</div>
|
||||
|
||||
<bs-modal ref="modalContainerAbgabeDetail" class="bootstrap-prompt"
|
||||
dialogClass="modal-fullscreen">
|
||||
<template v-slot:title>
|
||||
<div>
|
||||
{{$p.t('abgabetool/c4abgabeStudentDetailTitle')}}
|
||||
</div>
|
||||
</template>
|
||||
</vertical-split>
|
||||
<template v-slot:default>
|
||||
<AbgabeDetail :projektarbeit="selectedProjektarbeit"></AbgabeDetail>
|
||||
|
||||
</template>
|
||||
</bs-modal>
|
||||
|
||||
<h2>{{$p.t('abgabetool/abgabetoolTitle')}}</h2>
|
||||
<hr>
|
||||
|
||||
<div v-if="projektarbeiten === null">
|
||||
{{$p.t('abgabetool/c4abgabeStudentNoProjectsFound')}}
|
||||
</div>
|
||||
|
||||
<Accordion :multiple="true" :activeIndex="[0]">
|
||||
<template v-for="projektarbeit in projektarbeiten">
|
||||
<AccordionTab>
|
||||
|
||||
<template #header>
|
||||
<div class="d-flex row w-100">
|
||||
<div class="col-6 text-start">
|
||||
<span>{{getAccTabHeaderForProjektarbeit(projektarbeit)}}</span>
|
||||
</div>
|
||||
<div class="col-6 text-end">
|
||||
<span>{{getNoteBezeichnung(projektarbeit)}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4details')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
<button @click="setDetailComponent(projektarbeit.details)" class="btn btn-primary">
|
||||
{{$p.t('abgabetool/c4projektdetailsOeffnen')}} <a><i class="fa fa-folder-open"></i></a>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-2">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4beurteilung')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
<button v-if="projektarbeit.beurteilung" @click="handleDownloadBeurteilung(projektarbeit)" class="btn btn-primary">
|
||||
<a> {{$p.t('abgabetool/c4downloadBeurteilung')}} <i class="fa fa-file-pdf" style="margin-left:4px; cursor: pointer;"></i></a>
|
||||
</button>
|
||||
<a v-else>{{$p.t('abgabetool/c4nobeurteilungVorhanden')}}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-2">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4sem')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
{{ projektarbeit.sem }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-2">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4stg')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
<div class="col-1 d-flex justify-content-start align-items-start">
|
||||
{{ projektarbeit.stg }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-2">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4betreuer')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
{{ projektarbeit.betreuer }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-2">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4betreuerEmailKontakt')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
<a :href="getMailLink(projektarbeit)"><i class="fa fa-envelope" style="color:#00649C"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="projektarbeit.zweitbetreuer" class="row mt-2">
|
||||
<div class="col-4 col-md-3 fw-bold">{{ projektarbeit.zweitbetreuer_betreuerart_kurzbz}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
{{ projektarbeit.zweitbetreuer_betreuerart_beschreibung}}: {{ projektarbeit.zweitbetreuer?.first }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-2">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4projekttyp')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
{{ projektarbeit.projekttypbezeichnung }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-2">
|
||||
<div class="col-4 col-md-3 fw-bold">{{$p.t('abgabetool/c4titel')}}</div>
|
||||
<div class="col-8 col-md-9">
|
||||
{{ projektarbeit.titel }}
|
||||
</div>
|
||||
</div>
|
||||
</AccordionTab>
|
||||
</template>
|
||||
</Accordion>
|
||||
|
||||
`,
|
||||
};
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import {CoreFilterCmpt} from "../../../components/filter/Filter.js";
|
||||
import ApiAbgabe from '../../../api/factory/abgabe.js'
|
||||
|
||||
export const DeadlineOverview = {
|
||||
name: "DeadlineOverview",
|
||||
@@ -84,7 +85,7 @@ export const DeadlineOverview = {
|
||||
this.tableBuiltResolve = resolve
|
||||
},
|
||||
loadDeadlines() {
|
||||
this.$fhcApi.factory.lehre.fetchDeadlines(this.person_uid_prop ?? null)
|
||||
this.$api.call(ApiAbgabe.fetchDeadlines(this.person_uid_prop ?? null))
|
||||
.then(res => {
|
||||
if(res?.data) this.setupData(res.data)
|
||||
})
|
||||
@@ -109,7 +110,7 @@ export const DeadlineOverview = {
|
||||
if(!tableDataSet) return
|
||||
const rect = tableDataSet.getBoundingClientRect();
|
||||
|
||||
this.deadlineTableOptions.height = window.visualViewport.height - rect.top
|
||||
this.deadlineTableOptions.height = window.visualViewport.height - rect.top - 30
|
||||
this.$refs.deadlineTable.tabulator.setHeight(this.deadlineTableOptions.height)
|
||||
},
|
||||
async setupMounted() {
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
<?php
|
||||
if (! defined('DB_NAME')) exit('No direct script access allowed');
|
||||
|
||||
// add campus.tbl_paabgabetyp options for Quality Gates
|
||||
if($result = $db->db_query("SELECT 1 FROM campus.tbl_paabgabetyp WHERE paabgabetyp_kurzbz='qualgate1'"))
|
||||
{
|
||||
if($db->db_num_rows($result) === 0)
|
||||
{
|
||||
$qry = "INSERT INTO campus.tbl_paabgabetyp (paabgabetyp_kurzbz, bezeichnung) VALUES('qualgate1', 'Quality Gate 1');";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>campus.tbl_paabgabetyp: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>paabgabetyp quality gate 1 hinzugefuegt';
|
||||
}
|
||||
}
|
||||
|
||||
if($result = $db->db_query("SELECT 1 FROM campus.tbl_paabgabetyp WHERE paabgabetyp_kurzbz='qualgate2'"))
|
||||
{
|
||||
if($db->db_num_rows($result) === 0)
|
||||
{
|
||||
$qry = "INSERT INTO campus.tbl_paabgabetyp (paabgabetyp_kurzbz, bezeichnung) VALUES('qualgate2', 'Quality Gate 2');";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>campus.tbl_paabgabetyp: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>paabgabetyp quality gate 2 hinzugefuegt';
|
||||
}
|
||||
}
|
||||
|
||||
if($result = $db->db_query("SELECT 1 FROM information_schema.columns WHERE table_schema = 'campus' AND table_name = 'tbl_paabgabe' AND column_name = 'note'"))
|
||||
{
|
||||
if($db->db_num_rows($result) === 0)
|
||||
{
|
||||
|
||||
$qry = "ALTER TABLE campus.tbl_paabgabe
|
||||
ADD COLUMN note SMALLINT DEFAULT NULL,
|
||||
ADD CONSTRAINT tbl_paabgabe_note_fkey
|
||||
FOREIGN KEY (note)
|
||||
REFERENCES lehre.tbl_note(note)
|
||||
ON UPDATE CASCADE ON DELETE RESTRICT;";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>campus.tbl_paabgabe: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>paabgabe column note default 9 (noch nicht eingetragen) hinzugefuegt';
|
||||
}
|
||||
}
|
||||
|
||||
if($result = $db->db_query("SELECT 1 FROM information_schema.columns WHERE table_schema = 'campus' AND table_name = 'tbl_paabgabe' AND column_name = 'upload_allowed'"))
|
||||
{
|
||||
if($db->db_num_rows($result) === 0)
|
||||
{
|
||||
$qry = "ALTER TABLE campus.tbl_paabgabe
|
||||
ADD COLUMN IF NOT EXISTS upload_allowed boolean DEFAULT true;";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>campus.tbl_paabgabe: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>paabgabe column upload_allowed default false hinzugefuegt';
|
||||
}
|
||||
}
|
||||
|
||||
if($result = $db->db_query("SELECT 1 FROM information_schema.columns WHERE table_schema = 'campus' AND table_name = 'tbl_paabgabe' AND column_name = 'beurteilungsnotiz'"))
|
||||
{
|
||||
if($db->db_num_rows($result) === 0)
|
||||
{
|
||||
$qry = "ALTER TABLE campus.tbl_paabgabe
|
||||
ADD COLUMN IF NOT EXISTS beurteilungsnotiz text DEFAULT NULL;";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>campus.tbl_paabgabe: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo "<br>paabgabe column beurteilungsnotiz default '' hinzugefuegt";
|
||||
}
|
||||
}
|
||||
|
||||
if($result = $db->db_query("SELECT 1 FROM system.tbl_berechtigung WHERE berechtigung_kurzbz = 'basis/abgabe_student'"))
|
||||
{
|
||||
if($db->db_num_rows($result) === 0)
|
||||
{
|
||||
$qry = "INSERT INTO system.tbl_berechtigung(berechtigung_kurzbz, beschreibung)
|
||||
SELECT 'basis/abgabe_student', 'Recht um Abgabetool für Studenten zu bedienen'";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>system.tbl_berechtigung: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo "<br>system.tbl_berechtigung insert basis/abgabe_student hinzugefuegt";
|
||||
}
|
||||
}
|
||||
|
||||
if($result = $db->db_query("SELECT 1 FROM system.tbl_berechtigung WHERE berechtigung_kurzbz = 'basis/abgabe_lektor'"))
|
||||
{
|
||||
if($db->db_num_rows($result) === 0)
|
||||
{
|
||||
$qry = "INSERT INTO system.tbl_berechtigung(berechtigung_kurzbz, beschreibung)
|
||||
SELECT 'basis/abgabe_lektor', 'Recht um Abgabetool für Lektoren zu bedienen'";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>system.tbl_berechtigung: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo "<br>system.tbl_berechtigung insert basis/abgabe_lektor hinzugefuegt";
|
||||
}
|
||||
}
|
||||
|
||||
if($result = $db->db_query("SELECT 1 FROM system.tbl_berechtigung WHERE berechtigung_kurzbz = 'basis/abgabe_assistenz'"))
|
||||
{
|
||||
if($db->db_num_rows($result) === 0)
|
||||
{
|
||||
$qry = "INSERT INTO system.tbl_berechtigung(berechtigung_kurzbz, beschreibung)
|
||||
SELECT 'basis/abgabe_assistenz', 'Recht um Abgabetool für Assistenzen zu bedienen'";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>system.tbl_berechtigung: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo "<br>system.tbl_berechtigung insert basis/abgabe_assistenz hinzugefuegt";
|
||||
}
|
||||
}
|
||||
+630
-10
@@ -33799,6 +33799,46 @@ array(
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'anwesenheiten',
|
||||
'category' => 'global',
|
||||
'phrase' => 'c4fileUploadSuccess',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Datei erfolgreich hochgeladen!',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'File upload successful',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'anwesenheiten',
|
||||
'category' => 'global',
|
||||
'phrase' => 'c4fileUploadError',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Fehler beim hochladen der Datei!',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'File upload error!',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'anwesenheiten',
|
||||
'category' => 'global',
|
||||
@@ -39752,6 +39792,46 @@ array(
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4Sprache',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Sprache",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "Language",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4fehlerAktualitaetProjektarbeit ',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Projektarbeit ist nichtmehr aktuell",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "Project work is not current anymore",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
@@ -41511,7 +41591,7 @@ array(
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "details",
|
||||
'text' => "Details",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
@@ -41531,7 +41611,7 @@ array(
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "semester",
|
||||
'text' => "Semester",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
@@ -41551,7 +41631,7 @@ array(
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "degree program",
|
||||
'text' => "Degree program",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
@@ -41571,7 +41651,7 @@ array(
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "contact",
|
||||
'text' => "Contact",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
@@ -41585,7 +41665,7 @@ array(
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Betreuer",
|
||||
'text' => "BetreuerIn",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
@@ -41611,7 +41691,7 @@ array(
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "project type",
|
||||
'text' => "Project type",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
@@ -41631,7 +41711,7 @@ array(
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "title",
|
||||
'text' => "Title",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
@@ -41645,7 +41725,7 @@ array(
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Dokumentabgabe - Studentenbereich",
|
||||
'text' => "Dokumentabgabe - Studierendenbereich",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
@@ -41691,7 +41771,7 @@ array(
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "target date",
|
||||
'text' => "Target date",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
@@ -41751,7 +41831,7 @@ array(
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "submission date",
|
||||
'text' => "Submission date",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
@@ -41797,6 +41877,26 @@ array(
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4benoten',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Benoten",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "Grade",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
@@ -41817,6 +41917,46 @@ array(
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4save',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Speichern",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "Save",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4delete',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Löschen",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "Delete",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
@@ -42197,6 +42337,486 @@ array(
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4note',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Note",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Grade',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4upload_allowed',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Upload erlaubt",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Upload allowed',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4student_perspective',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Studierendenansicht",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Student perspective',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4upload',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Hochladen",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Upload',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4plagiatcheck_link',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "zur Plagiatsprüfung",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Plagiarism check',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4plagiatcheck_link',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "zur Plagiatsprüfung",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Plagiarism check',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4noEnduploadFound',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Kein Endupload vorhanden!",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'No final submission found!',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4notizQualGate',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Beurteilungsnotizen",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Evaluation notes',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4abgabeMitarbeiterDetailTitle',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Projektarbeit Detailansicht Mitarbeiter",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Project work Detailed view Employees',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4abgabeStudentDetailTitle',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Projektarbeit Detailansicht Studierende",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Project work Detailed view Students',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4abgabeStudentNoProjectsFound',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Keine Projektarbeiten gefunden!",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'No projects found!',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4confirm_delete',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Möchten Sie wirklich Löschen?",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Do you really want to delete?',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4newAbgabetermin',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Neuen Abgabetermin erstellen",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Create new Deadline',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4qualgateNegativEmailSubject',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Quality Gate Negativ beurteilt",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Quality Gate graded negative',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4abgabeQualGateNegativAddNewAutomagisch',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Sie haben eine Abgabe vom Typ Quality Gate negativ benotet, bitte legen Sie zeitnah einen Nachfolgetermin an!",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'You have graded a submission of type Quality Gate negative, please schedule a follow-up appointment promptly!',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4betreuerEmailKontakt',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Emailkontakt BetreuerIn",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Emailcontact Assesor',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4projektdetailsOeffnen',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Projektdetails öffnen",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'open Project Details',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4downloadBeurteilung',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Beurteilung herunterladen",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Download Evaluation',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4nobeurteilungVorhanden',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Keine Beurteilung vorhanden",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'No Project evaluation found',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4AcceptAndProceed',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Akzeptieren und Fortfahren",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Accept and proceed',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4Cancel',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Abbrechen",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Cancel',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4downloadAbgabe',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Abgabe herunterladen",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Download Abgabe',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'warningShortAbstract',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Ihr Abstract ist sehr kurz, möchten Sie den Endupload trotzdem durchführen?",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Your abstract is very short. Would you still like to complete the final upload?',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4saveNewAbgabetermin',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Neuen Abgabetermin speichern",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Save new Deadline',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
|
||||
Reference in New Issue
Block a user