Merge pull request #2837 from dpalou/MOBILE-3320

Mobile 3320
main
Pau Ferrer Ocaña 2021-06-17 14:07:58 +02:00 committed by GitHub
commit 2680b65a19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
36 changed files with 74 additions and 48 deletions

View File

@ -873,6 +873,7 @@
"addon.mod_quiz.summaryofattempts": "quiz", "addon.mod_quiz.summaryofattempts": "quiz",
"addon.mod_quiz.timeleft": "quiz", "addon.mod_quiz.timeleft": "quiz",
"addon.mod_quiz.timetaken": "quiz", "addon.mod_quiz.timetaken": "quiz",
"addon.mod_quiz.unit": "quiz",
"addon.mod_quiz.warningattemptfinished": "local_moodlemobileapp", "addon.mod_quiz.warningattemptfinished": "local_moodlemobileapp",
"addon.mod_quiz.warningdatadiscarded": "local_moodlemobileapp", "addon.mod_quiz.warningdatadiscarded": "local_moodlemobileapp",
"addon.mod_quiz.warningdatadiscardedfromfinished": "local_moodlemobileapp", "addon.mod_quiz.warningdatadiscardedfromfinished": "local_moodlemobileapp",

View File

@ -44,6 +44,7 @@
*ngIf="eventTypes.length > 1" *ngIf="eventTypes.length > 1"
formControlName="eventtype" formControlName="eventtype"
interface="action-sheet" interface="action-sheet"
[interfaceOptions]="{header: 'addon.calendar.eventkind' | translate}"
> >
<ion-select-option *ngFor="let type of eventTypes" [value]="type.value"> <ion-select-option *ngFor="let type of eventTypes" [value]="type.value">
{{ type.name | translate }} {{ type.name | translate }}
@ -56,8 +57,8 @@
<ion-label> <ion-label>
<p class="item-heading" [core-mark-required]="true">{{ 'core.category' | translate }}</p> <p class="item-heading" [core-mark-required]="true">{{ 'core.category' | translate }}</p>
</ion-label> </ion-label>
<ion-select formControlName="categoryid" interface="action-sheet" <ion-select formControlName="categoryid" interface="action-sheet" [placeholder]="'core.noselection' | translate"
[placeholder]="'core.noselection' | translate"> [interfaceOptions]="{header: 'core.category' | translate}">
<ion-select-option *ngFor="let category of categories" [value]="category.id"> <ion-select-option *ngFor="let category of categories" [value]="category.id">
{{ category.name }} {{ category.name }}
</ion-select-option> </ion-select-option>
@ -69,8 +70,8 @@
<ion-label> <ion-label>
<p class="item-heading" [core-mark-required]="true">{{ 'core.course' | translate }}</p> <p class="item-heading" [core-mark-required]="true">{{ 'core.course' | translate }}</p>
</ion-label> </ion-label>
<ion-select formControlName="courseid" interface="action-sheet" <ion-select formControlName="courseid" interface="action-sheet" [placeholder]="'core.noselection' | translate"
[placeholder]="'core.noselection' | translate"> [interfaceOptions]="{header: 'core.course' | translate}">
<ion-select-option *ngFor="let course of courses" [value]="course.id">{{ course.fullname }}</ion-select-option> <ion-select-option *ngFor="let course of courses" [value]="course.id">{{ course.fullname }}</ion-select-option>
</ion-select> </ion-select>
</ion-item> </ion-item>
@ -84,7 +85,7 @@
</ion-label> </ion-label>
<ion-select formControlName="groupcourseid" <ion-select formControlName="groupcourseid"
interface="action-sheet" [placeholder]="'core.noselection' | translate" interface="action-sheet" [placeholder]="'core.noselection' | translate"
(ionChange)="groupCourseSelected()"> (ionChange)="groupCourseSelected()" [interfaceOptions]="{header: 'core.course' | translate}">
<ion-select-option *ngFor="let course of courses" [value]="course.id"> <ion-select-option *ngFor="let course of courses" [value]="course.id">
{{ course.fullname }} {{ course.fullname }}
</ion-select-option> </ion-select-option>
@ -99,8 +100,8 @@
<ion-label> <ion-label>
<p class="item-heading" [core-mark-required]="true">{{ 'core.group' | translate }}</p> <p class="item-heading" [core-mark-required]="true">{{ 'core.group' | translate }}</p>
</ion-label> </ion-label>
<ion-select formControlName="groupid" interface="action-sheet" <ion-select formControlName="groupid" interface="action-sheet" [placeholder]="'core.noselection' | translate"
[placeholder]="'core.noselection' | translate"> [interfaceOptions]="{header: 'core.group' | translate}">
<ion-select-option *ngFor="let group of groups" [value]="group.id">{{ group.name }}</ion-select-option> <ion-select-option *ngFor="let group of groups" [value]="group.id">{{ group.name }}</ion-select-option>
</ion-select> </ion-select>
</ion-item> </ion-item>

View File

@ -10,7 +10,8 @@
<ion-list> <ion-list>
<ion-item *ngIf="defaultTime != -1"> <ion-item *ngIf="defaultTime != -1">
<ion-label>{{ 'addon.calendar.defaultnotificationtime' | translate }}</ion-label> <ion-label>{{ 'addon.calendar.defaultnotificationtime' | translate }}</ion-label>
<ion-select [(ngModel)]="defaultTime" (ionChange)="updateDefaultTime(defaultTime)" interface="action-sheet"> <ion-select [(ngModel)]="defaultTime" (ionChange)="updateDefaultTime(defaultTime)" interface="action-sheet"
[interfaceOptions]="{header: 'addon.calendar.defaultnotificationtime' | translate}">
<ion-select-option [value]="0">{{ 'core.settings.disabled' | translate }}</ion-select-option> <ion-select-option [value]="0">{{ 'core.settings.disabled' | translate }}</ion-select-option>
<ion-select-option [value]="10">{{ 600 | coreDuration }}</ion-select-option> <ion-select-option [value]="10">{{ 600 | coreDuration }}</ion-select-option>
<ion-select-option [value]="30">{{ 1800 | coreDuration }}</ion-select-option> <ion-select-option [value]="30">{{ 1800 | coreDuration }}</ion-select-option>

View File

@ -69,7 +69,7 @@
<ng-container *ngIf="groupInfo.visibleGroups">{{'core.groupsvisible' | translate }}</ng-container> <ng-container *ngIf="groupInfo.visibleGroups">{{'core.groupsvisible' | translate }}</ng-container>
</ion-label> </ion-label>
<ion-select [(ngModel)]="group" (ionChange)="setGroup(group)" aria-labelledby="addon-assign-groupslabel" <ion-select [(ngModel)]="group" (ionChange)="setGroup(group)" aria-labelledby="addon-assign-groupslabel"
interface="action-sheet"> interface="action-sheet" [interfaceOptions]="{header: 'core.group' | translate}">
<ion-select-option *ngFor="let groupOpt of groupInfo.groups" [value]="groupOpt.id"> <ion-select-option *ngFor="let groupOpt of groupInfo.groups" [value]="groupOpt.id">
{{groupOpt.name}} {{groupOpt.name}}
</ion-select-option> </ion-select-option>

View File

@ -244,7 +244,8 @@
<!-- Grade using a scale. --> <!-- Grade using a scale. -->
<ion-item class="ion-text-wrap" *ngIf="grade.method == 'simple' && grade.scale"> <ion-item class="ion-text-wrap" *ngIf="grade.method == 'simple' && grade.scale">
<ion-label><h2>{{ 'addon.mod_assign.grade' | translate }}</h2></ion-label> <ion-label><h2>{{ 'addon.mod_assign.grade' | translate }}</h2></ion-label>
<ion-select [(ngModel)]="grade.grade" interface="action-sheet" [disabled]="grade.disabled"> <ion-select [(ngModel)]="grade.grade" interface="action-sheet" [disabled]="grade.disabled"
[interfaceOptions]="{header: 'addon.mod_assign.grade' | translate}">
<ion-select-option *ngFor="let grade of grade.scale" [value]="grade.value"> <ion-select-option *ngFor="let grade of grade.scale" [value]="grade.value">
{{grade.label}} {{grade.label}}
</ion-select-option> </ion-select-option>
@ -255,7 +256,8 @@
<ion-item class="ion-text-wrap" *ngFor="let outcome of gradeInfo!.outcomes"> <ion-item class="ion-text-wrap" *ngFor="let outcome of gradeInfo!.outcomes">
<ion-label><h2>{{ outcome.name }}</h2></ion-label> <ion-label><h2>{{ outcome.name }}</h2></ion-label>
<ion-select *ngIf="canSaveGrades && outcome.itemNumber" [(ngModel)]="outcome.selectedId" <ion-select *ngIf="canSaveGrades && outcome.itemNumber" [(ngModel)]="outcome.selectedId"
interface="action-sheet" [disabled]="gradeInfo!.disabled"> interface="action-sheet" [disabled]="gradeInfo!.disabled"
[interfaceOptions]="{header: outcome.name }">
<ion-select-option *ngFor="let grade of outcome.options" [value]="grade.value"> <ion-select-option *ngFor="let grade of outcome.options" [value]="grade.value">
{{grade.label}} {{grade.label}}
</ion-select-option> </ion-select-option>

View File

@ -31,7 +31,7 @@
{{ 'core.groupsvisible' | translate }} {{ 'core.groupsvisible' | translate }}
</ion-label> </ion-label>
<ion-select [(ngModel)]="groupId" (ionChange)="setGroup(groupId)" aria-labelledby="addon-assign-groupslabel" <ion-select [(ngModel)]="groupId" (ionChange)="setGroup(groupId)" aria-labelledby="addon-assign-groupslabel"
interface="action-sheet" slot="end"> interface="action-sheet" slot="end" [interfaceOptions]="{header: 'core.group' | translate}">
<ion-select-option *ngFor="let groupOpt of groupInfo.groups" [value]="groupOpt.id"> <ion-select-option *ngFor="let groupOpt of groupInfo.groups" [value]="groupOpt.id">
{{groupOpt.name}} {{groupOpt.name}}
</ion-select-option> </ion-select-option>

View File

@ -18,7 +18,7 @@
<ng-container *ngIf="groupInfo.visibleGroups">{{'core.groupsvisible' | translate }}</ng-container> <ng-container *ngIf="groupInfo.visibleGroups">{{'core.groupsvisible' | translate }}</ng-container>
</ion-label> </ion-label>
<ion-select [(ngModel)]="groupId" (ionChange)="fetchSessions(true)" aria-labelledby="addon-chat-groupslabel" <ion-select [(ngModel)]="groupId" (ionChange)="fetchSessions(true)" aria-labelledby="addon-chat-groupslabel"
interface="action-sheet"> interface="action-sheet" [interfaceOptions]="{header: 'core.group' | translate}">
<ion-select-option *ngFor="let groupOpt of groupInfo.groups" [value]="groupOpt.id"> <ion-select-option *ngFor="let groupOpt of groupInfo.groups" [value]="groupOpt.id">
{{groupOpt.name}} {{groupOpt.name}}
</ion-select-option> </ion-select-option>

View File

@ -62,7 +62,7 @@
<ng-container *ngIf="groupInfo.visibleGroups">{{'core.groupsvisible' | translate }}</ng-container> <ng-container *ngIf="groupInfo.visibleGroups">{{'core.groupsvisible' | translate }}</ng-container>
</ion-label> </ion-label>
<ion-select [(ngModel)]="selectedGroup" (ionChange)="setGroup(selectedGroup)" aria-labelledby="addon-data-groupslabel" <ion-select [(ngModel)]="selectedGroup" (ionChange)="setGroup(selectedGroup)" aria-labelledby="addon-data-groupslabel"
interface="action-sheet"> interface="action-sheet" [interfaceOptions]="{header: 'core.group' | translate}">
<ion-select-option *ngFor="let groupOpt of groupInfo.groups" [value]="groupOpt.id"> <ion-select-option *ngFor="let groupOpt of groupInfo.groups" [value]="groupOpt.id">
{{groupOpt.name}} {{groupOpt.name}}
</ion-select-option> </ion-select-option>

View File

@ -27,7 +27,7 @@
<ion-item class="ion-text-wrap"> <ion-item class="ion-text-wrap">
<ion-label position="stacked">{{ 'core.sortby' | translate }}</ion-label> <ion-label position="stacked">{{ 'core.sortby' | translate }}</ion-label>
<ion-select interface="action-sheet" name="sortBy" formControlName="sortBy" <ion-select interface="action-sheet" name="sortBy" formControlName="sortBy"
[placeholder]="'core.sortby' | translate"> [placeholder]="'core.sortby' | translate" [interfaceOptions]="{header: 'core.sortby' | translate}">
<optgroup *ngIf="fieldsArray.length" label="{{ 'addon.mod_data.fields' | translate }}"> <optgroup *ngIf="fieldsArray.length" label="{{ 'addon.mod_data.fields' | translate }}">
<ion-select-option *ngFor="let field of fieldsArray" [value]="field.id">{{field.name}}</ion-select-option> <ion-select-option *ngFor="let field of fieldsArray" [value]="field.id">{{field.name}}</ion-select-option>
</optgroup> </optgroup>

View File

@ -22,7 +22,7 @@
<ng-container *ngIf="groupInfo.visibleGroups">{{ 'core.groupsseparate' | translate }}</ng-container> <ng-container *ngIf="groupInfo.visibleGroups">{{ 'core.groupsseparate' | translate }}</ng-container>
</ion-label> </ion-label>
<ion-select [(ngModel)]="selectedGroup" (ionChange)="setGroup(selectedGroup)" aria-labelledby="addon-data-groupslabel" <ion-select [(ngModel)]="selectedGroup" (ionChange)="setGroup(selectedGroup)" aria-labelledby="addon-data-groupslabel"
interface="action-sheet"> interface="action-sheet" [interfaceOptions]="{header: 'core.group' | translate}">
<ion-select-option *ngFor="let groupOpt of groupInfo.groups" [value]="groupOpt.id"> <ion-select-option *ngFor="let groupOpt of groupInfo.groups" [value]="groupOpt.id">
{{groupOpt.name}} {{groupOpt.name}}
</ion-select-option> </ion-select-option>

View File

@ -30,7 +30,7 @@
<ng-container *ngIf="groupInfo.visibleGroups">{{ 'core.groupsseparate' | translate }}</ng-container> <ng-container *ngIf="groupInfo.visibleGroups">{{ 'core.groupsseparate' | translate }}</ng-container>
</ion-label> </ion-label>
<ion-select [(ngModel)]="selectedGroup" (ionChange)="setGroup(selectedGroup)" aria-labelledby="addon-data-groupslabel" <ion-select [(ngModel)]="selectedGroup" (ionChange)="setGroup(selectedGroup)" aria-labelledby="addon-data-groupslabel"
interface="action-sheet"> interface="action-sheet" [interfaceOptions]="{header: 'core.group' | translate}">
<ion-select-option *ngFor="let groupOpt of groupInfo.groups" [value]="groupOpt.id"> <ion-select-option *ngFor="let groupOpt of groupInfo.groups" [value]="groupOpt.id">
{{groupOpt.name}} {{groupOpt.name}}
</ion-select-option> </ion-select-option>

View File

@ -67,7 +67,7 @@
<ng-container *ngIf="groupInfo.visibleGroups">{{'core.groupsvisible' | translate }}</ng-container> <ng-container *ngIf="groupInfo.visibleGroups">{{'core.groupsvisible' | translate }}</ng-container>
</ion-label> </ion-label>
<ion-select [(ngModel)]="group" (ionChange)="setGroup(group)" aria-labelledby="addon-feedback-groupslabel" <ion-select [(ngModel)]="group" (ionChange)="setGroup(group)" aria-labelledby="addon-feedback-groupslabel"
interface="action-sheet"> interface="action-sheet" [interfaceOptions]="{header: 'core.group' | translate}">
<ion-select-option *ngFor="let groupOpt of groupInfo.groups" [value]="groupOpt.id"> <ion-select-option *ngFor="let groupOpt of groupInfo.groups" [value]="groupOpt.id">
{{groupOpt.name}} {{groupOpt.name}}
</ion-select-option> </ion-select-option>

View File

@ -61,7 +61,8 @@
</ion-textarea> </ion-textarea>
<ion-select *ngIf="item.templateName == 'multichoice-d'" [required]="item.required" <ion-select *ngIf="item.templateName == 'multichoice-d'" [required]="item.required"
name="{{item.typ}}_{{item.id}}" [(ngModel)]="item.value" interface="action-sheet"> name="{{item.typ}}_{{item.id}}" [(ngModel)]="item.value" interface="action-sheet"
[interfaceOptions]="{header: item.name}">
<ion-select-option *ngFor="let option of item.choices" [value]="option.value"> <ion-select-option *ngFor="let option of item.choices" [value]="option.value">
<core-format-text [component]="component" [componentId]="cmId" [text]="option.label" <core-format-text [component]="component" [componentId]="cmId" [text]="option.label"
contextLevel="module" [contextInstanceId]="cmId" [wsNotFiltered]="true" contextLevel="module" [contextInstanceId]="cmId" [wsNotFiltered]="true"

View File

@ -18,7 +18,8 @@
<ng-container *ngIf="groupInfo.visibleGroups">{{'core.groupsvisible' | translate }}</ng-container> <ng-container *ngIf="groupInfo.visibleGroups">{{'core.groupsvisible' | translate }}</ng-container>
</ion-label> </ion-label>
<ion-select [(ngModel)]="selectedGroup" (ionChange)="loadAttempts(selectedGroup)" <ion-select [(ngModel)]="selectedGroup" (ionChange)="loadAttempts(selectedGroup)"
aria-labelledby="addon-feedback-groupslabel" interface="action-sheet"> aria-labelledby="addon-feedback-groupslabel" interface="action-sheet"
[interfaceOptions]="{header: 'core.group' | translate}">
<ion-select-option *ngFor="let groupOpt of groupInfo.groups" [value]="groupOpt.id"> <ion-select-option *ngFor="let groupOpt of groupInfo.groups" [value]="groupOpt.id">
{{groupOpt.name}} {{groupOpt.name}}
</ion-select-option> </ion-select-option>

View File

@ -19,7 +19,8 @@
<ng-container *ngIf="groupInfo.visibleGroups">{{'core.groupsvisible' | translate }}</ng-container> <ng-container *ngIf="groupInfo.visibleGroups">{{'core.groupsvisible' | translate }}</ng-container>
</ion-label> </ion-label>
<ion-select [(ngModel)]="selectedGroup" (ionChange)="loadAttempts(selectedGroup)" <ion-select [(ngModel)]="selectedGroup" (ionChange)="loadAttempts(selectedGroup)"
aria-labelledby="addon-feedback-groupslabel" interface="action-sheet"> aria-labelledby="addon-feedback-groupslabel" interface="action-sheet"
[interfaceOptions]="{header: 'core.group' | translate}">
<ion-select-option *ngFor="let groupOpt of groupInfo.groups" [value]="groupOpt.id"> <ion-select-option *ngFor="let groupOpt of groupInfo.groups" [value]="groupOpt.id">
{{groupOpt.name}} {{groupOpt.name}}
</ion-select-option> </ion-select-option>

View File

@ -53,7 +53,8 @@
<ion-item *ngIf="showGroups"> <ion-item *ngIf="showGroups">
<ion-label id="addon-mod-forum-groupslabel">{{ 'addon.mod_forum.group' | translate }}</ion-label> <ion-label id="addon-mod-forum-groupslabel">{{ 'addon.mod_forum.group' | translate }}</ion-label>
<ion-select [(ngModel)]="newDiscussion.groupId" [disabled]="newDiscussion.postToAllGroups" <ion-select [(ngModel)]="newDiscussion.groupId" [disabled]="newDiscussion.postToAllGroups"
aria-labelledby="addon-mod-forum-groupslabel" interface="action-sheet" name="groupid"> aria-labelledby="addon-mod-forum-groupslabel" interface="action-sheet" name="groupid"
[interfaceOptions]="{header: 'addon.mod_forum.group' | translate}">
<ion-select-option *ngFor="let group of groups" [value]="group.id">{{ group.name }}</ion-select-option> <ion-select-option *ngFor="let group of groups" [value]="group.id">{{ group.name }}</ion-select-option>
</ion-select> </ion-select>
</ion-item> </ion-item>

View File

@ -31,7 +31,8 @@
{{ 'addon.mod_glossary.categories' | translate }} {{ 'addon.mod_glossary.categories' | translate }}
</ion-label> </ion-label>
<ion-select [(ngModel)]="options.categories" multiple="true" aria-labelledby="addon-mod-glossary-categories-label" <ion-select [(ngModel)]="options.categories" multiple="true" aria-labelledby="addon-mod-glossary-categories-label"
interface="action-sheet" [placeholder]="'addon.mod_glossary.categories' | translate" name="categories"> interface="action-sheet" [placeholder]="'addon.mod_glossary.categories' | translate" name="categories"
[interfaceOptions]="{header: 'addon.mod_glossary.categories' | translate}">
<ion-select-option *ngFor="let category of categories" [value]="category.id"> <ion-select-option *ngFor="let category of categories" [value]="category.id">
{{ category.name }} {{ category.name }}
</ion-select-option> </ion-select-option>

View File

@ -166,7 +166,7 @@
<span *ngIf="groupInfo.visibleGroups">{{ 'core.groupsvisible' | translate }}</span> <span *ngIf="groupInfo.visibleGroups">{{ 'core.groupsvisible' | translate }}</span>
</ion-label> </ion-label>
<ion-select [(ngModel)]="group" (ionChange)="setGroup(group)" aria-labelledby="addon-mod_lesson-groupslabel" <ion-select [(ngModel)]="group" (ionChange)="setGroup(group)" aria-labelledby="addon-mod_lesson-groupslabel"
interface="action-sheet"> interface="action-sheet" [interfaceOptions]="{header: 'core.group' | translate}">
<ion-select-option *ngFor="let groupOpt of groupInfo.groups" [value]="groupOpt.id"> <ion-select-option *ngFor="let groupOpt of groupInfo.groups" [value]="groupOpt.id">
{{groupOpt.name}} {{groupOpt.name}}
</ion-select-option> </ion-select-option>

View File

@ -27,7 +27,8 @@
<ion-item class="ion-text-wrap" *ngIf="student.attempts && student.attempts.length > 1"> <ion-item class="ion-text-wrap" *ngIf="student.attempts && student.attempts.length > 1">
<ion-label id="addon-mod_lesson-retakeslabel">{{ 'addon.mod_lesson.attemptheader' | translate }}</ion-label> <ion-label id="addon-mod_lesson-retakeslabel">{{ 'addon.mod_lesson.attemptheader' | translate }}</ion-label>
<ion-select [(ngModel)]="selectedRetake" (ionChange)="changeRetake(selectedRetake!)" <ion-select [(ngModel)]="selectedRetake" (ionChange)="changeRetake(selectedRetake!)"
aria-labelledby="addon-mod_lesson-retakeslabel" interface="action-sheet"> aria-labelledby="addon-mod_lesson-retakeslabel" interface="action-sheet"
[interfaceOptions]="{header: 'addon.mod_lesson.attemptheader' | translate}">
<ion-select-option *ngFor="let retake of student.attempts" [value]="retake.try"> <ion-select-option *ngFor="let retake of student.attempts" [value]="retake.try">
{{retake.label}} {{retake.label}}
</ion-select-option> </ion-select-option>

View File

@ -75,9 +75,10 @@
"summaryofattempts": "Summary of your previous attempts", "summaryofattempts": "Summary of your previous attempts",
"timeleft": "Time left", "timeleft": "Time left",
"timetaken": "Time taken", "timetaken": "Time taken",
"unit": "Unit",
"warningattemptfinished": "Offline attempt discarded as it was finished on the site or not found.", "warningattemptfinished": "Offline attempt discarded as it was finished on the site or not found.",
"warningdatadiscarded": "Some offline answers were discarded because the questions were modified online.", "warningdatadiscarded": "Some offline answers were discarded because the questions were modified online.",
"warningdatadiscardedfromfinished": "Attempt unfinished because some offline answers were discarded. Please review your answers then resubmit the attempt.", "warningdatadiscardedfromfinished": "Attempt unfinished because some offline answers were discarded. Please review your answers then resubmit the attempt.",
"warningquestionsnotsupported": "This quiz contains questions not supported by the app:", "warningquestionsnotsupported": "This quiz contains questions not supported by the app:",
"yourfinalgradeis": "Your final grade for this quiz is {{$a}}." "yourfinalgradeis": "Your final grade for this quiz is {{$a}}."
} }

View File

@ -135,7 +135,7 @@
<ion-item class="ion-text-wrap" *ngIf="organizations.length > 1"> <ion-item class="ion-text-wrap" *ngIf="organizations.length > 1">
<ion-label>{{ 'addon.mod_scorm.organizations' | translate }}</ion-label> <ion-label>{{ 'addon.mod_scorm.organizations' | translate }}</ion-label>
<ion-select [(ngModel)]="currentOrganization.identifier" (ionChange)="loadOrganization()" <ion-select [(ngModel)]="currentOrganization.identifier" (ionChange)="loadOrganization()"
interface="action-sheet"> interface="action-sheet" [interfaceOptions]="{header: 'addon.mod_scorm.organizations' | translate}">
<ion-select-option *ngFor="let org of organizations" [value]="org.identifier"> <ion-select-option *ngFor="let org of organizations" [value]="org.identifier">
{{ org.title }} {{ org.title }}
</ion-select-option> </ion-select-option>

View File

@ -102,7 +102,7 @@
<ion-col class="ion-hide-md-up" size="5"> <ion-col class="ion-hide-md-up" size="5">
<ion-select class="ion-padding" [(ngModel)]="answers[question.name]" [required]="question.required" <ion-select class="ion-padding" [(ngModel)]="answers[question.name]" [required]="question.required"
[attr.aria-labelledby]="'addon-mod_survey-'+question.id" interface="action-sheet" [attr.aria-labelledby]="'addon-mod_survey-'+question.id" interface="action-sheet"
[name]="question.name"> [name]="question.name" [interfaceOptions]="{header: question.text}">
<ion-select-option value="-1" selected disabled>{{ 'core.choose' | translate }}</ion-select-option> <ion-select-option value="-1" selected disabled>{{ 'core.choose' | translate }}</ion-select-option>
<ion-select-option *ngFor="let option of question.optionsArray; let value=index;" <ion-select-option *ngFor="let option of question.optionsArray; let value=index;"
[value]="value +1"> [value]="value +1">
@ -127,7 +127,7 @@
<ion-col size="5"> <ion-col size="5">
<ion-select class="ion-padding" [(ngModel)]="answers[question.name]" [required]="question.required" <ion-select class="ion-padding" [(ngModel)]="answers[question.name]" [required]="question.required"
[attr.aria-labelledby]="'addon-mod_survey-'+question.id" interface="action-sheet" [attr.aria-labelledby]="'addon-mod_survey-'+question.id" interface="action-sheet"
[name]="question.name"> [name]="question.name" [interfaceOptions]="{header: question.text}">
<ion-select-option *ngFor="let option of question.optionsArray; let value=index;" [value]="value"> <ion-select-option *ngFor="let option of question.optionsArray; let value=index;" [value]="value">
{{option}} {{option}}
</ion-select-option> </ion-select-option>

View File

@ -14,7 +14,9 @@
{{ 'addon.mod_workshop_assessment_accumulative.dimensiongradefor' | translate : {'$a': field.dimtitle } }} {{ 'addon.mod_workshop_assessment_accumulative.dimensiongradefor' | translate : {'$a': field.dimtitle } }}
</span> </span>
</ion-label> </ion-label>
<ion-select [(ngModel)]="selectedValues[n].grade" interface="action-sheet"> <ion-select [(ngModel)]="selectedValues[n].grade" interface="action-sheet"
[interfaceOptions]="{header: 'addon.mod_workshop_assessment_accumulative.dimensiongradefor' |
translate : {'$a': field.dimtitle }}">
<ion-select-option *ngFor="let grade of field.grades" [value]="grade.value">{{grade.label}}</ion-select-option> <ion-select-option *ngFor="let grade of field.grades" [value]="grade.value">{{grade.label}}</ion-select-option>
</ion-select> </ion-select>
<core-input-errors *ngIf="fieldErrors['grade_' + n]" [errorText]="fieldErrors['grade_' + n]"> <core-input-errors *ngIf="fieldErrors['grade_' + n]" [errorText]="fieldErrors['grade_' + n]">

View File

@ -45,7 +45,8 @@
{{ 'addon.mod_workshop.assessmentweight' | translate }} {{ 'addon.mod_workshop.assessmentweight' | translate }}
</span> </span>
</ion-label> </ion-label>
<ion-select [(ngModel)]="weight" interface="action-sheet" name="weight"> <ion-select [(ngModel)]="weight" interface="action-sheet" name="weight"
[interfaceOptions]="{header: 'addon.mod_workshop.assessmentweight' | translate}">
<ion-select-option *ngFor="let w of weights" [value]="w">{{w}}</ion-select-option> <ion-select-option *ngFor="let w of weights" [value]="w">{{w}}</ion-select-option>
</ion-select> </ion-select>
</ion-item> </ion-item>

View File

@ -223,7 +223,7 @@
{{ 'core.groupsvisible' | translate }} {{ 'core.groupsvisible' | translate }}
</ion-label> </ion-label>
<ion-select [(ngModel)]="group" (ionChange)="setGroup(group)" aria-labelledby="addon-workshop-groupslabel" <ion-select [(ngModel)]="group" (ionChange)="setGroup(group)" aria-labelledby="addon-workshop-groupslabel"
interface="action-sheet"> interface="action-sheet" [interfaceOptions]="{header: 'core.group' | translate}">
<ion-select-option *ngFor="let groupOpt of groupInfo.groups" [value]="groupOpt.id"> <ion-select-option *ngFor="let groupOpt of groupInfo.groups" [value]="groupOpt.id">
{{groupOpt.name}} {{groupOpt.name}}
</ion-select-option> </ion-select-option>

View File

@ -92,10 +92,12 @@
{{ 'addon.mod_workshop.gradinggradeof' | translate:{$a: workshop.gradinggrade } }}: {{submission.gradinggrade}} {{ 'addon.mod_workshop.gradinggradeof' | translate:{$a: workshop.gradinggrade } }}: {{submission.gradinggrade}}
</p> </p>
<ion-badge *ngIf="assessment && (showGrade(assessment.grade) || assessment.offline)" color="success"> <ion-badge *ngIf="assessment && (showGrade(assessment.grade) || assessment.offline)" color="success"
class="ion-text-wrap">
{{ 'addon.mod_workshop.assessedsubmission' | translate }} {{ 'addon.mod_workshop.assessedsubmission' | translate }}
</ion-badge> </ion-badge>
<ion-badge *ngIf="assessment && !showGrade(assessment.grade) && !assessment.offline" color="danger"> <ion-badge *ngIf="assessment && !showGrade(assessment.grade) && !assessment.offline" color="danger"
class="ion-text-wrap">
{{ 'addon.mod_workshop.notassessed' | translate }} {{ 'addon.mod_workshop.notassessed' | translate }}
</ion-badge> </ion-badge>

View File

@ -63,19 +63,21 @@
{{ 'addon.mod_workshop.assessmentweight' | translate }} {{ 'addon.mod_workshop.assessmentweight' | translate }}
</span> </span>
</ion-label> </ion-label>
<ion-select formControlName="weight" required="true" interface="action-sheet"> <ion-select formControlName="weight" required="true" interface="action-sheet"
[interfaceOptions]="{header: 'addon.mod_workshop.assessmentweight' | translate}">
<ion-select-option *ngFor="let w of weights" [value]="w">{{ w }}</ion-select-option> <ion-select-option *ngFor="let w of weights" [value]="w">{{ w }}</ion-select-option>
</ion-select> </ion-select>
</ion-item> </ion-item>
<ion-item class="ion-text-wrap"> <ion-item class="ion-text-wrap">
<ion-label> <ion-label>
<h2>{{ 'addon.mod_workshop.gradinggradecalculated' | translate }}</h2> <h2>{{ 'addon.mod_workshop.gradinggradecalculated' | translate }}</h2>
<p>{{ assessment.gradinggrade }}</p> <p>{{ gradingGrade }}</p>
</ion-label> </ion-label>
</ion-item> </ion-item>
<ion-item class="ion-text-wrap" *ngIf="access?.canoverridegrades"> <ion-item class="ion-text-wrap" *ngIf="access?.canoverridegrades">
<ion-label position="stacked">{{ 'addon.mod_workshop.gradinggradeover' | translate }}</ion-label> <ion-label position="stacked">{{ 'addon.mod_workshop.gradinggradeover' | translate }}</ion-label>
<ion-select formControlName="grade" interface="action-sheet"> <ion-select formControlName="grade" interface="action-sheet"
[interfaceOptions]="{header: 'addon.mod_workshop.gradinggradeover' | translate}">
<ion-select-option *ngFor="let grade of evaluationGrades" [value]="grade.value"> <ion-select-option *ngFor="let grade of evaluationGrades" [value]="grade.value">
{{grade.label}} {{grade.label}}
</ion-select-option> </ion-select-option>

View File

@ -73,7 +73,8 @@ export class AddonModWorkshopAssessmentPage implements OnInit, OnDestroy, CanLea
weights: number[] = []; weights: number[] = [];
evaluateByProfile?: CoreUserProfile; evaluateByProfile?: CoreUserProfile;
evaluationGrades: CoreGradesMenuItem[] =[]; evaluationGrades: CoreGradesMenuItem[] = [];
gradingGrade?: string | number;
protected workshopId!: number; protected workshopId!: number;
protected originalEvaluation: AddonModWorkshopAssessmentEvaluation = { protected originalEvaluation: AddonModWorkshopAssessmentEvaluation = {
@ -193,6 +194,7 @@ export class AddonModWorkshopAssessmentPage implements OnInit, OnDestroy, CanLea
this.assessment = AddonModWorkshopHelper.realGradeValue(this.workshop, assessment); this.assessment = AddonModWorkshopHelper.realGradeValue(this.workshop, assessment);
this.evaluate.text = this.assessment.feedbackreviewer || ''; this.evaluate.text = this.assessment.feedbackreviewer || '';
this.evaluate.weight = this.assessment.weight; this.evaluate.weight = this.assessment.weight;
this.gradingGrade = this.assessment.gradinggrade ?? '-';
if (this.evaluating) { if (this.evaluating) {
if (this.access.canallocate) { if (this.access.canallocate) {

View File

@ -117,7 +117,8 @@
</ion-item> </ion-item>
<ion-item class="ion-text-wrap"> <ion-item class="ion-text-wrap">
<ion-label position="stacked">{{ 'addon.mod_workshop.gradeover' | translate }}</ion-label> <ion-label position="stacked">{{ 'addon.mod_workshop.gradeover' | translate }}</ion-label>
<ion-select formControlName="grade" interface="action-sheet"> <ion-select formControlName="grade" interface="action-sheet"
[interfaceOptions]="{header: 'addon.mod_workshop.gradeover' | translate}">
<ion-select-option *ngFor="let grade of evaluationGrades" [value]="grade.value"> <ion-select-option *ngFor="let grade of evaluationGrades" [value]="grade.value">
{{grade.label}} {{grade.label}}
</ion-select-option> </ion-select-option>

View File

@ -50,7 +50,7 @@
</label> </label>
<ion-select id="{{calcQuestion!.select!.id}}" [name]="calcQuestion!.select!.name" <ion-select id="{{calcQuestion!.select!.id}}" [name]="calcQuestion!.select!.name"
[(ngModel)]="calcQuestion!.select!.selected" interface="action-sheet" [disabled]="calcQuestion!.select!.disabled" [(ngModel)]="calcQuestion!.select!.selected" interface="action-sheet" [disabled]="calcQuestion!.select!.disabled"
[slot]="calcQuestion?.selectFirst ? 'start' : 'end'"> [slot]="calcQuestion?.selectFirst ? 'start' : 'end'" [interfaceOptions]="{header: 'addon.mod_quiz.unit' | translate}">
<ion-select-option *ngFor="let option of calcQuestion!.select!.options" [value]="option.value"> <ion-select-option *ngFor="let option of calcQuestion!.select!.options" [value]="option.value">
{{option.label}} {{option.label}}
</ion-select-option> </ion-select-option>

View File

@ -13,7 +13,8 @@
<ion-label position="stacked"> <ion-label position="stacked">
<span [core-mark-required]="required">{{ field.name }}</span> <span [core-mark-required]="required">{{ field.name }}</span>
</ion-label> </ion-label>
<ion-select [formControlName]="modelName" [placeholder]="'core.choosedots' | translate" interface="action-sheet"> <ion-select [formControlName]="modelName" [placeholder]="'core.choosedots' | translate" interface="action-sheet"
[interfaceOptions]="{header: field.name}">
<ion-select-option value="">{{ 'core.choosedots' | translate }}</ion-select-option> <ion-select-option value="">{{ 'core.choosedots' | translate }}</ion-select-option>
<ion-select-option *ngFor="let option of options" [value]="option">{{option}}</ion-select-option> <ion-select-option *ngFor="let option of options" [value]="option">{{option}}</ion-select-option>
</ion-select> </ion-select>

View File

@ -1,6 +1,7 @@
<ion-item *ngIf="sites && sites.length"> <ion-item *ngIf="sites && sites.length">
<ion-label>{{ 'core.site' | translate }}</ion-label> <ion-label>{{ 'core.site' | translate }}</ion-label>
<ion-select [(ngModel)]="selectedSite" (ngModelChange)="siteSelected.emit(selectedSite)" interface="action-sheet"> <ion-select [(ngModel)]="selectedSite" (ngModelChange)="siteSelected.emit(selectedSite)" interface="action-sheet"
[interfaceOptions]="{header: 'core.site' | translate}">
<ion-select-option *ngFor="let site of sites" [value]="site.id">{{ site.fullNameAndSiteName }}</ion-select-option> <ion-select-option *ngFor="let site of sites" [value]="site.id">{{ site.fullNameAndSiteName }}</ion-select-option>
</ion-select> </ion-select>
</ion-item> </ion-item>

View File

@ -12,9 +12,7 @@
</ion-toolbar> </ion-toolbar>
</ion-header> </ion-header>
<core-loading [hideUntil]="loaded"> <core-loading [hideUntil]="loaded">
<ng-container *ngIf="tabs.length == 0"> <core-empty-box *ngIf="tabs.length == 0" icon="fas-home" [message]="'core.courses.nocourses' | translate"></core-empty-box>
<core-empty-box icon="fas-home" [message]="'core.courses.nocourses' | translate"></core-empty-box>
</ng-container>
</core-loading> </core-loading>
<core-tabs-outlet *ngIf="tabs.length > 0" [selectedIndex]="selectedTab" [hideUntil]="loaded" [tabs]="tabs" <core-tabs-outlet *ngIf="tabs.length > 0" [selectedIndex]="selectedTab" [hideUntil]="loaded" [tabs]="tabs"
(ionChange)="tabSelected()"> (ionChange)="tabSelected()">

View File

@ -86,6 +86,7 @@ export class CoreMainMenuHomePage implements OnInit {
*/ */
initHandlers(handlers: CoreMainMenuHomeHandlerToDisplay[]): void { initHandlers(handlers: CoreMainMenuHomeHandlerToDisplay[]): void {
// Re-build the list of tabs. // Re-build the list of tabs.
const loaded = CoreMainMenuHomeDelegate.areHandlersLoaded();
const handlersMap = CoreUtils.arrayToObject(handlers, 'title'); const handlersMap = CoreUtils.arrayToObject(handlers, 'title');
const newTabs = handlers.map((handler): CoreTabsOutletTab => { const newTabs = handlers.map((handler): CoreTabsOutletTab => {
const tab = this.tabs.find(tab => tab.title == handler.title); const tab = this.tabs.find(tab => tab.title == handler.title);
@ -125,7 +126,10 @@ export class CoreMainMenuHomePage implements OnInit {
this.tabs = newTabs; this.tabs = newTabs;
this.loaded = CoreMainMenuHomeDelegate.areHandlersLoaded(); // Try to prevent empty box displayed for an instant when it shouldn't.
setTimeout(() => {
this.loaded = loaded;
}, 50);
} }
/** /**

View File

@ -1,7 +1,7 @@
<ion-item class="ion-text-wrap" *ngIf="item && (item!.canrate || item!.rating != null) && !disabled"> <ion-item class="ion-text-wrap" *ngIf="item && (item!.canrate || item!.rating != null) && !disabled">
<ion-label>{{ 'core.rating.rating' | translate }}</ion-label> <ion-label>{{ 'core.rating.rating' | translate }}</ion-label>
<ion-select class="ion-text-start" [(ngModel)]="rating" (ngModelChange)="userRatingChanged()" interface="action-sheet" <ion-select class="ion-text-start" [(ngModel)]="rating" (ngModelChange)="userRatingChanged()" interface="action-sheet"
[disabled]="!item!.canrate"> [disabled]="!item!.canrate" [interfaceOptions]="{header: 'core.rating.rating' | translate}">
<ion-select-option *ngFor="let scaleItem of scale!.items" [value]="scaleItem.value">{{ scaleItem.name }}</ion-select-option> <ion-select-option *ngFor="let scaleItem of scale!.items" [value]="scaleItem.value">{{ scaleItem.name }}</ion-select-option>
</ion-select> </ion-select>
</ion-item> </ion-item>

View File

@ -131,7 +131,7 @@ export class CoreScreenService {
* @return Active layout. * @return Active layout.
*/ */
protected calculateLayout(breakpoints: Record<Breakpoint, boolean>): CoreScreenLayout { protected calculateLayout(breakpoints: Record<Breakpoint, boolean>): CoreScreenLayout {
if (breakpoints[Breakpoint.LARGE]) { if (breakpoints[Breakpoint.MEDIUM]) {
return CoreScreenLayout.TABLET; return CoreScreenLayout.TABLET;
} }