mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-19 16:02:15 +00:00
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:
@@ -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);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user