Layout of course timing tools

This commit is contained in:
PMKuipers 2023-08-07 11:48:06 +02:00
parent 5146ebdf0a
commit 0915274503
6 changed files with 54 additions and 34 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -180,6 +180,8 @@ export default {
rememberchoice: 'course_timing_rememberchoice', rememberchoice: 'course_timing_rememberchoice',
hidewarning: 'course_timing_hidewarning', hidewarning: 'course_timing_hidewarning',
periodspan: 'course_period_span', periodspan: 'course_period_span',
periods: 'periods',
periodspan_desc: 'course_period_span_desc',
}, },
studyplan_associate: { studyplan_associate: {
associations: 'associations', associations: 'associations',
@ -2275,24 +2277,45 @@ export default {
// To avoid the span creeping in the dom where it shouldn't, set display to none if it is hidden // To avoid the span creeping in the dom where it shouldn't, set display to none if it is hidden
// This does not affect the modals, which are rendered outside of this element when needed // This does not affect the modals, which are rendered outside of this element when needed
template: ` template: `
<span :class="'t-course-timing-matcher'" :style="hidden?'display: none ':''"> <div :class="'t-item-timing-checker'" :style="hidden?'display: none ':''">
<span v-if="!hidden"> <template v-if="!hidden" >
<i v-if="course_period_matches" class="text-success fa fa-calendar-check-o" <span class="mr-1" v-if="course_period_matches">
v-b-tooltip.hover.topright :title="text.timing_ok" <i class="text-success fa fa-calendar-check-o"
></i v-b-tooltip.hover.topright :title="text.timing_ok"
><a v-else
href='#' @click="validate_course_period()" class="text-warning"
><i class="fa fa-calendar-times-o" v-b-tooltip.hover.topright :title="text.timing_off"
></i ></i
></a> ><i class="fa fa-question-circle text-black-50"
<span v-if='value.span > 1 || value.span < maxspan' > style="font-size: 0.8em; top: -0.3em; position: relative;"
{{ text.periodspan}} v-b-tooltip.hover.topright :title="(course_period_matches)?text.timing_ok:text.timing_off"
<b-form-select @change="change_span" v-model="value.span"> ></i>
</span>
<span class="mr-1" v-else>
<a href='#' @click="validate_course_period()" class="text-warning"
><i class="fa fa-calendar-times-o"
v-b-tooltip.hover.topright :title="text.timing_off"
></i
><i class="fa fa-question-circle text-black-50"
style="font-size: 0.8em; top: -0.3em; position: relative;"
v-b-tooltip.hover.topright :title="text.timing_off"
></i
></a>
</span>
<span class="ml-1"
>{{
text.periodspan
}}<b-form-select
class=""
size="sm" @change="change_span" v-model="value.span">
<b-form-select-option v-for="(n,i) in maxspan" :value='n' <b-form-select-option v-for="(n,i) in maxspan" :value='n'
>{{ n }}</b-form-select-option> >{{ n }}</b-form-select-option>
</b-form-select> </b-form-select
>{{
(value.span == 1)?text.period.toLowerCase():text.periods.toLowerCase()
}}<i
class="fa fa-question-circle text-black-50"
style="font-size: 0.8em; top: -0.3em; position: relative;"
v-b-tooltip.hover :title="text.periodspan_desc"></i>
</span> </span>
</span> </template>
<b-modal <b-modal
:id="'t-course-timing-matching-'+this.id" :id="'t-course-timing-matching-'+this.id"
size="lg" size="lg"
@ -2917,21 +2940,14 @@ export default {
{{text['coursetiming_'+value.course.timing]}}<br> {{text['coursetiming_'+value.course.timing]}}<br>
{{ startdate }} - {{ enddate }} {{ startdate }} - {{ enddate }}
</div> </div>
</div> <t-item-timing-checker
</template> class="mt-1"
<template #modal-footer="{ ok }" class='d-flex'>
<div class="flex-fill">
<!-- Configure spans and timing if needed -->
<t-item-timing-checker
:maxspan="maxspan" :maxspan="maxspan"
:page="page" :page="page"
:period="period" :period="period"
v-model="value" v-model="value"
></t-item-timing-checker> ></t-item-timing-checker>
</div> </div>
<b-button class='' variant="primary" @click="ok()">
{{ text.ok }}
</b-button>
</template> </template>
<t-item-course-grades <t-item-course-grades

View file

@ -293,12 +293,14 @@ $string["period_default_fullname"] = 'Period {$a}';
$string["period_default_shortname"] = 'P{$a}'; $string["period_default_shortname"] = 'P{$a}';
$string["course_timing_title"] = 'Course timing does not match period timing'; $string["course_timing_title"] = 'Course timing does not match period timing';
$string["course_timing_desc"] = 'The start and end date of the course do not match the start and end date of it\'s period(s) in the studyplan.'; $string["course_timing_desc"] = 'The start and end date of the course do not match the start and end date of it\'s period(s) in the studyplan.';
$string["course_timing_question"] = 'Do you want to update the course\'s start and end time to match that of the period?'; $string["course_timing_question"] = 'Do you want to update the course\'s start and end time to match that of the period(s)?';
$string["course_timing_warning"] = 'You do not have permission to automatically update this course start and end date. Automatic timing update not available'; $string["course_timing_warning"] = 'You do not have permission to automatically update this course start and end date. Automatic timing update not available';
$string["period"] = 'Period'; $string["period"] = 'Period';
$string["periods"] = 'Periods';
$string["duration"] = 'Duration'; $string["duration"] = 'Duration';
$string["course_timing_rememberchoice"] = 'Remember my choice for future date mismatches'; $string["course_timing_rememberchoice"] = 'Remember my choice for future date mismatches';
$string["course_timing_hidewarning"] = 'Hide this warning next time'; $string["course_timing_hidewarning"] = 'Hide this warning next time';
$string["course_timing_ok"] = 'Course timing does matches period timing'; $string["course_timing_ok"] = 'Course timing matches period timing';
$string["course_timing_off"] = 'Course timing does not match period timing'; $string["course_timing_off"] = 'Course timing does not match period timing. Click here to correct.';
$string["course_period_span"] = 'Number of periods'; $string["course_period_span"] = 'Spans';
$string["course_period_span_desc"] = 'Depending on the space available in the studyplan, you can change the number of periods the course spans here. Make sure the slots directly behind this item are free if you want to expand the course.';

View file

@ -295,13 +295,15 @@ $string["badgeissuedstats"] = "Voortgang van uitgifte";
$string["period_default_fullname"] = 'Periode {$a}'; $string["period_default_fullname"] = 'Periode {$a}';
$string["period_default_shortname"] = 'P{$a}'; $string["period_default_shortname"] = 'P{$a}';
$string["course_timing_title"] = 'Cursustiming en periodetiming komen niet overeen'; $string["course_timing_title"] = 'Cursustiming en periodetiming komen niet overeen';
$string["course_timing_desc"] = 'De start- en einddatum van de cursus, komen niet overen met die van de periode waarin je hem hebt gedropt.'; $string["course_timing_desc"] = 'De start- en einddatum van de cursus, komen niet overen met die van de periode(n) waarin je hem hebt gedropt.';
$string["course_timing_question"] = 'Wil je de start- en eindtijd van de cursus aanpassen naar doe van de periode?'; $string["course_timing_question"] = 'Wil je de start- en eindtijd van de cursus aanpassen naar doe van de periode(n)?';
$string["course_timing_warning"] = 'Je hebt geen rechten om de start- en eindtijd van deze cursus aan te passen. Aanpassen van cursus naar periodetiming is niet beschikbaar.'; $string["course_timing_warning"] = 'Je hebt geen rechten om de start- en eindtijd van deze cursus aan te passen. Aanpassen van cursus naar periodetiming is niet beschikbaar.';
$string["period"] = 'Periode'; $string["period"] = 'Periode';
$string["periods"] = 'Perioden';
$string["duration"] = 'Duur'; $string["duration"] = 'Duur';
$string["course_timing_rememberchoice'"] = 'Onthoud mijn keuze voor toekomstige mismatches tussen cursus en periode'; $string["course_timing_rememberchoice'"] = 'Onthoud mijn keuze voor toekomstige mismatches tussen cursus en periode';
$string["course_timing_hidewarning"] = 'Hide this warning next time'; $string["course_timing_hidewarning"] = 'Hide this warning next time';
$string["course_timing_ok"] = 'Cursustiming en periodetiming komen overeen'; $string["course_timing_ok"] = 'Cursustiming en periodetiming komen overeen';
$string["course_timing_off"] = 'Cursustiming en periodetiming komen niet overeen'; $string["course_timing_off"] = 'Cursustiming en periodetiming komen niet overeen. Klik hier om bij te werken.';
$string["course_period_span"] = 'Aantal perioden'; $string["course_period_span"] = 'Duurt';
$string["course_period_span_desc"] = 'Als er genoeg ruimte beschikbaar is, kan de duur van de cursus in perioden worden aangepast. Zorg dat de ruimte na deze cursus leeg is om de cursus langer te kunnen maken.';

View file

@ -1,6 +1,6 @@
<?php <?php
$plugin->component = 'local_treestudyplan'; // Recommended since 2.0.2 (MDL-26035). Required since 3.0 (MDL-48494) $plugin->component = 'local_treestudyplan'; // Recommended since 2.0.2 (MDL-26035). Required since 3.0 (MDL-48494)
$plugin->version = 2023080500; // YYYYMMDDHH (year, month, day, iteration) $plugin->version = 2023080700; // YYYYMMDDHH (year, month, day, iteration)
$plugin->requires = 2021051700; // YYYYMMDDHH (This is the release version for Moodle 3.11) $plugin->requires = 2021051700; // YYYYMMDDHH (This is the release version for Moodle 3.11)
$plugin->dependencies = [ $plugin->dependencies = [