mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-16 06:22:18 +00:00
Merge branch 'feature-18984/infocenter_tool_fuer_lehrgaenge_anpassen'
This commit is contained in:
@@ -151,6 +151,7 @@ class InfoCenter extends Auth_Controller
|
||||
'getAbsageData' => 'infocenter:r',
|
||||
'saveAbsageForAll' => 'infocenter:rw',
|
||||
'deleteDoc' => 'infocenter:rw',
|
||||
'getStudienartData' => 'infocenter:rw'
|
||||
)
|
||||
);
|
||||
|
||||
@@ -167,6 +168,7 @@ class InfoCenter extends Auth_Controller
|
||||
$this->load->model('system/Message_model', 'MessageModel');
|
||||
$this->load->model('system/Filters_model', 'FiltersModel');
|
||||
$this->load->model('system/PersonLock_model', 'PersonLockModel');
|
||||
$this->load->model('organisation/Studiengang_model', 'StudiengangModel');
|
||||
|
||||
// Loads libraries
|
||||
$this->load->library('PersonLogLib');
|
||||
@@ -328,12 +330,13 @@ class InfoCenter extends Auth_Controller
|
||||
|
||||
$this->DokumentModel->addOrder('bezeichnung');
|
||||
$dokumentdata = array('dokumententypen' => (getData($this->DokumentModel->load())));
|
||||
|
||||
$studienArtBerechtigung = array('studienArtBerechtigung' => array_column($this->getStudienArtBerechtigung(), 'typ'));
|
||||
$data = array_merge(
|
||||
$persondata,
|
||||
$prestudentdata,
|
||||
$dokumentdata,
|
||||
$duplicate
|
||||
$duplicate,
|
||||
$studienArtBerechtigung
|
||||
);
|
||||
|
||||
$data[self::FHC_CONTROLLER_ID] = $this->getControllerId();
|
||||
@@ -2242,18 +2245,36 @@ class InfoCenter extends Auth_Controller
|
||||
|
||||
public function getAbsageData()
|
||||
{
|
||||
$this->load->model('organisation/Studiengang_model', 'StudiengangModel');
|
||||
$studiengang_kz_all = $this->permissionlib->getSTG_isEntitledFor('infocenter');
|
||||
$stg_typ = $this->StudiengangModel->getStudiengangTyp($studiengang_kz_all, ['b', 'm']);
|
||||
|
||||
$statusgruende = $this->StatusgrundModel->getStatus(self::ABGEWIESENERSTATUS, true)->retval;
|
||||
$studienSemester = $this->variablelib->getVar('infocenter_studiensemester');
|
||||
$studiengaenge = $this->StudiengangModel->getStudiengaengeWithOrgForm(['b', 'm'], $studienSemester);
|
||||
if (hasData($stg_typ))
|
||||
{
|
||||
$stg_typ = getData($stg_typ);
|
||||
$statusgruende = $this->StatusgrundModel->getStatus(self::ABGEWIESENERSTATUS, true)->retval;
|
||||
$studienSemester = $this->variablelib->getVar('infocenter_studiensemester');
|
||||
$studiengaenge = $this->StudiengangModel->getStudiengaengeWithOrgForm(array_column($stg_typ, 'typ'), $studienSemester);
|
||||
|
||||
$data = array (
|
||||
'statusgruende' => $statusgruende,
|
||||
'studiengaenge' => $studiengaenge->retval
|
||||
);
|
||||
$data = array (
|
||||
'statusgruende' => $statusgruende,
|
||||
'studiengaenge' => $studiengaenge->retval
|
||||
);
|
||||
|
||||
$this->outputJsonSuccess($data);
|
||||
$this->outputJsonSuccess($data);
|
||||
}
|
||||
else
|
||||
$this->outputJsonSuccess(null);
|
||||
}
|
||||
|
||||
public function getStudienArtBerechtigung()
|
||||
{
|
||||
$studiengang_kz_all = $this->permissionlib->getSTG_isEntitledFor('infocenter');
|
||||
$stg_typ = $this->StudiengangModel->getStudiengangTyp($studiengang_kz_all, ['b', 'm', 'l']);
|
||||
return getData($stg_typ);
|
||||
}
|
||||
public function getStudienartData()
|
||||
{
|
||||
$this->outputJsonSuccess($this->getStudienArtBerechtigung());
|
||||
}
|
||||
|
||||
public function saveAbsageForAll()
|
||||
|
||||
@@ -507,4 +507,14 @@ class Studiengang_model extends DB_Model
|
||||
|
||||
return $this->execQuery($query, array($typ, $semester));
|
||||
}
|
||||
|
||||
public function getStudiengangTyp($studiengang_kz, $typ)
|
||||
{
|
||||
$query = "SELECT DISTINCT(sgt.*)
|
||||
FROM tbl_studiengangstyp sgt JOIN tbl_studiengang sg on sgt.typ = sg.typ
|
||||
WHERE studiengang_kz IN ? and sgt.typ IN ?";
|
||||
|
||||
return $this->execQuery($query, array($studiengang_kz, $typ));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,6 +124,32 @@
|
||||
</div>
|
||||
<div id="collapse<?php echo $zgvpruefung->prestudent_id ?>"
|
||||
class="panel-collapse collapse<?php echo $infoonly ? '' : ' in' ?>">
|
||||
<?php
|
||||
$disabled = $disabledStg = $disabledTxt = $disabledStgTxt = '';
|
||||
if (isEmptyString($zgvpruefung->prestudentstatus->bewerbung_abgeschicktamum))
|
||||
{
|
||||
$disabled = $disabledStg = 'disabled';
|
||||
$disabledTxt = $disabledStgTxt = $this->p->t('infocenter', 'bewerbungMussAbgeschickt');
|
||||
}
|
||||
|
||||
if ($studiengangtyp !== 'b' && $studiengangtyp !== 'm')
|
||||
{
|
||||
$disabled = 'disabled';
|
||||
$disabledTxt = $this->p->t('infocenter', 'nurBachelorMasterFreigeben');
|
||||
|
||||
// FIT-Lehrgänge: exceptions, can be freigegeben in Infocenter
|
||||
if (!in_array($studiengang_kz, $fit_programme_studiengaenge))
|
||||
{
|
||||
$disabledStg = 'disabled';
|
||||
$disabledStgTxt = $this->p->t('infocenter', 'nurBachelorMasterFreigeben');
|
||||
}
|
||||
}
|
||||
|
||||
if (!in_array($studiengangtyp, $studienArtBerechtigung))
|
||||
$disabledPer = 'disabled';
|
||||
else
|
||||
$disabledPer = '';
|
||||
?>
|
||||
<div class="panel-body">
|
||||
<form action="javascript:void(0);" class="zgvform" id="zgvform_<?php echo $zgvpruefung->prestudent_id ?>">
|
||||
<input type="hidden" name="prestudentid" value="<?php echo $zgvpruefung->prestudent_id ?>" class="prestudentidinput">
|
||||
@@ -318,17 +344,17 @@
|
||||
<?php if (!$infoonly): ?>
|
||||
<div class="row">
|
||||
<div class="col-xs-8 text-left zgvBearbeitungButtons" id="zgvBearbeitungButtons_<?php echo $zgvpruefung->prestudent_id ?>">
|
||||
<button type="button" class="btn btn-default zgvUebernehmen" id="zgvUebernehmen_<?php echo $zgvpruefung->prestudent_id ?>">
|
||||
<button type="button" class="btn btn-default zgvUebernehmen" id="zgvUebernehmen_<?php echo $zgvpruefung->prestudent_id ?>" <?php echo $disabledPer?>>
|
||||
<?php echo $this->p->t('infocenter', 'letzteZgvUebernehmen') ?>
|
||||
</button>
|
||||
<button class="btn btn-default zgvRueckfragen" id="zgvRueckfragen_<?php echo $zgvpruefung->prestudent_id ?>">
|
||||
<button class="btn btn-default zgvRueckfragen" <?php echo $disabledStg . ' ' . $disabledPer?> id="zgvRueckfragen_<?php echo $zgvpruefung->prestudent_id ?>">
|
||||
<?php echo $this->p->t('infocenter', 'zgvRueckfragen') ?>
|
||||
</button>
|
||||
<span class="zgvStatusText" id="zgvStatusText_<?php echo $zgvpruefung->prestudent_id ?>" <?php (!(isset($zgvpruefung->statusZGV))) ?: print_r('data-info="need"')?>>
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-xs-4 text-right">
|
||||
<button type="submit" class="btn btn-default saveZgv" id="zgvSpeichern_<?php echo $zgvpruefung->prestudent_id ?>">
|
||||
<button type="submit" class="btn btn-default saveZgv" id="zgvSpeichern_<?php echo $zgvpruefung->prestudent_id ?>" <?php echo $disabledPer?>>
|
||||
<?php echo $this->p->t('ui', 'speichern') ?>
|
||||
</button>
|
||||
</div>
|
||||
@@ -336,7 +362,7 @@
|
||||
<?php endif; ?>
|
||||
<br />
|
||||
<?php
|
||||
if (isset($zgvpruefung->prestudentUdfs))
|
||||
if (isset($zgvpruefung->prestudentUdfs) && $studiengangtyp !== 'l')
|
||||
{
|
||||
echo $this->udflib->UDFWidget(
|
||||
array(
|
||||
@@ -362,6 +388,8 @@
|
||||
<div class="form-inline">
|
||||
<div class="input-group" id="absgstatusgrselect_<?php echo $zgvpruefung->prestudent_id ?>">
|
||||
<select name="absgstatusgrund"
|
||||
<?php echo $disabledStg ?>
|
||||
<?php echo $disabledPer ?>
|
||||
class="d-inline float-right"
|
||||
required>
|
||||
<option value="null"
|
||||
@@ -373,7 +401,7 @@
|
||||
</select>
|
||||
<span class="input-group-btn">
|
||||
<button type="button"
|
||||
class="btn btn-default absageBtn" id="absagebtn_<?php echo $zgvpruefung->prestudent_id ?>">
|
||||
class="btn btn-default absageBtn" <?php echo $disabledStg . ' ' . $disabledPer?> id="absagebtn_<?php echo $zgvpruefung->prestudent_id ?>">
|
||||
<?php echo $this->p->t('ui', 'absagen') ?>
|
||||
</button>
|
||||
</span>
|
||||
@@ -381,25 +409,6 @@
|
||||
</div>
|
||||
</div><!-- /.column-absage -->
|
||||
<?php
|
||||
$disabled = $disabledStg = $disabledTxt = $disabledStgTxt = '';
|
||||
if (isEmptyString($zgvpruefung->prestudentstatus->bewerbung_abgeschicktamum))
|
||||
{
|
||||
$disabled = $disabledStg = 'disabled';
|
||||
$disabledTxt = $disabledStgTxt = $this->p->t('infocenter', 'bewerbungMussAbgeschickt');
|
||||
}
|
||||
|
||||
if ($studiengangtyp !== 'b' && $studiengangtyp !== 'm')
|
||||
{
|
||||
$disabled = 'disabled';
|
||||
$disabledTxt = $this->p->t('infocenter', 'nurBachelorMasterFreigeben');
|
||||
|
||||
// FIT-Lehrgänge: exceptions, can be freigegeben in Infocenter
|
||||
if (!in_array($studiengang_kz, $fit_programme_studiengaenge))
|
||||
{
|
||||
$disabledStg = 'disabled';
|
||||
$disabledStgTxt = $this->p->t('infocenter', 'nurBachelorMasterFreigeben');
|
||||
}
|
||||
}
|
||||
if (!$infoonly) :
|
||||
?>
|
||||
<div class="col-lg-8 text-right">
|
||||
@@ -408,6 +417,7 @@
|
||||
<select name="frgstatusgrund"
|
||||
class="d-inline float-right"
|
||||
<?php echo $disabledStg ?>
|
||||
<?php echo $disabledPer ?>
|
||||
required>
|
||||
<option value="null"
|
||||
selected="selected"><?php echo ucfirst($this->p->t('ui', 'freigabeart')) . '...' ?>
|
||||
@@ -417,14 +427,14 @@
|
||||
<?php endforeach ?>
|
||||
</select>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default freigabebtnstg" <?php echo $disabledStg ?> id="freigabebtnstg_<?php echo $zgvpruefung->prestudent_id ?>"
|
||||
<button class="btn btn-default freigabebtnstg" <?php echo $disabledStg . ' ' . $disabledPer?> id="freigabebtnstg_<?php echo $zgvpruefung->prestudent_id ?>"
|
||||
data-toggle="tooltip" title="<?php echo $disabledStgTxt ?>">
|
||||
<?php echo $this->p->t('ui', 'freigabeAnStudiengang') ?>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
<div class="input-group" id="igrfrgbtn">
|
||||
<button type="button" id="freigabebtn_<?php echo $zgvpruefung->prestudent_id ?>" class="btn btn-default freigabebtn" <?php echo $disabled ?>
|
||||
<button type="button" id="freigabebtn_<?php echo $zgvpruefung->prestudent_id ?>" class="btn btn-default freigabebtn" <?php echo $disabled . ' ' . $disabledPer?>
|
||||
data-toggle="tooltip" title="<?php echo $disabledTxt ?>">
|
||||
<?php echo $this->p->t('ui', 'freigabeZumReihungstest') ?>
|
||||
</button>
|
||||
@@ -489,6 +499,8 @@
|
||||
<div class="col-lg-4 text-left">
|
||||
<div class="input-group" id="absgstatusgrselect_<?php echo $zgvpruefung->prestudent_id ?>">
|
||||
<select name="absgstatusgrund"
|
||||
<?php echo $disabledStg?>
|
||||
<?php echo $disabledPer?>
|
||||
class="d-inline float-right"
|
||||
required>
|
||||
<option value="null"
|
||||
@@ -500,6 +512,8 @@
|
||||
</select>
|
||||
<span class="input-group-btn">
|
||||
<button type="button"
|
||||
<?php echo $disabledStg ?>
|
||||
<?php echo $disabledPer ?>
|
||||
class="btn btn-default absageBtn" id="absagebtn_<?php echo $zgvpruefung->prestudent_id ?>">
|
||||
<?php echo $this->p->t('ui', 'absagen') ?>
|
||||
</button>
|
||||
|
||||
@@ -34,11 +34,10 @@ var InfocenterPersonDataset = {
|
||||
|
||||
var auswahlStudienart =
|
||||
'<select class="form-control auswahlStudienArt" style="width:auto;">' +
|
||||
'<option data-id="all"> Alle </option>' +
|
||||
'<option data-id="master"> Master </option>' +
|
||||
'<option data-id="bachelor"> Bachelor </option>' +
|
||||
'</select>';
|
||||
|
||||
InfocenterPersonDataset.getStudienartData(infocenter_studiengangstyp);
|
||||
|
||||
var auswahlAbsageToggle =
|
||||
'<a class="absageToggle">Erweiterte Einstellungen</a>';
|
||||
|
||||
@@ -90,11 +89,9 @@ var InfocenterPersonDataset = {
|
||||
"<div class='h-divider'></div><hr class='studiensemesterline'>"
|
||||
);
|
||||
|
||||
InfocenterPersonDataset.selectStudiengangTyp(infocenter_studiengangstyp)
|
||||
|
||||
$('.auswahlStudienArt').change(function()
|
||||
{
|
||||
InfocenterPersonDataset.changeStudengangsTyp($(this).find('option:selected').attr('data-id'));
|
||||
InfocenterPersonDataset.changeStudengangsTyp($(this).find('option:selected').val());
|
||||
});
|
||||
|
||||
$("#datasetActionsBottom").append(
|
||||
@@ -183,22 +180,6 @@ var InfocenterPersonDataset = {
|
||||
);
|
||||
},
|
||||
|
||||
selectStudiengangTyp: function(typ)
|
||||
{
|
||||
switch (typ)
|
||||
{
|
||||
case 'b, m' :
|
||||
$('.auswahlStudienArt [data-id="all"]').attr('selected', 'selected');
|
||||
break;
|
||||
case 'b' :
|
||||
$('.auswahlStudienArt [data-id="bachelor"]').attr('selected', 'selected');
|
||||
break;
|
||||
case 'm' :
|
||||
$('.auswahlStudienArt [data-id="master"]').attr('selected', 'selected');
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* sets functionality for the actions above and beneath the person table
|
||||
*/
|
||||
@@ -257,20 +238,12 @@ var InfocenterPersonDataset = {
|
||||
});
|
||||
},
|
||||
|
||||
changeStudengangsTyp: function($typ)
|
||||
changeStudengangsTyp: function(typ)
|
||||
{
|
||||
switch ($typ)
|
||||
{
|
||||
case 'all' :
|
||||
var change = 'b\', \'m';
|
||||
break;
|
||||
case 'bachelor' :
|
||||
var change = 'b';
|
||||
break;
|
||||
case 'master' :
|
||||
var change = 'm';
|
||||
break;
|
||||
}
|
||||
let change = typ;
|
||||
|
||||
if (typ === 'all')
|
||||
change = change = 'b\', \'m\', \'l';
|
||||
|
||||
FHC_AjaxClient.showVeil();
|
||||
|
||||
@@ -372,7 +345,8 @@ var InfocenterPersonDataset = {
|
||||
'system/infocenter/InfoCenter/getAbsageData',
|
||||
{},
|
||||
{
|
||||
successCallback: function(data, textStatus, jqXHR) {
|
||||
successCallback: function(data, textStatus, jqXHR)
|
||||
{
|
||||
if (FHC_AjaxClient.hasData(data))
|
||||
{
|
||||
data = FHC_AjaxClient.getData(data);
|
||||
@@ -397,6 +371,42 @@ var InfocenterPersonDataset = {
|
||||
}
|
||||
);
|
||||
},
|
||||
getStudienartData: function(infocenter_studiengangstyp)
|
||||
{
|
||||
FHC_AjaxClient.ajaxCallGet(
|
||||
'system/infocenter/InfoCenter/getStudienartData',
|
||||
{},
|
||||
{
|
||||
successCallback: function(data, textStatus, jqXHR)
|
||||
{
|
||||
if (FHC_AjaxClient.hasData(data))
|
||||
{
|
||||
data = FHC_AjaxClient.getData(data);
|
||||
|
||||
let all = data.map(item => item.typ).join('\',\'');
|
||||
$('.auswahlStudienArt').append($("<option/>")
|
||||
.val(all)
|
||||
.text('Alle')
|
||||
);
|
||||
|
||||
$.each(data, function(key, value)
|
||||
{
|
||||
let isSelected;
|
||||
isSelected = (infocenter_studiengangstyp === value.typ && all.length !== 1) ? 'selected' : false;
|
||||
$('.auswahlStudienArt').append($("<option/>")
|
||||
.val(value.typ)
|
||||
.text(value.bezeichnung)
|
||||
.attr('selected', isSelected)
|
||||
)
|
||||
});
|
||||
}
|
||||
},
|
||||
errorCallback: function(jqXHR, textStatus, errorThrown) {
|
||||
FHC_DialogLib.alertError(textStatus);
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
/**
|
||||
* initializes call to get the Studiensemester user variable
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user