mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-04 12:29:28 +00:00
WIP cis4 abgabetool student
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class Abgabetool extends Auth_Controller
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'index' => ['basis/cis:r']
|
||||
]);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
|
||||
$viewData = array(
|
||||
'uid'=>getAuthUID(),
|
||||
);
|
||||
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData, 'route' => 'Abgabetool']);
|
||||
}
|
||||
}
|
||||
@@ -31,10 +31,9 @@ class Lehre extends FHCAPI_Controller
|
||||
'lvStudentenMail' => self::PERM_LOGGED,
|
||||
'LV' => self::PERM_LOGGED,
|
||||
'Pruefungen' => self::PERM_LOGGED,
|
||||
'getStudentProjektarbeiten' => self::PERM_LOGGED, // TODO: abgabetool berechtigung?
|
||||
'getStudentProjektabgaben' => self::PERM_LOGGED
|
||||
]);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
@@ -94,10 +93,36 @@ class Lehre extends FHCAPI_Controller
|
||||
|
||||
$this->terminateWithSuccess($result);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function getStudentProjektabgaben() {
|
||||
$projektarbeit_id = $this->input->get("projektarbeit_id",TRUE);
|
||||
|
||||
$this->load->model('education/Abgabe_model', 'AbgabeModel');
|
||||
$ret = $this->AbgabeModel->getProjektarbeitAbgabetermine($projektarbeit_id);
|
||||
|
||||
|
||||
$this->terminateWithSuccess($ret);
|
||||
}
|
||||
|
||||
public function getStudentProjektarbeiten($uid)
|
||||
{
|
||||
$this->load->model('education/Abgabe_model', 'AbgabeModel');
|
||||
$this->load->model('ressource/Mitarbeiter_model', 'MitarbeiterModel');
|
||||
|
||||
$isZugeteilterBetreuer = count($this->AbgabeModel->checkZuordnung($uid, getAuthUID())->retval) > 0;
|
||||
$ret = $this->AbgabeModel->getStudentProjektarbeitenLegacy($uid);
|
||||
$this->addMeta('legacyQueryRetval', $ret);
|
||||
$this->addMeta('isZugeteilterBetreuer', $isZugeteilterBetreuer);
|
||||
|
||||
if ($this->MitarbeiterModel->isMitarbeiter(getAuthUID()) && ($isZugeteilterBetreuer)){
|
||||
$projektarbeiten = $this->AbgabeModel->getStudentProjektarbeitenWithBetreuer($uid);
|
||||
} else {
|
||||
$projektarbeiten = $this->AbgabeModel->getStudentProjektarbeitenWithBetreuer(getAuthUID());
|
||||
}
|
||||
|
||||
|
||||
$this->terminateWithSuccess(array($projektarbeiten, DOMAIN));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -11,4 +11,144 @@ class Abgabe_model extends DB_Model
|
||||
$this->dbTable = 'campus.tbl_abgabe';
|
||||
$this->pk = 'abgabe_id';
|
||||
}
|
||||
|
||||
public function checkZuordnung($studentUID, $maUID) {
|
||||
//oder Lektor mit Betreuung dieses Studenten
|
||||
$qry = "
|
||||
SELECT 1
|
||||
FROM
|
||||
lehre.tbl_projektarbeit
|
||||
JOIN lehre.tbl_projektbetreuer USING(projektarbeit_id)
|
||||
JOIN campus.vw_benutzer on(vw_benutzer.person_id=tbl_projektbetreuer.person_id)
|
||||
WHERE
|
||||
tbl_projektarbeit.student_uid = ? AND
|
||||
vw_benutzer.uid = ?";
|
||||
|
||||
return $this->execReadOnlyQuery($qry, array($studentUID, $maUID));
|
||||
}
|
||||
|
||||
public function getProjektarbeitAbgabetermine($projektarbeit_id) {
|
||||
$qry ="SELECT campus.tbl_paabgabe.paabgabe_id,
|
||||
campus.tbl_paabgabe.projektarbeit_id,
|
||||
campus.tbl_paabgabe.fixtermin,
|
||||
campus.tbl_paabgabe.kurzbz,
|
||||
campus.tbl_paabgabe.datum,
|
||||
campus.tbl_paabgabetyp.bezeichnung,
|
||||
campus.tbl_paabgabe.abgabedatum
|
||||
FROM campus.tbl_paabgabe JOIN campus.tbl_paabgabetyp USING(paabgabetyp_kurzbz)
|
||||
WHERE campus.tbl_paabgabe.projektarbeit_id = ?
|
||||
ORDER BY campus.tbl_paabgabe.datum";
|
||||
|
||||
return $this->execReadOnlyQuery($qry, array($projektarbeit_id));
|
||||
}
|
||||
|
||||
public function getStudentProjektarbeitenWithBetreuer($studentUID) {
|
||||
$betreuerQuery = "
|
||||
SELECT
|
||||
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
|
||||
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
|
||||
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)
|
||||
WHERE projektarbeit_id=tbl_projektarbeit.projektarbeit_id
|
||||
AND betreuerart_kurzbz IN ('Zweitbetreuer', 'Zweitbegutachter', 'Senatsmitglied') LIMIT 1) AS zweitbetreuer_betreuerart_beschreibung,
|
||||
|
||||
tbl_betreuerart.betreuerart_kurzbz,
|
||||
person_id as bperson_id,
|
||||
projektarbeit_id,
|
||||
lehre.tbl_projekttyp.bezeichnung as projekttypbezeichnung,
|
||||
lehre.tbl_lehreinheit.studiensemester_kurzbz,
|
||||
lehre.tbl_lehrveranstaltung.studiengang_kz,
|
||||
public.tbl_studiengang.kurzbzlang,
|
||||
lehre.tbl_projektbetreuer.note as note,
|
||||
public.tbl_mitarbeiter.mitarbeiter_uid,
|
||||
lehre.tbl_projektarbeit.titel as titel,
|
||||
(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
|
||||
|
||||
FROM lehre.tbl_projektarbeit
|
||||
LEFT JOIN lehre.tbl_projektbetreuer USING(projektarbeit_id)
|
||||
LEFT JOIN public.tbl_person USING(person_id)
|
||||
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
|
||||
(projekttyp_kurzbz='Bachelor' OR projekttyp_kurzbz='Diplom')
|
||||
AND betreuerart_kurzbz IN ('Betreuer', 'Begutachter', 'Erstbegutachter', 'Senatsvorsitz')";
|
||||
|
||||
// TODO: fetch senatsmitglieder
|
||||
return $this->execReadOnlyQuery($betreuerQuery, array($studentUID));
|
||||
}
|
||||
|
||||
public function getStudentProjektarbeitenLegacy($studentUID)
|
||||
{
|
||||
$qry = "SELECT (SELECT nachname FROM public.tbl_person WHERE person_id=tbl_projektbetreuer.person_id) AS bnachname,
|
||||
(SELECT vorname FROM public.tbl_person WHERE person_id=tbl_projektbetreuer.person_id) AS bvorname,
|
||||
(SELECT titelpre FROM public.tbl_person WHERE person_id=tbl_projektbetreuer.person_id) AS btitelpre,
|
||||
(SELECT titelpost FROM public.tbl_person WHERE person_id=tbl_projektbetreuer.person_id) AS btitelpost,
|
||||
tbl_betreuerart.beschreibung AS betreuerart_beschreibung,
|
||||
(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
|
||||
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)
|
||||
WHERE projektarbeit_id=tbl_projektarbeit.projektarbeit_id
|
||||
AND betreuerart_kurzbz IN ('Zweitbetreuer', 'Zweitbegutachter', 'Senatsmitglied') LIMIT 1) AS zweitbetreuer_betreuerart_beschreibung,
|
||||
tbl_projektbetreuer.person_id AS betreuer_person_id,
|
||||
tbl_projekttyp.bezeichnung AS prjbez,
|
||||
lehre.tbl_projektbetreuer.note as note,
|
||||
public.tbl_benutzer.aktiv as aktiv,
|
||||
(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,
|
||||
*
|
||||
FROM lehre.tbl_projektarbeit
|
||||
LEFT JOIN lehre.tbl_projektbetreuer USING(projektarbeit_id)
|
||||
LEFT JOIN public.tbl_benutzer ON(uid=student_uid)
|
||||
LEFT JOIN public.tbl_person ON(tbl_benutzer.person_id=tbl_person.person_id)
|
||||
LEFT JOIN lehre.tbl_lehreinheit USING(lehreinheit_id)
|
||||
LEFT JOIN lehre.tbl_lehrveranstaltung USING(lehrveranstaltung_id)
|
||||
LEFT JOIN public.tbl_studiengang USING(studiengang_kz)
|
||||
LEFT JOIN lehre.tbl_projekttyp USING (projekttyp_kurzbz)
|
||||
LEFT JOIN lehre.tbl_betreuerart USING(betreuerart_kurzbz)
|
||||
WHERE (projekttyp_kurzbz='Bachelor' OR projekttyp_kurzbz='Diplom')
|
||||
AND betreuerart_kurzbz IN ('Betreuer', 'Begutachter', 'Erstbegutachter', 'Senatsvorsitz')
|
||||
AND tbl_projektarbeit.student_uid= ?
|
||||
ORDER BY studiensemester_kurzbz desc, tbl_lehrveranstaltung.kurzbz";
|
||||
|
||||
return $this->execQuery($qry, array($studentUID));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+16
-1
@@ -131,8 +131,23 @@
|
||||
transition: all 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
fhcSkipLink:hover {
|
||||
.fhcSkipLink:hover {
|
||||
background-color: #ffcc00;
|
||||
color: #002b80;
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
.fhc-bullet::before {
|
||||
content: "• ";
|
||||
font-weight: bold;
|
||||
display: inline-block;
|
||||
transform: scale(2);
|
||||
}
|
||||
|
||||
.fhc-bullet-red::before {
|
||||
color: #ff001e;
|
||||
}
|
||||
|
||||
.fhc-bullet-green::before {
|
||||
color: #00ff26;
|
||||
}
|
||||
@@ -18,5 +18,19 @@ 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
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@ import CmsNews from "../../components/Cis/Cms/News.js";
|
||||
import CmsContent from "../../components/Cis/Cms/Content.js";
|
||||
import Info from "../../components/Cis/Mylv/Semester/Studiengang/Lv/Info.js";
|
||||
import RoomInformation, { DEFAULT_MODE_RAUMINFO } from "../../components/Cis/Mylv/RoomInformation.js";
|
||||
import Abgabetool from "../../components/Cis/Abgabetool/Abgabetool";
|
||||
|
||||
const ciPath = FHC_JS_DATA_STORAGE_OBJECT.app_root.replace(/(https:|)(^|\/\/)(.*?\/)/g, '') + FHC_JS_DATA_STORAGE_OBJECT.ci_router;
|
||||
|
||||
@@ -29,6 +30,12 @@ const router = VueRouter.createRouter({
|
||||
component: Profil,
|
||||
props: true
|
||||
},
|
||||
// {
|
||||
// path: `/Cis/Abgabetool`,
|
||||
// name: 'Abgabetool',
|
||||
// component: Abgabetool,
|
||||
// props: true
|
||||
// },
|
||||
{
|
||||
path: `/Cis/Raumsuche`,
|
||||
name: 'Raumsuche',
|
||||
@@ -204,6 +211,8 @@ const router = VueRouter.createRouter({
|
||||
]
|
||||
})
|
||||
|
||||
|
||||
|
||||
const app = Vue.createApp({
|
||||
name: 'FhcApp',
|
||||
data: () => ({
|
||||
|
||||
@@ -0,0 +1,197 @@
|
||||
import Upload from '../../../components/Form/Upload/Dms.js';
|
||||
import BsModal from '../../Bootstrap/Modal.js';
|
||||
|
||||
const today = new Date()
|
||||
export const AbgabeDetail = {
|
||||
name: "AbgabeDetail",
|
||||
components: {
|
||||
Upload,
|
||||
BsModal
|
||||
},
|
||||
props: {
|
||||
projektarbeit: {
|
||||
type: Object,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
file: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
triggerUpload() {
|
||||
// todo: trigger the loadup
|
||||
|
||||
this.$refs.modalContainerEnduploadZusatzdaten.hide()
|
||||
},
|
||||
upload(termin) {
|
||||
console.log(termin)
|
||||
// TODO load it up
|
||||
|
||||
if(termin.bezeichnung === 'Endupload') {
|
||||
// open endupload form modal and await that it will be sent & checked
|
||||
|
||||
this.$refs.modalContainerEnduploadZusatzdaten.show()
|
||||
}
|
||||
},
|
||||
dateDiffInDays(datum, today){
|
||||
const oneDayMs = 1000 * 60 * 60 * 24
|
||||
return Math.round((new Date(datum) - new Date(today)) / oneDayMs)
|
||||
},
|
||||
getDateStyle(termin) {
|
||||
const datum = new Date(termin.datum)
|
||||
const abgabedatum = new Date(termin.abgabedatum)
|
||||
|
||||
// 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'
|
||||
} else if (datum > today && this.dateDiffInDays(datum, today) <= 12) {
|
||||
color = 'yellow'
|
||||
}
|
||||
} else if(abgabedatum > datum) {
|
||||
color = 'pink' // aka "hellrot"
|
||||
fontColor = 'white'
|
||||
} else {
|
||||
color = 'green'
|
||||
}
|
||||
|
||||
return 'font-color: ' + fontColor + '; background-color: ' + color
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'file'(newVal) {
|
||||
if(newVal == [] || newVal === null || newVal === undefined) return
|
||||
|
||||
// check filetype on input change
|
||||
const file = newVal[0]
|
||||
if(!file) return
|
||||
|
||||
if(file.type && file.type.includes('pdf')) {
|
||||
// all fine
|
||||
} else {
|
||||
// clear and alert for filetypes
|
||||
this.$fhcAlert.alertInfo(this.$p.t('abgabetool/c4allowedFileTypes'))
|
||||
this.entschuldigung.files = []
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
template: `
|
||||
<div v-if="projektarbeit">
|
||||
|
||||
<h5>{{$p.t('abgabetool/c4abgabeStudentenbereich')}}</h5>
|
||||
<div class="row">
|
||||
<p> {{projektarbeit?.betreuer}}</p>
|
||||
<p> {{projektarbeit?.titel}}</p>
|
||||
</div>
|
||||
<div id="uploadWrapper">
|
||||
<div class="row" style="margin-bottom: 12px;">
|
||||
<div class="col">{{$p.t('abgabetool/c4fixtermin')}}</div>
|
||||
<div class="col">{{$p.t('abgabetool/c4zieldatum')}}</div>
|
||||
<div class="col">{{$p.t('abgabetool/c4abgabetyp')}}</div>
|
||||
<div class="col">{{$p.t('abgabetool/c4abgabekurzbz')}}</div>
|
||||
<div class="col">{{$p.t('abgabetool/c4abgabedatum')}}</div>
|
||||
<div class="col">
|
||||
{{$p.t('abgabetool/c4fileupload')}}
|
||||
</div>
|
||||
<div class="col">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" v-for="termin in projektarbeit.abgabetermine">
|
||||
<div class="col 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" :style="getDateStyle(termin)">{{ termin.datum?.split("-").reverse().join(".") }}</div>
|
||||
<div class="col">{{ termin.bezeichnung }}</div>
|
||||
<div class="col">{{ termin.kurzbz }}</div>
|
||||
<div class="col">{{ termin.abgabedatum?.split("-").reverse().join(".") }}</div>
|
||||
<div class="col">
|
||||
<!-- <Upload accept=".pdf" v-model="file"></Upload>-->
|
||||
</div>
|
||||
<div class="col">
|
||||
<button class="btn btn-primary border-0" @click="upload(termin)">
|
||||
Upload
|
||||
<i style="margin-left: 8px" class="fa-solid fa-upload"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<bs-modal ref="modalContainerEnduploadZusatzdaten" class="bootstrap-prompt" dialogClass="modal-lg">
|
||||
<template v-slot:title>
|
||||
<div>
|
||||
{{$p.t('abgabetool/c4enduploadZusatzdaten')}}
|
||||
|
||||
</div>
|
||||
<div class="row mb-3 align-items-center">
|
||||
|
||||
student uid
|
||||
|
||||
</div>
|
||||
<div class="row mb-3 align-items-center">
|
||||
|
||||
{{ projektarbeit?.titel }}
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:default>
|
||||
<div class="row mb-3 align-items-center">
|
||||
|
||||
Sprache der Arbeit
|
||||
|
||||
</div>
|
||||
<div class="row mb-3 align-items-center">
|
||||
|
||||
Kontrollierte Schlagwörter
|
||||
|
||||
</div>
|
||||
<div class="row mb-3 align-items-center">
|
||||
|
||||
Dt. Schlagwörter
|
||||
|
||||
</div>
|
||||
<div class="row mb-3 align-items-center">
|
||||
|
||||
Engl. Schlagwörter
|
||||
|
||||
</div>
|
||||
<div class="row mb-3 align-items-center">
|
||||
|
||||
Abstract max 5k characters
|
||||
|
||||
</div>
|
||||
<div class="row mb-3 align-items-center">
|
||||
|
||||
Abstract eng max 5k chars
|
||||
|
||||
</div>
|
||||
<div class="row mb-3 align-items-center">
|
||||
|
||||
Seitenanzahl
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:footer>
|
||||
<button class="btn btn-primary" @click="triggerUpload">{{$p.t('ui/hochladen')}}</button>
|
||||
</template>
|
||||
</bs-modal>
|
||||
|
||||
`,
|
||||
};
|
||||
|
||||
export default AbgabeDetail;
|
||||
@@ -0,0 +1,205 @@
|
||||
import {CoreFilterCmpt} from "../../../components/filter/Filter.js";
|
||||
import AbgabeDetail from "./AbgabeDetail";
|
||||
|
||||
export const Abgabetool = {
|
||||
name: "Abgabetool",
|
||||
components: {
|
||||
VueDatePicker,
|
||||
CoreFilterCmpt,
|
||||
AbgabeDetail
|
||||
},
|
||||
props: {
|
||||
viewData: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({name: '', uid: ''}),
|
||||
validator(value) {
|
||||
return value && value.name && value.uid
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
domain: '',
|
||||
detail: null,
|
||||
selectedProjektarbeit: null,
|
||||
tableBuiltResolve: null,
|
||||
tableBuiltPromise: null,
|
||||
abgabeTableOptions: {
|
||||
height: 200, // TODO: determine smallest necessary height
|
||||
index: 'projektarbeit_id',
|
||||
layout: 'fitColumns',
|
||||
placeholder: this.$p.t('global/noDataAvailable'),
|
||||
columns: [
|
||||
{title: Vue.computed(() => this.$p.t('abgabetool/c4details')), formatter: this.detailFormatter, field: 'details', 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') {
|
||||
//demo.dev.technikum-wien.at/cis/private/lehre/projektbeurteilungDocumentExport.php?betreuerart_kurzbz=Begutachter&projektarbeit_id=39239&person_id=22117
|
||||
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')
|
||||
}
|
||||
|
||||
}
|
||||
console.log(cell.getData())
|
||||
e.stopPropagation()
|
||||
|
||||
}
|
||||
}
|
||||
]};
|
||||
},
|
||||
methods: {
|
||||
setDetailComponent(details){
|
||||
this.loadAbgaben(details).then((res)=> {
|
||||
console.log(res)
|
||||
const pa = this.data[0]?.retval?.find(projekarbeit => projekarbeit.projektarbeit_id == details.projektarbeit_id)
|
||||
pa.abgabetermine = res.data.retval
|
||||
pa.betreuer = this.buildBetreuer(pa)
|
||||
|
||||
this.selectedProjektarbeit = pa
|
||||
})
|
||||
|
||||
},
|
||||
centeredTextFormatter(cell) {
|
||||
const val = cell.getValue()
|
||||
|
||||
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%">' +
|
||||
'<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%">' +
|
||||
'<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%">' +
|
||||
'<a href='+val+'><i class="fa fa-envelope" style="color:#00649C"></i></a></div>'
|
||||
},
|
||||
tableResolve(resolve) {
|
||||
this.tableBuiltResolve = resolve
|
||||
},
|
||||
buildMailToLink(abgabe) {
|
||||
return 'mailto:' + abgabe.mitarbeiter_uid +'@'+ this.domain
|
||||
},
|
||||
buildBetreuer(abgabe) {
|
||||
return abgabe.betreuerart_beschreibung + ': ' + (abgabe.btitelpre ? abgabe.btitelpre + ' ' : '') + abgabe.bvorname + ' ' + abgabe.bnachname + (abgabe.btitelpost ?? '')
|
||||
},
|
||||
setupData(data){
|
||||
|
||||
this.data = data // TODO: better define what is needed from this for detail component
|
||||
this.domain = data[1] // TODO do this in backend but this is a prototype anyway
|
||||
const d = data[0]?.retval?.map(projekt => {
|
||||
console.log('projekt', projekt)
|
||||
let mode = 'detailTermine'
|
||||
|
||||
if (projekt.babgeschickt || projekt.zweitbetreuer_abgeschickt) {
|
||||
mode = 'beurteilungDownload' // build dl link for both betreuer documents
|
||||
}
|
||||
|
||||
return {
|
||||
details: {
|
||||
student_uid: this.viewData?.uid,
|
||||
projektarbeit_id: projekt.projektarbeit_id,
|
||||
betreuer_person_id: projekt.bperson_id,
|
||||
betreuerart_kurzbz: projekt.betreuerart_kurzbz,
|
||||
mode
|
||||
},
|
||||
sem: projekt.studiensemester_kurzbz,
|
||||
stg: projekt.kurzbzlang,
|
||||
mail: this.buildMailToLink(projekt),
|
||||
betreuer: this.buildBetreuer(projekt),
|
||||
typ: projekt.projekttypbezeichnung,
|
||||
titel: projekt.titel
|
||||
}
|
||||
})
|
||||
|
||||
this.$refs.abgabeTable.tabulator.setColumns(this.abgabeTableOptions.columns)
|
||||
this.$refs.abgabeTable.tabulator.setData(d);
|
||||
},
|
||||
loadProjektarbeiten() {
|
||||
this.$fhcApi.factory.lehre.getStudentProjektarbeiten(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)
|
||||
.then(res => {
|
||||
resolve(res)
|
||||
})
|
||||
})
|
||||
},
|
||||
handleUuidDefined(uuid) {
|
||||
this.tabulatorUuid = uuid
|
||||
},
|
||||
async setupMounted() {
|
||||
this.tableBuiltPromise = new Promise(this.tableResolve)
|
||||
await this.tableBuiltPromise
|
||||
|
||||
this.loadProjektarbeiten()
|
||||
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.setupMounted()
|
||||
},
|
||||
template: `
|
||||
<h2>{{$p.t('abgabetool/abgabetoolTitle')}}</h2>
|
||||
<hr>
|
||||
|
||||
<core-filter-cmpt
|
||||
:title="''"
|
||||
ref="abgabeTable"
|
||||
:tabulator-options="abgabeTableOptions"
|
||||
:tabulator-events="abgabeTableEventHandlers"
|
||||
tableOnly
|
||||
:sideMenu="false"
|
||||
/>
|
||||
|
||||
<hr>
|
||||
<div v-show="selectedProjektarbeit">
|
||||
<AbgabeDetail :projektarbeit="selectedProjektarbeit"></AbgabeDetail>
|
||||
</div>
|
||||
`,
|
||||
};
|
||||
|
||||
export default Abgabetool;
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
import {CoreFilterCmpt} from "../../../components/filter/Filter.js";
|
||||
|
||||
export default {
|
||||
export const Raumsuche = {
|
||||
name: "Raumsuche",
|
||||
props: {
|
||||
|
||||
@@ -34,7 +34,7 @@ export default {
|
||||
}),
|
||||
raumsucheTableOptions: {
|
||||
height: Vue.ref(400),
|
||||
index: 'prestudent_id',
|
||||
index: 'ort_kurzbz',
|
||||
layout: 'fitColumns',
|
||||
placeholder: this.$p.t('global/noDataAvailable'),
|
||||
columns: [
|
||||
@@ -243,3 +243,5 @@ export default {
|
||||
/>
|
||||
`,
|
||||
};
|
||||
|
||||
export default Raumsuche;
|
||||
|
||||
@@ -3,6 +3,7 @@ import DashboardWidgetPicker from "./Widget/Picker.js";
|
||||
import ObjectUtils from "../../helpers/ObjectUtils.js";
|
||||
|
||||
export default {
|
||||
name: 'Dashboard',
|
||||
components: {
|
||||
DashboardSection,
|
||||
DashboardWidgetPicker
|
||||
|
||||
@@ -37697,6 +37697,346 @@ array(
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'abgabetoolTitle',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Bachelor-/Masterarbeiten",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "Bachelor's/Master's theses",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4details',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Details",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "details",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4sem',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Semester",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "semester",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4stg',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Studiengang",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "degree program",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4kontakt',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Kontakt",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "contact",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4betreuer',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Betreuer",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "Assessor",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4projekttyp',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Projekttyp",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "project type",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4titel',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Titel",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "title",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4abgabeStudentenbereich',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Dokumentabgabe - Studentenbereich",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "File submission - Student area",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4fixtermin',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Fixtermin",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "Fixed submission deadline",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4zieldatum',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Zieldatum",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "target date",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4abgabetyp',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Abgabetyp",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "Type of document submitted",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4abgabekurzbz',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Kurzbeschreibung der Abgabe",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "Short description of the submitted file",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4abgabedatum',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Abgabedatum",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "submission date",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4fileupload',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Fileupload PDF max. 30 MB",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "Fileupload PDF max. 30 MB",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4allowedFileTypes',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Upload-File ist kein PDF!",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "Upload-File is not a PDF!",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4enduploadZusatzdaten',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Upload-File ist kein PDF!",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "Upload-File is not a PDF!",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
// ### STUDIENGANG_INFORMATIONEN PHRASEN START
|
||||
array(
|
||||
'app' => 'core',
|
||||
|
||||
Reference in New Issue
Block a user