Compare commits

..
Author SHA1 Message Date
adisposkofh f092dfc70b added old attendance list w/ legacy link to lv menu 2026-10-22 10:50:08 +02:00
3 changed files with 48 additions and 19 deletions
@@ -239,6 +239,8 @@ class LvMenu extends FHCAPI_Controller
$this->fhc_menu_anrechnungLector($menu, $angezeigtes_stsem);
$this->fhc_menu_anwesenheitslisten($menu, $is_lector, $studiengang_kz, $semester, $lvid, $studiensemester_kurzbz);
// Addons Menu Logic
// ##########################################################################################
@@ -550,4 +552,24 @@ class LvMenu extends FHCAPI_Controller
);
}
}
private function fhc_menu_anwesenheitslisten(&$menu, $is_lector, $stg_kz, $sem, $lvid, $stsem)
{
if (
!$is_lector ||
(defined('CIS_LEHRVERANSTALTUNG_LEISTUNGSUEBERSICHT_ANZEIGEN') && !CIS_LEHRVERANSTALTUNG_LEISTUNGSUEBERSICHT_ANZEIGEN)
) {
return;
}
$menu[]=array
(
'id' => 'core_menu_anwesenheitslisten',
'position' => '40',
'phrase' => 'lehre/anwesenheitsUndNotenlisten',
'c4_icon' => base_url('skin/images/button_kreuzerltool.png'),
'c4_icon2' => 'fa-solid fa-graduation-cap',
'c4_link' => base_url('cis.php/Cis/Compat/legacy/cis/private/lehre/anwesenheitsliste.php?stg_kz=' . urlencode($stg_kz) . '&sem=' . urlencode($sem) . '&lvid=' . urlencode($lvid) . '&stsem=' . urlencode($stsem)),
);
}
}
@@ -31,24 +31,10 @@ export default {
return {};
},
methods: {
printDokument(url, scope, event){
let output = 'pdf';
if(this.showAllFormats)
{
console.log("BERECHTIUNG VORHANDEN");
if (event.ctrlKey) {
output = 'doc';
} else if (event.shiftKey) {
output = 'odt';
}
url = url.replace("output=pdf","output="+output);
}
printDokument(url, scope){
//TODO Manu(check if logic not in content (Zutrittkarte also in content folder))
let linkToDocument = FHC_JS_DATA_STORAGE_OBJECT.app_root + 'content/' + url;
console.log('Documentlink:', linkToDocument);
window.open(linkToDocument, '_blank');
let linkToPdf = FHC_JS_DATA_STORAGE_OBJECT.app_root + 'content/' + url;
window.open(linkToPdf, '_blank');
}
},
template: `
@@ -67,7 +53,7 @@ export default {
<ul class="dropdown-menu dropdown-menu-right">
<template v-for="doc in documents" :key="doc.id">
<li v-if="doc.type === 'documenturl'">
<button class="dropdown-item" type="button" @click="printDokument(doc.url, doc.scope, $event)">
<button class="dropdown-item" type="button" @click="printDokument(doc.url, doc.scope)">
{{ doc.name }}
</button>
</li>
@@ -86,7 +72,7 @@ export default {
<ul class="dropdown-menu">
<template v-for="child in doc.data" :key="child.id">
<li v-if="child.type === 'documenturl'">
<button class="dropdown-item" type="button" @click="printDokument(child.url, child.scope, $event)">
<button class="dropdown-item" type="button" @click="printDokument(child.url, child.scope)">
{{ child.name }}
</button>
</li>
+21
View File
@@ -44966,6 +44966,27 @@ In the list:
)
)
),
array(
'app' => 'core',
'category' => 'lehre',
'phrase' => 'anwesenheitsUndNotenlisten',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Anwesenheits- und Notenlisten',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Attendance and grade list',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'lehre',