Merge branch 'feature-33683/digitale_anwesenheitsliste_und_entschuldigungsmanagement_fuer_studierende_prototyp' into feature-25999/C4_cleanup

This commit is contained in:
Harald Bamberger
2024-11-12 11:21:16 +01:00
13 changed files with 158 additions and 32 deletions
+2 -2
View File
@@ -565,6 +565,7 @@ class FilterCmptLib
getAuthPersonId()
);
// If filters were loaded
if (hasData($filters))
{
@@ -1172,5 +1173,4 @@ class FilterCmptLib
return $filterName;
}
}
}
+1 -2
View File
@@ -177,5 +177,4 @@
</body>
</html>
<!-- Footer end -->
<!-- Footer end -->
+1
View File
@@ -27,6 +27,7 @@ define('CIS_LEHRVERANSTALTUNG_SEMESTERINFO_ANZEIGEN',true);
define('CIS_LEHRVERANSTALTUNG_LEHRFACH_ANZEIGEN',false);
define('CIS_LEHRVERANSTALTUNG_GESAMTNOTE_ANZEIGEN', true);
define('CIS_LEHRVERANSTALTUNG_ANRECHNUNG_ANZEIGEN', true);
define('CIS_LEHRVERANSTALTUNG_ANWESENHEIT_ANZEIGEN', true);
// Im CIS Menue Links bei Modulen anzeigen wenn Lehrauftrag
define('CIS_LEHRVERANSTALTUNG_MODULE_LINK',true);
+26 -2
View File
@@ -240,13 +240,37 @@ function checkZeilenUmbruch()
);
}
// Digitale Anwesenheiten
if(CIS_LEHRVERANSTALTUNG_ANWESENHEIT_ANZEIGEN && $angemeldet
&& ($rechte->isBerechtigt('extension/anw_ent_admin')
|| $rechte->isBerechtigt('extension/anwesenheit_lektor')
|| $rechte->isBerechtigt('extension/anwesenheit_student')
|| $rechte->isBerechtigt('extension/anwesenheit_admin')))
{
$link='';
$text='';
$link= APP_ROOT."index.ci.php/extensions/FHC-Core-Anwesenheiten/?stg_kz=$studiengang_kz&sem=$semester&lvid=$lvid&sem_kurzbz=$angezeigtes_stsem";
$menu[]=array
(
'id'=>'core_menu_digitale_anwesenheitslisten',
'position'=>'50',
'name'=> $p->t('lehre/digiAnw'),
'icon'=>'../../../skin/images/button_kreuzerltool.png',
'link'=>$link,
'text'=>$text
);
}
//FEEDBACK
if((!defined('CIS_LEHRVERANSTALTUNG_FEEDBACK_ANZEIGEN') || CIS_LEHRVERANSTALTUNG_FEEDBACK_ANZEIGEN) && $angemeldet)
{
$menu[]=array
(
'id'=>'core_menu_feedback',
'position'=>'50',
'position'=>'60',
'name'=>$p->t('lehre/feedback'),
'icon'=>'../../../skin/images/button_feedback.png',
'link'=>'feedback.php?lvid='.$lvid,
@@ -584,4 +608,4 @@ function isDirectoryEmpty($DOC_ROOT, $kurzbz, $semester, $short_short_name, $typ
}
?>
</tr>
</table>
</table>
+1
View File
@@ -16,6 +16,7 @@ $this->phrasen['lehre/upload']='Upload';
$this->phrasen['lehre/ziparchiv']='Zip-Archiv';
$this->phrasen['lehre/ziparchivTitle']='Alle Dateien im Download Verzeichnis als Zip-Archiv herunterladen';
$this->phrasen['lehre/anwesenheitsUndNotenlisten']='Anwesenheits- und Notenlisten';
$this->phrasen['lehre/digiAnw']='Digitale Anwesenheiten';
$this->phrasen['lehre/leistungsuebersicht']='Leistungsübersicht';
$this->phrasen['lehre/newsgroups']='Newsgroups';
$this->phrasen['lehre/feedback']='Feedback';
+1
View File
@@ -16,6 +16,7 @@ $this->phrasen['lehre/upload']='Upload';
$this->phrasen['lehre/ziparchiv']='Zip-File';
$this->phrasen['lehre/ziparchivTitle']='Download all Files as Zip-File';
$this->phrasen['lehre/anwesenheitsUndNotenlisten']='Attendance and grade list';
$this->phrasen['lehre/digiAnw']='Digital Attendances';
$this->phrasen['lehre/leistungsuebersicht']='Performance List';
$this->phrasen['lehre/newsgroups']='Newsgroups';
$this->phrasen['lehre/feedback']='Feedback';
+8 -4
View File
@@ -16,7 +16,11 @@ export default {
id: String,
name: String,
inputClass: [String, Array, Object],
noList: Boolean
noList: Boolean,
accept: {
type: String,
default: ''
}
},
methods: {
stringifyFile(file) {
@@ -84,8 +88,8 @@ export default {
},
template: `
<div class="form-upload-dms">
<input ref="upload" class="form-control" :class="inputClass" :id="id" :name="name" :multiple="multiple" type="file" @change="addFiles">
<ul v-if="modelValue.length && multiple && !noList" class="list-unstyled m-0">
<input ref="upload" class="form-control" :accept="accept" :class="inputClass" :id="id" :name="name" :multiple="multiple" type="file" @change="addFiles">
<ul v-if="modelValue.length && multiple && !noList" :accept="accept" class="list-unstyled m-0">
<dms-item
v-for="(file, index) in modelValue"
:key="index"
@@ -96,4 +100,4 @@ export default {
</dms-item>
</ul>
</div>`
}
}
+13 -12
View File
@@ -43,7 +43,8 @@ export const CoreFilterCmpt = {
emits: [
'nwNewEntry',
'click:new',
'tableBuilt'
'tableBuilt',
'uuidDefined'
],
props: {
onNwNewEntry: Function, // NOTE(chris): Hack to get the nwNewEntry listener into $props
@@ -200,16 +201,16 @@ export const CoreFilterCmpt = {
}
// Define a default tabulator options in case it was not provided
let tabulatorOptions = {...{
height: 500,
layout: "fitDataStretch",
movableColumns: true,
columnDefaults:{
tooltip: true,
},
placeholder,
reactiveData: true,
persistence: true
}, ...(this.tabulatorOptions || {})};
height: 500,
layout: "fitDataStretch",
movableColumns: true,
columnDefaults:{
tooltip: true,
},
placeholder,
reactiveData: true,
persistence: true
}, ...(this.tabulatorOptions || {})};
if (!this.tableOnly) {
tabulatorOptions.data = this.filteredData;
@@ -573,6 +574,7 @@ export const CoreFilterCmpt = {
if (this.sideMenu && (!this.$props.onNwNewEntry || !(this.$props.onNwNewEntry instanceof Function)))
alert('"nwNewEntry" listener is mandatory when sideMenu is true');
this.uuid = _uuid++;
this.$emit('uuidDefined', this.uuid)
if (!this.tableOnly)
this.getFilter(); // get the filter data
},
@@ -664,4 +666,3 @@ export const CoreFilterCmpt = {
<div ref="table" :id="'filterTableDataset' + idExtra" class="filter-table-dataset"></div>
`
};
+19
View File
@@ -227,6 +227,25 @@ export default {
});
});
},
confirm(options) {
return new Promise((resolve, reject) => {
helperAppInstance.$confirm.require({
group: options?.group ?? 'fhcAlertConfirm',
header: options?.header ?? 'Achtung',
message: options?.message ?? '',
acceptLabel: options?.acceptLabel ?? 'Ok',
acceptClass: options?.acceptClass ?? 'btn btn-primary',
rejectLabel: options?.rejectLabel ?? 'Abbrechen',
rejectClass: options?.rejectClass ?? 'btn btn-outline-secondary',
accept() {
resolve(true);
},
reject() {
resolve(false);
},
});
});
},
alertDefault(severity, title, message, sticky = false) {
let options = { severity: severity, summary: title, detail: message};
+7 -7
View File
@@ -46,9 +46,9 @@ export default {
result.meta.response = response;
return result;
}
const baseURL = FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router + "/";
const fhcApiAxios = axios.create({
timeout: 5000,
timeout: 500000,
baseURL: FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router + "/"
});
@@ -58,7 +58,7 @@ export default {
if (config.data instanceof FormData)
return config;
if (!Object.values(config.data).every(item => {
if (item instanceof FileList)
return false;
@@ -96,7 +96,7 @@ export default {
|| response.config?.errorHandling === false
|| response.config?.errorHandling == 'fail')
return _clean_return_value(response);
// NOTE(chris): loop through errors
if (response.data.errors)
response.data.errors = response.data.errors.filter(
@@ -107,7 +107,7 @@ export default {
}, error => {
if (error.code == 'ERR_CANCELED')
return Promise.reject({...{handled: true}, ...error});
if (error.config?.errorHandling == 'off'
|| error.config?.errorHandling === false
|| error.config?.errorHandling == 'success')
@@ -118,7 +118,7 @@ export default {
app.config.globalProperties.$fhcAlert.alertDefault('error', error.message, error.request.responseURL, true);
return Promise.reject({...{handled: true}, ...error});
}
// NOTE(chris): loop through errors
error.response.data.errors = error.response.data.errors.filter(
err => (error.config[err.type + 'ErrorHandler'] || app.config.globalProperties.$fhcApi._defaultErrorHandlers[err.type])(err, error.config)
@@ -132,7 +132,7 @@ export default {
app.config.globalProperties.$fhcAlert.alertError(error.message);
return Promise.reject({...{handled: true}, ...error});
}
return Promise.reject(error);
});
+1 -1
View File
@@ -374,4 +374,4 @@ if($neue==false)
echo '<br>Keine neuen Webservicerechte';
echo '</body></html>';
?>
?>
@@ -0,0 +1,16 @@
<?php
if (! defined('DB_NAME')) exit('No direct script access allowed');
// add app fhctemplate
if($result = $db->db_query("SELECT 1 FROM system.tbl_app WHERE app='anwesenheiten'"))
{
if($db->db_num_rows($result) === 0)
{
$qry = "INSERT INTO system.tbl_app (app) VALUES('anwesenheiten');";
if(!$db->db_query($qry))
echo '<strong>System Tabelle app: '.$db->db_last_error().'</strong><br>';
else
echo '<br>app anwesenheiten hinzugefuegt';
}
}
+62 -2
View File
@@ -31224,6 +31224,66 @@ array(
)
)
),
array(
'app' => 'anwesenheiten',
'category' => 'global',
'phrase' => 'notAuthorizedForLva',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Keine Berechtigung für die Lehrveranstaltung.',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'No Authorization for that Course.',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'anwesenheiten',
'category' => 'global',
'phrase' => 'notAuthorizedForLe',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Keine Berechtigung für die Lehreinheit.',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'No Authorization for that Teaching Unit.',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'anwesenheiten',
'category' => 'global',
'phrase' => 'noAuthorization',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Keine Berechtigung.',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'No Authorization.',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'anwesenheiten',
'category' => 'global',
@@ -31279,7 +31339,7 @@ array(
array(
'app' => 'anwesenheiten',
'category' => 'global',
'phrase' => 'tooltipStudentAssistenz',
'phrase' => 'tooltipAssistenz',
'insertvon' => 'system',
'phrases' => array(
array(
@@ -37181,4 +37241,4 @@ foreach ($phrases as $phrase)
}
if(!$new)
echo '<b>Keine neuen Phrasen</b><br>';
echo '<b>Keine neuen Phrasen</b><br>';