commit
8b67def43c
|
@ -109,7 +109,7 @@ export class AddonModAssignIndexComponent extends CoreCourseModuleMainActivityCo
|
||||||
AddonModAssignProvider.SUBMISSION_SAVED_EVENT,
|
AddonModAssignProvider.SUBMISSION_SAVED_EVENT,
|
||||||
(data) => {
|
(data) => {
|
||||||
if (this.assign && data.assignmentId == this.assign.id && data.userId == this.currentUserId) {
|
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);
|
this.showLoadingAndRefresh(true, false);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -326,6 +326,8 @@ export class AddonModAssignIndexComponent extends CoreCourseModuleMainActivityCo
|
||||||
const promises: Promise<void>[] = [];
|
const promises: Promise<void>[] = [];
|
||||||
|
|
||||||
promises.push(AddonModAssign.invalidateAssignmentData(this.courseId));
|
promises.push(AddonModAssign.invalidateAssignmentData(this.courseId));
|
||||||
|
// Invalidate before component becomes null.
|
||||||
|
promises.push(this.submissionComponent?.invalidateAndRefresh(true) || Promise.resolve());
|
||||||
|
|
||||||
if (this.assign) {
|
if (this.assign) {
|
||||||
promises.push(AddonModAssign.invalidateAllSubmissionData(this.assign.id));
|
promises.push(AddonModAssign.invalidateAllSubmissionData(this.assign.id));
|
||||||
|
@ -335,9 +337,7 @@ export class AddonModAssignIndexComponent extends CoreCourseModuleMainActivityCo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await Promise.all(promises).finally(() => {
|
await Promise.all(promises);
|
||||||
this.submissionComponent?.invalidateAndRefresh(true);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -391,10 +391,10 @@
|
||||||
</p>
|
</p>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<p>
|
<p>
|
||||||
<ion-badge *ngIf="statusTranslated" [color]="statusColor">
|
<ion-badge *ngIf="statusTranslated" [color]="statusColor" class="ion-text-wrap ion-text-start">
|
||||||
{{ statusTranslated }}
|
{{ statusTranslated }}
|
||||||
</ion-badge>
|
</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 }}
|
{{ gradingStatusTranslationId | translate }}
|
||||||
</ion-badge>
|
</ion-badge>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -21,6 +21,11 @@
|
||||||
.core-grading-summary .advancedgrade {
|
.core-grading-summary .advancedgrade {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ion-badge {
|
||||||
|
margin-left: 2px;
|
||||||
|
margin-right: 2px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
:host-context(body.dark) ::ng-deep {
|
:host-context(body.dark) ::ng-deep {
|
||||||
|
|
|
@ -26,13 +26,11 @@
|
||||||
|
|
||||||
<ion-list>
|
<ion-list>
|
||||||
<ion-item class="ion-text-wrap" *ngIf="(groupInfo.separateGroups || groupInfo.visibleGroups)">
|
<ion-item class="ion-text-wrap" *ngIf="(groupInfo.separateGroups || groupInfo.visibleGroups)">
|
||||||
<ion-label id="addon-assign-groupslabel" *ngIf="groupInfo.separateGroups">
|
<ion-label id="addon-assign-groupslabel-list">
|
||||||
{{ 'core.groupsseparate' | translate }}
|
<ng-container *ngIf="groupInfo.separateGroups">{{'core.groupsseparate' | translate }}</ng-container>
|
||||||
|
<ng-container *ngIf="groupInfo.visibleGroups">{{'core.groupsvisible' | translate }}</ng-container>
|
||||||
</ion-label>
|
</ion-label>
|
||||||
<ion-label id="addon-assign-groupslabel" *ngIf="groupInfo.visibleGroups">
|
<ion-select [(ngModel)]="groupId" (ionChange)="reloadSubmissions()" aria-labelledby="addon-assign-groupslabel-list"
|
||||||
{{ 'core.groupsvisible' | translate }}
|
|
||||||
</ion-label>
|
|
||||||
<ion-select [(ngModel)]="groupId" (ionChange)="reloadSubmissions()" aria-labelledby="addon-assign-groupslabel"
|
|
||||||
interface="action-sheet" slot="end" [interfaceOptions]="{header: 'core.group' | translate}">
|
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}}
|
||||||
|
|
|
@ -174,7 +174,7 @@ export class AddonModForumIndexComponent extends CoreCourseModuleMainActivityCom
|
||||||
// Check if there are replies for discussions stored in offline.
|
// Check if there are replies for discussions stored in offline.
|
||||||
const hasOffline = await AddonModForumOffline.hasForumReplies(this.forum.id);
|
const hasOffline = await AddonModForumOffline.hasForumReplies(this.forum.id);
|
||||||
|
|
||||||
this.hasOffline = this.hasOffline || hasOffline;
|
this.hasOffline = this.hasOffline || hasOffline || this.hasOfflineRatings;
|
||||||
|
|
||||||
if (hasOffline) {
|
if (hasOffline) {
|
||||||
// Only update new fetched discussions.
|
// Only update new fetched discussions.
|
||||||
|
@ -258,6 +258,7 @@ export class AddonModForumIndexComponent extends CoreCourseModuleMainActivityCom
|
||||||
if (this.forum && data.component == 'mod_forum' && data.ratingArea == 'post' &&
|
if (this.forum && data.component == 'mod_forum' && data.ratingArea == 'post' &&
|
||||||
data.contextLevel == ContextLevel.MODULE && data.instanceId == this.forum.cmid) {
|
data.contextLevel == ContextLevel.MODULE && data.instanceId == this.forum.cmid) {
|
||||||
this.hasOfflineRatings = true;
|
this.hasOfflineRatings = true;
|
||||||
|
this.hasOffline = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -266,6 +267,7 @@ export class AddonModForumIndexComponent extends CoreCourseModuleMainActivityCom
|
||||||
data.contextLevel == ContextLevel.MODULE && data.instanceId == this.forum.cmid) {
|
data.contextLevel == ContextLevel.MODULE && data.instanceId == this.forum.cmid) {
|
||||||
this.hasOfflineRatings =
|
this.hasOfflineRatings =
|
||||||
await CoreRatingOffline.hasRatings('mod_forum', 'post', ContextLevel.MODULE, this.forum.cmid);
|
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>
|
</core-course-module-info>
|
||||||
|
|
||||||
<!-- Survey already done -->
|
<!-- Survey already done -->
|
||||||
<ion-card class="ion-padding" *ngIf="survey && survey.surveydone">
|
<ion-card class="core-success-card" *ngIf="survey && survey.surveydone">
|
||||||
<p class="ion-padding">{{ 'addon.mod_survey.surveycompletednograph' | translate }}</p>
|
<ion-item>
|
||||||
<ion-button expand="block" [href]="module.url" core-link>
|
<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>
|
<ion-icon name="fas-external-link-alt" slot="start" aria-hidden="true"></ion-icon>
|
||||||
{{ 'addon.mod_survey.results' | translate }}
|
{{ 'addon.mod_survey.results' | translate }}
|
||||||
</ion-button>
|
</ion-button>
|
||||||
|
|
|
@ -59,13 +59,7 @@ export class CoreCourseFormatSingleActivityHandlerService implements CoreCourseF
|
||||||
return sections[0].modules[0].name;
|
return sections[0].modules[0].name;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (course.displayname) {
|
return course.fullname || '';
|
||||||
return course.displayname;
|
|
||||||
} else if (course.fullname) {
|
|
||||||
return course.fullname;
|
|
||||||
}
|
|
||||||
|
|
||||||
return '';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -40,13 +40,7 @@ export class CoreCourseFormatDefaultHandler implements CoreCourseFormatHandler {
|
||||||
* @inheritdoc
|
* @inheritdoc
|
||||||
*/
|
*/
|
||||||
getCourseTitle(course: CoreCourseAnyCourseData): string {
|
getCourseTitle(course: CoreCourseAnyCourseData): string {
|
||||||
if (course.displayname) {
|
return course.fullname || '';
|
||||||
return course.displayname;
|
|
||||||
} else if (course.fullname) {
|
|
||||||
return course.fullname;
|
|
||||||
}
|
|
||||||
|
|
||||||
return '';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -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.
|
// Ionic list.
|
||||||
ion-list {
|
ion-list {
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
|
@ -740,7 +750,7 @@ body.core-iframe-fullscreen ion-router-outlet {
|
||||||
ion-label {
|
ion-label {
|
||||||
white-space: normal !important;
|
white-space: normal !important;
|
||||||
}
|
}
|
||||||
ion-icon {
|
ion-item > ion-icon {
|
||||||
color: var(--color-shade);
|
color: var(--color-shade);
|
||||||
@include margin-horizontal(null, 16px);
|
@include margin-horizontal(null, 16px);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue