Merge branch 'feature-25999/C4_cleanup' into feature-61235/Cis4_Studium_Uebersicht

This commit is contained in:
Harald Bamberger
2025-05-14 15:43:04 +02:00
14 changed files with 165 additions and 89 deletions
+3 -1
View File
@@ -4,4 +4,6 @@ if (! defined('BASEPATH')) exit('No direct script access allowed');
// use vuejs dev version
$config['use_vuejs_dev_version'] = false;
// use bundled javascript
$config['use_bundled_javascript'] = false;
$config['use_bundled_javascript'] = false;
// systemerror_mailto use in FHC-Alert Plugin - if empty Link will not be rendered
$config['systemerror_mailto'] = '';
@@ -87,47 +87,19 @@ class Stundenplan extends FHCAPI_Controller
$stundenplan_events = array();
}
// fetching moodle events
$moodle_start_date = new DateTime($start_date);
$moodle_start_date = $moodle_start_date->getTimestamp();
$moodle_end_date = new DateTime($end_date);
$moodle_end_date = $moodle_end_date->getTimestamp();
$moodle_events = [];
Events::trigger('moodleCalendarEvents',
function & () use (&$moodle_events) {
return $moodle_events;
},
['timestart'=>$moodle_start_date,'timeend'=>$moodle_end_date, 'username'=>getAuthUID()]
Events::trigger(
'moodleCalendarEvents',
function & () use (&$moodle_events)
{
return $moodle_events;
},
[
'start_date' => $start_date,
'end_date' => $end_date,
'username' => getAuthUID()
]
);
$moodle_events = array_map(function($event){
$moodle_event_timestart = new DateTime($event->timestart);
$moodle_event_timeend = new DateTime($event->timeend);
$convertedEvent = new stdClass();
$convertedEvent->type = 'moodle';
$convertedEvent->beginn = $moodle_event_timestart->format('H:i:s');
$convertedEvent->ende = $moodle_event_timeend->format('H:i:s');
$convertedEvent->allDayEvent = true;
$convertedEvent->datum = $moodle_event_timestart->format('Y-n-j');
$convertedEvent->purpose = $event->purpose;
$convertedEvent->assignment = $event->activityname;
$convertedEvent->topic = $event->activitystr;
$convertedEvent->lektor = [];
$convertedEvent->gruppe = [];
$convertedEvent->ort_kurzbz = $event->location;
$convertedEvent->lehreinheit_id = $event->lehreinheitsNummber ?? null;
$convertedEvent->titel = isset($event->course->fullname)? $event->course->fullname:null;
$convertedEvent->lehrfach = '';
$convertedEvent->lehrform = '';
$convertedEvent->lehrfach_bez = '';
$convertedEvent->organisationseinheit = '';
$convertedEvent->farbe = '00689E';
$convertedEvent->lehrveranstaltung_id = 0;
$convertedEvent->ort_content_id = 0;
$convertedEvent->url = $event->url;
$convertedEvent->activityIcon = isset($event->icon->iconurl)? $event->icon->iconurl:null;
$convertedEvent->actionname = isset($event->action->name)?$event->action->name:null;
$convertedEvent->overdue = !empty($event->overdue);
return $convertedEvent;
},$moodle_events);
$result = array_merge($stundenplan_events,$moodle_events);
// sort array with moodle events first
@@ -95,6 +95,9 @@ function generateJSDataStorageObject($indexPage, $calledPath, $calledMethod)
}, $server_language);
$user_language = getUserLanguage();
$ci->load->config('javascript');
$systemerror_mailto = $ci->config->item('systemerror_mailto');
$FHC_JS_DATA_STORAGE_OBJECT = array(
'app_root' => APP_ROOT,
'ci_router' => $indexPage,
@@ -103,6 +106,7 @@ function generateJSDataStorageObject($indexPage, $calledPath, $calledMethod)
'server_languages' => $server_language,
'user_language' => $user_language,
'timezone' => date_default_timezone_get(),
'systemerror_mailto' => $systemerror_mailto,
);
$toPrint = "\n";
+2 -2
View File
@@ -148,7 +148,7 @@ echo '
alert(<?php echo "'".$p->t("testtool/alleFragenBeantwortet")."'"?>);
return true;
}
$(document).ready(function () {
$(document).bind('cut copy paste', function(e)
{
@@ -717,7 +717,7 @@ if($frage->frage_id!='')
if(!$demo)
{
echo '<input style="width:180px; white-space:normal" class="btn btn-default btn-testtool" type="submit" name="submitantwort" value="'.$p->t('testtool/speichernUndWeiter').'" />';
echo '<input style="width:180px; white-space:normal; margin-bottom: 130px;" class="btn btn-default btn-testtool" type="submit" name="submitantwort" value="'.$p->t('testtool/speichernUndWeiter').'" />';
}
else
{
+3 -2
View File
@@ -73,9 +73,10 @@
box-shadow: 1px 1px 0 #dee2e6;
}
.fhc-calendar-week-page .all-day-event{
.fhc-calendar-week-page .all-day-event {
max-height: 75px;
overflow:auto;
overflow: auto;
overscroll-behavior: none;
}
.fhc-calendar-week-page .all-day-event-container{
+1 -1
View File
@@ -68,7 +68,7 @@ export default {
</tr>
<tr>
<th>{{$p.t('global','aktivitaet')}}:</th>
<td>{{event?.assignment}}</td>
<td v-html="event?.assignment"></td>
</tr>
<tr>
<th>{{$p.t('global','typ')}}:</th>
+1 -1
View File
@@ -76,7 +76,7 @@ export default {
template: /*html*/ `
<bs-modal ref="modalContainer" @showBsModal="onModalShow" v-bind="$props" :bodyClass="''" dialogClass='modal-lg' class="bootstrap-alert" :backdrop="false" >
<template v-slot:title>
<template v-if="event?.type=='moodle'">{{event.titel}}</template>
<template v-if="event?.type=='moodle'"><strong v-html="event.titel"></strong></template>
<template v-else-if="event.titel">{{ event.titel + ' - ' + event.lehrfach_bez + ' [' + event.ort_kurzbz+']'}}</template>
<template v-else>{{ event.lehrfach_bez + ' [' + event.ort_kurzbz+']'}}</template>
</template>
@@ -288,7 +288,7 @@ const Stundenplan = {
<div class="p-1" v-if="event.type=='moodle'" @click="showModal(event)">
<div class="d-flex small w-100" >
<moodle-svg></moodle-svg>
<span class="flex-grow-1 text-center ">{{event.topic}}</span>
<span class="flex-grow-1 text-center "><strong v-html="event.titel"></strong> - {{event.topic}}</span>
</div>
</div>
<div v-else @click="showModal(event)" class="p-1">
@@ -308,7 +308,7 @@ const Stundenplan = {
</div>
<div v-if="event.type=='moodle'" class="d-flex small w-100" >
<moodle-svg></moodle-svg>
<span class="flex-grow-1 text-center">{{event.topic}}</span>
<span class="flex-grow-1 text-center"><strong v-html="event.titel"></strong> - {{event.topic}}</span>
</div>
<div v-else class="d-flex flex-column flex-grow-1 align-items-center small">
<span>{{event.topic}}</span>
@@ -322,7 +322,7 @@ const Stundenplan = {
<template v-if="event.type=='moodle'">
<div class="d-flex small align-items-center w-100 p-1" >
<moodle-svg></moodle-svg>
<span class="flex-grow-1 text-center">{{event.topic}}</span>
<span class="flex-grow-1 text-center"><strong v-html="event.titel"></strong> - {{event.topic}}</span>
</div>
</template>
<template v-else>
@@ -128,7 +128,7 @@ export default {
loadEvents: function () {
Promise.allSettled([
this.$api.call(ApiStundenplan.getStundenplan(this.monthFirstDay, this.monthLastDay)),
this.$api.call(ApiStundenplan.StundenplanEvents(this.monthFirstDay, this.monthLastDay)),
this.$api.call(ApiStundenplan.getStundenplanReservierungen(this.monthFirstDay, this.monthLastDay))
]).then((result) => {
let promise_events = [];
@@ -178,7 +178,7 @@ export default {
<div v-if="event.type=='moodle'">
<div class="d-flex small w-100" >
<moodle-svg></moodle-svg>
<span v-contrast class="flex-grow-1 text-center ">{{event.topic}}</span>
<span v-contrast class="flex-grow-1 text-center "><strong v-html="event.titel"></strong> - {{event.topic}}</span>
</div>
</div>
<span v-else class="small" >
@@ -198,7 +198,7 @@ export default {
<template v-if="evt.type=='moodle'">
<div class="d-flex align-items-center ">
<moodle-svg></moodle-svg>
<b v-contrast class="flex-grow-1 text-center">{{evt.topic}}</b>
<b v-contrast class="flex-grow-1 text-center"><strong v-html="evt.titel"></strong> - {{evt.topic}}</b>
</div>
</template>
<template v-else>
+7 -1
View File
@@ -117,7 +117,7 @@ const helperApp = Vue.createApp({
},
methods: {
mailToUrl(slotProps) {
let mailTo = 'noreply@technikum-wien.at'; // TODO domain anpassen
let mailTo = FHC_JS_DATA_STORAGE_OBJECT.systemerror_mailto;
let subject = 'Meldung%20Systemfehler';
let body = `
Danke, dass Sie uns den Fehler melden. %0D%0A %0D%0A
@@ -141,6 +141,11 @@ const helperApp = Vue.createApp({
unmounted() {
helperAppContainer.parentElement.removeChild(helperAppContainer);
},
computed: {
showmaillink: function() {
return FHC_JS_DATA_STORAGE_OBJECT.systemerror_mailto !== '';
}
},
template: `
<pv-toast ref="toast" class="fhc-alert" :base-z-index="99999"></pv-toast>
<pv-toast ref="alert" class="fhc-alert" :base-z-index="99999" position="center">
@@ -162,6 +167,7 @@ const helperApp = Vue.createApp({
Fehler anzeigen
</a>
<a
v-if="showmaillink"
class="btn btn-primary flex-fill"
target="_blank"
:href="mailToUrl(slotProps)"
+7 -1
View File
@@ -109,7 +109,7 @@ const helperApp = Vue.createApp({
},
methods: {
mailToUrl(slotProps) {
let mailTo = 'noreply@technikum-wien.at'; // TODO domain anpassen
let mailTo = FHC_JS_DATA_STORAGE_OBJECT.systemerror_mailto;
let subject = 'Meldung%20Systemfehler';
let body = `
Danke, dass Sie uns den Fehler melden. %0D%0A %0D%0A
@@ -133,6 +133,11 @@ const helperApp = Vue.createApp({
unmounted() {
helperAppContainer.parentElement.removeChild(helperAppContainer);
},
computed: {
showmaillink: function() {
return FHC_JS_DATA_STORAGE_OBJECT.systemerror_mailto !== '';
}
},
template: `
<pv-toast ref="toast" class="fhc-alert" :base-z-index="99999"></pv-toast>
<pv-toast ref="alert" class="fhc-alert" :base-z-index="99999" position="center">
@@ -154,6 +159,7 @@ const helperApp = Vue.createApp({
Fehler anzeigen
</a>
<a
v-if="showmaillink"
class="btn btn-primary flex-fill"
target="_blank"
:href="mailToUrl(slotProps)"
+52
View File
@@ -386,6 +386,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
echo ' <titel_en>'.$titel_en.'</titel_en>';
$praktikum = false;
$auslandssemester = false;
$internationalskills = false;
$qry = "SELECT
projektarbeit_id
FROM
@@ -403,6 +404,56 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
}
}
if ($row->typ === 'b')
{
//check if extension international skills is active
$qry = "SELECT 1
FROM information_schema.tables
WHERE table_schema = 'extension' AND table_name = 'tbl_internat_massnahme'";
if($result = $db->db_query($qry))
{
if ($db->db_num_rows($result) === 1)
{
$qry = "SELECT bezeichnung_mehrsprachig[1] as \"internationalskill_deutsch\",
bezeichnung_mehrsprachig[2] as \"internationalskill_english\"
FROM extension.tbl_internat_massnahme_zuordnung zuordnung
JOIN extension.tbl_internat_massnahme massnahme ON zuordnung.massnahme_id = massnahme.massnahme_id
JOIN extension.tbl_internat_massnahme_zuordnung_status zstatus ON zuordnung.massnahme_zuordnung_id = zstatus.massnahme_zuordnung_id
JOIN tbl_prestudent ON zuordnung.prestudent_id = tbl_prestudent.prestudent_id
JOIN tbl_student ON tbl_prestudent.prestudent_id = tbl_student.prestudent_id
WHERE zstatus.massnahme_status_kurzbz = 'confirmed'
AND tbl_student.student_uid = ".$db->db_add_param($uid_arr[$i])."
AND zstatus.massnahme_zuordnung_status_id = (
SELECT MAX(sub_zstatus.massnahme_zuordnung_status_id)
FROM extension.tbl_internat_massnahme_zuordnung_status sub_zstatus
WHERE sub_zstatus.massnahme_zuordnung_id = zuordnung.massnahme_zuordnung_id
)
GROUP BY zuordnung.massnahme_zuordnung_id, tbl_student.student_uid, tbl_prestudent.prestudent_id, tbl_prestudent.studiengang_kz, bezeichnung_mehrsprachig;";
if($db->db_query($qry))
{
if($db->db_num_rows() > 0)
{
$internationalskills = true;
echo "<internationalskills>";
while($row1 = $db->db_fetch_object())
{
echo "<internationalskillsdeutsch>";
echo "<internationalskilldeutsch><![CDATA[$row1->internationalskill_deutsch]]></internationalskilldeutsch>";
echo "</internationalskillsdeutsch>";
echo "<internationalskillsenglisch>";
echo "<internationalskillenglish><![CDATA[$row1->internationalskill_english]]></internationalskillenglish>";
echo "</internationalskillsenglisch>";
}
echo "</internationalskills>";
}
}
}
}
}
$qry = "SELECT tbl_bisio.bisio_id, von, bis, lehreinheit_id,
(SELECT STRING_AGG (
tbl_zweck.bezeichnung,
@@ -461,6 +512,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
$abschlusspruefungsdatum = '';
$abschlussbeurteilung='';
$pruefungstyp_kurzbz='';
$abschlussbeurteilung_deutsch = '';
if($db->db_query($qry))
{
+68 -8
View File
@@ -18428,6 +18428,26 @@ array(
)
)
),
array(
'app' => 'international',
'category' => 'international',
'phrase' => 'studentstatus',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Studentstatus',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Student status',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'international',
'category' => 'international',
@@ -19331,13 +19351,33 @@ array(
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Maßnahmen - geplant',
'text' => 'Maßnahme - geplant',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Measures - planned',
'text' => 'Measure - planned',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'international',
'category' => 'international',
'phrase' => 'geplanteMassnahmenDesc',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Die Maßhname wurde geplant.',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'The measure was planned.',
'description' => '',
'insertvon' => 'system'
)
@@ -19391,13 +19431,13 @@ array(
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Maßnahmen - durchgeführt',
'text' => 'Maßnahme - durchgeführt',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Measures - performed',
'text' => 'Measure - performed',
'description' => '',
'insertvon' => 'system'
)
@@ -19431,13 +19471,13 @@ array(
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Maßnahmen - abgelehnt',
'text' => 'Maßnahme - abgelehnt',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Measures - declined',
'text' => 'Measure - declined',
'description' => '',
'insertvon' => 'system'
)
@@ -19531,13 +19571,13 @@ array(
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Anmerkung - Studiengangsleitung',
'text' => 'Begründung - Studiengangsleitung',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Note - Study course Director',
'text' => 'Reason - Study course Director',
'description' => '',
'insertvon' => 'system'
)
@@ -19563,6 +19603,26 @@ array(
)
)
),
array(
'app' => 'international',
'category' => 'international',
'phrase' => 'stgtodo',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Nur offene Massnahmen',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'only open measures',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'international',
'category' => 'international',
@@ -30,8 +30,6 @@
require_once('../../include/lehrmodus.class.php');
require_once('../../include/benutzerberechtigung.class.php');
require_once('../../include/studienplan.class.php');
require_once('../../include/lehrveranstaltung_faktor.class.php');
require_once('../../include/studiensemester.class.php');
if (!$db = new basis_db())
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
@@ -141,31 +139,6 @@
$reloadstr .= " window.location.href='".$_SERVER['PHP_SELF']."?stg_kz=$lv->studiengang_kz&semester=$lv->semester&neu=true';";
}
$reloadstr .= "</script>\n";
if (in_array($lv->lehrtyp_kurzbz, array('tpl', 'lv')) && $lv->new === true)
{
$lv_faktor = new lehrveranstaltung_faktor();
$studiensemester = new studiensemester();
$studiensemester_von = $studiensemester->getLastOrAktSemester();
if ($lv->lehrtyp_kurzbz === 'lv' && $_POST['lehrveranstaltung_template_id'] !== '')
{
$lv_faktor->getAkt($_POST['lehrveranstaltung_template_id']);
//TODO Faktor in eine Config
if (is_null($lv_faktor->faktor))
$lv_faktor->addFaktor($lv->lehrveranstaltung_id, 2, $studiensemester_von);
else
$lv_faktor->addFaktor($lv->lehrveranstaltung_id, $lv_faktor->faktor, $studiensemester_von);
}
else
{
$lv_faktor->loadByLV($lv->lehrveranstaltung_id);
if (empty($lv_faktor->lv_faktoren))
{
$lv_faktor->addFaktor($lv->lehrveranstaltung_id, 2, $studiensemester_von);
}
}
}
}
}