config-eintraege hinzugefuegt; bugfixes pruefungsverwaltung und

studienplanansicht im cis; anpassungen zeugnis
This commit is contained in:
Stefan Puraner
2016-06-08 13:32:06 +02:00
parent b07beff444
commit cf3ce680d6
11 changed files with 514 additions and 370 deletions
+60 -28
View File
@@ -43,6 +43,7 @@ require_once('../../../include/benutzergruppe.class.php');
require_once('../../../include/konto.class.php');
require_once('../../../include/lvinfo.class.php');
require_once('../../../include/addon.class.php');
require_once('../../../include/anrechnung.class.php');
$uid = get_uid();
@@ -305,7 +306,9 @@ if($zeugnisnote->getZeugnisnoten('',$uid,''))
foreach($zeugnisnote->result as $row_note)
{
if($row_note->note!='')
{
$noten_arr[$row_note->lehrveranstaltung_id][$row_note->studiensemester_kurzbz]=$row_note->note;
}
}
}
@@ -364,7 +367,7 @@ drawTree($tree,0);
function drawTree($tree, $depth)
{
global $uid, $stsem_arr, $noten_arr, $lvangebot_arr;
global $datum_obj, $db, $lv_arr, $p, $note_pruef_arr;
global $datum_obj, $db, $lv_arr, $p, $note_pruef_arr, $student;
foreach($tree as $row_tree)
{
@@ -448,7 +451,7 @@ function drawTree($tree, $depth)
$lv_kompatibel = new lehrveranstaltung();
$kompatibleLVs = $lv_kompatibel->loadLVkompatibel($row_tree->lehrveranstaltung_id);
if(isset($noten_arr[$row_tree->lehrveranstaltung_id]))
{
// Positive Note fuer diese LV vorhanden?
@@ -471,23 +474,40 @@ function drawTree($tree, $depth)
$found = false;
$i = 0;
while(!$found && $i < count($kompatibleLVs))
{
for($i; $i < (count($kompatibleLVs)); $i++)
{
foreach($kompatibleLVs as $komp)
{
if(isset($noten_arr[$kompatibleLVs[$i]]))
$anrechnung = new anrechnung();
$anrechnung->getAnrechnungPrestudent($student->prestudent_id, $row_tree->lehrveranstaltung_id, $komp);
if(count($anrechnung->result) == 1)
{
$positiv=false;
foreach($noten_arr[$kompatibleLVs[$i]] as $note)
$lv = $anrechnung->result[0]->lehrveranstaltung_id_kompatibel;
if(isset($noten_arr[$lv]))
{
if($note_pruef_arr[$note]->positiv)
$positiv=true;
$positiv=false;
foreach($noten_arr[$lv] as $note)
{
if($note_pruef_arr[$note]->positiv)
$positiv=true;
}
$found = true;
}
else
{
/* wenn zu mehreren kompatiblen lvs eine Anrechnung existiert
* darf found nicht auf false gesetzt werden wenn es zuvor bereits auf true gesetzt wurde
*/
if(!$found)
$found = false;
}
$found = true;
}
$i++;
}
$i++;
}
if($found)
{
if($positiv)
@@ -544,22 +564,34 @@ function drawTree($tree, $depth)
elseif(count($kompatibleLVs) > 0)
{
$found = false;
foreach($kompatibleLVs as $komp)
{
if(isset($noten_arr[$komp][$stsem]))
{
$found = true;
if($note_pruef_arr[$noten_arr[$komp][$stsem]]->positiv)
$tdinhalt .= '<span class="ok">'.$note_pruef_arr[$noten_arr[$komp][$stsem]]->anmerkung.'</span>';
else
$tdinhalt .= '<span class="error">'.$note_pruef_arr[$noten_arr[$komp][$stsem]]->anmerkung.'</span>';
}
}
if(!$found)
{
$tdinhalt.= '-';
}
$i = 0;
while(!$found && $i < count($kompatibleLVs))
{
foreach($kompatibleLVs as $komp)
{
$anrechnung = new anrechnung();
$anrechnung->getAnrechnungPrestudent($student->prestudent_id, $row_tree->lehrveranstaltung_id, $komp);
if(count($anrechnung->result) == 1)
{
$lv = $anrechnung->result[0]->lehrveranstaltung_id_kompatibel;
if(isset($noten_arr[$lv][$stsem]))
{
$found = true;
if($note_pruef_arr[$noten_arr[$lv][$stsem]]->positiv)
$tdinhalt .= '<span class="ok">'.$note_pruef_arr[$noten_arr[$lv][$stsem]]->anmerkung.'</span>';
else
$tdinhalt .= '<span class="error">'.$note_pruef_arr[$noten_arr[$lv][$stsem]]->anmerkung.'</span>';
}
}
$i++;
}
if(!$found)
{
$tdinhalt.= '-';
}
}
}
else
{