Merge branch 'epic-56039/LV-Evaluierung' into demo

This commit is contained in:
Andreas Österreicher
2025-10-06 12:04:35 +02:00
119 changed files with 2375 additions and 1679 deletions
+1 -1
View File
@@ -9755,7 +9755,7 @@ COMMENT ON TABLE public.tbl_tag IS 'Orders and Company Tags';
CREATE TABLE public.tbl_variable (
name character varying(64) NOT NULL,
uid character varying(32) NOT NULL,
wert character varying(64)
wert text
);
+4
View File
@@ -79,6 +79,10 @@ require_once('dbupdate_3.4/40314_electronic_onboarding_anbindung_ida.php');
require_once('dbupdate_3.4/25999_C4_dashboard.php');
require_once('dbupdate_3.4/61730_Dashboard_Anpassungen.php');
require_once('dbupdate_3.4/40128_search.php');
require_once('dbupdate_3.4/63394_Variablenbeschraenkung.php');
require_once('dbupdate_3.4/63436_cis4_iframe_component.php');
require_once('dbupdate_3.4/60882_lehrfaecherverteilung_favorites.php');
require_once('dbupdate_3.4/66982_berufsschule.php');
require_once('dbupdate_3.4/62063_lv_evaluierung.php');
// *** Pruefung und hinzufuegen der neuen Attribute und Tabellen
@@ -0,0 +1,28 @@
<?php
if (!defined('DB_NAME')) exit('No direct script access allowed');
// Change type of wert in public.tbl_variable
if ($result = @$db->db_query("
SELECT data_type
FROM information_schema.columns
WHERE table_schema = 'public'
AND table_name = 'tbl_variable'
AND column_name = 'wert';
")) {
if ($db->db_num_rows($result) == 1)
{
$data_type = $db->db_fetch_row($result)[0];
if (strtolower($data_type) != 'text')
{
$qry = "ALTER TABLE public.tbl_variable
ALTER COLUMN wert
TYPE TEXT;";
if (!$db->db_query($qry))
echo '<strong>public.tbl_variable '.$db->db_last_error().'</strong><br>';
else
echo 'public.tbl_variable: Change type of "wert" to TEXT<br>';
}
}
}
@@ -0,0 +1,81 @@
<?php
$xsd= <<<EOD
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name="content">
<xs:complexType>
<xs:sequence>
<xs:element name="url" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
EOD;
$xslt_xhtml= <<<EOD
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="UTF-8"/>
<xsl:template match="content">
<xsl:choose>
<xsl:when test="string(url)">
<iframe
src="{url}"
frameborder="0"
style="width:100%; height:90vh; border:0; display:block;"
>
</iframe>
</xsl:when>
<xsl:otherwise>
<div class="alert alert-warning">Keine URL im Inhalt gefunden.</div>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
EOD;
$xslt_xhtml_c4= <<<EOD
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="UTF-8"/>
<xsl:template match="content">
<xsl:choose>
<xsl:when test="string(url)">
<iframe
src="{url}"
frameborder="0"
style="width:100%; height:90vh; border:0; display:block;"
>
</iframe>
</xsl:when>
<xsl:otherwise>
<div class="alert alert-warning">Keine URL im Inhalt gefunden.</div>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
EOD;
if ($result = @$db->db_query("SELECT * FROM campus.tbl_template WHERE template_kurzbz='iframe'"))
{
if ($db->db_num_rows($result) == 0)
{
$sql= <<<EOD
INSERT INTO campus.tbl_template
(template_kurzbz, bezeichnung, xsd, xslt_xhtml, xslfo_pdf, xslt_xhtml_c4)
VALUES
('iframe','iFrame Content ', '{$xsd}', '{$xslt_xhtml}' , NULL, '{$xslt_xhtml_c4}');
EOD;
if (!$db->db_query($sql))
{
echo '<strong>campus.tbl_template: ' . $db->db_last_error() . '</strong><br>';
}
else
{
echo ' campus.tbl_template: Template "iframe" hinzugefügt.<br>';
}
}
}
@@ -0,0 +1,41 @@
<?php
/* Copyright (C) 2025 fhcomplete.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* Authors: Andreas Österreicher <[email protected]>,
*
* Beschreibung:
* Aktivität Berufsschule für Zeitaufzeichnung
*/
if (! defined('DB_NAME')) exit('No direct script access allowed');
// Add permission: basis/gehaelter
if($result = @$db->db_query("SELECT 1 FROM fue.tbl_aktivitaet WHERE aktivitaet_kurzbz = 'Berufsschule';"))
{
if($db->db_num_rows($result) == 0)
{
$qry = "INSERT INTO fue.tbl_aktivitaet(aktivitaet_kurzbz, beschreibung, sort) VALUES('Berufsschule', 'Berufsschule','5');";
if(!$db->db_query($qry))
{
echo '<strong>fue.tbl_aktivitaet '.$db->db_last_error().'</strong><br>';
}
else
{
echo 'fue.tbl_aktivitaet: Added Aktivitaet "berufsschule"<br>';
}
}
}
+40
View File
@@ -50125,6 +50125,46 @@ I have been informed that I am under no obligation to consent to the transmissio
)
)
),
array(
'app' => 'core',
'category' => 'global',
'phrase' => 'abschicken',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Abschicken',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Submit',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'global',
'phrase' => 'zurueckZumStart',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Zurück zum Start',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Back to Start',
'description' => '',
'insertvon' => 'system'
)
)
),
// LVEVALUIERUNG ---------------------------------------------------------------------------------------------------
array(
'app' => 'lvevaluierung',