Compare commits

...

2 Commits

Author SHA1 Message Date
cgfhtw c7e2e5ecf6 code quality 2023-10-17 09:30:12 +02:00
cgfhtw fb4164fd5c Add Config: stgtyp_blacklist 2023-10-17 09:29:47 +02:00
6 changed files with 63 additions and 2 deletions
+21
View File
@@ -159,3 +159,24 @@ $config['stgkz_blacklist_unterbrechung'] = [];
* @var array An array of tbl_studiengang.studiengang_kz's
*/
$config['stgkz_blacklist_wiederholung'] = [];
/**
* Blacklisted for abmeldung anträge
*
* @var array An array of tbl_studiengang.studiengang_kz's
*/
$config['stgtyp_blacklist_abmeldung'] = [];
/**
* Blacklisted for unterbrechung anträge
*
* @var array An array of tbl_studiengang.studiengang_kz's
*/
$config['stgtyp_blacklist_unterbrechung'] = [];
/**
* Blacklisted for wiederholung anträge
*
* @var array An array of tbl_studiengang.studiengang_kz's
*/
$config['stgtyp_blacklist_wiederholung'] = [];
@@ -517,6 +517,9 @@ class AntragJob extends JOB_Controller
$stg_kz = $prestudent->studiengang_kz;
if (in_array($stg_kz, $this->config->item('stgkz_blacklist_wiederholung')))
continue;
if (in_array($prestudent->stg_typ, $this->config->item('stgtyp_blacklist_wiederholung')))
continue;
$url = site_url('lehre/Studierendenantrag/wiederholung/' . $prestudent->prestudent_id);
$urlCIS = CIS_ROOT . 'index.ci.php/lehre/Studierendenantrag/wiederholung/' . $prestudent->prestudent_id;
$email = $this->StudentModel->getEmailFH($this->StudentModel->getUID($prestudent->prestudent_id));
+32
View File
@@ -1122,6 +1122,16 @@ class AntragLib
if (in_array($stg_kz, $this->_ci->config->item('stgkz_blacklist_abmeldung')))
return success(-3);
$result = $this->_ci->StudiengangModel->load($stg_kz);
if (isError($result))
return $result;
if (!hasData($result))
return success(0);
$result = current(getData($result));
$stg_typ = $result->typ;
if (in_array($stg_typ, $this->_ci->config->item('stgtyp_blacklist_abmeldung')))
return success(-3);
$result = $this->_ci->PrestudentstatusModel->getLastStatus($prestudent_id);
if (isError($result))
return $result;
@@ -1195,6 +1205,16 @@ class AntragLib
if (in_array($stg_kz, $this->_ci->config->item('stgkz_blacklist_unterbrechung')))
return success(-3);
$result = $this->_ci->StudiengangModel->load($stg_kz);
if (isError($result))
return $result;
if (!hasData($result))
return success(0);
$result = current(getData($result));
$stg_typ = $result->typ;
if (in_array($stg_typ, $this->_ci->config->item('stgtyp_blacklist_unterbrechung')))
return success(-3);
$result = $this->_ci->PrestudentstatusModel->getLastStatus($prestudent_id);
if (isError($result))
return $result;
@@ -1269,6 +1289,16 @@ class AntragLib
if (in_array($stg_kz, $this->_ci->config->item('stgkz_blacklist_wiederholung')))
return success(-3);
$result = $this->_ci->StudiengangModel->load($stg_kz);
if (isError($result))
return $result;
if (!hasData($result))
return success(0);
$result = current(getData($result));
$stg_typ = $result->typ;
if (in_array($stg_typ, $this->_ci->config->item('stgtyp_blacklist_wiederholung')))
return success(-3);
$result = $this->getFailedExamForPrestudent($prestudent_id);
if (isError($result))
return $result;
@@ -1473,10 +1503,12 @@ class AntragLib
public function getAktivePrestudentenInStgs($studiengaenge, $query)
{
$blacklist = $this->_ci->config->item('stgkz_blacklist_abmeldung');
$blacklist_typ = $this->_ci->config->item('stgtyp_blacklist_abmeldung');
$studiengaenge = array_diff($studiengaenge, $blacklist);
return $this->_ci->StudiengangModel->getAktivePrestudenten(
$studiengaenge,
[ Studierendenantrag_model::TYP_ABMELDUNG ],
$blacklist_typ,
$query
);
}
@@ -148,6 +148,7 @@ class Pruefung_model extends DB_Model
$this->addSelect('pers.nachname');
$this->addSelect('pers.person_id');
$this->addSelect('s.matrikelnr');
$this->addSelect('g.typ AS stg_typ');
$this->addSelect('g.bezeichnung');
$this->addSelect('g.studiengang_kz');
$this->addSelect('o.bezeichnung_mehrsprachig[(' . $sprache_index . ')] AS orgform', false);
@@ -546,7 +546,7 @@ class Studiengang_model extends DB_Model
*
* @return stdClass
*/
public function getAktivePrestudenten($studiengang_kzs, $not_antrag_typ = null, $query = null)
public function getAktivePrestudenten($studiengang_kzs, $not_antrag_typ = null, $not_stg_typ = null, $query = null)
{
$this->load->config('studierendenantrag');
@@ -593,6 +593,10 @@ class Studiengang_model extends DB_Model
$this->db->where('a.typ IS NULL');
}
if ($not_stg_typ) {
$this->db->where_not_in($this->dbTable . '.typ', $not_stg_typ);
}
if ($query) {
$query = explode(' ', $query);
$this->db->group_start();
@@ -83,7 +83,7 @@ export default {
class="w-100"
v-model="student"
:suggestions="data"
optionLabel = "name"
optionLabel="name"
@complete="loadData"
inputId="newAntragModalAutoComplete"
dropdown