mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-07 15:19:31 +00:00
UHSTAT1 form: added firstname and lastname of student
This commit is contained in:
@@ -279,8 +279,11 @@ class UHSTAT1 extends FHC_Controller
|
||||
private function _getFormMetaData()
|
||||
{
|
||||
$person_id = $this->_getValidPersonId('s');
|
||||
|
||||
// read only display param
|
||||
$readOnly = $this->input->get('readOnly');
|
||||
|
||||
// depending on permissions, editing or deleting is possible
|
||||
$editPermission = $this->_checkPermission('sui');
|
||||
$deletePermission = $this->_checkPermission('suid');
|
||||
|
||||
@@ -297,6 +300,20 @@ class UHSTAT1 extends FHC_Controller
|
||||
'readOnly' => $readOnly
|
||||
);
|
||||
|
||||
// get person data
|
||||
$this->load->model('person/Person_model', 'PersonModel');
|
||||
$this->PersonModel->addSelect("vorname, nachname");
|
||||
$personRes = $this->PersonModel->load($person_id);
|
||||
|
||||
if (isError($personRes)) return $personRes;
|
||||
|
||||
if (hasData($personRes))
|
||||
{
|
||||
$person = getData($personRes)[0];
|
||||
$formMetaData['vorname'] = $person->vorname;
|
||||
$formMetaData['nachname'] = $person->nachname;
|
||||
}
|
||||
|
||||
$nationTextFieldName = $languageIdx == 1 ? 'langtext' : 'engltext';
|
||||
|
||||
// get nation list
|
||||
|
||||
@@ -32,6 +32,12 @@ $saved = isset($saved) && $saved === true;
|
||||
?>
|
||||
|
||||
<div class='container' id='uhstat1Container'>
|
||||
<h1 class="text-center">
|
||||
<?php echo isset($formMetaData['nachname'])
|
||||
? 'UHSTAT1 Daten für '.(isset($formMetaData['vorname']) ? $formMetaData['vorname'].' ' : '').$formMetaData['nachname']
|
||||
: ''
|
||||
?>
|
||||
</h1>
|
||||
<div id="uhstat1Subcontainer">
|
||||
<input type='hidden' id='uhstat1Saved' value='<?php echo $saved ? 1 : 0 ?>' />
|
||||
<h2><?php echo $this->p->t('uhstat', 'uhstat1AnmeldungUeberschrift') ?></h2>
|
||||
|
||||
Reference in New Issue
Block a user