mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-25 08:34:29 +00:00
Usability: Added 'Empfehlungsanforderung an/am' to STGL + lectors Detail view
. Now more "Empfehlungs"-data shown in a table. . Better separation of PHP / JS. . Adapted Controller, View, JS and library to provide data about WHEN and TO WHOME the requests for recommendation had been sent. Signed-off-by: cris-technikum <[email protected]>
This commit is contained in:
@@ -247,7 +247,8 @@ class approveAnrechnungDetail extends Auth_Controller
|
||||
'status_kurzbz' => self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR,
|
||||
'status_bezeichnung' => $this->anrechnunglib->getStatusbezeichnung(self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR),
|
||||
'empfehlung_anrechnung' => null,
|
||||
'empfehlung_angefordert_am' => (new DateTime())->format('d.m.Y')
|
||||
'empfehlungsanfrageAm' => (new DateTime())->format('d.m.Y'),
|
||||
'empfehlungsanfrageAn' => $empfehlungsanfrage_an
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,8 +209,8 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
||||
'status_kurzbz' => self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR,
|
||||
'status_bezeichnung' => $this->anrechnunglib->getStatusbezeichnung(self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR),
|
||||
'empfehlung_anrechnung' => null,
|
||||
'empfehlungsanfrage_am' => (new DateTime())->format('Y-m-d H:i:s'),
|
||||
'empfehlungsanfrage_an' => $empfehlungsanfrage_an
|
||||
'empfehlungsanfrageAm' => (new DateTime())->format('Y-m-d H:i:s'),
|
||||
'empfehlungsanfrageAn' => $empfehlungsanfrage_an
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ class reviewAnrechnungDetail extends Auth_Controller
|
||||
'empfehlung_anrechnung' => 'false',
|
||||
'status_kurzbz' => self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL,
|
||||
'status_bezeichnung' => $this->anrechnunglib->getStatusbezeichnung(self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL),
|
||||
'empfehlumg_am' => (new DateTime())->format('d.m.Y'),
|
||||
'empfehlung_am' => (new DateTime())->format('d.m.Y'),
|
||||
'empfehlung_von' => $person->vorname. ' '. $person->nachname
|
||||
);
|
||||
}
|
||||
|
||||
@@ -224,8 +224,9 @@ class AnrechnungLib
|
||||
$empfehlung_data->empfehlung = null;
|
||||
$empfehlung_data->empfehlung_von = '-';
|
||||
$empfehlung_data->empfehlung_am = '-';
|
||||
$empfehlung_data->empfehlung_angefordert_am = '-';
|
||||
$empfehlung_data->notiz = ''; // Begruendung, if not recommended
|
||||
$empfehlung_data->empfehlungsanfrageAm = '-';
|
||||
$empfehlung_data->empfehlungsanfrageAn = '-';
|
||||
$empfehlung_data->notiz = '-'; // Begruendung, if not recommended
|
||||
|
||||
|
||||
if(!$anrechnung = getData($this->ci->AnrechnungModel->load($anrechnung_id))[0])
|
||||
@@ -238,9 +239,19 @@ class AnrechnungLib
|
||||
$anrechnung_id,
|
||||
self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR // when STLG asks for recommendation, status is set to in progress lektor
|
||||
);
|
||||
if ($result = getData($result)[0])
|
||||
|
||||
// If request for recommendation exists
|
||||
if (hasData($result))
|
||||
{
|
||||
$empfehlung_data->empfehlung_angefordert_am = (new DateTime($result->insertamum))->format('d.m.Y');
|
||||
$empfehlung_data->empfehlungsanfrageAm = (new DateTime($result->retval[0]->insertamum))->format('d.m.Y');
|
||||
|
||||
// Get lectors who received request for recommendation
|
||||
$lector_arr = self::getLectors($anrechnung_id);
|
||||
|
||||
if (!isEmptyArray($lector_arr))
|
||||
{
|
||||
$empfehlung_data->empfehlungsanfrageAn = implode(', ', array_column($lector_arr, 'fullname'));
|
||||
}
|
||||
}
|
||||
|
||||
if (is_null($anrechnung->empfehlung_anrechnung))
|
||||
|
||||
@@ -12,7 +12,8 @@ $this->load->view(
|
||||
'phrases' => array(
|
||||
'global' => array(
|
||||
'anerkennungNachgewiesenerKenntnisse',
|
||||
'antragStellen'
|
||||
'antragStellen',
|
||||
'begruendung'
|
||||
),
|
||||
'ui' => array(
|
||||
'hilfeZuDieserSeite',
|
||||
@@ -40,7 +41,9 @@ $this->load->view(
|
||||
'anrechnung' => array(
|
||||
'genehmigungAblehnungWirklichZuruecknehmen',
|
||||
'empfehlungsanforderungWirklichZuruecknehmen',
|
||||
'erfolgreichZurueckgenommen'
|
||||
'erfolgreichZurueckgenommen',
|
||||
'empfehlungPositivConfirmed',
|
||||
'empfehlungNegativConfirmed'
|
||||
)
|
||||
),
|
||||
'customCSSs' => array(
|
||||
@@ -151,14 +154,8 @@ $this->load->view(
|
||||
value="<?php echo $anrechnungData->anrechnung_id ?>">
|
||||
<div class="panel panel-default" id="approveAnrechnungDetail-empfehlung"
|
||||
data-empfehlung="<?php echo json_encode($empfehlungData->empfehlung) ?>">
|
||||
|
||||
<div class="panel-heading">
|
||||
<span class="text-uppercase"><b><?php echo $this->p->t('anrechnung', 'empfehlung'); ?></b></span> 
|
||||
<!-- <span class="approveAnrechnungDetail-empfehlungInfoTooltip"-->
|
||||
<!-- data-toggle="tooltip" data-placement="right"-->
|
||||
<!-- title="--><?php //echo $this->p->t('anrechnung', 'empfehlungInfoTooltipText'); ?><!--">-->
|
||||
<!-- <i class="fa fa-lg fa-info-circle" aria-hidden="true"></i>-->
|
||||
<!-- </span>-->
|
||||
<div class="pull-right">
|
||||
<?php echo $this->p->t('anrechnung', 'empfehlungVon'); ?>:
|
||||
<span id="approveAnrechnungDetail-empfehlungVon"><?php echo $empfehlungData->empfehlung_von ?></span>
|
||||
@@ -167,41 +164,40 @@ $this->load->view(
|
||||
<span id="approveAnrechnungDetail-empfehlungAm"><?php echo $empfehlungData->empfehlung_am ?></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel-body" id="approveAnrechnungDetail-empfehlungDetail">
|
||||
|
||||
<div class="panel panel-default panel-body
|
||||
<?php echo is_null($empfehlungData->empfehlung) && $anrechnungData->status_kurzbz != 'inProgressLektor' ? '' : 'hidden' ?>"
|
||||
id="approveAnrechnungDetail-empfehlungDetail-empfehlungIsNull">
|
||||
<?php echo $this->p->t('anrechnung', 'keineEmpfehlungAngefordert'); ?>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default panel-body <?php echo
|
||||
is_null($empfehlungData->empfehlung) && $anrechnungData->status_kurzbz == 'inProgressLektor'
|
||||
? '' : 'hidden' ?>"
|
||||
id="approveAnrechnungDetail-empfehlungDetail-empfehlungIsAngefordert">
|
||||
<?php echo $this->p->t('anrechnung', 'empfehlungAngefordertNochKeineEmpfehlung'); ?>
|
||||
<span id="approveAnrechnungDetail-empfehlungDetail-empfehlungAngefordertAm">
|
||||
<?php echo $empfehlungData->empfehlung_angefordert_am ?>
|
||||
</span>.
|
||||
</div>
|
||||
|
||||
<div class="alert alert-success <?php echo $empfehlungData->empfehlung === true ? '' : 'hidden' ?>"
|
||||
id="approveAnrechnungDetail-empfehlungDetail-empfehlungIsTrue">
|
||||
<b><?php echo $this->p->t('anrechnung', 'empfehlungPositivConfirmed'); ?></b>
|
||||
</div>
|
||||
|
||||
<div class="<?php echo $empfehlungData->empfehlung === false ? '' : 'hidden' ?>"
|
||||
id="approveAnrechnungDetail-empfehlungDetail-empfehlungIsFalse">
|
||||
<div class="alert alert-danger">
|
||||
<b><?php echo $this->p->t('anrechnung', 'empfehlungNegativConfirmed'); ?></b>
|
||||
</div>
|
||||
<div class="well"><b><?php echo $this->p->t('global', 'begruendung'); ?>
|
||||
: </b>
|
||||
<span id="approveAnrechnungDetail-empfehlungDetail-begruendung"><?php echo htmlentities($empfehlungData->notiz) ?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table class="panel-body table table-bordered table-condensed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="col-xs-4"><?php echo ucfirst($this->p->t('anrechnung', 'empfehlungsanfrageAm')); ?></td>
|
||||
<td id="approveAnrechnungDetail-empfehlungDetail-empfehlungsanfrageAm">
|
||||
<?php echo $empfehlungData->empfehlungsanfrageAm; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-xs-4"><?php echo $this->p->t('anrechnung', 'empfehlungsanfrageAn'); ?></td>
|
||||
<td id="approveAnrechnungDetail-empfehlungDetail-empfehlungsanfrageAn">
|
||||
<?php echo $empfehlungData->empfehlungsanfrageAn; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-xs-4"><?php echo ucfirst($this->p->t('anrechnung', 'empfehlungdatum')); ?></td>
|
||||
<td><?php echo $empfehlungData->empfehlung_am ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-xs-4"><?php echo ucfirst($this->p->t('anrechnung', 'empfehlungVon')); ?></td>
|
||||
<td><?php echo $empfehlungData->empfehlung_von ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-xs-4"><?php echo $this->p->t('anrechnung', 'empfehlung'); ?></td>
|
||||
<td id="approveAnrechnungDetail-empfehlungDetail-empfehlung"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-xs-4"><?php echo $this->p->t('global', 'begruendung'); ?></td>
|
||||
<td id="approveAnrechnungDetail-empfehlungDetail-begruendung">
|
||||
<?php echo htmlentities($empfehlungData->notiz) ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
<div class="pull-right">
|
||||
|
||||
@@ -68,14 +68,14 @@ $query = '
|
||||
AND status_kurzbz = \'' . ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR . '\'
|
||||
ORDER BY insertamum DESC
|
||||
LIMIT 1)
|
||||
END empfehlungsanfrage_am,
|
||||
END "empfehlungsanfrageAm",
|
||||
CASE
|
||||
WHEN (anrechnungen.empfehlung_anrechnung IS NULL AND anrechnungen.status_kurzbz = \'' . ANRECHNUNGSTATUS_PROGRESSED_BY_STGL . '\') THEN NULL
|
||||
ELSE
|
||||
(SELECT COALESCE(
|
||||
STRING_AGG(CONCAT_WS(\' \', vorname, nachname), \', \') FILTER (WHERE lvleiter = TRUE),
|
||||
STRING_AGG(CONCAT_WS(\' \', vorname, nachname), \', \') FILTER (WHERE lvleiter = FALSE)
|
||||
) empfehlungsanfrage_an
|
||||
) empfehlungsanfrageAn
|
||||
FROM (
|
||||
SELECT DISTINCT ON (benutzer.uid) uid, vorname, nachname,
|
||||
CASE WHEN lehrfunktion_kurzbz = \'LV-Leitung\' THEN TRUE ELSE FALSE END AS lvleiter
|
||||
@@ -91,7 +91,7 @@ $query = '
|
||||
ORDER BY benutzer.uid, lvleiter DESC, nachname, vorname
|
||||
) as tmp_lvlektoren
|
||||
)
|
||||
END empfehlungsanfrage_an
|
||||
END "empfehlungsanfrageAn"
|
||||
FROM anrechnungen
|
||||
JOIN lehre.tbl_anrechnungstatus as anrechnungstatus ON (anrechnungstatus.status_kurzbz = anrechnungen.status_kurzbz)
|
||||
WHERE studiensemester_kurzbz = \'' . $STUDIENSEMESTER . '\'
|
||||
@@ -183,8 +183,8 @@ $filterWidgetArray = array(
|
||||
empfehlung_anrechnung: {headerFilter:"input", align:"center", formatter: format_empfehlung_anrechnung, headerFilterFunc: hf_filterTrueFalse},
|
||||
status_kurzbz: {visible: false},
|
||||
status_bezeichnung: {headerFilter:"input"},
|
||||
empfehlungsanfrage_am: {visible: false, align:"center", headerFilter:"input", mutator: mut_formatStringDate},
|
||||
empfehlungsanfrage_an: {visible: false, headerFilter:"input"}
|
||||
empfehlungsanfrageAm: {visible: false, align:"center", headerFilter:"input", mutator: mut_formatStringDate},
|
||||
empfehlungsanfrageAn: {visible: false, headerFilter:"input"}
|
||||
}', // col properties
|
||||
);
|
||||
|
||||
|
||||
@@ -34,7 +34,11 @@ $this->load->view(
|
||||
'lehrveranstaltung',
|
||||
'ects',
|
||||
'lektor',
|
||||
)
|
||||
),
|
||||
'anrechnung' => array(
|
||||
'empfehlungPositivConfirmed',
|
||||
'empfehlungNegativConfirmed'
|
||||
)
|
||||
),
|
||||
'customCSSs' => array(
|
||||
'public/css/Tabulator.css'
|
||||
@@ -140,7 +144,8 @@ $this->load->view(
|
||||
<!-- Empfehlungsdaten -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel panel-default" id="reviewAnrechnungDetail-empfehlung"
|
||||
data-empfehlung="<?php echo json_encode($empfehlungData->empfehlung) ?>">
|
||||
<div class="panel-heading">
|
||||
<span class="text-uppercase"><b><?php echo $this->p->t('anrechnung', 'empfehlung'); ?></b></span>
|
||||
<div class="pull-right">
|
||||
@@ -152,29 +157,46 @@ $this->load->view(
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body" id="reviewAnrechnungDetail-empfehlungDetail">
|
||||
|
||||
<table class="panel-body table table-bordered table-condensed">
|
||||
|
||||
<div class="panel panel-default panel-body <?php echo is_null($empfehlungData->empfehlung) ? '' : 'hidden' ?>"
|
||||
id="reviewAnrechnungDetail-empfehlungDetail-empfehlungIsNull">
|
||||
<?php echo $this->p->t('anrechnung', 'nochKeineEmpfehlung'); ?>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-success <?php echo $empfehlungData->empfehlung === true ? '' : 'hidden' ?>"
|
||||
id="reviewAnrechnungDetail-empfehlungDetail-empfehlungIsTrue">
|
||||
<b><?php echo $this->p->t('anrechnung', 'empfehlungPositivConfirmed'); ?></b>
|
||||
</div>
|
||||
|
||||
<div class="<?php echo $empfehlungData->empfehlung === false ? '' : 'hidden' ?>"
|
||||
id="reviewAnrechnungDetail-empfehlungDetail-empfehlungIsFalse">
|
||||
<div class="alert alert-danger">
|
||||
<b><?php echo $this->p->t('anrechnung', 'empfehlungNegativConfirmed'); ?></b>
|
||||
</div>
|
||||
<div class="well"><b><?php echo $this->p->t('global', 'begruendung'); ?>
|
||||
: </b>
|
||||
<span id="reviewAnrechnungDetail-empfehlungDetail-begruendung"><?php echo htmlentities($empfehlungData->notiz) ?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="col-xs-4"><?php echo ucfirst($this->p->t('anrechnung', 'empfehlungsanfrageAm')); ?></td>
|
||||
<td id="reviewAnrechnungDetail-empfehlungDetail-empfehlungsanfrageAm">
|
||||
<?php echo $empfehlungData->empfehlungsanfrageAm; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-xs-4"><?php echo $this->p->t('anrechnung', 'empfehlungsanfrageAn'); ?></td>
|
||||
<td id="reviewAnrechnungDetail-empfehlungDetail-empfehlungsanfrageAn">
|
||||
<?php echo $empfehlungData->empfehlungsanfrageAn; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-xs-4"><?php echo ucfirst($this->p->t('anrechnung', 'empfehlungdatum')); ?></td>
|
||||
<td id="reviewAnrechnungDetail-empfehlungDetail-empfehlungAm">
|
||||
<?php echo $empfehlungData->empfehlung_am ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-xs-4"><?php echo ucfirst($this->p->t('anrechnung', 'empfehlungVon')); ?></td>
|
||||
<td id="reviewAnrechnungDetail-empfehlungDetail-empfehlungVon">
|
||||
<?php echo $empfehlungData->empfehlung_von ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-xs-4"><?php echo $this->p->t('anrechnung', 'empfehlung'); ?></td>
|
||||
<td id="reviewAnrechnungDetail-empfehlungDetail-empfehlung"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-xs-4"><?php echo $this->p->t('global', 'begruendung'); ?></td>
|
||||
<td id="reviewAnrechnungDetail-empfehlungDetail-begruendung">
|
||||
<?php echo htmlentities($empfehlungData->notiz) ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="panel-body">
|
||||
<form>
|
||||
<input type="hidden" name="anrechnung_id"
|
||||
|
||||
Reference in New Issue
Block a user