diff --git a/src/addons/mod/assign/components/index/index.ts b/src/addons/mod/assign/components/index/index.ts index c78728728..226d5e28a 100644 --- a/src/addons/mod/assign/components/index/index.ts +++ b/src/addons/mod/assign/components/index/index.ts @@ -109,7 +109,7 @@ export class AddonModAssignIndexComponent extends CoreCourseModuleMainActivityCo AddonModAssignProvider.SUBMISSION_SAVED_EVENT, (data) => { if (this.assign && data.assignmentId == this.assign.id && data.userId == this.currentUserId) { - // Assignment submission saved, refresh data. + // Assignment submission saved, refresh data. this.showLoadingAndRefresh(true, false); } }, @@ -326,6 +326,8 @@ export class AddonModAssignIndexComponent extends CoreCourseModuleMainActivityCo const promises: Promise[] = []; promises.push(AddonModAssign.invalidateAssignmentData(this.courseId)); + // Invalidate before component becomes null. + promises.push(this.submissionComponent?.invalidateAndRefresh(true) || Promise.resolve()); if (this.assign) { promises.push(AddonModAssign.invalidateAllSubmissionData(this.assign.id)); @@ -335,9 +337,7 @@ export class AddonModAssignIndexComponent extends CoreCourseModuleMainActivityCo } } - await Promise.all(promises).finally(() => { - this.submissionComponent?.invalidateAndRefresh(true); - }); + await Promise.all(promises); } /** diff --git a/src/addons/mod/assign/components/submission/addon-mod-assign-submission.html b/src/addons/mod/assign/components/submission/addon-mod-assign-submission.html index 506fea6e4..7b0f32cf6 100644 --- a/src/addons/mod/assign/components/submission/addon-mod-assign-submission.html +++ b/src/addons/mod/assign/components/submission/addon-mod-assign-submission.html @@ -391,10 +391,10 @@

- + {{ statusTranslated }} - + {{ gradingStatusTranslationId | translate }}

diff --git a/src/addons/mod/assign/components/submission/submission.scss b/src/addons/mod/assign/components/submission/submission.scss index 51e8c8838..935b96fe7 100644 --- a/src/addons/mod/assign/components/submission/submission.scss +++ b/src/addons/mod/assign/components/submission/submission.scss @@ -21,6 +21,11 @@ .core-grading-summary .advancedgrade { display: none; } + + ion-badge { + margin-left: 2px; + margin-right: 2px; + } } :host-context(body.dark) ::ng-deep { diff --git a/src/addons/mod/assign/pages/submission-list/submission-list.html b/src/addons/mod/assign/pages/submission-list/submission-list.html index 40ad93441..09beab4e9 100644 --- a/src/addons/mod/assign/pages/submission-list/submission-list.html +++ b/src/addons/mod/assign/pages/submission-list/submission-list.html @@ -26,13 +26,11 @@ - - {{ 'core.groupsseparate' | translate }} + + {{'core.groupsseparate' | translate }} + {{'core.groupsvisible' | translate }} - - {{ 'core.groupsvisible' | translate }} - - {{groupOpt.name}} diff --git a/src/addons/mod/forum/components/index/index.ts b/src/addons/mod/forum/components/index/index.ts index 40fda05ae..55ac9daaa 100644 --- a/src/addons/mod/forum/components/index/index.ts +++ b/src/addons/mod/forum/components/index/index.ts @@ -174,7 +174,7 @@ export class AddonModForumIndexComponent extends CoreCourseModuleMainActivityCom // Check if there are replies for discussions stored in offline. const hasOffline = await AddonModForumOffline.hasForumReplies(this.forum.id); - this.hasOffline = this.hasOffline || hasOffline; + this.hasOffline = this.hasOffline || hasOffline || this.hasOfflineRatings; if (hasOffline) { // Only update new fetched discussions. @@ -258,6 +258,7 @@ export class AddonModForumIndexComponent extends CoreCourseModuleMainActivityCom if (this.forum && data.component == 'mod_forum' && data.ratingArea == 'post' && data.contextLevel == ContextLevel.MODULE && data.instanceId == this.forum.cmid) { this.hasOfflineRatings = true; + this.hasOffline = true; } }); @@ -266,6 +267,7 @@ export class AddonModForumIndexComponent extends CoreCourseModuleMainActivityCom data.contextLevel == ContextLevel.MODULE && data.instanceId == this.forum.cmid) { this.hasOfflineRatings = await CoreRatingOffline.hasRatings('mod_forum', 'post', ContextLevel.MODULE, this.forum.cmid); + this.hasOffline = this.hasOffline || this.hasOfflineRatings; } }); } diff --git a/src/addons/mod/survey/components/index/addon-mod-survey-index.html b/src/addons/mod/survey/components/index/addon-mod-survey-index.html index 6f08add31..acafdf331 100644 --- a/src/addons/mod/survey/components/index/addon-mod-survey-index.html +++ b/src/addons/mod/survey/components/index/addon-mod-survey-index.html @@ -14,9 +14,14 @@ - -

{{ 'addon.mod_survey.surveycompletednograph' | translate }}

- + + + + + {{ 'addon.mod_survey.surveycompletednograph' | translate }} + + + {{ 'addon.mod_survey.results' | translate }} diff --git a/src/core/features/course/format/singleactivity/services/handlers/singleactivity-format.ts b/src/core/features/course/format/singleactivity/services/handlers/singleactivity-format.ts index 8e4b1f6d3..999a1c08c 100644 --- a/src/core/features/course/format/singleactivity/services/handlers/singleactivity-format.ts +++ b/src/core/features/course/format/singleactivity/services/handlers/singleactivity-format.ts @@ -59,13 +59,7 @@ export class CoreCourseFormatSingleActivityHandlerService implements CoreCourseF return sections[0].modules[0].name; } - if (course.displayname) { - return course.displayname; - } else if (course.fullname) { - return course.fullname; - } - - return ''; + return course.fullname || ''; } /** diff --git a/src/core/features/course/services/handlers/default-format.ts b/src/core/features/course/services/handlers/default-format.ts index 5a4833f15..ff60f6c39 100644 --- a/src/core/features/course/services/handlers/default-format.ts +++ b/src/core/features/course/services/handlers/default-format.ts @@ -40,13 +40,7 @@ export class CoreCourseFormatDefaultHandler implements CoreCourseFormatHandler { * @inheritdoc */ getCourseTitle(course: CoreCourseAnyCourseData): string { - if (course.displayname) { - return course.displayname; - } else if (course.fullname) { - return course.fullname; - } - - return ''; + return course.fullname || ''; } /** diff --git a/src/theme/theme.base.scss b/src/theme/theme.base.scss index ff9231e33..064a3dcee 100644 --- a/src/theme/theme.base.scss +++ b/src/theme/theme.base.scss @@ -483,6 +483,16 @@ ion-loading { } } +// Toasts. +ion-toast { + --button-color: var(--primary-tint); + @include media-breakpoint-down(sm) { + &::part(container) { + flex-direction: column; + } + } +} + // Ionic list. ion-list { padding: 0 !important; @@ -740,7 +750,7 @@ body.core-iframe-fullscreen ion-router-outlet { ion-label { white-space: normal !important; } - ion-icon { + ion-item > ion-icon { color: var(--color-shade); @include margin-horizontal(null, 16px); }