load all studiensemester for assistenz; load paabgabetyp benotbar for all paabgaben; datediff calc luxon; new dateclass 'beurteilungrequired'; 2nd quality gate validation logic option; filter notenoptions as per config; filter abgabetypoptions as per config; upload_allowed checkbox for serientermine; serientermin modal layout rearranged; abgabetoolJob fixes; 23:59 in the descriptive col, not datepicker; zusatzdaten are required; activeIndex for accordion calulated on demand by method instead of reading a computed value;

This commit is contained in:
Johann Hoffmann
2025-11-27 16:53:50 +01:00
parent 8888b6991f
commit 095d5acbc5
13 changed files with 461 additions and 205 deletions
+5 -1
View File
@@ -11,4 +11,8 @@ $config['PAABGABE_EMAIL_JOB_INTERVAL'] = '1 day';
// used as APP_ROOT.URL_STUDENTS -> cis4
$config['URL_STUDENTS'] = 'cis.php/Cis/Abgabetool/Student';
// used as APP_ROOT.URL_MITARBEITER -> old cis
$config['URL_MITARBEITER'] = 'index.ci.php/Cis/Abgabetool/Mitarbeiter';
$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_NOTEN_ABGABETOOL'] = ['Bestanden', 'Nicht bestanden'];
@@ -82,11 +82,13 @@ class Abgabe extends FHCAPI_Controller
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');
$turnitin_link = $this->config->item('turnitin_link');
$abgabetypenBetreuer = $this->config->item('ALLOWED_ABGABETYPEN_BETREUER');
$ret = array(
'old_abgabe_beurteilung_link' => $old_abgabe_beurteilung_link,
'turnitin_link' => $turnitin_link
'turnitin_link' => $turnitin_link,
'abgabetypenBetreuer' => $abgabetypenBetreuer
);
$this->terminateWithSuccess($ret);
@@ -402,7 +404,7 @@ class Abgabe extends FHCAPI_Controller
$ci3BootstrapFilePath = "index.ci.php";
}
$path = $this->_ci->config->item('URL_MITARBEITER');
$path = $this->config->item('URL_MITARBEITER');
$url = APP_ROOT.$path;
// $this->addMeta('betreuerArray', $resBetr->retval);
@@ -701,6 +703,7 @@ class Abgabe extends FHCAPI_Controller
$bezeichnung = $_POST['bezeichnung'];
$kurzbz = $_POST['kurzbz'];
$fixtermin = $_POST['fixtermin'];
$upload_allowed = $_POST['upload_allowed'];
if (!isset($projektarbeit_ids) || !is_array($projektarbeit_ids) || empty($projektarbeit_ids)
|| !isset($datum) || isEmptyString($datum)
@@ -736,6 +739,7 @@ class Abgabe extends FHCAPI_Controller
'fixtermin' => $fixtermin,
'datum' => $datum,
'kurzbz' => $kurzbz,
'upload_allowed' => $upload_allowed,
'insertvon' => getAuthUID(),
'insertamum' => date('Y-m-d H:i:s')
)
@@ -800,7 +804,10 @@ class Abgabe extends FHCAPI_Controller
$result = $this->NoteModel->getAllActive();
$noten = $this->getDataOrTerminateWithError($result);
$this->terminateWithSuccess($noten);
$allowed_noten_abgabetool = $this->config->item('ALLOWED_NOTEN_ABGABETOOL');
$this->terminateWithSuccess(array($noten, $allowed_noten_abgabetool));
}
private function sendQualGateNegativEmail($projektarbeit_id, $betreuer_person_id, $paabgabe) {
@@ -904,7 +911,7 @@ class Abgabe extends FHCAPI_Controller
$this->load->library('PermissionLib');
$stg_allowed = $this->permissionlib->getSTG_isEntitledFor('basis/abgabe_assistenz:rw');
if($stg_allowed == false) {
$this->terminateWithError($this->p->t('ui', 'keineBerechtigung'), 'general');
}
@@ -160,8 +160,8 @@ class Studiensemester extends FHCAPI_Controller
$this->StudiensemesterModel->addOrder("start", "DESC");
$result = $this->StudiensemesterModel->getAktOrNextSemester();
$aktuell = getData($result)[0];
$result = $this->StudiensemesterModel->getPreviousFrom($aktuell->studiensemester_kurzbz, 10);
$this->StudiensemesterModel->addSelect('*');
$result = $this->StudiensemesterModel->load();
$studiensemester = getData($result);
$this->terminateWithSuccess(array($studiensemester, $aktuell));
@@ -20,6 +20,7 @@ class AbgabetoolJob extends JOB_Controller
$this->_ci->load->model('education/Paabgabe_model', 'PaabgabeModel');
$this->_ci->load->model('crm/Student_model', 'StudentModel');
$this->_ci->load->config('abgabe');
$this->loadPhrases([
'abgabetool'
]);
@@ -32,7 +33,7 @@ class AbgabetoolJob extends JOB_Controller
// this job gathers all new or changed file uploads via field 'abgabedatum', enduploads still
// send an email directly after happening since they are kind of important
$this->_ci->logInfo('Start job queue scheduler FHC-Core->notifyBetreuerMail');
$this->_ci->logInfo('Start job FHC-Core->notifyBetreuerMail');
$interval = $this->_ci->config->item('PAABGABE_EMAIL_JOB_INTERVAL');
@@ -102,7 +103,7 @@ class AbgabetoolJob extends JOB_Controller
// send email with bundled info
sendSanchoMail(
'paabgabeUpdatesBetSM',
'PaabgabeUpdatesBetSM',
$body_fields,
$data->private_email,
$this->p->t('abgabetool', 'changedAbgabeterminev2')
@@ -112,14 +113,14 @@ class AbgabetoolJob extends JOB_Controller
}
$this->_ci->logInfo($count . " Emails erfolgreich versandt");
$this->_ci->logInfo('End job queue scheduler FHC-Core->notifyBetreuerMail');
$this->_ci->logInfo('End job FHC-Core->notifyBetreuerMail');
}
public function notifyStudentMail()
{
// send all new projektarbeit abgabe since the last job run to the related student
$this->_ci->logInfo('Start job queue scheduler FHC-Core->notifyStudentMail');
$this->_ci->logInfo('Start job FHC-Core->notifyStudentMail');
$interval = $this->_ci->config->item('PAABGABE_EMAIL_JOB_INTERVAL');
@@ -127,7 +128,7 @@ class AbgabetoolJob extends JOB_Controller
$retval = getData($result);
if(count($retval) == 0) {
$this->logInfo("Keine Emails an Studenten versandt");
$this->_ci->logInfo("Keine Emails an Studenten versandt");
return;
}
@@ -180,7 +181,7 @@ class AbgabetoolJob extends JOB_Controller
// send email with bundled info
sendSanchoMail(
'paabgabeUpdatesSammelmail',
'PaabgabeUpdatesSammelmail',
$body_fields,
$uid.'@'.DOMAIN,
$this->p->t('abgabetool', 'changedAbgabeterminev2')
@@ -191,6 +192,6 @@ class AbgabetoolJob extends JOB_Controller
}
$this->_ci->logInfo($count . " Emails erfolgreich versandt");
$this->_ci->logInfo('End job queue scheduler FHC-Core->notifyStudentMail');
$this->_ci->logInfo('End job FHC-Core->notifyStudentMail');
}
}
@@ -175,6 +175,7 @@ class Projektarbeit_model extends DB_Model
campus.tbl_paabgabe.beurteilungsnotiz,
campus.tbl_paabgabetyp.paabgabetyp_kurzbz,
campus.tbl_paabgabetyp.bezeichnung,
campus.tbl_paabgabetyp.benotbar,
campus.tbl_paabgabe.abgabedatum,
campus.tbl_paabgabe.insertvon
FROM campus.tbl_paabgabe JOIN campus.tbl_paabgabetyp USING(paabgabetyp_kurzbz)