correct student check

This commit is contained in:
cgfhtw
2024-08-07 15:51:19 +02:00
parent 0621073f8d
commit 24d74dd332
3 changed files with 9 additions and 66 deletions
@@ -127,20 +127,22 @@ class PrestudentstatusCheckLib
}
/**
* Checks if a student role already exists.
* Checks if a student already exists.
*
* @param integer $prestudent_id
*
* @return stdClass
*/
public function checkIfExistingStudentRolle($prestudent_id)
public function checkIfExistingStudent($prestudent_id)
{
$result = $this->_ci->StudentModel->checkIfExistingStudentRolle($prestudent_id);
$result = $this->_ci->StudentModel->loadWhere([
'prestudent_id' => $prestudent_id
]);
if (isError($result))
return $result;
return success(getData($result) != '0');
return success(hasData($result));
}
/**
@@ -229,23 +231,6 @@ class PrestudentstatusCheckLib
return success(hasData($result));
}
/**
* Checks if is the first student Status
*
* @param integer $prestudent_id
*
* @return stdClass
*/
public function checkIfIsErsterStudent($prestudent_id)
{
$result = $this->_ci->StudentModel->checkIfExistingStudentRolle($prestudent_id);
if (isError($result))
return $result;
return success(getData($result) == '0');
}
/**
* Check if Bismeldestichtag erreicht
*