commit
8b67def43c
|
@ -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<void>[] = [];
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -391,10 +391,10 @@
|
|||
</p>
|
||||
</ng-container>
|
||||
<p>
|
||||
<ion-badge *ngIf="statusTranslated" [color]="statusColor">
|
||||
<ion-badge *ngIf="statusTranslated" [color]="statusColor" class="ion-text-wrap ion-text-start">
|
||||
{{ statusTranslated }}
|
||||
</ion-badge>
|
||||
<ion-badge class="ion-margin-start" *ngIf="gradingStatusTranslationId" [color]="gradingColor">
|
||||
<ion-badge class="ion-text-wrap ion-text-start" *ngIf="gradingStatusTranslationId" [color]="gradingColor">
|
||||
{{ gradingStatusTranslationId | translate }}
|
||||
</ion-badge>
|
||||
</p>
|
||||
|
|
|
@ -21,6 +21,11 @@
|
|||
.core-grading-summary .advancedgrade {
|
||||
display: none;
|
||||
}
|
||||
|
||||
ion-badge {
|
||||
margin-left: 2px;
|
||||
margin-right: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
:host-context(body.dark) ::ng-deep {
|
||||
|
|
|
@ -26,13 +26,11 @@
|
|||
|
||||
<ion-list>
|
||||
<ion-item class="ion-text-wrap" *ngIf="(groupInfo.separateGroups || groupInfo.visibleGroups)">
|
||||
<ion-label id="addon-assign-groupslabel" *ngIf="groupInfo.separateGroups">
|
||||
{{ 'core.groupsseparate' | translate }}
|
||||
<ion-label id="addon-assign-groupslabel-list">
|
||||
<ng-container *ngIf="groupInfo.separateGroups">{{'core.groupsseparate' | translate }}</ng-container>
|
||||
<ng-container *ngIf="groupInfo.visibleGroups">{{'core.groupsvisible' | translate }}</ng-container>
|
||||
</ion-label>
|
||||
<ion-label id="addon-assign-groupslabel" *ngIf="groupInfo.visibleGroups">
|
||||
{{ 'core.groupsvisible' | translate }}
|
||||
</ion-label>
|
||||
<ion-select [(ngModel)]="groupId" (ionChange)="reloadSubmissions()" aria-labelledby="addon-assign-groupslabel"
|
||||
<ion-select [(ngModel)]="groupId" (ionChange)="reloadSubmissions()" aria-labelledby="addon-assign-groupslabel-list"
|
||||
interface="action-sheet" slot="end" [interfaceOptions]="{header: 'core.group' | translate}">
|
||||
<ion-select-option *ngFor="let groupOpt of groupInfo.groups" [value]="groupOpt.id">
|
||||
{{groupOpt.name}}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -14,9 +14,14 @@
|
|||
</core-course-module-info>
|
||||
|
||||
<!-- Survey already done -->
|
||||
<ion-card class="ion-padding" *ngIf="survey && survey.surveydone">
|
||||
<p class="ion-padding">{{ 'addon.mod_survey.surveycompletednograph' | translate }}</p>
|
||||
<ion-button expand="block" [href]="module.url" core-link>
|
||||
<ion-card class="core-success-card" *ngIf="survey && survey.surveydone">
|
||||
<ion-item>
|
||||
<ion-icon name="fas-check" slot="start" aria-hidden="true"></ion-icon>
|
||||
<ion-label>
|
||||
{{ 'addon.mod_survey.surveycompletednograph' | translate }}
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
<ion-button class="ion-margin" expand="block" [href]="module.url" core-link>
|
||||
<ion-icon name="fas-external-link-alt" slot="start" aria-hidden="true"></ion-icon>
|
||||
{{ 'addon.mod_survey.results' | translate }}
|
||||
</ion-button>
|
||||
|
|
|
@ -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 || '';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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 || '';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue