Added some config features for display

This commit is contained in:
PMKuipers 2024-08-14 12:17:55 +02:00
parent 13523670cb
commit fd9d50873e
7 changed files with 25 additions and 25 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -4528,7 +4528,7 @@ export default {
self.loadingcourses = false;
return;
}).catch(notification.exception);
if (!this.toolboxcoursesonly && this.enablebadges) {
this.filterSystembadges();
if (this.allowcoursebadges) {
@ -4652,7 +4652,7 @@ export default {
</ul>
</div>
</b-tab>
<b-tab :title="text.sitebadges" v-if="!coaching">
<b-tab :title="text.sitebadges">
<div class="t-toolbox-badges-filter">
<input v-model="filters.systembadges" @input="filterSystembadges" :placeholder="text.filter"></input>
&nbsp; <a @click="resetSystembadges" v-if="filters.systembadges" href='#'

View File

@ -579,41 +579,38 @@ export default {
>&nbsp;</template
><b-form-select v-model="bubblevalue"
@change='selectedchanged'
>
<b-form-select-option
><b-form-select-option
:disabled="!defaultselectable"
:value="null"
:class="(defaultselectable)?'font-italic text-primary ':'font-italic'"
><slot name="defaultlabel">{{text.select}}</slot></b-form-select-option>
</b-form-select-option-group>
<template v-if="grouped">
<template v-for="(g,gi) in this.options">
<b-form-select-option-group
><slot name="defaultlabel">{{text.select}}</slot></b-form-select-option
><template v-if="grouped"
><template v-for="(g,gi) in this.options"
><b-form-select-option-group
v-if="g[optionsfield] && g[optionsfield].length > 0"
:label="g[labelfield]"
>
<b-form-select-option
><b-form-select-option
v-for="(o,i) in g[optionsfield]"
:key="i"
:value="o"
><slot :value="o">{{o[titlefield]}}</slot></b-form-select-option>
</b-form-select-option-group>
</template>
</template>
<template v-else>
</b-form-select-option-group
></template
></template
><template v-else>
<b-form-select-option
v-for="(o,i) in this.options"
:key="i"
:value="o"
><slot :value="o">{{o[titlefield]}}</slot></b-form-select-option>
</template>
</b-form-select
><slot :value="o">{{o[titlefield]}}</slot></b-form-select-option
></template
></b-form-select
><template v-if="showarrows"
>&nbsp;<b-button :variant='variant' @click="next" :disabled="atLast()"
><i v-if='arrows' class='fa fa-caret-right s-prevnext-arrow'></i
><template v-else>{{text.next}}</template></b-button
></template>
</div>
></template
></div>
`,
});

View File

@ -189,7 +189,8 @@ class utilityservice extends \external_api {
"toolboxleft" => new \external_value(PARAM_BOOL, 'Start toolbox default on left side'),
"toolboxcoursesonly" => new \external_value(PARAM_BOOL, 'Show only courses in the toolbox'),
"enablebadges" => new \external_value(PARAM_BOOL, 'Badges are enabled in this instance'),
"badges_allowcoursebadges" => new \external_value(PARAM_BOOL, 'Badges are enabled in this instance'),
"badges_allowcoursebadges" => new \external_value(PARAM_BOOL, 'Course badges are enabled in this instance'),
"showprevnextarrows" => new \external_value(PARAM_BOOL, 'Show arrows next to the student selector'),
]);
}
@ -208,6 +209,8 @@ class utilityservice extends \external_api {
"toolboxcoursesonly" => get_config("local_treestudyplan", "toolboxcoursesonly"),
"enablebadges" => !empty($CFG->enablebadges),
"badges_allowcoursebadges" => !empty($CFG->badges_allowcoursebadges),
"showprevnextarrows" => get_config("local_treestudyplan", "showprevnextarrows"),
];
}