added Plausicheck CORE_STUDENTSTATUS_0015 for finding persons without Konto Buchungen (charges), Plausichecks GUI: generic plausicheck error text is displayed if not defined erroroccured, instead of success message

This commit is contained in:
KarpAlex
2023-02-20 11:40:55 +01:00
parent de81a5abbd
commit 88dee31289
7 changed files with 160 additions and 4 deletions
@@ -0,0 +1,36 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Student with active status should have been charged, i.e. have a Kontobuchung with negative or zero value.
*/
class CORE_STUDENTSTATUS_0015 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->getAktiverStudentstatusOhneKontobuchung(
$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
}
}