mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-21 00:42:15 +00:00
- Added utility function var_dump_to_error_log to the fhc_helper
- Added method checkAvailability to model Reihungstest_model - Added method checkAvailability to library ReihungstestLib - Added a validation for the test in the method insertPersonReihungstest of the library ReihungstestLib
This commit is contained in:
@@ -23,7 +23,14 @@ class ReihungstestLib
|
||||
*/
|
||||
public function insertPersonReihungstest($ddReihungstest)
|
||||
{
|
||||
return $this->ci->RtPersonModel->insert($ddReihungstest);
|
||||
if (isset($ddReihungstest['rt_id']) && $this->checkAvailability($ddReihungstest['rt_id']))
|
||||
{
|
||||
return $this->ci->RtPersonModel->insert($ddReihungstest);
|
||||
}
|
||||
else
|
||||
{
|
||||
return error('This test is not more available');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -62,4 +69,19 @@ class ReihungstestLib
|
||||
|
||||
return $this->ci->ReihungstestModel->loadWhere($parametersArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* It checks if the test is available
|
||||
*/
|
||||
public function checkAvailability($reihungstest_id)
|
||||
{
|
||||
$result = $this->ci->ReihungstestModel->checkAvailability($reihungstest_id);
|
||||
|
||||
if (hasData($result))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user