diff --git a/application/controllers/jobs/IssueResolver.php b/application/controllers/jobs/IssueResolver.php index c2ab87710..d53a6c10c 100755 --- a/application/controllers/jobs/IssueResolver.php +++ b/application/controllers/jobs/IssueResolver.php @@ -23,7 +23,30 @@ class IssueResolver extends IssueResolver_Controller 'CORE_INOUT_0004' => 'CORE_INOUT_0004', 'CORE_INOUT_0005' => 'CORE_INOUT_0005', 'CORE_INOUT_0006' => 'CORE_INOUT_0006', - 'CORE_INOUT_0007' => 'CORE_INOUT_0007' + 'CORE_INOUT_0007' => 'CORE_INOUT_0007', + 'CORE_INOUT_0008' => 'CORE_INOUT_0008', + 'CORE_STG_0001' => 'CORE_STG_0001', + 'CORE_STG_0002' => 'CORE_STG_0002', + 'CORE_STG_0003' => 'CORE_STG_0003', + 'CORE_STG_0004' => 'CORE_STG_0004', + 'CORE_STUDENTSTATUS_0001' => 'CORE_STUDENTSTATUS_0001', + 'CORE_STUDENTSTATUS_0002' => 'CORE_STUDENTSTATUS_0002', + 'CORE_STUDENTSTATUS_0003' => 'CORE_STUDENTSTATUS_0003', + 'CORE_STUDENTSTATUS_0004' => 'CORE_STUDENTSTATUS_0004', + 'CORE_STUDENTSTATUS_0005' => 'CORE_STUDENTSTATUS_0005', + 'CORE_STUDENTSTATUS_0006' => 'CORE_STUDENTSTATUS_0006', + 'CORE_STUDENTSTATUS_0007' => 'CORE_STUDENTSTATUS_0007', + 'CORE_STUDENTSTATUS_0008' => 'CORE_STUDENTSTATUS_0008', + 'CORE_STUDENTSTATUS_0009' => 'CORE_STUDENTSTATUS_0009', + 'CORE_STUDENTSTATUS_0010' => 'CORE_STUDENTSTATUS_0010', + 'CORE_STUDENTSTATUS_0011' => 'CORE_STUDENTSTATUS_0011', + 'CORE_STUDENTSTATUS_0012' => 'CORE_STUDENTSTATUS_0012', + 'CORE_STUDENTSTATUS_0013' => 'CORE_STUDENTSTATUS_0013', + 'CORE_STUDENTSTATUS_0014' => 'CORE_STUDENTSTATUS_0014', + 'CORE_PERSON_0001' => 'CORE_PERSON_0001', + 'CORE_PERSON_0002' => 'CORE_PERSON_0002', + 'CORE_PERSON_0003' => 'CORE_PERSON_0003', + 'CORE_PERSON_0004' => 'CORE_PERSON_0004' ); } } diff --git a/application/controllers/system/issues/Plausichecks.php b/application/controllers/system/issues/Plausichecks.php index 878f04935..d72c4f007 100644 --- a/application/controllers/system/issues/Plausichecks.php +++ b/application/controllers/system/issues/Plausichecks.php @@ -79,8 +79,8 @@ class Plausichecks extends Auth_Controller { $fehlerText = getData($fehlerRes)[0]->fehlertext; $fehlerText = isEmptyArray($fehlertext_params) ? $fehlerText : vsprintf($fehlerText, $fehlertext_params); - if (isset($person_id)) $fehlerText .= ", person_id: $person_id"; - if (isset($oe_kurzbz)) $fehlerText .= ", oe_kurzbz: $oe_kurzbz"; + if (isset($person_id)) $fehlerText .= "; person_id: $person_id"; + if (isset($oe_kurzbz)) $fehlerText .= "; oe_kurzbz: $oe_kurzbz"; $issueTexts[$fehler_kurzbz][] = $fehlerText; } } diff --git a/application/libraries/issues/PlausicheckLib.php b/application/libraries/issues/PlausicheckLib.php index 40b7976f6..696df1647 100644 --- a/application/libraries/issues/PlausicheckLib.php +++ b/application/libraries/issues/PlausicheckLib.php @@ -31,7 +31,7 @@ class PlausicheckLib * @param int prestudent_id if check is to be executed only for one prestudent * @return success with prestudents or error */ - public function getPrestudentenStgUngleichStgStudent($studiengang_kz = null, $prestudent_id = null) + public function getStgPrestudentUngleichStgStudent($studiengang_kz = null, $prestudent_id = null) { $params = array(); @@ -155,13 +155,13 @@ class PlausicheckLib * @param int prestudent_id if check is to be executed only for one prestudent * @return success with prestudents or error */ - public function getPrestudentStgUngleichStgStudienplan($studiengang_kz = null, $prestudent_id = null) + public function getStgPrestudentUngleichStgStudienplan($studiengang_kz = null, $prestudent_id = null, $studienordnung_id = null) { $params = array(); $qry = " SELECT - DISTINCT ON (ps.prestudent_id) ps.person_id, ps.prestudent_id, + DISTINCT ON (ps.prestudent_id) ps.person_id, ps.prestudent_id, stordnung.studienordnung_id, stplan.bezeichnung AS studienplan, stg.oe_kurzbz AS prestudent_stg_oe_kurzbz FROM public.tbl_prestudent ps @@ -185,6 +185,12 @@ class PlausicheckLib $params[] = $prestudent_id; } + if (isset($studienordnung_id)) + { + $qry .= " AND stordnung.studienordnung_id = ?"; + $params[] = $studienordnung_id; + } + return $this->_db->execReadOnlyQuery($qry, $params); } @@ -258,7 +264,7 @@ class PlausicheckLib if (isset($prestudent_id)) { - $qry .= " AND pre.prestudent_id = ?"; + $qry .= " AND prestudent.prestudent_id = ?"; $params[] = $prestudent_id; } @@ -408,91 +414,52 @@ class PlausicheckLib * @param int prestudent_id if check is to be executed only for one prestudent * @return success with prestudents or error */ - public function getDatumStudiensemesterFalscheReihenfolge($studiensemester_kurzbz, $studiengang_kz = null, $prestudent_id = null) + public function getDatumStudiensemesterFalscheReihenfolge($studiengang_kz = null, $prestudent_id = null) { - $params = array($studiensemester_kurzbz); + $params = array(); $results = array(); // all active students with Status student in current semester $qry = " - SELECT - DISTINCT(student_uid), prestudent.person_id, prestudent.prestudent_id, - stg.oe_kurzbz AS prestudent_stg_oe_kurzbz, status.studiensemester_kurzbz - FROM - public.tbl_student student - JOIN public.tbl_benutzer benutzer on(student.student_uid = benutzer.uid) - JOIN public.tbl_prestudent prestudent USING(prestudent_id) - JOIN public.tbl_prestudentstatus status USING(prestudent_id) - JOIN public.tbl_studiengang stg ON prestudent.studiengang_kz = stg.studiengang_kz - WHERE - benutzer.aktiv=true - AND status.status_kurzbz='Student' - AND status.studiensemester_kurzbz=?"; + SELECT DISTINCT ON (prestudent_id) * + FROM ( + SELECT + prestudent.person_id, prestudent.prestudent_id, + stg.studiengang_kz, stg.oe_kurzbz AS prestudent_stg_oe_kurzbz, + ROW_NUMBER () OVER ( + PARTITION BY prestudent.prestudent_id + ORDER BY sem.start DESC, status.datum DESC, status.insertamum DESC, status.ext_id DESC + ) AS reihenfolge_semester, + ROW_NUMBER () OVER ( + PARTITION BY prestudent.prestudent_id + ORDER BY status.datum DESC, status.insertamum DESC, status.ext_id DESC + ) AS reihenfolge_datum + FROM + public.tbl_student student + JOIN public.tbl_benutzer benutzer on(student.student_uid = benutzer.uid) + JOIN public.tbl_prestudent prestudent USING(prestudent_id) + JOIN public.tbl_prestudentstatus status USING(prestudent_id) + JOIN public.tbl_studiensemester sem USING(studiensemester_kurzbz) + JOIN public.tbl_studiengang stg ON prestudent.studiengang_kz = stg.studiengang_kz + WHERE + benutzer.aktiv=true + AND status.status_kurzbz='Student' + ) reihenfolge + WHERE reihenfolge_semester <> reihenfolge_datum"; if (isset($studiengang_kz)) { - $qry .= " AND stg.studiengang_kz = ?"; + $qry .= " AND studiengang_kz = ?"; $params[] = $studiengang_kz; } if (isset($prestudent_id)) { - $qry .= " AND pre.prestudent_id = ?"; + $qry .= " AND prestudent_id = ?"; $params[] = $prestudent_id; } - $qryRes = $this->_db->execReadOnlyQuery($qry, $params); - - if (isError($qryRes)) return $qryRes; - - if (hasData($qryRes)) - { - $students = getData($qryRes); - - foreach ($students as $student) - { - // get all status of student, sorted by semester start - $qryOrderSemester = " - SELECT - status.* - FROM - public.tbl_prestudentstatus status - JOIN public.tbl_studiensemester semester USING(studiensemester_kurzbz) - WHERE - prestudent_id = ? - ORDER BY semester.start DESC, status.datum DESC;"; - - $qryOrderSemesterRes = $this->_db->execReadOnlyQuery($qryOrderSemester, array($student->prestudent_id)); - - if (isError($qryOrderSemesterRes)) return $qryOrderSemesterRes; - - $prestudentsSemesterSorted = hasData($qryOrderSemesterRes) ? getData($qryOrderSemesterRes) : array(); - - // get all status of student, sorted by status date - $this->_ci->PrestudentstatusModel->addSelect('studiensemester_kurzbz'); - $this->_ci->PrestudentstatusModel->addOrder('datum', 'DESC'); - $this->_ci->PrestudentstatusModel->addOrder('insertamum', 'DESC'); - $qryOrderDateRes = $this->_ci->PrestudentstatusModel->loadWhere(array('prestudent_id' => $student->prestudent_id)); - - if (isError($qryOrderDateRes)) return $qryOrderDateRes; - - $prestudentsDateSorted = hasData($qryOrderDateRes) ? getData($qryOrderDateRes) : array(); - - // check if differently sorted status have same Studiensemester order - $countStatus = count($prestudentsSemesterSorted); - - for ($i = 0; $i < $countStatus; $i++) - { - if ($prestudentsSemesterSorted[$i]->studiensemester_kurzbz != $prestudentsDateSorted[$i]->studiensemester_kurzbz) - { - $results[] = $student; - break; - } - } - } - } - - return success($results); + return $this->_db->execReadOnlyQuery($qry, $params); } /** @@ -622,6 +589,8 @@ class PlausicheckLib JOIN public.tbl_studiengang stg ON pre.studiengang_kz = stg.studiengang_kz WHERE status_kurzbz = 'Absolvent' + AND pre.bismelden + AND stg.melderelevant AND NOT EXISTS ( /* exclude gs */ SELECT 1 FROM bis.tbl_mobilitaet @@ -684,7 +653,7 @@ class PlausicheckLib * @param int prestudent_id if check is to be executed only for one prestudent * @return success with prestudents or error */ - public function getDatumSponsionFehlt($studiensemester_kurzbz, $studiengang_kz = null, $abschlusspruefung_id = null) + public function getDatumSponsionFehlt($studiensemester_kurzbz = null, $studiengang_kz = null, $abschlusspruefung_id = null) { $results = array(); @@ -726,7 +695,7 @@ class PlausicheckLib JOIN public.tbl_prestudentstatus status ON(prestudent.prestudent_id=status.prestudent_id) JOIN public.tbl_person USING(person_id) LEFT JOIN bis.tbl_orgform USING(orgform_kurzbz) - JOIN public.tbl_studiengang stg ON prestudent.studiengang_kz = stg.studiengang_kz + JOIN public.tbl_studiengang stg USING(studiengang_kz) WHERE status_kurzbz='Bewerber' AND reihungstestangetreten=false @@ -752,7 +721,7 @@ class PlausicheckLib if (isset($prestudent_id)) { - $qry .= " AND tbl_prestudent.prestudent_id = ?"; + $qry .= " AND prestudent.prestudent_id = ?"; $params[] = $prestudent_id; } @@ -774,7 +743,7 @@ class PlausicheckLib FROM public.tbl_prestudent pre JOIN public.tbl_prestudentstatus prestat USING(prestudent_id) - JOIN public.tbl_studiengang stg ON pre.studiengang_kz = stg.studiengang_kz + JOIN public.tbl_studiengang stg USING(studiengang_kz) WHERE prestat.status_kurzbz != 'Incoming' AND prestat.studiensemester_kurzbz = ? @@ -799,7 +768,7 @@ class PlausicheckLib /** * Prestudent should have a final status. - * + * * @param int prestudent_id if check is to be executed only for one prestudent * @return success with prestudents or error */ @@ -815,7 +784,7 @@ class PlausicheckLib public.tbl_prestudent pre JOIN public.tbl_person USING(person_id) JOIN public.tbl_prestudentstatus status USING(prestudent_id) - JOIN public.tbl_studiengang stg ON pre.studiengang_kz = stg.studiengang_kz + JOIN public.tbl_studiengang stg USING(studiengang_kz) WHERE NOT EXISTS( /*student does not study anymore*/ SELECT @@ -899,7 +868,7 @@ class PlausicheckLib SELECT 1 FROM public.tbl_prestudent JOIN public.tbl_prestudentstatus status USING(prestudent_id) - JOIN public.tbl_studiengang stg ON tbl_prestudent.studiengang_kz = stg.studiengang_kz + JOIN public.tbl_studiengang USING(studiengang_kz) WHERE person_id = pers.person_id"; if (isset($studiensemester_kurzbz)) diff --git a/application/libraries/issues/PlausicheckProducerLib.php b/application/libraries/issues/PlausicheckProducerLib.php index b165a4b76..adca981d1 100644 --- a/application/libraries/issues/PlausicheckProducerLib.php +++ b/application/libraries/issues/PlausicheckProducerLib.php @@ -34,7 +34,7 @@ class PlausicheckProducerLib 'NationNichtOesterreichAberGemeinde' => 'NationNichtOesterreichAberGemeinde', 'OrgformStgUngleichOrgformPrestudent' => 'OrgformStgUngleichOrgformPrestudent', 'PrestudentMischformOhneOrgform' => 'PrestudentMischformOhneOrgform', - 'PrestudentStgUngleichStgStudienplan' => 'PrestudentStgUngleichStgStudienplan', + 'StgPrestudentUngleichStgStudienplan' => 'StgPrestudentUngleichStgStudienplan', 'StgPrestudentUngleichStgStudent' => 'StgPrestudentUngleichStgStudent', 'StudentstatusNachAbbrecher' => 'StudentstatusNachAbbrecher' //'StudienplanUngueltig' => 'StudienplanUngueltig' diff --git a/application/libraries/issues/plausichecks/DatumStudiensemesterFalscheReihenfolge.php b/application/libraries/issues/plausichecks/DatumStudiensemesterFalscheReihenfolge.php index fadcf3e74..ab8566e47 100644 --- a/application/libraries/issues/plausichecks/DatumStudiensemesterFalscheReihenfolge.php +++ b/application/libraries/issues/plausichecks/DatumStudiensemesterFalscheReihenfolge.php @@ -14,11 +14,10 @@ class DatumStudiensemesterFalscheReihenfolge extends PlausiChecker $results = array(); // pass parameters needed for plausicheck - $studiensemester_kurzbz = isset($params['studiensemester_kurzbz']) ? $params['studiensemester_kurzbz'] : null; $studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null; // get all students failing the plausicheck - $prestudentRes = $this->_ci->plausichecklib->getDatumStudiensemesterFalscheReihenfolge($studiensemester_kurzbz, $studiengang_kz); + $prestudentRes = $this->_ci->plausichecklib->getDatumStudiensemesterFalscheReihenfolge($studiengang_kz); if (isError($prestudentRes)) return $prestudentRes; @@ -34,8 +33,7 @@ class DatumStudiensemesterFalscheReihenfolge extends PlausiChecker 'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz, 'fehlertext_params' => array('prestudent_id' => $prestudent->prestudent_id), 'resolution_params' => array( - 'prestudent_id' => $prestudent->prestudent_id, - 'studiensemester_kurzbz' => $prestudent->studiensemester_kurzbz + 'prestudent_id' => $prestudent->prestudent_id ) ); } diff --git a/application/libraries/issues/plausichecks/PlausiChecker.php b/application/libraries/issues/plausichecks/PlausiChecker.php index f4cd6f01e..3c781cd63 100644 --- a/application/libraries/issues/plausichecks/PlausiChecker.php +++ b/application/libraries/issues/plausichecks/PlausiChecker.php @@ -1,7 +1,7 @@ _ci->plausichecklib->getPrestudentenStgUngleichStgStudent($studiengang_kz); + $prestudentRes = $this->_ci->plausichecklib->getStgPrestudentUngleichStgStudent($studiengang_kz); if (isError($prestudentRes)) return $prestudentRes; diff --git a/application/libraries/issues/plausichecks/PrestudentStgUngleichStgStudienplan.php b/application/libraries/issues/plausichecks/StgPrestudentUngleichStgStudienplan.php similarity index 83% rename from application/libraries/issues/plausichecks/PrestudentStgUngleichStgStudienplan.php rename to application/libraries/issues/plausichecks/StgPrestudentUngleichStgStudienplan.php index 980297861..7175725fd 100644 --- a/application/libraries/issues/plausichecks/PrestudentStgUngleichStgStudienplan.php +++ b/application/libraries/issues/plausichecks/StgPrestudentUngleichStgStudienplan.php @@ -7,7 +7,7 @@ require_once('PlausiChecker.php'); /** * */ -class PrestudentStgUngleichStgStudienplan extends PlausiChecker +class StgPrestudentUngleichStgStudienplan extends PlausiChecker { public function executePlausiCheck($params) { @@ -17,7 +17,7 @@ class PrestudentStgUngleichStgStudienplan extends PlausiChecker $studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null; // get all students failing the plausicheck - $prestudentRes = $this->_ci->plausichecklib->getPrestudentStgUngleichStgStudienplan($studiengang_kz); + $prestudentRes = $this->_ci->plausichecklib->getStgPrestudentUngleichStgStudienplan($studiengang_kz); if (isError($prestudentRes)) return $prestudentRes; @@ -32,7 +32,7 @@ class PrestudentStgUngleichStgStudienplan extends PlausiChecker 'person_id' => $prestudent->person_id, 'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz, 'fehlertext_params' => array('prestudent_id' => $prestudent->prestudent_id, 'studienplan' => $prestudent->studienplan), - 'resolution_params' => array('prestudent_id' => $prestudent->prestudent_id) + 'resolution_params' => array('prestudent_id' => $prestudent->prestudent_id, 'studienordnung_id' => $prestudent->studienordnung_id) ); } } diff --git a/application/libraries/issues/resolvers/CORE_INOUT_0006.php b/application/libraries/issues/resolvers/CORE_INOUT_0006.php index a447a9625..6894c9878 100644 --- a/application/libraries/issues/resolvers/CORE_INOUT_0006.php +++ b/application/libraries/issues/resolvers/CORE_INOUT_0006.php @@ -15,7 +15,6 @@ class CORE_INOUT_0006 implements IIssueResolvedChecker $this->_ci =& get_instance(); // get code igniter instance $this->_ci->load->model('codex/Bisio_model', 'BisioModel'); - //$this->_ci->load->model('codex/Aufenthaltfoerderung_model', 'AufenthaltfoerderungModel'); // get all Zwecke $this->_ci->BisioModel->addSelect('ects_erworben'); diff --git a/application/libraries/issues/resolvers/CORE_INOUT_0007.php b/application/libraries/issues/resolvers/CORE_INOUT_0007.php index 925344e34..2d9c7a3f4 100644 --- a/application/libraries/issues/resolvers/CORE_INOUT_0007.php +++ b/application/libraries/issues/resolvers/CORE_INOUT_0007.php @@ -9,7 +9,7 @@ class CORE_INOUT_0007 implements IIssueResolvedChecker { public function checkIfIssueIsResolved($params) { - if (!isset($params['person_id']) || !is_numeric($params['person_id'])) + if (!isset($params['issue_person_id']) || !is_numeric($params['issue_person_id'])) return error('Person Id missing, issue_id: '.$params['issue_id']); if (!isset($params['studiensemester_kurzbz']) || isEmptyString($params['studiensemester_kurzbz'])) @@ -20,14 +20,13 @@ class CORE_INOUT_0007 implements IIssueResolvedChecker $this->_ci->load->library('issues/PlausicheckLib'); // check if issue persists - $checkRes = $this->_ci->plausichecklib->getIncomingHeimatNationOesterreich($params['studiensemester_kurzbz'], null, $params['person_id']); + $checkRes = $this->_ci->plausichecklib->getIncomingHeimatNationOesterreich($params['studiensemester_kurzbz'], null, $params['issue_person_id']); if (isError($checkRes)) return $checkRes; if (hasData($checkRes)) - return success(false); // not resolved if issue is still present + return success(false); // not resolved if issue is still present else return success(true); // resolved otherwise } } - diff --git a/application/libraries/issues/resolvers/CORE_INOUT_0008.php b/application/libraries/issues/resolvers/CORE_INOUT_0008.php new file mode 100644 index 000000000..afa43893a --- /dev/null +++ b/application/libraries/issues/resolvers/CORE_INOUT_0008.php @@ -0,0 +1,29 @@ +_ci =& get_instance(); // get code igniter instance + + $this->_ci->load->library('issues/PlausicheckLib'); + + // check if issue persists + $checkRes = $this->_ci->plausichecklib->getIncomingOhneIoDatensatz(null, $params['prestudent_id']); + + if (isError($checkRes)) return $checkRes; + + if (hasData($checkRes)) + return success(false); // not resolved if issue is still present + else + return success(true); // resolved otherwise + } +} diff --git a/application/libraries/issues/resolvers/CORE_PERSON_0001.php b/application/libraries/issues/resolvers/CORE_PERSON_0001.php new file mode 100644 index 000000000..bd94fea59 --- /dev/null +++ b/application/libraries/issues/resolvers/CORE_PERSON_0001.php @@ -0,0 +1,29 @@ +_ci =& get_instance(); // get code igniter instance + + $this->_ci->load->library('issues/PlausicheckLib'); + + // check if issue persists + $checkRes = $this->_ci->plausichecklib->getGbDatumWeitZurueck(null, null, $params['issue_person_id']); + + if (isError($checkRes)) return $checkRes; + + if (hasData($checkRes)) + return success(false); // not resolved if issue is still present + else + return success(true); // resolved otherwise + } +} diff --git a/application/libraries/issues/resolvers/CORE_PERSON_0002.php b/application/libraries/issues/resolvers/CORE_PERSON_0002.php new file mode 100644 index 000000000..d1bb2fe94 --- /dev/null +++ b/application/libraries/issues/resolvers/CORE_PERSON_0002.php @@ -0,0 +1,29 @@ +_ci =& get_instance(); // get code igniter instance + + $this->_ci->load->library('issues/PlausicheckLib'); + + // check if issue persists + $checkRes = $this->_ci->plausichecklib->getNationNichtOesterreichAberGemeinde(null, $params['issue_person_id']); + + if (isError($checkRes)) return $checkRes; + + if (hasData($checkRes)) + return success(false); // not resolved if issue is still present + else + return success(true); // resolved otherwise + } +} diff --git a/application/libraries/issues/resolvers/CORE_PERSON_0003.php b/application/libraries/issues/resolvers/CORE_PERSON_0003.php new file mode 100644 index 000000000..08fea6c05 --- /dev/null +++ b/application/libraries/issues/resolvers/CORE_PERSON_0003.php @@ -0,0 +1,29 @@ +_ci =& get_instance(); // get code igniter instance + + $this->_ci->load->library('issues/PlausicheckLib'); + + // check if issue persists + $checkRes = $this->_ci->plausichecklib->getFalscheAnzahlHeimatadressen(null, null, $params['issue_person_id']); + + if (isError($checkRes)) return $checkRes; + + if (hasData($checkRes)) + return success(false); // not resolved if issue is still present + else + return success(true); // resolved otherwise + } +} diff --git a/application/libraries/issues/resolvers/CORE_PERSON_0004.php b/application/libraries/issues/resolvers/CORE_PERSON_0004.php new file mode 100644 index 000000000..bfe243fd1 --- /dev/null +++ b/application/libraries/issues/resolvers/CORE_PERSON_0004.php @@ -0,0 +1,29 @@ +_ci =& get_instance(); // get code igniter instance + + $this->_ci->load->library('issues/PlausicheckLib'); + + // check if issue persists + $checkRes = $this->_ci->plausichecklib->getFalscheAnzahlZustelladressen(null, null, $params['issue_person_id']); + + if (isError($checkRes)) return $checkRes; + + if (hasData($checkRes)) + return success(false); // not resolved if issue is still present + else + return success(true); // resolved otherwise + } +} diff --git a/application/libraries/issues/resolvers/CORE_STG_0001.php b/application/libraries/issues/resolvers/CORE_STG_0001.php new file mode 100644 index 000000000..97cef6056 --- /dev/null +++ b/application/libraries/issues/resolvers/CORE_STG_0001.php @@ -0,0 +1,29 @@ +_ci =& get_instance(); // get code igniter instance + + $this->_ci->load->library('issues/PlausicheckLib'); + + // check if issue persists + $checkRes = $this->_ci->plausichecklib->getStgPrestudentUngleichStgStudent(null, $params['prestudent_id']); + + if (isError($checkRes)) return $checkRes; + + if (hasData($checkRes)) + return success(false); // not resolved if issue is still present + else + return success(true); // resolved otherwise + } +} diff --git a/application/libraries/issues/resolvers/CORE_STG_0002.php b/application/libraries/issues/resolvers/CORE_STG_0002.php new file mode 100644 index 000000000..fe414de38 --- /dev/null +++ b/application/libraries/issues/resolvers/CORE_STG_0002.php @@ -0,0 +1,32 @@ +_ci =& get_instance(); // get code igniter instance + + $this->_ci->load->library('issues/PlausicheckLib'); + + // check if issue persists + $checkRes = $this->_ci->plausichecklib->getOrgformStgUngleichOrgformPrestudent($params['studiensemester_kurzbz'], null, $params['prestudent_id']); + + if (isError($checkRes)) return $checkRes; + + if (hasData($checkRes)) + return success(false); // not resolved if issue is still present + else + return success(true); // resolved otherwise + } +} diff --git a/application/libraries/issues/resolvers/CORE_STG_0003.php b/application/libraries/issues/resolvers/CORE_STG_0003.php new file mode 100644 index 000000000..33cb0846b --- /dev/null +++ b/application/libraries/issues/resolvers/CORE_STG_0003.php @@ -0,0 +1,32 @@ +_ci =& get_instance(); // get code igniter instance + + $this->_ci->load->library('issues/PlausicheckLib'); + + // check if issue persists + $checkRes = $this->_ci->plausichecklib->getPrestudentMischformOhneOrgform($params['studiensemester_kurzbz'], null, $params['prestudent_id']); + + if (isError($checkRes)) return $checkRes; + + if (hasData($checkRes)) + return success(false); // not resolved if issue is still present + else + return success(true); // resolved otherwise + } +} diff --git a/application/libraries/issues/resolvers/CORE_STG_0004.php b/application/libraries/issues/resolvers/CORE_STG_0004.php new file mode 100644 index 000000000..02d45bbd3 --- /dev/null +++ b/application/libraries/issues/resolvers/CORE_STG_0004.php @@ -0,0 +1,32 @@ +_ci =& get_instance(); // get code igniter instance + + $this->_ci->load->library('issues/PlausicheckLib'); + + // check if issue persists + $checkRes = $this->_ci->plausichecklib->getStgPrestudentUngleichStgStudienplan(null, $params['prestudent_id'], $params['studienordnung_id']); + + if (isError($checkRes)) return $checkRes; + + if (hasData($checkRes)) + return success(false); // not resolved if issue is still present + else + return success(true); // resolved otherwise + } +} diff --git a/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0001.php b/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0001.php new file mode 100644 index 000000000..78c49810b --- /dev/null +++ b/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0001.php @@ -0,0 +1,29 @@ +_ci =& get_instance(); // get code igniter instance + + $this->_ci->load->library('issues/PlausicheckLib'); + + // check if issue persists + $checkRes = $this->_ci->plausichecklib->getAbbrecherAktiv(null, $params['prestudent_id']); + + if (isError($checkRes)) return $checkRes; + + if (hasData($checkRes)) + return success(false); // not resolved if issue is still present + else + return success(true); // resolved otherwise + } +} diff --git a/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0002.php b/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0002.php new file mode 100644 index 000000000..23943397a --- /dev/null +++ b/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0002.php @@ -0,0 +1,29 @@ +_ci =& get_instance(); // get code igniter instance + + $this->_ci->load->library('issues/PlausicheckLib'); + + // check if issue persists + $checkRes = $this->_ci->plausichecklib->getStudentstatusNachAbbrecher(null, $params['prestudent_id']); + + if (isError($checkRes)) return $checkRes; + + if (hasData($checkRes)) + return success(false); // not resolved if issue is still present + else + return success(true); // resolved otherwise + } +} diff --git a/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0003.php b/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0003.php new file mode 100644 index 000000000..6ac243b4f --- /dev/null +++ b/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0003.php @@ -0,0 +1,32 @@ +_ci =& get_instance(); // get code igniter instance + + $this->_ci->load->library('issues/PlausicheckLib'); + + // check if issue persists + $checkRes = $this->_ci->plausichecklib->getAusbildungssemPrestudentUngleichAusbildungssemStatus($params['studiensemester_kurzbz'], null, $params['prestudent_id']); + + if (isError($checkRes)) return $checkRes; + + if (hasData($checkRes)) + return success(false); // not resolved if issue is still present + else + return success(true); // resolved otherwise + } +} diff --git a/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0004.php b/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0004.php new file mode 100644 index 000000000..d76215b6a --- /dev/null +++ b/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0004.php @@ -0,0 +1,32 @@ +_ci =& get_instance(); // get code igniter instance + + $this->_ci->load->library('issues/PlausicheckLib'); + + // check if issue persists + $checkRes = $this->_ci->plausichecklib->getInaktiverStudentAktiverStatus($params['studiensemester_kurzbz'], null, $params['prestudent_id']); + + if (isError($checkRes)) return $checkRes; + + if (hasData($checkRes)) + return success(false); // not resolved if issue is still present + else + return success(true); // resolved otherwise + } +} diff --git a/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0005.php b/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0005.php new file mode 100644 index 000000000..7f7ca4723 --- /dev/null +++ b/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0005.php @@ -0,0 +1,32 @@ +_ci =& get_instance(); // get code igniter instance + + $this->_ci->load->library('issues/PlausicheckLib'); + + // check if issue persists + $checkRes = $this->_ci->plausichecklib->getInskriptionVorLetzerBismeldung($params['studiensemester_kurzbz'], null, $params['prestudent_id']); + + if (isError($checkRes)) return $checkRes; + + if (hasData($checkRes)) + return success(false); // not resolved if issue is still present + else + return success(true); // resolved otherwise + } +} diff --git a/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0006.php b/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0006.php new file mode 100644 index 000000000..ba1e5b715 --- /dev/null +++ b/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0006.php @@ -0,0 +1,29 @@ +_ci =& get_instance(); // get code igniter instance + + $this->_ci->load->library('issues/PlausicheckLib'); + + // check if issue persists + $checkRes = $this->_ci->plausichecklib->getDatumStudiensemesterFalscheReihenfolge(null, $params['prestudent_id']); + + if (isError($checkRes)) return $checkRes; + + if (hasData($checkRes)) + return success(false); // not resolved if issue is still present + else + return success(true); // resolved otherwise + } +} diff --git a/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0007.php b/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0007.php new file mode 100644 index 000000000..1dd8fdcb2 --- /dev/null +++ b/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0007.php @@ -0,0 +1,29 @@ +_ci =& get_instance(); // get code igniter instance + + $this->_ci->load->library('issues/PlausicheckLib'); + + // check if issue persists + $checkRes = $this->_ci->plausichecklib->getAktiverStudentOhneStatus(null, $params['prestudent_id']); + + if (isError($checkRes)) return $checkRes; + + if (hasData($checkRes)) + return success(false); // not resolved if issue is still present + else + return success(true); // resolved otherwise + } +} diff --git a/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0008.php b/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0008.php new file mode 100644 index 000000000..83357d9bf --- /dev/null +++ b/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0008.php @@ -0,0 +1,32 @@ +_ci =& get_instance(); // get code igniter instance + + $this->_ci->load->library('issues/PlausicheckLib'); + + // check if issue persists + $checkRes = $this->_ci->plausichecklib->getStudienplanUngueltig($params['studiensemester_kurzbz'], null, $params['prestudent_id']); + + if (isError($checkRes)) return $checkRes; + + if (hasData($checkRes)) + return success(false); // not resolved if issue is still present + else + return success(true); // resolved otherwise + } +} diff --git a/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0009.php b/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0009.php new file mode 100644 index 000000000..b1b5e9876 --- /dev/null +++ b/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0009.php @@ -0,0 +1,29 @@ +_ci =& get_instance(); // get code igniter instance + + $this->_ci->load->library('issues/PlausicheckLib'); + + // check if issue persists + $checkRes = $this->_ci->plausichecklib->getFalscheAnzahlAbschlusspruefungen(null, null, $params['prestudent_id']); + + if (isError($checkRes)) return $checkRes; + + if (hasData($checkRes)) + return success(false); // not resolved if issue is still present + else + return success(true); // resolved otherwise + } +} diff --git a/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0010.php b/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0010.php new file mode 100644 index 000000000..1e3a6849b --- /dev/null +++ b/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0010.php @@ -0,0 +1,29 @@ +_ci =& get_instance(); // get code igniter instance + + $this->_ci->load->library('issues/PlausicheckLib'); + + // check if issue persists + $checkRes = $this->_ci->plausichecklib->getDatumAbschlusspruefungFehlt(null, null, $params['abschlusspruefung_id']); + + if (isError($checkRes)) return $checkRes; + + if (hasData($checkRes)) + return success(false); // not resolved if issue is still present + else + return success(true); // resolved otherwise + } +} diff --git a/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0011.php b/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0011.php new file mode 100644 index 000000000..233240305 --- /dev/null +++ b/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0011.php @@ -0,0 +1,29 @@ +_ci =& get_instance(); // get code igniter instance + + $this->_ci->load->library('issues/PlausicheckLib'); + + // check if issue persists + $checkRes = $this->_ci->plausichecklib->getDatumSponsionFehlt(null, null, $params['abschlusspruefung_id']); + + if (isError($checkRes)) return $checkRes; + + if (hasData($checkRes)) + return success(false); // not resolved if issue is still present + else + return success(true); // resolved otherwise + } +} diff --git a/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0012.php b/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0012.php new file mode 100644 index 000000000..38832edc0 --- /dev/null +++ b/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0012.php @@ -0,0 +1,32 @@ +_ci =& get_instance(); // get code igniter instance + + $this->_ci->load->library('issues/PlausicheckLib'); + + // check if issue persists + $checkRes = $this->_ci->plausichecklib->getBewerberNichtZumRtAngetreten($params['studiensemester_kurzbz'], null, $params['prestudent_id']); + + if (isError($checkRes)) return $checkRes; + + if (hasData($checkRes)) + return success(false); // not resolved if issue is still present + else + return success(true); // resolved otherwise + } +} diff --git a/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0013.php b/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0013.php new file mode 100644 index 000000000..78ad40a8e --- /dev/null +++ b/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0013.php @@ -0,0 +1,32 @@ +_ci =& get_instance(); // get code igniter instance + + $this->_ci->load->library('issues/PlausicheckLib'); + + // check if issue persists + $checkRes = $this->_ci->plausichecklib->getAktSemesterNull($params['studiensemester_kurzbz'], null, $params['prestudent_id']); + + if (isError($checkRes)) return $checkRes; + + if (hasData($checkRes)) + return success(false); // not resolved if issue is still present + else + return success(true); // resolved otherwise + } +} diff --git a/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0014.php b/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0014.php new file mode 100644 index 000000000..9b70219f4 --- /dev/null +++ b/application/libraries/issues/resolvers/CORE_STUDENTSTATUS_0014.php @@ -0,0 +1,32 @@ +_ci =& get_instance(); // get code igniter instance + + $this->_ci->load->library('issues/PlausicheckLib'); + + // check if issue persists + $checkRes = $this->_ci->plausichecklib->getAbschlussstatusFehlt($params['studiensemester_kurzbz'], null, $params['prestudent_id']); + + if (isError($checkRes)) return $checkRes; + + if (hasData($checkRes)) + return success(false); // not resolved if issue is still present + else + return success(true); // resolved otherwise + } +} diff --git a/application/views/system/issues/plausichecks.php b/application/views/system/issues/plausichecks.php index 8fba2a02f..db894457f 100644 --- a/application/views/system/issues/plausichecks.php +++ b/application/views/system/issues/plausichecks.php @@ -82,7 +82,7 @@ $this->load->view(

- +
diff --git a/public/js/issues/plausichecks.js b/public/js/issues/plausichecks.js index 0849fff85..f679c9434 100644 --- a/public/js/issues/plausichecks.js +++ b/public/js/issues/plausichecks.js @@ -54,7 +54,7 @@ var Plausichecks = { * When JQuery is up */ $(document).ready(function () { - // set event for adding a new Zuständigkeit + // start the Plausicheck run on button click $("#plausistart").click( function () { Plausichecks.startPlausichecks( diff --git a/system/fehlerupdate.php b/system/fehlerupdate.php index 8709fc812..e329ef62b 100644 --- a/system/fehlerupdate.php +++ b/system/fehlerupdate.php @@ -151,7 +151,7 @@ $fehlerArr = array( ), array( 'fehlercode' => 'CORE_STG_0004', - 'fehler_kurzbz' => 'PrestudentStgUngleichStgStudienplan', + 'fehler_kurzbz' => 'StgPrestudentUngleichStgStudienplan', 'fehlercode_extern' => null, 'fehlertext' => 'Studiengang des Prestudenten passt nicht zu Studiengang des Studienplans. (prestudent_id %s, Studienplan %s)', 'fehlertyp_kurzbz' => 'error', @@ -326,11 +326,11 @@ for ($fehlerCounter = 0; $fehlerCounter < count($fehlerArr); $fehlerCounter++) { $selectFehlerQuery = 'SELECT 1 FROM system.tbl_fehler - WHERE fehlercode = '.$db->db_add_param($fehler['fehlercode']); + WHERE fehlercode = '.$db->db_add_param($fehler['fehlercode']); // If no error occurred while loading a fehler from the DB - if ($dbFehlerDefinition = @$db->db_query($selectFehlerQuery)) - { + if ($dbFehlerDefinition = @$db->db_query($selectFehlerQuery)) + { // If NO filters were loaded: insert if ($db->db_num_rows($dbFehlerDefinition) == 0) {