Merge branch 'master' into feature-30660/FHC4_StudierendenGUI_Prototyp

This commit is contained in:
cgfhtw
2024-08-12 08:34:32 +02:00
8 changed files with 118 additions and 51 deletions
+3
View File
@@ -21,3 +21,6 @@ $config['grades_blocking_application'] = array(
$config['fbl'] = FALSE;
//Enables Info Mails
$config['send_mail'] = TRUE;
// Display fields to explain equivalence of ECTS and LV-Inhalte
$config['explain_equivalence'] = TRUE;
@@ -111,8 +111,13 @@ class requestAnrechnung extends Auth_Controller
$lehrveranstaltung_id = $this->input->post('lv_id');
$studiensemester_kurzbz = $this->input->post('studiensemester');
$bestaetigung = $this->input->post('bestaetigung');
$begruendung_ects = $this->input->post('begruendung_ects');
$begruendung_lvinhalt = $this->input->post('begruendung_lvinhalt');
$begruendung_ects = $this->config->item('explain_equivalence') === TRUE
? $this->input->post('begruendung_ects')
: NULL;
$begruendung_lvinhalt = $this->config->item('explain_equivalence') === TRUE
? $this->input->post('begruendung_lvinhalt')
: NULL;
// Validate data
if (empty($_FILES['uploadfile']['name']))
@@ -124,8 +129,8 @@ class requestAnrechnung extends Auth_Controller
isEmptyString($anmerkung) ||
isEmptyString($lehrveranstaltung_id) ||
isEmptyString($studiensemester_kurzbz) ||
isEmptyString($begruendung_ects) ||
isEmptyString($begruendung_lvinhalt))
($this->config->item('explain_equivalence') === TRUE && isEmptyString($begruendung_ects)) ||
($this->config->item('explain_equivalence') === TRUE && isEmptyString($begruendung_lvinhalt)))
{
return $this->outputJsonError($this->p->t('ui', 'errorFelderFehlen'));
}
@@ -168,7 +173,7 @@ class requestAnrechnung extends Auth_Controller
// Hold just inserted DMS ID
$lastInsert_dms_id = $result->retval['dms_id'];
// Save Anrechnung and Anrechnungstatus
$result = $this->AnrechnungModel->createAnrechnungsantrag(
$prestudent_id,
@@ -1,4 +1,5 @@
<?php
$this->load->config('anrechnung');
$this->load->view(
'templates/FHC-Header',
array(
@@ -172,14 +173,16 @@ $this->load->view(
<th class="col-xs-4"><?php echo $this->p->t('global', 'begruendung'); ?></th>
<td><span id="begruendung_id" data-begruendung_id="<?php echo $anrechnungData->begruendung_id ?>" ><?php echo $anrechnungData->begruendung ?></span></td>
</tr>
<tr>
<th class="col-xs-4"><?php echo $this->p->t('anrechnung', 'begruendungEctsLabel'); ?></th>
<td><span><?php echo $anrechnungData->begruendung_ects ?></span></td>
</tr>
<tr>
<th class="col-xs-4"><?php echo $this->p->t('anrechnung', 'begruendungLvinhaltLabel'); ?></th>
<td><span><?php echo $anrechnungData->begruendung_lvinhalt ?></span></td>
</tr>
<?php if ($this->config->item('explain_equivalence')): ?>
<tr>
<th class="col-xs-4"><?php echo $this->p->t('anrechnung', 'begruendungEctsLabel'); ?></th>
<td><span><?php echo $anrechnungData->begruendung_ects ?></span></td>
</tr>
<tr>
<th class="col-xs-4"><?php echo $this->p->t('anrechnung', 'begruendungLvinhaltLabel'); ?></th>
<td><span><?php echo $anrechnungData->begruendung_lvinhalt ?></span></td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
@@ -4,6 +4,7 @@ const CHAR_LENGTH150 = 150;
const CHAR_LENGTH500 = 500;
const CHAR_LENGTH1000 = 1000;
$this->load->config('anrechnung');
$this->load->view(
'templates/FHC-Header',
array(
@@ -200,27 +201,29 @@ $this->load->view(
</div>
</div>
</div>
<!-- Begruendung ECTS -->
<div class="row">
<div class="col-lg-12">
<div class="panel panel-default">
<div class="panel-heading">
<b><?php echo $this->p->t('anrechnung', 'begruendungEcts'); ?></b>&emsp;
<span class="requestAnrechnung-anrechnungInfoTooltip" data-toggle="tooltip" data-placement="right"
title="<?php echo $this->p->t('anrechnung', 'anrechnungBegruendungEctsTooltipText'); ?>">
<i class="fa fa-lg fa-info-circle" aria-hidden="true"></i>
</span>
</div>
<div class="panel-body">
<textarea class="form-control" name="begruendung_ects" rows="1" id="requestAnrechnung-begruendungEcts"
maxlength="<?php echo CHAR_LENGTH150 ?>" required><?php echo $anrechnungData->begruendung_ects; ?></textarea>
<small><span class="text-muted pull-right"><?php echo $this->p->t('ui', 'maxZeichen'); ?> :<span id="requestAnrechnung-begruendungEcts-charCounter"><?php echo CHAR_LENGTH150 ?></span></span></small>
<?php if ($this->config->item('explain_equivalence')): ?>
<!-- Begruendung ECTS -->
<div class="row">
<div class="col-lg-12">
<div class="panel panel-default">
<div class="panel-heading">
<b><?php echo $this->p->t('anrechnung', 'begruendungEcts'); ?></b>&emsp;
<span class="requestAnrechnung-anrechnungInfoTooltip" data-toggle="tooltip" data-placement="right"
title="<?php echo $this->p->t('anrechnung', 'anrechnungBegruendungEctsTooltipText'); ?>">
<i class="fa fa-lg fa-info-circle" aria-hidden="true"></i>
</span>
</div>
<div class="panel-body">
<textarea class="form-control" name="begruendung_ects" rows="1" id="requestAnrechnung-begruendungEcts"
maxlength="<?php echo CHAR_LENGTH150 ?>" required><?php echo $anrechnungData->begruendung_ects; ?></textarea>
<small><span class="text-muted pull-right"><?php echo $this->p->t('ui', 'maxZeichen'); ?> :<span id="requestAnrechnung-begruendungEcts-charCounter"><?php echo CHAR_LENGTH150 ?></span></span></small>
</div>
</div>
</div>
</div>
</div>
<!-- Begruendung LV Inhalt -->
<div class="row">
<!-- Begruendung LV Inhalt -->
<div class="row">
<div class="col-lg-12">
<div class="panel panel-default">
<div class="panel-heading">
@@ -240,6 +243,8 @@ $this->load->view(
</div>
</div>
</div>
<?php endif; ?>
<!-- Dokument Upload-->
<div class="row">
<div class="col-lg-12">
@@ -1,4 +1,5 @@
<?php
$this->load->config('anrechnung');
$this->load->view(
'templates/FHC-Header',
array(
@@ -143,14 +144,16 @@ $this->load->view(
target="_blank"><?php echo htmlentities($anrechnungData->dokumentname) ?></a>
</td>
</tr>
<tr>
<th class="col-xs-4"><?php echo $this->p->t('anrechnung', 'begruendungEctsLabel'); ?></th>
<td><span><?php echo $anrechnungData->begruendung_ects ?></span></td>
</tr>
<tr>
<th class="col-xs-4"><?php echo $this->p->t('anrechnung', 'begruendungLvinhaltLabel'); ?></th>
<td><span><?php echo $anrechnungData->begruendung_lvinhalt ?></span></td>
</tr>
<?php if ($this->config->item('explain_equivalence')): ?>
<tr>
<th class="col-xs-4"><?php echo $this->p->t('anrechnung', 'begruendungEctsLabel'); ?></th>
<td><span><?php echo $anrechnungData->begruendung_ects ?></span></td>
</tr>
<tr>
<th class="col-xs-4"><?php echo $this->p->t('anrechnung', 'begruendungLvinhaltLabel'); ?></th>
<td><span><?php echo $anrechnungData->begruendung_lvinhalt ?></span></td>
</tr>
<?php endif; ?>
</tbody>
</table>
+20 -12
View File
@@ -101,8 +101,12 @@ $(function(){
begruendung: this.begruendung.value,
lv_id: this.lv_id.value,
studiensemester: this.studiensemester.value,
begruendung_ects: this.begruendung_ects.value,
begruendung_lvinhalt: this.begruendung_lvinhalt.value,
begruendung_ects: this.begruendung_ects && this.begruendung_ects.value
? this.begruendung_ects.value
: null,
begruendung_lvinhalt: this.begruendung_lvinhalt && this.begruendung_lvinhalt.value
? this.begruendung_lvinhalt.value
: null,
bestaetigung: this.bestaetigung.value,
uploadfile: this.uploadfile.files
},
@@ -216,18 +220,22 @@ var requestAnrechnung = {
$('#requestAnrechnung-herkunftDerKenntnisse-charCounter').text(length);
});
$('#requestAnrechnung-begruendungEcts').keyup(function() {
let length = CHAR_LENGTH150 - $(this).val().length;
$('#requestAnrechnung-begruendungEcts-charCounter').text(length);
});
if ($('#requestAnrechnung-begruendungEcts').length) {
$('#requestAnrechnung-begruendungEcts').keyup(function () {
let length = CHAR_LENGTH150 - $(this).val().length;
$('#requestAnrechnung-begruendungEcts-charCounter').text(length);
});
}
$('#requestAnrechnung-begruendungLvinhalt').keyup(function() {
let maxlength = CHAR_LENGTH1000 - $(this).val().length;
$('#requestAnrechnung-begruendungLvinhalt-charCounterMax').text(maxlength);
if ($('#requestAnrechnung-begruendungLvinhalt').length){
$('#requestAnrechnung-begruendungLvinhalt').keyup(function() {
let maxlength = CHAR_LENGTH1000 - $(this).val().length;
$('#requestAnrechnung-begruendungLvinhalt-charCounterMax').text(maxlength);
let minlength = CHAR_LENGTH500 - $(this).val().length;
$('#requestAnrechnung-begruendungLvinhalt-charCounterMin').text(minlength);
});
let minlength = CHAR_LENGTH500 - $(this).val().length;
$('#requestAnrechnung-begruendungLvinhalt-charCounterMin').text(minlength);
});
}
},
formatAnrechnungIsApplied: function (antragdatum, dms_id, filename){
$('#requestAnrechnung-antragdatum').text(antragdatum);
+1
View File
@@ -56,6 +56,7 @@ require_once('dbupdate_3.4/36530_bis_internationsalisierung_codextabelle_neuerun
require_once('dbupdate_3.4/34543_ux_template.php');
require_once('dbupdate_3.4/17513_Entwicklungsteam.php');
require_once('dbupdate_3.4/28575_softwarebereitstellung.php');
require_once('dbupdate_3.4/41150_oe-pfad_db_view.php');
// *** Pruefung und hinzufuegen der neuen Attribute und Tabellen
echo '<H2>Pruefe Tabellen und Attribute!</H2>';
@@ -0,0 +1,39 @@
<?php
if (! defined('DB_NAME')) exit('No direct script access allowed');
if ($result = $db->db_query("SELECT * FROM information_schema.views WHERE table_catalog = '" . DB_NAME . "' AND table_schema = 'public' AND table_name = 'vw_oe_path'"))
{
if($db->db_num_rows($result) == 0)
{
$qry = "
CREATE OR REPLACE VIEW public.vw_oe_path AS
WITH RECURSIVE vw_oe_path(oe_kurzbz, bezeichnung, oe_parent_kurzbz, organisationseinheittyp_kurzbz, oetyp_bezeichnung, depth, path) AS (
SELECT
oe.oe_kurzbz, oe.bezeichnung, oe.oe_parent_kurzbz, oe.organisationseinheittyp_kurzbz, oetyp.bezeichnung AS oetyp_bezeichnung, 0, '/' || oetyp.bezeichnung || ' ' || oe.bezeichnung AS path
FROM
public.tbl_organisationseinheit oe
JOIN
public.tbl_organisationseinheittyp oetyp USING(organisationseinheittyp_kurzbz)
WHERE
oe.oe_parent_kurzbz IS NULL
UNION ALL
SELECT
oe.oe_kurzbz, oe.bezeichnung, oe.oe_parent_kurzbz, oe.organisationseinheittyp_kurzbz, oetyp.bezeichnung AS oetyp_bezeichnung, depth + 1, oet.path || '/' || oetyp.bezeichnung || ' ' || oe.bezeichnung
FROM
public.tbl_organisationseinheit oe, vw_oe_path oet
JOIN
public.tbl_organisationseinheittyp oetyp USING(organisationseinheittyp_kurzbz)
WHERE
oe.oe_parent_kurzbz = oet.oe_kurzbz
)
SELECT * FROM vw_oe_path ORDER BY path, depth;
GRANT SELECT ON public.vw_oe_path TO vilesci;
";
if (!$db->db_query($qry))
echo '<strong>public.vw_oe_path: ' . $db->db_last_error() . '</strong><br />';
else
echo 'public.vw_oe_path: erstellt<br />';
}
}