show ModalHasUnterbrecherStatus in Student View if there is a Unterbrecher Status in history

This commit is contained in:
ma0068
2026-08-17 11:43:45 +02:00
parent 6d5a4531e1
commit c8d49a793f
4 changed files with 105 additions and 1 deletions
@@ -22,6 +22,7 @@ class Studierendenantrag extends FHC_Controller
// Load Models
$this->load->model('education/Studierendenantrag_model', 'StudierendenantragModel');
$this->load->model('person/Person_model', 'PersonModel');
$this->load->model('crm/Prestudenstatus_model', 'PrestudentstatusModel');
// Load language phrases
$this->loadPhrases([
@@ -55,7 +56,8 @@ class Studierendenantrag extends FHC_Controller
'allowedNewTypes' => array(),
'antraege'=> array(),
'bezeichnungStg' => $antrag->bezeichnung,
'bezeichnungOrgform' => $antrag->orgform
'bezeichnungOrgform' => $antrag->orgform,
'hasStatusUnterbrecher' => false
);
if ($this->config->item('wiederholung_enabled') === true)
@@ -70,6 +72,11 @@ class Studierendenantrag extends FHC_Controller
$result = $this->antraglib->getPrestudentUnterbrechungsBerechtigt($antrag->prestudent_id);
if (getData($result) == 1)
$prestudentenArr[$antrag->prestudent_id]['allowedNewTypes'][] = 'Unterbrechung';
//check if already status unterbrecher
elseif (getData($result) == -4){
$prestudentenArr[$antrag->prestudent_id]['allowedNewTypes'][] = 'Unterbrechung';
$prestudentenArr[$antrag->prestudent_id]['hasStatusUnterbrecher'] = true;
}
}
if ($this->config->item('abmeldung_enabled') === true)
+10
View File
@@ -1427,9 +1427,19 @@ class AntragLib
* retval -1 means has already an Antrag pending;
* retval -2 means other Antrag pending;
* retval -3 means in blacklist stg
* retval -4 means existing Unterbrecher status in prestudent history
*/
public function getPrestudentUnterbrechungsBerechtigt($prestudent_id, $studiensemester_kurzbz = null, $datum_wiedereinstieg = null)
{
//check if Unterbrecherstatus
$result = $this->_ci->PrestudentstatusModel->loadWhere([
'prestudent_id' => $prestudent_id,
'status_kurzbz' => Prestudentstatus_model::STATUS_UNTERBRECHER
]);
$hasStatusUnterbrecher = hasData($result) ? true : false;
if ($hasStatusUnterbrecher)
return success(-4);
$result = $this->_ci->PrestudentModel->load($prestudent_id);
if (isError($result))
return $result;
@@ -57,6 +57,9 @@ if(defined('CIS4')){
if($type == 'Abmeldung' && $showInfoModalAbmeldung){
$href = "#modalinfo" . $prestudent_id;
}
elseif($type == 'Unterbrechung' && $array['hasStatusUnterbrecher']){
$href = "#modalalreadyinterruptor" . $prestudent_id;
}
else
$href = site_url('lehre/Studierendenantrag/' . strtolower($type) . '/' . $prestudent_id);
?>
@@ -67,10 +70,52 @@ if(defined('CIS4')){
<?php if($type == 'Abmeldung' && $showInfoModalAbmeldung): ?>
data-bs-toggle="modal"
<?php endif; ?>
<?php if($type == 'Unterbrechung' && $array['hasStatusUnterbrecher']): ?>
data-bs-toggle="modal"
<?php endif; ?>
>
<i class="fa fa-plus"></i> <?= $this->p->t('studierendenantrag', 'antrag_typ_' . $type); ?>
</a>
<!-- Modal interruptor-->
<div
class="modal fade"
id="modalalreadyinterruptor<?= $prestudent_id; ?>"
tabindex="-1"
aria-labelledby="modalalreadyinterruptorLabel<?= $prestudent_id; ?>"
aria-hidden="true"
>
<div class="modal-dialog modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5
class="modal-title"
id="modalalreadyinterruptorLabel<?= $prestudent_id; ?>"
><?= $this->p->t('studierendenantrag', 'info_only_one_interruption'); ?>
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<?php
$hrefUnterbrechung = site_url('lehre/Studierendenantrag/unterbrechung/' . $prestudent_id);
?>
<div class="modal-body">
<div
class="form-control"
style="width: 100%; height: 250px;overflow:auto; white-space: normal;"
><?= $this->p->t('studierendenantrag', 'modalHinweistext_UB'); ?>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-outline-primary" data-bs-dismiss="modal"><?= $this->p->t('ui', 'cancel'); ?></button>
</div>
</div>
</div>
</div>
<!-- Modal -->
<div
class="modal fade"
+42
View File
@@ -62351,6 +62351,48 @@ I have been informed that I am under no obligation to consent to the transmissio
)
)
),
array(
'app' => 'core',
'category' => 'studierendenantrag',
'phrase' => 'modalHinweistext_UB',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Du hast bereits einmal zuvor dein Studium unterbrochen.
Eine weitere Unterbrechung ist gemäß § 12 Z 5 Prüfungsordnung nicht vorgesehen.',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'You have already interrupted your studies once before.
A further interruption is not permitted according to Section 12 Z 5 of the examination regulations.',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'studierendenantrag',
'phrase' => 'info_only_one_interruption',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Hinweis Unterbrechung',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Note Interruption',
'description' => '',
'insertvon' => 'system'
)
)
),
);