-added issue resolvers for plausichecks - renamed fehler PrestudentStgUngleichStgStudienplan to StgPrestudentUngleichStgStudienplan -fixed some parameters passed for resolving -plausicheck getDatumStudiensemesterFalscheReiheinfolge: performed directly in SQL for speedup -plausicheck GUI: fixed comment, minor text changes

This commit is contained in:
KarpAlex
2022-10-04 19:17:03 +02:00
parent 5670f931ef
commit 2a060ace25
36 changed files with 789 additions and 104 deletions
+24 -1
View File
@@ -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'
);
}
}
@@ -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;
}
}
+49 -80
View File
@@ -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))
@@ -34,7 +34,7 @@ class PlausicheckProducerLib
'NationNichtOesterreichAberGemeinde' => 'NationNichtOesterreichAberGemeinde',
'OrgformStgUngleichOrgformPrestudent' => 'OrgformStgUngleichOrgformPrestudent',
'PrestudentMischformOhneOrgform' => 'PrestudentMischformOhneOrgform',
'PrestudentStgUngleichStgStudienplan' => 'PrestudentStgUngleichStgStudienplan',
'StgPrestudentUngleichStgStudienplan' => 'StgPrestudentUngleichStgStudienplan',
'StgPrestudentUngleichStgStudent' => 'StgPrestudentUngleichStgStudent',
'StudentstatusNachAbbrecher' => 'StudentstatusNachAbbrecher'
//'StudienplanUngueltig' => 'StudienplanUngueltig'
@@ -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
)
);
}
@@ -1,7 +1,7 @@
<?php
/**
* classing defining method and ressources to use for plausicheck issue producer
* class defining ressources and method to use for plausicheck issue producer
*/
abstract class PlausiChecker
{
@@ -17,7 +17,7 @@ class StgPrestudentUngleichStgStudent extends PlausiChecker
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
// get all students failing the plausicheck
$prestudentRes = $this->_ci->plausichecklib->getPrestudentenStgUngleichStgStudent($studiengang_kz);
$prestudentRes = $this->_ci->plausichecklib->getStgPrestudentUngleichStgStudent($studiengang_kz);
if (isError($prestudentRes)) return $prestudentRes;
@@ -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)
);
}
}
@@ -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');
@@ -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
}
}
@@ -0,0 +1,29 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Incoming shouldn't have austrian home address.
*/
class CORE_INOUT_0008 implements IIssueResolvedChecker
{
public function checkIfIssueIsResolved($params)
{
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
$this->_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
}
}
@@ -0,0 +1,29 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Incoming shouldn't have austrian home address.
*/
class CORE_PERSON_0001 implements IIssueResolvedChecker
{
public function checkIfIssueIsResolved($params)
{
if (!isset($params['issue_person_id']) || !is_numeric($params['issue_person_id']))
return error('Person Id missing, issue_id: '.$params['issue_id']);
$this->_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
}
}
@@ -0,0 +1,29 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Incoming shouldn't have austrian home address.
*/
class CORE_PERSON_0002 implements IIssueResolvedChecker
{
public function checkIfIssueIsResolved($params)
{
if (!isset($params['issue_person_id']) || !is_numeric($params['issue_person_id']))
return error('Person Id missing, issue_id: '.$params['issue_id']);
$this->_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
}
}
@@ -0,0 +1,29 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Incoming shouldn't have austrian home address.
*/
class CORE_PERSON_0003 implements IIssueResolvedChecker
{
public function checkIfIssueIsResolved($params)
{
if (!isset($params['issue_person_id']) || !is_numeric($params['issue_person_id']))
return error('Person Id missing, issue_id: '.$params['issue_id']);
$this->_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
}
}
@@ -0,0 +1,29 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Incoming shouldn't have austrian home address.
*/
class CORE_PERSON_0004 implements IIssueResolvedChecker
{
public function checkIfIssueIsResolved($params)
{
if (!isset($params['issue_person_id']) || !is_numeric($params['issue_person_id']))
return error('Person Id missing, issue_id: '.$params['issue_id']);
$this->_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
}
}
@@ -0,0 +1,29 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Incoming shouldn't have austrian home address.
*/
class CORE_STG_0001 implements IIssueResolvedChecker
{
public function checkIfIssueIsResolved($params)
{
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
$this->_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
}
}
@@ -0,0 +1,32 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Incoming shouldn't have austrian home address.
*/
class CORE_STG_0002 implements IIssueResolvedChecker
{
public function checkIfIssueIsResolved($params)
{
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
if (!isset($params['studiensemester_kurzbz']) || isEmptyString($params['studiensemester_kurzbz']))
return error('Studiensemester missing, issue_id: '.$params['issue_id']);
$this->_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
}
}
@@ -0,0 +1,32 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Incoming shouldn't have austrian home address.
*/
class CORE_STG_0003 implements IIssueResolvedChecker
{
public function checkIfIssueIsResolved($params)
{
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
if (!isset($params['studiensemester_kurzbz']) || isEmptyString($params['studiensemester_kurzbz']))
return error('Studiensemester missing, issue_id: '.$params['issue_id']);
$this->_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
}
}
@@ -0,0 +1,32 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Incoming shouldn't have austrian home address.
*/
class CORE_STG_0004 implements IIssueResolvedChecker
{
public function checkIfIssueIsResolved($params)
{
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
if (!isset($params['studienordnung_id']) || !is_numeric($params['studienordnung_id']))
return error('Studienordnung Id missing, issue_id: '.$params['issue_id']);
$this->_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
}
}
@@ -0,0 +1,29 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Incoming shouldn't have austrian home address.
*/
class CORE_STUDENTSTATUS_0001 implements IIssueResolvedChecker
{
public function checkIfIssueIsResolved($params)
{
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
$this->_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
}
}
@@ -0,0 +1,29 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Incoming shouldn't have austrian home address.
*/
class CORE_STUDENTSTATUS_0002 implements IIssueResolvedChecker
{
public function checkIfIssueIsResolved($params)
{
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
$this->_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
}
}
@@ -0,0 +1,32 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Incoming shouldn't have austrian home address.
*/
class CORE_STUDENTSTATUS_0003 implements IIssueResolvedChecker
{
public function checkIfIssueIsResolved($params)
{
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
if (!isset($params['studiensemester_kurzbz']) || isEmptyString($params['studiensemester_kurzbz']))
return error('Studiensemester missing, issue_id: '.$params['issue_id']);
$this->_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
}
}
@@ -0,0 +1,32 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Incoming shouldn't have austrian home address.
*/
class CORE_STUDENTSTATUS_0004 implements IIssueResolvedChecker
{
public function checkIfIssueIsResolved($params)
{
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
if (!isset($params['studiensemester_kurzbz']) || isEmptyString($params['studiensemester_kurzbz']))
return error('Studiensemester missing, issue_id: '.$params['issue_id']);
$this->_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
}
}
@@ -0,0 +1,32 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Incoming shouldn't have austrian home address.
*/
class CORE_STUDENTSTATUS_0005 implements IIssueResolvedChecker
{
public function checkIfIssueIsResolved($params)
{
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
if (!isset($params['studiensemester_kurzbz']) || isEmptyString($params['studiensemester_kurzbz']))
return error('Studiensemester missing, issue_id: '.$params['issue_id']);
$this->_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
}
}
@@ -0,0 +1,29 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Incoming shouldn't have austrian home address.
*/
class CORE_STUDENTSTATUS_0006 implements IIssueResolvedChecker
{
public function checkIfIssueIsResolved($params)
{
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
$this->_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
}
}
@@ -0,0 +1,29 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Incoming shouldn't have austrian home address.
*/
class CORE_STUDENTSTATUS_0007 implements IIssueResolvedChecker
{
public function checkIfIssueIsResolved($params)
{
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
$this->_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
}
}
@@ -0,0 +1,32 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Incoming shouldn't have austrian home address.
*/
class CORE_STUDENTSTATUS_0008 implements IIssueResolvedChecker
{
public function checkIfIssueIsResolved($params)
{
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
if (!isset($params['studiensemester_kurzbz']) || isEmptyString($params['studiensemester_kurzbz']))
return error('Studiensemester missing, issue_id: '.$params['issue_id']);
$this->_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
}
}
@@ -0,0 +1,29 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Incoming shouldn't have austrian home address.
*/
class CORE_STUDENTSTATUS_0009 implements IIssueResolvedChecker
{
public function checkIfIssueIsResolved($params)
{
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
$this->_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
}
}
@@ -0,0 +1,29 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Incoming shouldn't have austrian home address.
*/
class CORE_STUDENTSTATUS_0010 implements IIssueResolvedChecker
{
public function checkIfIssueIsResolved($params)
{
if (!isset($params['abschlusspruefung_id']) || !is_numeric($params['abschlusspruefung_id']))
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
$this->_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
}
}
@@ -0,0 +1,29 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Incoming shouldn't have austrian home address.
*/
class CORE_STUDENTSTATUS_0011 implements IIssueResolvedChecker
{
public function checkIfIssueIsResolved($params)
{
if (!isset($params['abschlusspruefung_id']) || !is_numeric($params['abschlusspruefung_id']))
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
$this->_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
}
}
@@ -0,0 +1,32 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Incoming shouldn't have austrian home address.
*/
class CORE_STUDENTSTATUS_0012 implements IIssueResolvedChecker
{
public function checkIfIssueIsResolved($params)
{
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
if (!isset($params['studiensemester_kurzbz']) || isEmptyString($params['studiensemester_kurzbz']))
return error('Studiensemester missing, issue_id: '.$params['issue_id']);
$this->_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
}
}
@@ -0,0 +1,32 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Incoming shouldn't have austrian home address.
*/
class CORE_STUDENTSTATUS_0013 implements IIssueResolvedChecker
{
public function checkIfIssueIsResolved($params)
{
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
if (!isset($params['studiensemester_kurzbz']) || isEmptyString($params['studiensemester_kurzbz']))
return error('Studiensemester missing, issue_id: '.$params['issue_id']);
$this->_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
}
}
@@ -0,0 +1,32 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Incoming shouldn't have austrian home address.
*/
class CORE_STUDENTSTATUS_0014 implements IIssueResolvedChecker
{
public function checkIfIssueIsResolved($params)
{
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
if (!isset($params['studiensemester_kurzbz']) || isEmptyString($params['studiensemester_kurzbz']))
return error('Studiensemester missing, issue_id: '.$params['issue_id']);
$this->_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
}
}
@@ -82,7 +82,7 @@ $this->load->view(
<div class="col-xs-2 form-group">
<label>&nbsp;</label>
<br />
<button class="btn btn-default" id="plausistart">Plausichecks starten</button>
<button class="btn btn-default text-right" id="plausistart">Plausichecks starten</button>
</div>
</div>
<div class="row">
+1 -1
View File
@@ -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(
+4 -4
View File
@@ -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)
{