mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-25 00:24:35 +00:00
Plausichecks: enabled passing of params to plausi issue checkers, created first checker StgPrestudentUngleichStgStudent
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once('IPlausiChecker.php');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class StgPrestudentUngleichStgStudent implements IPlausiChecker
|
||||
{
|
||||
public function executePlausiCheck($params)
|
||||
{
|
||||
$results = array();
|
||||
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
$this->_ci->load->library('issues/PlausicheckLib'); // load plausicheck library
|
||||
|
||||
// get all students failing the plausicheck
|
||||
$prestudentRes = $this->_ci->plausichecklib->getPrestudentenStgUngleichStgStudent();
|
||||
|
||||
if (isError($prestudentRes)) return $prestudentRes;
|
||||
|
||||
if (hasData($prestudentRes))
|
||||
{
|
||||
$prestudents = getData($prestudentRes);
|
||||
|
||||
// populate results with data necessary for writing issues
|
||||
foreach ($prestudents as $prestudent)
|
||||
{
|
||||
$results[] = array(
|
||||
'person_id' => $prestudent->person_id,
|
||||
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
|
||||
'fehlertext_params' => array('prestudent_id' => $prestudent->prestudent_id),
|
||||
'resolution_params' => array('prestudent_id' => $prestudent->prestudent_id)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return success($results);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user