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',
hidewarning: 'course_timing_hidewarning',
periodspan: 'course_period_span',
periods: 'periods',
periodspan_desc: 'course_period_span_desc',
},
studyplan_associate: {
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
// This does not affect the modals, which are rendered outside of this element when needed
template: `
<span :class="'t-course-timing-matcher'" :style="hidden?'display: none ':''">
<span v-if="!hidden">
<i v-if="course_period_matches" class="text-success fa fa-calendar-check-o"
v-b-tooltip.hover.topright :title="text.timing_ok"
></i
><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"
<div :class="'t-item-timing-checker'" :style="hidden?'display: none ':''">
<template v-if="!hidden" >
<span class="mr-1" v-if="course_period_matches">
<i class="text-success fa fa-calendar-check-o"
v-b-tooltip.hover.topright :title="text.timing_ok"
></i
></a>
<span v-if='value.span > 1 || value.span < maxspan' >
{{ text.periodspan}}
<b-form-select @change="change_span" v-model="value.span">
><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="(course_period_matches)?text.timing_ok:text.timing_off"
></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'
>{{ 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>
</template>
<b-modal
:id="'t-course-timing-matching-'+this.id"
size="lg"
@ -2917,21 +2940,14 @@ export default {
{{text['coursetiming_'+value.course.timing]}}<br>
{{ startdate }} - {{ enddate }}
</div>
</div>
</template>
<template #modal-footer="{ ok }" class='d-flex'>
<div class="flex-fill">
<!-- Configure spans and timing if needed -->
<t-item-timing-checker
<t-item-timing-checker
class="mt-1"
:maxspan="maxspan"
:page="page"
:period="period"
v-model="value"
></t-item-timing-checker>
</div>
<b-button class='' variant="primary" @click="ok()">
{{ text.ok }}
</b-button>
</template>
<t-item-course-grades

View File

@ -293,12 +293,14 @@ $string["period_default_fullname"] = 'Period {$a}';
$string["period_default_shortname"] = 'P{$a}';
$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_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["period"] = 'Period';
$string["periods"] = 'Periods';
$string["duration"] = 'Duration';
$string["course_timing_rememberchoice"] = 'Remember my choice for future date mismatches';
$string["course_timing_hidewarning"] = 'Hide this warning next time';
$string["course_timing_ok"] = 'Course timing does matches period timing';
$string["course_timing_off"] = 'Course timing does not match period timing';
$string["course_period_span"] = 'Number of periods';
$string["course_timing_ok"] = 'Course timing matches period timing';
$string["course_timing_off"] = 'Course timing does not match period timing. Click here to correct.';
$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_shortname"] = 'P{$a}';
$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_question"] = 'Wil je de start- en eindtijd van de cursus aanpassen naar doe van de periode?';
$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(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["period"] = 'Periode';
$string["periods"] = 'Perioden';
$string["duration"] = 'Duur';
$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_ok"] = 'Cursustiming en periodetiming komen overeen';
$string["course_timing_off"] = 'Cursustiming en periodetiming komen niet overeen';
$string["course_period_span"] = 'Aantal perioden';
$string["course_timing_off"] = 'Cursustiming en periodetiming komen niet overeen. Klik hier om bij te werken.';
$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
$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->dependencies = [