mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
explicitely set deadline to end of day to achieve the desired "valid until 23:59" logic, instead of just moving the deadline by one day; endupload deadline is now optional by defining it as a "nachreichen möglich" aka non fixtermin;
This commit is contained in:
@@ -461,6 +461,9 @@ class Abgabe extends FHCAPI_Controller
|
||||
$this->terminateWithError($this->p->t('abgabetool', 'c4projektabgabeNichtGefunden'), 'general');
|
||||
}
|
||||
|
||||
// in that case any submission date is fine
|
||||
if($paabgabe->fixtermin === false) return;
|
||||
|
||||
$tz = new DateTimeZone('Europe/Berlin');
|
||||
$now = new DateTimeImmutable('now', $tz);
|
||||
$deadline = DateTimeImmutable::createFromFormat(
|
||||
@@ -502,6 +505,15 @@ class Abgabe extends FHCAPI_Controller
|
||||
$projektarbeiten = $this->ProjektarbeitModel->getMitarbeiterProjektarbeiten(getAuthUID(), $showAllBool);
|
||||
|
||||
|
||||
$mapFunc = function($projektarbeit) {
|
||||
return $projektarbeit->projektarbeit_id;
|
||||
};
|
||||
$projektarbeiten_ids = array_map($mapFunc, $projektarbeiten->retval);
|
||||
|
||||
$ret = $this->ProjektarbeitModel->getProjektarbeitenAbgabetermine($projektarbeiten_ids);
|
||||
$projektabgaben = $this->getDataOrTerminateWithError($ret, 'general');
|
||||
|
||||
|
||||
forEach($projektarbeiten->retval as $pa) {
|
||||
|
||||
$result = $this->ProjektarbeitModel->getProjektbetreuerAnrede($pa->betreuer_person_id);
|
||||
@@ -518,6 +530,12 @@ class Abgabe extends FHCAPI_Controller
|
||||
Events::trigger('projektbeurteilung_formular_link', $pa->betreuerart_kurzbz, APP_ROOT, $pa->projektarbeit_id, $pa->student_uid, $returnFunc);
|
||||
$pa->beurteilungLinkNew = $newLink;
|
||||
$pa->beurteilungLinkOld = $oldLink;
|
||||
|
||||
$filterFunc = function($projektabgabe) use ($pa) {
|
||||
return $projektabgabe->projektarbeit_id == $pa->projektarbeit_id;
|
||||
};
|
||||
|
||||
$pa->abgabetermine = array_values(array_filter($projektabgaben, $filterFunc));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ export const AbgabetoolStudent = {
|
||||
return qgate1positiv && qgate2positiv
|
||||
},
|
||||
isPastDate(date) {
|
||||
const deadline = luxon.DateTime.fromISO(date, { zone: 'Europe/Berlin' });
|
||||
const deadline = luxon.DateTime.fromISO(date, { zone: 'Europe/Berlin' }).endOf('day');
|
||||
const nowInBerlin = luxon.DateTime.now().setZone('Europe/Berlin');
|
||||
return nowInBerlin > deadline;
|
||||
},
|
||||
@@ -175,8 +175,8 @@ export const AbgabetoolStudent = {
|
||||
// old assumed production logic when qgates are required
|
||||
// termin.allowedToUpload = !this.isPastDate(termin.datum) && this.checkQualityGatesStrict(pa.abgabetermine)
|
||||
|
||||
// new larifari we want qgates but they are optional fhtw mode
|
||||
termin.allowedToUpload = !this.isPastDate(termin.datum) && this.checkQualityGatesOptional(pa.abgabetermine)
|
||||
const inTime = termin.fixtermin ? !this.isPastDate(termin.datum) : true
|
||||
termin.allowedToUpload = inTime && this.checkQualityGatesOptional(pa.abgabetermine)
|
||||
|
||||
|
||||
// development purposes
|
||||
|
||||
Reference in New Issue
Block a user