diff --git a/application/config/abgabe.php b/application/config/abgabe.php
index 282421ac0..8b14deffc 100644
--- a/application/config/abgabe.php
+++ b/application/config/abgabe.php
@@ -16,6 +16,12 @@ $config['URL_MITARBEITER'] = 'index.ci.php/Cis/Abgabetool/Mitarbeiter';
// lehre.tbl_paabgabetyp bezeichnung
//$config['ALLOWED_ABGABETYPEN_BETREUER'] = ['Zwischenabgabe', 'Quality Gate 1', 'Quality Gate 2'];
$config['ALLOWED_ABGABETYPEN_BETREUER'] = ['zwischen', 'qualgate1', 'qualgate2']; // tbl_paabgabetyp pk
+// paabgabetypen for which betreuer is benachrichtigt via sammelmail
+$config['RELEVANT_PAABGABETYPEN_SAMMELMAIL_BETREUER'] = ['qualgate1', 'qualgate2', 'end'];
+// paabgabetypen for which assistenz is benachrichtigt via sammelmail
+$config['RELEVANT_PAABGABETYPEN_SAMMELMAIL_ASSISTENZ'] = ['end'];
+// paabgabetypen for which student is benachrichtigt via sammelmail -> basically all of them but still defined for consistency
+$config['RELEVANT_PAABGABETYPEN_SAMMELMAIL_STUDENT'] = ['qualgate1', 'qualgate2', 'zwischen', 'note', 'abstract', 'end', 'enda'];
//$config['ALLOWED_NOTEN_ABGABETOOL'] = ['Bestanden', 'Nicht bestanden'];
$config['ALLOWED_NOTEN_ABGABETOOL'] = [10, 14]; // tbl_note pk
diff --git a/application/controllers/jobs/AbgabetoolJob.php b/application/controllers/jobs/AbgabetoolJob.php
index 99958720a..5c1bd687a 100644
--- a/application/controllers/jobs/AbgabetoolJob.php
+++ b/application/controllers/jobs/AbgabetoolJob.php
@@ -34,8 +34,10 @@ class AbgabetoolJob extends JOB_Controller
$this->_ci->logInfo('Start job FHC-Core->notifyAssistenzAboutChangedAbgaben');
$interval = $this->_ci->config->item('PAABGABE_EMAIL_JOB_INTERVAL');
+ $relevantTypes = $this->_ci->config->item('RELEVANT_PAABGABETYPEN_SAMMELMAIL_ASSISTENZ');
// get all new or changed termine in interval
- $result = $this->_ci->PaabgabeModel->findAbgabenNewOrUpdatedSince($interval);
+ $result = $this->_ci->PaabgabeModel->findAbgabenNewOrUpdatedSince($interval, $relevantTypes);
+
$retval = getData($result);
if(count($retval) == 0) {
@@ -162,7 +164,6 @@ class AbgabetoolJob extends JOB_Controller
| Zieldatum |
Bezeichnung |
- Abgabe bis |
';
@@ -178,7 +179,6 @@ class AbgabetoolJob extends JOB_Controller
{$abgabe->bezeichnung}{$kurzbzLine}
|
- {$abgabedatumFormatted} |
";
}
@@ -207,7 +207,7 @@ class AbgabetoolJob extends JOB_Controller
);
$email = $assistenzRow->uid."@".DOMAIN;
-
+
// send email with bundled info
sendSanchoMail(
'PAAChangesAssSM',
@@ -228,8 +228,11 @@ class AbgabetoolJob extends JOB_Controller
$this->_ci->logInfo('Start job FHC-Core->notifyBetreuerAboutChangedAbgaben');
$interval = $this->_ci->config->item('PAABGABE_EMAIL_JOB_INTERVAL');
+
+ $relevantTypes = $this->_ci->config->item('RELEVANT_PAABGABETYPEN_SAMMELMAIL_BETREUER');
+
// get all new or changed termine in interval
- $result = $this->_ci->PaabgabeModel->findAbgabenNewOrUpdatedSince($interval);
+ $result = $this->_ci->PaabgabeModel->findAbgabenNewOrUpdatedSince($interval, $relevantTypes);
$retval = getData($result);
if(count($retval) == 0) {
@@ -335,7 +338,6 @@ class AbgabetoolJob extends JOB_Controller
| Zieldatum |
Bezeichnung |
- Abgabe bis |
';
@@ -351,7 +353,6 @@ class AbgabetoolJob extends JOB_Controller
{$abgabe->bezeichnung}{$kurzbzLine}
|
- {$abgabedatumFormatted} |
";
}
@@ -399,6 +400,8 @@ class AbgabetoolJob extends JOB_Controller
$this->_ci->logInfo('Start job FHC-Core->notifyBetreuerMail');
+ // dont filter for relevant types since this mail should gather all UPLOAD info
+
$interval = $this->_ci->config->item('PAABGABE_EMAIL_JOB_INTERVAL');
$result = $this->_ci->PaabgabeModel->findAbgabenNewOrUpdatedSinceByAbgabedatum($interval);
@@ -446,7 +449,7 @@ class AbgabetoolJob extends JOB_Controller
Zieldatum |
Studierende/r |
Bezeichnung |
- Abgabe bis |
+ Abgabedatum |
';
@@ -518,9 +521,11 @@ class AbgabetoolJob extends JOB_Controller
$this->_ci->logInfo('Start job FHC-Core->notifyStudentMail');
- $interval = '10 days';//$this->_ci->config->item('PAABGABE_EMAIL_JOB_INTERVAL');
+ $interval = '20 days';$this->_ci->config->item('PAABGABE_EMAIL_JOB_INTERVAL');
- $result = $this->_ci->PaabgabeModel->findAbgabenNewOrUpdatedSince($interval);
+ $relevantTypes = $this->_ci->config->item('RELEVANT_PAABGABETYPEN_SAMMELMAIL_STUDENT');
+
+ $result = $this->_ci->PaabgabeModel->findAbgabenNewOrUpdatedSince($interval, $relevantTypes);
$retval = getData($result);
if(count($retval) == 0) {
@@ -561,7 +566,7 @@ class AbgabetoolJob extends JOB_Controller
- | Datum |
+ Zieldatum |
Bezeichnung / Hinweis |
diff --git a/application/models/education/Paabgabe_model.php b/application/models/education/Paabgabe_model.php
index a50c3ea95..aa61bbaae 100644
--- a/application/models/education/Paabgabe_model.php
+++ b/application/models/education/Paabgabe_model.php
@@ -61,7 +61,7 @@ class Paabgabe_model extends DB_Model
return $this->execReadOnlyQuery($qry, array($person_id));
}
- public function findAbgabenNewOrUpdatedSince($interval)
+ public function findAbgabenNewOrUpdatedSince($interval, $relevantTypes)
{
$query = "SELECT projektarbeit_id, paabgabe_id, paabgabetyp_kurzbz, fixtermin, datum, campus.tbl_paabgabe.kurzbz, campus.tbl_paabgabetyp.bezeichnung, campus.tbl_paabgabe.abgabedatum,
@@ -79,10 +79,11 @@ class Paabgabe_model extends DB_Model
JOIN public.tbl_benutzer ON (public.tbl_benutzer.uid = student_uid)
JOIN public.tbl_person USING (person_id)
- WHERE campus.tbl_paabgabe.insertamum >= NOW() - INTERVAL ?
- OR campus.tbl_paabgabe.updateamum >= NOW() - INTERVAL ?";
+ WHERE (campus.tbl_paabgabe.insertamum >= NOW() - INTERVAL ?
+ OR campus.tbl_paabgabe.updateamum >= NOW() - INTERVAL ?)
+ AND campus.tbl_paabgabe.paabgabetyp_kurzbz IN ?";
- return $this->execQuery($query, [$interval, $interval]);
+ return $this->execQuery($query, [$interval, $interval, $relevantTypes]);
}
public function findAbgabenNewOrUpdatedSinceByAbgabedatum($interval) {
diff --git a/public/js/components/Cis/Abgabetool/AbgabetoolAssistenz.js b/public/js/components/Cis/Abgabetool/AbgabetoolAssistenz.js
index 5d8c3846a..4c3714372 100644
--- a/public/js/components/Cis/Abgabetool/AbgabetoolAssistenz.js
+++ b/public/js/components/Cis/Abgabetool/AbgabetoolAssistenz.js
@@ -685,7 +685,8 @@ export const AbgabetoolAssistenz = {
const pa = this.projektarbeiten.find(projektarbeit => projektarbeit.projektarbeit_id == details.projektarbeit_id)
// pa.isCurrent = res.data[1]
-
+ const paIsBenotet = pa.note !== null
+
pa.abgabetermine.forEach(termin => {
if(typeof termin.note !== 'object') {
termin.note = this.allowedNotenOptions.find(opt => opt.note == termin.note)
@@ -694,10 +695,11 @@ export const AbgabetoolAssistenz = {
termin.file = []
// assistenz should be able to edit every abgabe
- termin.allowedToSave = true
+ // update 21-01-2026: actually blocking operations on finished projektarbeiten seems like a decent idea
+ termin.allowedToSave = paIsBenotet ? false : true
// assistenz are not allowed to delete deadlines with existing submissions
- termin.allowedToDelete = !termin.abgabedatum
+ termin.allowedToDelete = paIsBenotet ? false : !termin.abgabedatum
termin.bezeichnung = this.abgabeTypeOptions.find(opt => opt.paabgabetyp_kurzbz === termin.paabgabetyp_kurzbz)
diff --git a/public/js/components/Cis/Abgabetool/AbgabetoolMitarbeiter.js b/public/js/components/Cis/Abgabetool/AbgabetoolMitarbeiter.js
index adb165a0a..df521d52d 100644
--- a/public/js/components/Cis/Abgabetool/AbgabetoolMitarbeiter.js
+++ b/public/js/components/Cis/Abgabetool/AbgabetoolMitarbeiter.js
@@ -300,13 +300,18 @@ 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]
-
+
+ const paIsBenotet = pa.note !== null
+
pa.abgabetermine.forEach(termin => {
termin.note = this.allowedNotenOptions.find(opt => opt.note == termin.note)
termin.file = []
- // update 08-01-20206: everybody is allowed to do everything in client, critical checks happen at backend level
- termin.allowedToSave = true
+ // update 08-01-2026: everybody is allowed to do everything in client, critical checks happen at backend level
+ // termin.allowedToSave = true
+
+ // update 21-01-2026: actually blocking operations on finished projektarbeiten seems like a decent idea
+ termin.allowedToSave = paIsBenotet ? false : true
// lektoren are not allowed to delete deadlines with existing submissions
termin.allowedToDelete = termin.allowedToSave && !termin.abgabedatum
diff --git a/public/js/components/Cis/Abgabetool/AbgabetoolStudent.js b/public/js/components/Cis/Abgabetool/AbgabetoolStudent.js
index 493c78918..85afdfcaa 100644
--- a/public/js/components/Cis/Abgabetool/AbgabetoolStudent.js
+++ b/public/js/components/Cis/Abgabetool/AbgabetoolStudent.js
@@ -149,6 +149,9 @@ export const AbgabetoolStudent = {
this.loadAbgaben(details).then((res)=> {
const pa = this.projektarbeiten?.find(projekarbeit => projekarbeit.projektarbeit_id == details.projektarbeit_id)
pa.abgabetermine = res.data[0].retval
+
+ const paIsBenotet = pa.note !== null
+
pa.abgabetermine.forEach(termin => {
termin.file = []
termin.allowedToUpload = false
@@ -172,6 +175,10 @@ export const AbgabetoolStudent = {
termin.allowedToUpload = termin.upload_allowed
}
+ // blocks client upload button if projektarbeitet is already beurteilt und thus further abgaben on any termin should be blocked
+ if(paIsBenotet) termin.allowedToUpload = false
+
+
termin.bezeichnung = this.abgabeTypeOptions.find(opt => opt.paabgabetyp_kurzbz === termin.paabgabetyp_kurzbz)
termin.dateStyle = this.getDateStyleClass(termin)
})