mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-22 17:32:18 +00:00
Neue Notenübersicht für Studenten
- Ansicht aller LVs die der Studierende lt Studienplan besuchen muss - Lehrveranstaltungen die ausserhalb des Studienplanes besucht wurden - Notendurchschnitt pro Semester und über alle Semester nur für Studienplanrelevante LVs - Neuer Menüpunkt im FAS für Zugriff auf die Notenliste
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
|
||||
if (! defined("BASEPATH")) exit("No direct script access allowed");
|
||||
|
||||
class StudienplanLib
|
||||
{
|
||||
/**
|
||||
* Loads model OrganisationseinheitModel
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->ci =& get_instance();
|
||||
|
||||
// Loads model Organisationseinheit_model
|
||||
$this->ci->load->model('organisation/Studienplan_model', 'StudienplanModel');
|
||||
}
|
||||
|
||||
public function getLehrveranstaltungTree($studienplan_id, $semester, $studplan = null)
|
||||
{
|
||||
$tree = array();
|
||||
$data = $this->ci->StudienplanModel->getStudienplanLehrveranstaltung($studienplan_id, $semester);
|
||||
if(isSuccess($data) && hasData($data))
|
||||
{
|
||||
$this->lehrveranstaltungen = $data->retval;
|
||||
foreach($this->lehrveranstaltungen as $row)
|
||||
{
|
||||
if (!is_null($studplan) && $row->export != $studplan)
|
||||
continue;
|
||||
|
||||
if (is_null($row->studienplan_lehrveranstaltung_id_parent))
|
||||
{
|
||||
$treeitem = array(
|
||||
'lehrveranstaltung_id' => $row->lehrveranstaltung_id,
|
||||
'lehrtyp_kurzbz' => $row->lehrtyp_kurzbz,
|
||||
'pflicht' => $row->pflicht,
|
||||
'bezeichnung' => $row->bezeichnung,
|
||||
'ects' => $row->ects
|
||||
);
|
||||
$childs = $this->getChildElements($row->studienplan_lehrveranstaltung_id);
|
||||
if(is_array($childs) && count($childs) > 0)
|
||||
$treeitem['childs'] = $childs;
|
||||
$tree[] = $treeitem;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $tree;
|
||||
}
|
||||
|
||||
private function getChildElements($studienplan_lehrveranstaltung_id)
|
||||
{
|
||||
$subtree = array();
|
||||
|
||||
foreach($this->lehrveranstaltungen as $row)
|
||||
{
|
||||
if($studienplan_lehrveranstaltung_id == $row->studienplan_lehrveranstaltung_id_parent)
|
||||
{
|
||||
$treeitem = array(
|
||||
'lehrveranstaltung_id' => $row->lehrveranstaltung_id,
|
||||
'lehrtyp_kurzbz' => $row->lehrtyp_kurzbz,
|
||||
'pflicht' => $row->pflicht,
|
||||
'bezeichnung' => $row->bezeichnung,
|
||||
'ects' => $row->ects
|
||||
);
|
||||
$childs = $this->getChildElements($row->studienplan_lehrveranstaltung_id);
|
||||
if(is_array($childs))
|
||||
$treeitem['childs'] = $childs;
|
||||
$subtree[] = $treeitem;
|
||||
}
|
||||
}
|
||||
return $subtree;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user