zweitbetreuer in StudentDetail; query the fullname of insertvon user to display upon creating a new abgabetermin;

This commit is contained in:
Johann Hoffmann
2026-07-09 15:53:09 +02:00
parent c26db6cc40
commit f346bc6fcb
3 changed files with 47 additions and 7 deletions
@@ -947,6 +947,16 @@ class Abgabe extends FHCAPI_Controller
$paabgabeArr = $this->getDataOrTerminateWithError($result, 'general');
$paabgabe = $paabgabeArr[0];
// resolve the insert/update user full names so the frontend info string ("saved at X by Y")
// renders immediately for freshly created/updated termine without needing a reload.
$this->load->model('person/Person_model', 'PersonModel');
if(!empty($paabgabe->insertvon)) {
$paabgabe->insertvon_fullname = getData($this->PersonModel->getFullName($paabgabe->insertvon));
}
if(!empty($paabgabe->updatevon)) {
$paabgabe->updatevon_fullname = getData($this->PersonModel->getFullName($paabgabe->updatevon));
}
// check if abgabe even has note
if($paabgabe->note) {
$this->load->model('education/Note_model', 'NoteModel');