yellow dropdown styling only on editable tabulator colums for note_vorschlag; fetch note for punkte for notenvorschlag and pruefungsnote if certain config is set; added debounce helper file/function; WIP persisting punkte in backend

This commit is contained in:
Johann Hoffmann
2026-02-02 17:07:16 +01:00
parent 390a3c0d5a
commit 81eee814e9
6 changed files with 179 additions and 63 deletions
@@ -38,7 +38,8 @@ class Noten extends FHCAPI_Controller
'createPruefungen' => array('lehre/benotungstool:rw'),
'saveNotenvorschlagBulk' => array('lehre/benotungstool:rw'),
'savePruefungenBulk' => array('lehre/benotungstool:rw'),
'getCisConfig' => array('lehre/benotungstool:rw')
'getCisConfig' => array('lehre/benotungstool:rw'),
'getNoteByPunkte' => array('lehre/benotungstool:rw')
]);
$this->load->library('AuthLib', null, 'AuthLib');
@@ -1045,6 +1046,27 @@ class Noten extends FHCAPI_Controller
return $anwesenheiten;
}
public function getNoteByPunkte() {
$result = $this->getPostJSON();
// TODO validate post properly
if(!property_exists($result, 'punkte')
|| !property_exists($result, 'lv_id')
|| !property_exists($result, 'sem_kurzbz')) {
$this->terminateWithError($this->p->t('global', 'missingParameters'), 'general');
}
$punkte = $result->punkte;
$lv_id = $result->lv_id;
$sem_kurzbz = $result->sem_kurzbz;
$result = $this->NotenschluesselaufteilungModel->getNote($punkte, $lv_id, $sem_kurzbz);
$data = $this->getDataOrTerminateWithError($result);
$this->terminateWithSuccess($data);
}
}