mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
Compare commits
2 Commits
805fd34d17
...
68403c637c
| Author | SHA1 | Date | |
|---|---|---|---|
| 68403c637c | |||
| 52b7226c3b |
@@ -438,7 +438,7 @@ $config['fehler'] = array(
|
||||
'fehlercode' => 'CORE_STUDENTSTATUS_0022',
|
||||
'fehler_kurzbz' => 'FalscheStatusabfolgeVorStudentstatus',
|
||||
'fehlercode_extern' => null,
|
||||
'fehlertext' => 'Falsche Statusabfolge vor Studentstatus (prestudent_id %s, Studiensemester%s, richtige Abfolge: %s)',
|
||||
'fehlertext' => 'Falsche Statusabfolge vor Studentstatus (prestudent_id %s, Studiensemester %s, richtige Abfolge: %s)',
|
||||
'fehlertyp_kurzbz' => 'error',
|
||||
'app' => 'core',
|
||||
'producerLibName' => 'FalscheStatusabfolgeVorStudentstatus',
|
||||
|
||||
@@ -17,11 +17,18 @@ class StudentstatusNachAbbrecher extends PlausiChecker
|
||||
$exkludierte_studiengang_kz = isset($this->_config['exkludierteStudiengaenge']) ? $this->_config['exkludierteStudiengaenge'] : null;
|
||||
|
||||
// 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;
|
||||
$person_id = isset($params['person_id']) ? $params['person_id'] : null;
|
||||
|
||||
// get all students failing the plausicheck
|
||||
$prestudentRes = $this->getStudentstatusNachAbbrecher($studiengang_kz, null, $person_id, $exkludierte_studiengang_kz);
|
||||
$prestudentRes = $this->getStudentstatusNachAbbrecher(
|
||||
$studiensemester_kurzbz = null,
|
||||
$studiengang_kz,
|
||||
null,
|
||||
$person_id,
|
||||
$exkludierte_studiengang_kz
|
||||
);
|
||||
|
||||
if (isError($prestudentRes)) return $prestudentRes;
|
||||
|
||||
@@ -47,12 +54,13 @@ class StudentstatusNachAbbrecher extends PlausiChecker
|
||||
|
||||
/**
|
||||
* There shouldn't be any status after Abbrecher status.
|
||||
* @param studiensemester_kurzbz int if check is to be executed for certain Studiensemester
|
||||
* @param studiengang_kz int if check is to be executed for certain Studiengang
|
||||
* @param prestudent_id int if check is to be executed only for one prestudent
|
||||
* @param exkludierte_studiengang_kz array if certain Studiengänge have to be excluded from check
|
||||
* @return success with prestudents or error
|
||||
*/
|
||||
public function getStudentstatusNachAbbrecher($studiengang_kz = null, $prestudent_id = null, $person_id = null, $exkludierte_studiengang_kz = null)
|
||||
public function getStudentstatusNachAbbrecher($studiensemester_kurzbz = null, $studiengang_kz = null, $prestudent_id = null, $person_id = null, $exkludierte_studiengang_kz = null)
|
||||
{
|
||||
$params = array();
|
||||
|
||||
@@ -68,6 +76,18 @@ class StudentstatusNachAbbrecher extends PlausiChecker
|
||||
prestatus.status_kurzbz = 'Abbrecher'
|
||||
AND get_rolle_prestudent(prestudent.prestudent_id, prestatus.studiensemester_kurzbz) <> 'Abbrecher'";
|
||||
|
||||
if (isset($studiensemester_kurzbz))
|
||||
{
|
||||
$qry .= " AND EXISTS (
|
||||
SELECT 1
|
||||
FROM public.tbl_prestudentstatus ps
|
||||
WHERE studiensemester_kurzbz IN ?
|
||||
AND ps.prestudent_id = prestudent.prestudent_id
|
||||
)";
|
||||
|
||||
$params[] = [$studiensemester_kurzbz];
|
||||
}
|
||||
|
||||
if (isset($studiengang_kz))
|
||||
{
|
||||
$qry .= " AND stg.studiengang_kz = ?";
|
||||
|
||||
@@ -17,11 +17,12 @@ class StudentstatusNachDiplomand extends PlausiChecker
|
||||
$exkludierte_studiengang_kz = isset($this->_config['exkludierteStudiengaenge']) ? $this->_config['exkludierteStudiengaenge'] : null;
|
||||
|
||||
// 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;
|
||||
$prestudent_id = isset($params['prestudent_id']) ? $params['prestudent_id'] : null;
|
||||
|
||||
// get all students failing the plausicheck
|
||||
$prestudentRes = $this->getStudentstatusNachDiplomand($studiengang_kz, $prestudent_id, $exkludierte_studiengang_kz);
|
||||
$prestudentRes = $this->getStudentstatusNachDiplomand($studiensemester_kurzbz, $studiengang_kz, $prestudent_id, $exkludierte_studiengang_kz);
|
||||
|
||||
if (isError($prestudentRes)) return $prestudentRes;
|
||||
|
||||
@@ -47,12 +48,13 @@ class StudentstatusNachDiplomand extends PlausiChecker
|
||||
|
||||
/**
|
||||
* There shouldn't be any student status after Diplomand status.
|
||||
* @param studiensemester_kurzbz int if check is to be executed for certain Studiensemester
|
||||
* @param studiengang_kz int if check is to be executed for certain Studiengang
|
||||
* @param prestudent_id int if check is to be executed only for one prestudent
|
||||
* @param exkludierte_studiengang_kz array if certain Studiengänge have to be excluded from check
|
||||
* @return success with prestudents or error
|
||||
*/
|
||||
public function getStudentstatusNachDiplomand($studiengang_kz = null, $prestudent_id = null, $exkludierte_studiengang_kz = null)
|
||||
public function getStudentstatusNachDiplomand($studiensemester_kurzbz = null, $studiengang_kz = null, $prestudent_id = null, $exkludierte_studiengang_kz = null)
|
||||
{
|
||||
$params = array();
|
||||
|
||||
@@ -76,6 +78,18 @@ class StudentstatusNachDiplomand extends PlausiChecker
|
||||
AND datum::date > status.datum::date
|
||||
)";
|
||||
|
||||
if (isset($studiensemester_kurzbz))
|
||||
{
|
||||
$qry .= " AND EXISTS (
|
||||
SELECT 1
|
||||
FROM public.tbl_prestudentstatus ps
|
||||
WHERE studiensemester_kurzbz IN ?
|
||||
AND ps.prestudent_id = prestudent.prestudent_id
|
||||
)";
|
||||
|
||||
$params[] = [$studiensemester_kurzbz];
|
||||
}
|
||||
|
||||
if (isset($studiengang_kz))
|
||||
{
|
||||
$qry .= " AND stg.studiengang_kz = ?";
|
||||
|
||||
@@ -86,9 +86,7 @@ if($prestudent_id!='')
|
||||
$disabled = $bismeldestichtag->checkMeldestichtagErreicht($datum) && !$rechte->isBerechtigt('student/keine_studstatuspruefung', null, 'suid')
|
||||
? ' disabled="true"'
|
||||
: '';
|
||||
$isStatusBeforeStudent = in_array($status_kurzbz, array('Student','Diplomand','Absovlent','Incoming','Abbrecher','Unterbrecher'))
|
||||
? false
|
||||
: true;
|
||||
$isStatusBeforeStudent = !in_array($status_kurzbz, array('Student','Diplomand','Absovlent','Incoming','Abbrecher','Unterbrecher'));
|
||||
$disabledStudent = $isStatusBeforeStudent
|
||||
? ' '
|
||||
: ' disabled="true"';
|
||||
|
||||
Reference in New Issue
Block a user