mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 16:32:20 +00:00
Ermittlung Prestudent_id mit load()
This commit is contained in:
@@ -1133,19 +1133,20 @@ if (defined("CIS_GESAMTNOTE_PRUEFUNG_MOODLE_LE_NOTE") && CIS_GESAMTNOTE_PRUEFUNG
|
||||
$grades[$row_stud->uid]['vorname'] = $row_stud->vorname;
|
||||
$grades[$row_stud->uid]['nachname'] = $row_stud->nachname;
|
||||
|
||||
$ps = new student();
|
||||
$prestudent_id = $ps->getPrestudentIdFromBenutzerId($row_stud->uid, $stg_obj->studiengang_kz);
|
||||
$student = new student();
|
||||
$student->load($row_stud->uid);
|
||||
$student->result[]= $student;
|
||||
$prestudent_id = $student->prestudent_id;
|
||||
|
||||
$mobility = new mobilitaet();
|
||||
$mobility->loadPrestudent($prestudent_id);
|
||||
$output = $mobility->result;
|
||||
$eintrag = '';
|
||||
|
||||
foreach ($output as $k)
|
||||
{
|
||||
if($k->mobilitaetstyp_kurzbz == 'GS')
|
||||
$eintrag = ' (d.d.)';
|
||||
$eintrag = ' (d.d.)';
|
||||
}
|
||||
|
||||
$grades[$row_stud->uid]['mobility'] = $eintrag;
|
||||
|
||||
// Noten aus Uebungstool
|
||||
|
||||
@@ -896,38 +896,4 @@ class student extends benutzer
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Ermittelt den Prestudenten mithilfe der UID, des Studiengangs und des Semesters
|
||||
* @param string $uid UID des Benutzers (zum Beispiel se15m007).
|
||||
* @param int $stg_kz Kennzeichen Studiengang (zum Beispiel 299).
|
||||
* @return int prestudent_id
|
||||
*/
|
||||
public function getPrestudentIdFromBenutzerId($uid, $stg_kz)
|
||||
{
|
||||
$qry = "SELECT
|
||||
prestudent_id
|
||||
FROM public.tbl_student
|
||||
WHERE student_uid = ".$this->db_add_param($uid)."
|
||||
AND studiengang_kz = ".$this->db_add_param($stg_kz, FHC_INTEGER).";";
|
||||
|
||||
if ($this->db_query($qry))
|
||||
{
|
||||
if ($row = $this->db_fetch_object())
|
||||
{
|
||||
$prestudent_id = $row->prestudent_id;
|
||||
return $prestudent_id;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user