mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-10-12 15:04:04 +00:00
Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
86df5471f2 | ||
|
|
d64f5610c9 | ||
|
|
444f7aec48 | ||
|
|
4dbffc3527 | ||
|
|
f826c20949 | ||
|
|
45b7a56c3a |
@@ -71,22 +71,31 @@ class PlausicheckProducerLib
|
||||
{
|
||||
$plausicheckData = getData($plausicheckRes);
|
||||
|
||||
foreach ($plausicheckData as $plausiData)
|
||||
if (is_array($plausicheckData))
|
||||
{
|
||||
// get the data needed for issue production
|
||||
$person_id = isset($plausiData['person_id']) ? $plausiData['person_id'] : null;
|
||||
$oe_kurzbz = isset($plausiData['oe_kurzbz']) ? $plausiData['oe_kurzbz'] : null;
|
||||
$fehlertext_params = isset($plausiData['fehlertext_params']) ? $plausiData['fehlertext_params'] : null;
|
||||
$resolution_params = isset($plausiData['resolution_params']) ? $plausiData['resolution_params'] : null;
|
||||
foreach ($plausicheckData as $plausiData)
|
||||
{
|
||||
// get the data needed for issue production
|
||||
$person_id = isset($plausiData['person_id']) ? $plausiData['person_id'] : null;
|
||||
$oe_kurzbz = isset($plausiData['oe_kurzbz']) ? $plausiData['oe_kurzbz'] : null;
|
||||
$fehlertext_params = isset($plausiData['fehlertext_params']) ? $plausiData['fehlertext_params'] : null;
|
||||
$resolution_params = isset($plausiData['resolution_params']) ? $plausiData['resolution_params'] : null;
|
||||
|
||||
// write the issue
|
||||
$addIssueRes = $this->_ci->issueslib->addFhcIssue($fehler_kurzbz, $person_id, $oe_kurzbz, $fehlertext_params, $resolution_params);
|
||||
// write the issue
|
||||
$addIssueRes = $this->_ci->issueslib->addFhcIssue(
|
||||
$fehler_kurzbz,
|
||||
$person_id,
|
||||
$oe_kurzbz,
|
||||
$fehlertext_params,
|
||||
$resolution_params
|
||||
);
|
||||
|
||||
// log if error, or log info if inserted new issue
|
||||
if (isError($addIssueRes))
|
||||
$result->errors[] = getError($addIssueRes);
|
||||
elseif (hasData($addIssueRes) && is_integer(getData($addIssueRes)))
|
||||
$result->infos[] = "Plausicheck issue " . $fehler_kurzbz . " successfully produced, person_id: " . $person_id;
|
||||
// log if error, or log info if inserted new issue
|
||||
if (isError($addIssueRes))
|
||||
$result->errors[] = getError($addIssueRes);
|
||||
elseif (hasData($addIssueRes) && is_integer(getData($addIssueRes)))
|
||||
$result->infos[] = "Plausicheck issue " . $fehler_kurzbz . " successfully produced, person_id: " . $person_id;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,11 +99,12 @@ class PlausicheckResolverLib
|
||||
$issueResolved = getData($issueResolvedRes) === true;
|
||||
}
|
||||
}
|
||||
elseif (isset($this->_codeProducerLibMappings[$issue->fehlercode])) // check if it is an issue without explicit resolver, "self-resolving"
|
||||
// mappings for issues that are resolved the same way as they are produced
|
||||
elseif (isset($this->_codeProducerLibMappings[$issue->fehlercode]))
|
||||
{
|
||||
$libName = $this->_codeProducerLibMappings[$issue->fehlercode];
|
||||
|
||||
// execute same check as used for issue production
|
||||
// call produce plausicheck method of producer lib
|
||||
$issueResolvedRes = $this->_ci->plausicheckproducerlib->producePlausicheckIssue(
|
||||
$libName,
|
||||
$issue->fehler_kurzbz,
|
||||
@@ -114,7 +115,7 @@ class PlausicheckResolverLib
|
||||
{
|
||||
$result->errors[] = getError($issueResolvedRes);
|
||||
}
|
||||
else
|
||||
else // resolved if no issue found
|
||||
{
|
||||
$issueResolved = !hasData($issueResolvedRes);
|
||||
}
|
||||
|
||||
@@ -384,17 +384,6 @@ for ($i = 0; $i < count($ztaufdata); $i++)
|
||||
}
|
||||
}
|
||||
|
||||
//worktime with no break greater 6 -> compulsory break of half an hour
|
||||
if ($pauseSubtracted < 0.5 && !$lehreExternExists)
|
||||
{
|
||||
if ($projektlines[$day]->arbeitszeit >= 6.5)
|
||||
$projektlines[$day]->arbeitszeit -= 0.5;
|
||||
|
||||
//ensure that no worktime gets smaller than 6 hours because of compulsory break
|
||||
elseif ($projektlines[$day]->arbeitszeit > 6)
|
||||
$projektlines[$day]->arbeitszeit -= $projektlines[$day]->arbeitszeit - 6;
|
||||
}
|
||||
|
||||
$projektlines[$day]->arbeitszeit = round($projektlines[$day]->arbeitszeit, 2);
|
||||
|
||||
//calculate sums
|
||||
|
||||
+21
-1
@@ -35,6 +35,7 @@ require_once('../include/studiengang.class.php');
|
||||
require_once('../include/mitarbeiter.class.php');
|
||||
require_once('../include/anrechnung.class.php');
|
||||
require_once('../include/prestudent.class.php');
|
||||
require_once('../include/nation.class.php');
|
||||
|
||||
$datum = new datum();
|
||||
$db = new basis_db();
|
||||
@@ -107,7 +108,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
|
||||
tbl_studiengang.bezeichnung, tbl_studiengang.english, tbl_studentlehrverband.semester,
|
||||
tbl_person.vorname, tbl_person.vornamen, tbl_person.nachname,tbl_person.gebdatum,tbl_person.titelpre,
|
||||
tbl_person.titelpost, tbl_person.anrede, tbl_studiensemester.bezeichnung as sembezeichnung,
|
||||
tbl_studiensemester.studiensemester_kurzbz as stsem, tbl_student.prestudent_id, tbl_studiengang.max_semester
|
||||
tbl_studiensemester.studiensemester_kurzbz as stsem, tbl_student.prestudent_id, tbl_studiengang.max_semester, tbl_person.gebort, tbl_person.geburtsnation, tbl_person.geschlecht
|
||||
FROM tbl_person, tbl_student, tbl_studiengang, tbl_benutzer, tbl_studentlehrverband, tbl_studiensemester
|
||||
WHERE tbl_student.studiengang_kz = tbl_studiengang.studiengang_kz
|
||||
AND tbl_student.student_uid = tbl_benutzer.uid AND tbl_benutzer.person_id = tbl_person.person_id
|
||||
@@ -187,6 +188,10 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
|
||||
else
|
||||
$studiengang_kz = sprintf("%04s", abs($row->studiengang_kz));
|
||||
|
||||
|
||||
$nation = new nation($row->geburtsnation);
|
||||
$geburtsnation = $nation->kurztext;
|
||||
|
||||
$xml .= " <studiengang_art><![CDATA[".$bezeichnung."]]></studiengang_art>";
|
||||
$xml .= " <studiengang_kz><![CDATA[".$studiengang_kz."]]></studiengang_kz>";
|
||||
$xml .= "\n <anrede><![CDATA[".$row->anrede."]]></anrede>";
|
||||
@@ -195,6 +200,9 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
|
||||
$xml .= " <name><![CDATA[".trim($row->titelpre.' '.trim($row->vorname.' '.$row->vornamen).' '.$row->nachname.($row->titelpost!=''?', '.$row->titelpost:''))."]]></name>";
|
||||
$gebdatum = date('d.m.Y',strtotime($row->gebdatum));
|
||||
$xml .= " <gebdatum><![CDATA[".$gebdatum."]]></gebdatum>";
|
||||
$xml .= " <gebort><![CDATA[".$row->gebort."]]></gebort>";
|
||||
$xml .= " <geburtsnation><![CDATA[".$geburtsnation."]]></geburtsnation>";
|
||||
$xml .= " <geschlecht><![CDATA[".$row->geschlecht."]]></geschlecht>";
|
||||
$xml .= " <matrikelnr><![CDATA[".trim($row->matrikelnr)."]]></matrikelnr>";
|
||||
$xml .= " <studiengangsleiter><![CDATA[".$stgl."]]></studiengangsleiter>";
|
||||
$datum_aktuell = date('d.m.Y');
|
||||
@@ -267,6 +275,15 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
|
||||
if ($lastPrestudentStatus)
|
||||
$showAllNoten = $prestudent->status_kurzbz === 'Incoming';
|
||||
|
||||
$lastBenotungsdatum = '';
|
||||
|
||||
$dates = array_column($obj->result, 'benotungsdatum');
|
||||
if (!empty($dates))
|
||||
{
|
||||
$lastBenotungsdatum = max($dates);
|
||||
$xml .= "<last_benotungsdatum><![CDATA[".date('d.m.Y', strtotime($lastBenotungsdatum))."]]></last_benotungsdatum>";
|
||||
}
|
||||
|
||||
foreach ($obj->result as $row)
|
||||
{
|
||||
if($showAllNoten || $row->zeugnis)
|
||||
@@ -390,12 +407,15 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
|
||||
}
|
||||
}
|
||||
$xml .= "\n <unterrichtsfach>";
|
||||
$xml .= " <benotungsdatum><![CDATA[".date('d.m.Y', strtotime($row->benotungsdatum))."]]></benotungsdatum>";
|
||||
$xml .= " <bezeichnung><![CDATA[".$bezeichnung."]]></bezeichnung>";
|
||||
$xml .= " <bezeichnung_englisch><![CDATA[".$bezeichnung_englisch."]]></bezeichnung_englisch>";
|
||||
$xml .= " <note_positiv><![CDATA[".$row->note_positiv."]]></note_positiv>";
|
||||
$xml .= " <note><![CDATA[".$note2."]]></note>";
|
||||
$xml .= " <sws><![CDATA[".($row->semesterstunden==0?'':number_format(sprintf('%.1F',$row->semesterstunden/$wochen),1))."]]></sws>";
|
||||
$xml .= " <sws_lv><![CDATA[".($row->sws==0?'':number_format(sprintf('%.1F',$row->sws),1))."]]></sws_lv>";
|
||||
$xml .= " <lv_id><![CDATA[".$row->lehrveranstaltung_id."]]></lv_id>";
|
||||
|
||||
$ectspunkte='';
|
||||
|
||||
$anrechnung = new anrechnung();
|
||||
|
||||
Reference in New Issue
Block a user