mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-25 16:44:28 +00:00
custom sticky css; offcanvas mobility legende; mobiltiy zusatz in seperate column; added getMobilityZusatzForUids & formatZusatz similar to digital anw mobility zusaetze;
This commit is contained in:
@@ -31,7 +31,7 @@ class Benotungstool extends Auth_Controller
|
||||
|
||||
// TODO: check if related CIS config is also loaded when being routed in Cis4 by vuerouter
|
||||
// TODO: check if new benotungstool should be configurable the exact same way?
|
||||
|
||||
// TODO: move this to some config api?
|
||||
|
||||
$viewData = array(
|
||||
'uid'=>getAuthUID(),
|
||||
|
||||
@@ -59,6 +59,8 @@ class Noten extends FHCAPI_Controller
|
||||
$this->load->model('person/Person_model', 'PersonModel');
|
||||
$this->load->model('organisation/Studienplan_model', 'StudienplanModel');
|
||||
$this->load->model('crm/Student_model', 'StudentModel');
|
||||
$this->load->model('codex/Mobilitaet_model', 'MobilitaetModel');
|
||||
$this->load->model('organisation/Erhalter_model', 'ErhalterModel');
|
||||
|
||||
$this->load->helper('hlp_sancho_helper');
|
||||
|
||||
@@ -92,26 +94,24 @@ class Noten extends FHCAPI_Controller
|
||||
$grades = array();
|
||||
$student_uids = array_map($func, $studentenData);
|
||||
|
||||
if(count($student_uids) > 0) {
|
||||
$mobres = $this->MobilitaetModel->getMobilityZusatzForUids($student_uids);
|
||||
$mobData = $this->getDataOrTerminateWithError($mobres);
|
||||
|
||||
$result = $this->ErhalterModel->load();
|
||||
$erhalter = getData($result)[0];
|
||||
|
||||
$erhalter_kz = '9' . sprintf("%03s", $erhalter->erhalter_kz);
|
||||
foreach($mobData as $mob) {
|
||||
$grades[$mob->uid]['mobility_zusatz'] = $this->MobilitaetModel->formatZusatz($mob, $erhalter_kz);
|
||||
}
|
||||
}
|
||||
|
||||
foreach($student_uids as $uid) {
|
||||
$grades[$uid]['grades'] = [];
|
||||
|
||||
$res = $this->StudentModel->load([$uid]);
|
||||
if(!isError($res) && hasData($res)) $student = getData($res)[0];
|
||||
|
||||
$prestudent_id = $student->prestudent_id;
|
||||
|
||||
|
||||
// TODO: last class to get rid of but this one is complicated
|
||||
$mobility = new mobilitaet();
|
||||
$mobility->loadPrestudent($prestudent_id);
|
||||
$output = $mobility->result;
|
||||
$eintrag = '';
|
||||
foreach ($output as $k)
|
||||
{
|
||||
if(($k->mobilitaetstyp_kurzbz == 'GS') && ($k->studiensemester_kurzbz == $sem_kurzbz))
|
||||
$eintrag = ' (d.d.)';
|
||||
}
|
||||
$grades[$uid]['mobility'] = $eintrag;
|
||||
|
||||
$result = $this->LvgesamtnoteModel->getLvGesamtNoten($lv_id, $uid, $sem_kurzbz);
|
||||
|
||||
@@ -131,6 +131,7 @@ class Noten extends FHCAPI_Controller
|
||||
|
||||
// send $grades reference to moodle addon
|
||||
// TODO: DONT LET FAULTY MOODLE TOKEN BREAK THE STARTUP
|
||||
|
||||
// Events::trigger(
|
||||
// 'getExternalGrades',
|
||||
// function & () use (&$grades)
|
||||
@@ -142,6 +143,8 @@ class Noten extends FHCAPI_Controller
|
||||
// 'stsem' => $sem_kurzbz
|
||||
// ]
|
||||
// );
|
||||
|
||||
|
||||
|
||||
// calculate notenvorschläge from teilnoten
|
||||
foreach($studentenData as $student) {
|
||||
|
||||
@@ -11,4 +11,73 @@ class Mobilitaet_model extends DB_Model
|
||||
$this->dbTable = 'bis.tbl_mobilitaet';
|
||||
$this->pk = 'mobilitaet_id';
|
||||
}
|
||||
|
||||
public function getMobilityZusatzForUids($uids) {
|
||||
$qry = "SELECT distinct on(nachname, vorname, public.tbl_benutzer.person_id) uid,
|
||||
tbl_mitarbeiter.mitarbeiter_uid,
|
||||
tbl_note.lkt_ueberschreibbar, tbl_note.anmerkung,
|
||||
tbl_mobilitaet.mobilitaetstyp_kurzbz,
|
||||
(CASE WHEN bis.tbl_mobilitaet.studiensemester_kurzbz = vw_student_lehrveranstaltung.studiensemester_kurzbz THEN 1 ELSE 0 END) as doubledegree,
|
||||
public.tbl_prestudent.gsstudientyp_kurzbz as ddtype,
|
||||
(SELECT status_kurzbz FROM public.tbl_prestudentstatus
|
||||
WHERE prestudent_id=tbl_student.prestudent_id
|
||||
ORDER BY datum DESC, insertamum DESC, ext_id DESC LIMIT 1) as studienstatus
|
||||
FROM
|
||||
campus.vw_student_lehrveranstaltung
|
||||
JOIN public.tbl_benutzer USING(uid)
|
||||
JOIN public.tbl_person USING(person_id)
|
||||
LEFT JOIN public.tbl_student ON(uid=student_uid)
|
||||
LEFT JOIN public.tbl_mitarbeiter ON(uid=mitarbeiter_uid)
|
||||
LEFT JOIN public.tbl_studentlehrverband USING(student_uid,studiensemester_kurzbz)
|
||||
LEFT JOIN lehre.tbl_zeugnisnote on(vw_student_lehrveranstaltung.lehrveranstaltung_id=tbl_zeugnisnote.lehrveranstaltung_id
|
||||
AND tbl_zeugnisnote.student_uid=tbl_student.student_uid
|
||||
AND tbl_zeugnisnote.studiensemester_kurzbz=tbl_studentlehrverband.studiensemester_kurzbz)
|
||||
LEFT JOIN lehre.tbl_note USING (note)
|
||||
LEFT JOIN bis.tbl_bisio ON(uid=tbl_bisio.student_uid)
|
||||
LEFT JOIN public.tbl_studiengang ON(tbl_student.studiengang_kz=tbl_studiengang.studiengang_kz)
|
||||
LEFT JOIN bis.tbl_mobilitaet USING(prestudent_id)
|
||||
LEFT JOIN public.tbl_prestudent USING(prestudent_id)
|
||||
WHERE uid IN ?";
|
||||
|
||||
return $this->execReadOnlyQuery($qry, [$uids]);
|
||||
}
|
||||
|
||||
public function formatZusatz($entry, $erhalter_kz) {
|
||||
$zusatz = '';
|
||||
|
||||
if (isset($entry->studienstatus) && $entry->studienstatus === 'Incoming') {
|
||||
$zusatz = '(i)';
|
||||
}
|
||||
|
||||
if (isset($entry->lkt_ueberschreibbar) && $entry->lkt_ueberschreibbar === false) {
|
||||
$zusatz .= ' (' . ($entry->anmerkung ?? '') . ')';
|
||||
}
|
||||
|
||||
if (isset($entry->mitarbeiter_uid) && $entry->mitarbeiter_uid !== null) {
|
||||
$zusatz .= ' (ma)';
|
||||
}
|
||||
|
||||
if (isset($entry->stg_kz_student) && $entry->stg_kz_student == $erhalter_kz) {
|
||||
$zusatz .= ' (a.o.)';
|
||||
}
|
||||
|
||||
if (
|
||||
isset($entry->mobilitaetstyp_kurzbz) && $entry->mobilitaetstyp_kurzbz &&
|
||||
isset($entry->doubledegree) && $entry->doubledegree === 1
|
||||
) {
|
||||
$zusatz .= ' (d.d.';
|
||||
|
||||
$ddtype = $entry->ddtype ?? null;
|
||||
|
||||
if ($ddtype == 'Intern') {
|
||||
$zusatz .= 'i.)';
|
||||
} elseif ($ddtype == 'Extern') {
|
||||
$zusatz .= 'o.)';
|
||||
} else {
|
||||
$zusatz .= ')';
|
||||
}
|
||||
}
|
||||
|
||||
return $zusatz;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -898,8 +898,4 @@ class Prestudent_model extends DB_Model
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getMobilityPrestudent(){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ $includesArray = array(
|
||||
'public/css/components/FormUnderline.css',
|
||||
'public/css/Cis4/Cms.css',
|
||||
'public/css/Cis4/Studium.css',
|
||||
'public/css/Cis4/Benotungstool.css'
|
||||
),
|
||||
'customJSs' => array(
|
||||
'vendor/npm-asset/primevue/accordion/accordion.min.js',
|
||||
|
||||
@@ -36,4 +36,4 @@ $this->load->view('templates/FHC-Header', $includesArray);
|
||||
></cis-menu>
|
||||
</header>
|
||||
|
||||
<main id="cis-main" class="flex-grow-1 p-4 pt-2">
|
||||
<main id="cis-main" class="flex-grow-1 p-4 pt-2" style="min-width: 0;">
|
||||
Reference in New Issue
Block a user