From 114ac7a69e89b91b9442f4547b5210d71fe23b61 Mon Sep 17 00:00:00 2001 From: Cris Date: Wed, 20 Jan 2021 13:40:33 +0100 Subject: [PATCH] Corrected Personenkennzeichen: students matrikelnr instead of person bpk Signed-off-by: cris-technikum --- application/libraries/AnrechnungLib.php | 10 ++++++++-- .../views/lehre/anrechnung/requestAnrechnung.php | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/application/libraries/AnrechnungLib.php b/application/libraries/AnrechnungLib.php index 129fe9292..fbcbe817e 100644 --- a/application/libraries/AnrechnungLib.php +++ b/application/libraries/AnrechnungLib.php @@ -17,6 +17,7 @@ class AnrechnungLib $this->ci->load->model('person/Person_model', 'PersonModel'); $this->ci->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel'); $this->ci->load->model('organisation/Studiengang_model', 'StudiengangModel'); + $this->ci->load->model('crm/Student_model', 'StudentModel'); $this->ci->load->model('content/DmsVersion_model', 'DmsVersionModel'); } @@ -43,6 +44,12 @@ class AnrechnungLib show_error('Failed loading person data.'); } + // Get the internal personenkennzeichen + if (!$student = getData($this->ci->StudentModel->load(array('student_uid' => $uid)))[0]) + { + show_error(getError($student)); + } + // Get studiengang bezeichnung if (!$studiengang = getData($this->ci->StudiengangModel->load($lv->studiengang_kz))[0]) { @@ -63,8 +70,7 @@ class AnrechnungLib $antrag_data->studiensemester_kurzbz = $studiensemester_kurzbz; $antrag_data->vorname = $person->vorname; $antrag_data->nachname = $person->nachname; -// $antrag_data->bpk = $person->bpk; - $antrag_data->bpk = $person->matr_nr; + $antrag_data->matrikelnr = $student->matrikelnr; $antrag_data->stg_bezeichnung = $studiengang->bezeichnung; $antrag_data->lektoren = $lv_lektoren; diff --git a/application/views/lehre/anrechnung/requestAnrechnung.php b/application/views/lehre/anrechnung/requestAnrechnung.php index 7e37e9e52..0c59f73e2 100644 --- a/application/views/lehre/anrechnung/requestAnrechnung.php +++ b/application/views/lehre/anrechnung/requestAnrechnung.php @@ -76,7 +76,7 @@ $this->load->view( p->t('person', 'personenkennzeichen'); ?> - bpk ?> + matrikelnr ?> p->t('lehre', 'studiensemester'); ?>