mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-16 22:42:16 +00:00
absage fuer alle und rueckstellung ueber infocenter uebersicht
This commit is contained in:
@@ -2375,16 +2375,39 @@ class InfoCenter extends Auth_Controller
|
||||
if ($statusgrund === 'null' || $studiengang === 'null' || $abgeschickt === 'null' || empty($personen))
|
||||
$this->terminateWithJsonError("Bitte füllen Sie alle Felder aus");
|
||||
|
||||
foreach($personen as $person)
|
||||
if ($studiengang === 'all' && $abgeschickt !== 'all' ||
|
||||
$abgeschickt === 'all' && $studiengang !== 'all')
|
||||
$this->terminateWithJsonError("Absage für alle Studiengänge ist nur in Kombination mit abgeschickt 'Beide' möglich!");
|
||||
|
||||
if ($studiengang === 'all' && $abgeschickt === 'all')
|
||||
{
|
||||
$prestudent = $this->PrestudentModel->getPrestudentByStudiengangAndPerson($studiengang, $person, $studienSemester, $abgeschickt);
|
||||
foreach($personen as $person)
|
||||
{
|
||||
$prestudenten = $this->PrestudentModel->getByPersonWithoutLehrgang($person, $studienSemester);
|
||||
|
||||
if (!hasData($prestudent))
|
||||
continue;
|
||||
if (!hasData($prestudenten))
|
||||
continue;
|
||||
|
||||
$prestudentData = getData($prestudent);
|
||||
$prestudentenData = getData($prestudenten);
|
||||
|
||||
$this->saveAbsage($prestudentData[0]->prestudent_id, $statusgrund);
|
||||
foreach ($prestudentenData as $prestudent)
|
||||
{
|
||||
$this->saveAbsage($prestudent->prestudent_id, $statusgrund);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach($personen as $person)
|
||||
{
|
||||
$prestudent = $this->PrestudentModel->getPrestudentByStudiengangAndPerson($studiengang, $person, $studienSemester, $abgeschickt);
|
||||
|
||||
if (!hasData($prestudent))
|
||||
continue;
|
||||
|
||||
$prestudentData = getData($prestudent);
|
||||
$this->saveAbsage($prestudentData[0]->prestudent_id, $statusgrund);
|
||||
}
|
||||
}
|
||||
|
||||
$this->outputJsonSuccess("Success");
|
||||
|
||||
@@ -14,7 +14,8 @@ class Rueckstellung extends Auth_Controller
|
||||
'get' => array('infocenter:r', 'lehre/zgvpruefung:r'),
|
||||
'set' => array('infocenter:r', 'lehre/zgvpruefung:r'),
|
||||
'delete' => array('infocenter:r', 'lehre/zgvpruefung:r'),
|
||||
'getStatus' => array('infocenter:rw', 'lehre/zgvpruefung:rw')
|
||||
'getStatus' => array('infocenter:rw', 'lehre/zgvpruefung:rw'),
|
||||
'setForPersonen' => array('infocenter:rw', 'lehre/zgvpruefung:rw'),
|
||||
)
|
||||
);
|
||||
|
||||
@@ -79,7 +80,34 @@ class Rueckstellung extends Auth_Controller
|
||||
|
||||
$this->outputJson($result);
|
||||
}
|
||||
|
||||
|
||||
public function setForPersonen()
|
||||
{
|
||||
$personen = $this->input->post('personen');
|
||||
$datum_bis = $this->input->post('datum_bis');
|
||||
$status_kurzbz = $this->input->post('status_kurzbz');
|
||||
|
||||
foreach ($personen as $person)
|
||||
{
|
||||
$rueckstellung = $this->_ci->RueckstellungModel->loadWhere(array('person_id' => $person));
|
||||
if (hasData($rueckstellung))
|
||||
continue;
|
||||
|
||||
$result = $this->_ci->RueckstellungModel->insert(
|
||||
array('person_id' => $person,
|
||||
'status_kurzbz' => $status_kurzbz,
|
||||
'datum_bis' => date_format(date_create($datum_bis), 'Y-m-d'),
|
||||
'insertvon' => $this->_uid
|
||||
)
|
||||
);
|
||||
|
||||
if (isError($result))
|
||||
$this->terminateWithJsonError(getError($result));
|
||||
$this->_log($person, $status_kurzbz);
|
||||
}
|
||||
$this->outputJsonSuccess("Erfolgreich gespeichert!");
|
||||
}
|
||||
|
||||
public function delete()
|
||||
{
|
||||
$person_id = $this->input->post('person_id');
|
||||
|
||||
@@ -703,6 +703,22 @@ class Prestudent_model extends DB_Model
|
||||
return $this->execQuery($query, array($person, $studiengang, $studienSemester));
|
||||
}
|
||||
|
||||
public function getByPersonWithoutLehrgang($person, $studienSemester)
|
||||
{
|
||||
$query = "SELECT DISTINCT(ps.prestudent_id)
|
||||
FROM public.tbl_prestudentstatus pss
|
||||
JOIN public.tbl_prestudent ps USING(prestudent_id)
|
||||
JOIN public.tbl_studiengang sg USING(studiengang_kz)
|
||||
JOIN lehre.tbl_studienplan sp USING(studienplan_id)
|
||||
JOIN lehre.tbl_studienordnung so USING(studienordnung_id)
|
||||
WHERE ps.person_id = ?
|
||||
AND (sg.typ = 'b' OR sg.typ = 'm')
|
||||
AND pss.studiensemester_kurzbz = ?";
|
||||
|
||||
return $this->execQuery($query, array($person, $studienSemester));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets förderrelevant flag for a prestudent, from prestudent, or, if not set on prestudent level, from studiengang
|
||||
* @param int $prestudent_id
|
||||
|
||||
@@ -14,12 +14,13 @@
|
||||
'navigationwidget' => true,
|
||||
'dialoglib' => true,
|
||||
'phrases' => array(
|
||||
'infocenter' => array('statusAuswahl'),
|
||||
'person' => array('vorname', 'nachname'),
|
||||
'global' => array('mailAnXversandt'),
|
||||
'ui' => array('bitteEintragWaehlen')
|
||||
),
|
||||
'customCSSs' => array('public/css/sbadmin2/tablesort_bootstrap.css', 'public/css/infocenter/infocenterPersonDataset.css'),
|
||||
'customJSs' => array('public/js/bootstrapper.js', 'public/js/infocenter/infocenterPersonDataset.js')
|
||||
'customJSs' => array('public/js/bootstrapper.js', 'public/js/infocenter/rueckstellung.js', 'public/js/infocenter/infocenterPersonDataset.js')
|
||||
);
|
||||
|
||||
$this->load->view('templates/FHC-Header', $includesArray);
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
'ui' => array('bitteEintragWaehlen')
|
||||
),
|
||||
'customCSSs' => array('public/css/sbadmin2/tablesort_bootstrap.css', 'public/css/infocenter/infocenterPersonDataset.css'),
|
||||
'customJSs' => array('public/js/bootstrapper.js', 'public/js/infocenter/infocenterPersonDataset.js')
|
||||
'customJSs' => array('public/js/bootstrapper.js', 'public/js/infocenter/rueckstellung.js', 'public/js/infocenter/infocenterPersonDataset.js')
|
||||
)
|
||||
);
|
||||
?>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
'ui' => array('bitteEintragWaehlen')
|
||||
),
|
||||
'customCSSs' => array('public/css/sbadmin2/tablesort_bootstrap.css', 'public/css/infocenter/infocenterPersonDataset.css'),
|
||||
'customJSs' => array('public/js/bootstrapper.js', 'public/js/infocenter/infocenterPersonDataset.js')
|
||||
'customJSs' => array('public/js/bootstrapper.js', 'public/js/infocenter/rueckstellung.js', 'public/js/infocenter/infocenterPersonDataset.js')
|
||||
)
|
||||
);
|
||||
?>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
'ui' => array('bitteEintragWaehlen')
|
||||
),
|
||||
'customCSSs' => array('public/css/sbadmin2/tablesort_bootstrap.css', 'public/css/infocenter/infocenterPersonDataset.css'),
|
||||
'customJSs' => array('public/js/bootstrapper.js', 'public/js/infocenter/infocenterPersonDataset.js')
|
||||
'customJSs' => array('public/js/bootstrapper.js', 'public/js/infocenter/rueckstellung.js', 'public/js/infocenter/infocenterPersonDataset.js')
|
||||
)
|
||||
);
|
||||
?>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
'ui' => array('bitteEintragWaehlen')
|
||||
),
|
||||
'customCSSs' => array('public/css/sbadmin2/tablesort_bootstrap.css', 'public/css/infocenter/infocenterPersonDataset.css'),
|
||||
'customJSs' => array('public/js/bootstrapper.js', 'public/js/infocenter/infocenterPersonDataset.js')
|
||||
'customJSs' => array('public/js/bootstrapper.js', 'public/js/infocenter/rueckstellung.js', 'public/js/infocenter/infocenterPersonDataset.js')
|
||||
)
|
||||
);
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user