beim abweisen das studiensemester hinzugefuegt

This commit is contained in:
ma0048
2021-06-01 11:13:23 +02:00
parent f05493d3f3
commit 5330e2b250
2 changed files with 7 additions and 4 deletions
@@ -1713,13 +1713,14 @@ class InfoCenter extends Auth_Controller
$statusgrund = $this->input->post('statusgrund');
$studiengang = $this->input->post('studiengang');
$personen = $this->input->post('personen');
$studienSemester = $this->variablelib->getVar('infocenter_studiensemester');
if ($statusgrund === 'null' || $studiengang === 'null' || empty($personen))
$this->terminateWithJsonError("Bitte Statusgrund, Studiengang und Personen auswählen.");
foreach($personen as $person)
{
$prestudent = $this->PrestudentModel->getPrestudentByStudiengangAndPerson($studiengang, $person);
$prestudent = $this->PrestudentModel->getPrestudentByStudiengangAndPerson($studiengang, $person, $studienSemester);
if(!hasData($prestudent))
continue;
+5 -3
View File
@@ -582,7 +582,7 @@ class Prestudent_model extends DB_Model
return $this->execQuery($query, array($person_id));
}
public function getPrestudentByStudiengangAndPerson($studiengang, $person)
public function getPrestudentByStudiengangAndPerson($studiengang, $person, $studienSemester)
{
$query = "SELECT ps.prestudent_id
FROM public.tbl_prestudentstatus pss
@@ -590,8 +590,10 @@ class Prestudent_model extends DB_Model
JOIN public.tbl_studiengang sg USING(studiengang_kz)
JOIN lehre.tbl_studienplan sp USING(studienplan_id)
WHERE ps.person_id = ?
AND UPPER((sg.typ || sg.kurzbz) || ':' || sp.orgform_kurzbz) = ?";
AND UPPER((sg.typ || sg.kurzbz) || ':' || sp.orgform_kurzbz) = ?
AND pss.studiensemester_kurzbz = ?
";
return $this->execQuery($query, array($person, $studiengang));
return $this->execQuery($query, array($person, $studiengang, $studienSemester));
}
}