commit
2b14ca1dea
|
@ -18,11 +18,11 @@
|
|||
<label class="accesshide" for="{{row.id}}" *ngIf="row.accessibilityLabel">
|
||||
{{ row.accessibilityLabel }}
|
||||
</label>
|
||||
<ion-icon *ngIf="row.isCorrect === 1" class="core-correct-icon" name="fas-check" color="success" slot="end"
|
||||
[attr.aria-label]="'core.question.correct' | translate" />
|
||||
<ion-icon *ngIf="row.isCorrect === 0" class="core-correct-icon" name="fas-xmark" color="danger" slot="end"
|
||||
[attr.aria-label]="'core.question.incorrect' | translate" />
|
||||
</div>
|
||||
<ion-icon *ngIf="row.isCorrect === 1" class="core-correct-icon" name="fas-check" color="success" slot="start"
|
||||
[attr.aria-label]="'core.question.correct' | translate" />
|
||||
<ion-icon *ngIf="row.isCorrect === 0" class="core-correct-icon" name="fas-xmark" color="danger" slot="start"
|
||||
[attr.aria-label]="'core.question.incorrect' | translate" />
|
||||
<ion-select-option *ngFor="let option of row.options" [value]="option.value">
|
||||
{{option.label}}
|
||||
</ion-select-option>
|
||||
|
|
|
@ -194,7 +194,10 @@ export class CoreContentLinksDelegateService {
|
|||
return;
|
||||
}
|
||||
|
||||
const actions = await handler.getActions(siteIds, relativeUrl, params, courseId, data);
|
||||
const actions = await CoreUtils.ignoreErrors(
|
||||
Promise.resolve(handler.getActions(siteIds, relativeUrl, params, courseId, data)),
|
||||
<CoreContentLinksAction[]> [],
|
||||
);
|
||||
|
||||
if (actions && actions.length) {
|
||||
// Set default values if any value isn't supplied.
|
||||
|
|
|
@ -47,22 +47,16 @@ export class CoreCoursesSectionLinkHandlerService extends CoreCoursesLinksHandle
|
|||
url: string,
|
||||
params: Record<string, string>,
|
||||
): Promise<CoreContentLinksAction[]> {
|
||||
try {
|
||||
const siteId = siteIds[0] ?? false;
|
||||
const sectionId = params.id ? Number(params.id) : false;
|
||||
const siteHomeId = await CoreSites.getSiteHomeId(siteId);
|
||||
const course = await this.getSectionCourse(sectionId, siteId);
|
||||
|
||||
if (!sectionId || !course || course.id === siteHomeId) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return this.getCourseActions(url, course.id, { sectionId });
|
||||
} catch (error) {
|
||||
this.logger.error(`Failed getting actions for url: '${url}'`, error);
|
||||
const siteId = siteIds[0] ?? false;
|
||||
const sectionId = params.id ? Number(params.id) : false;
|
||||
const siteHomeId = await CoreSites.getSiteHomeId(siteId);
|
||||
const course = await this.getSectionCourse(sectionId, siteId);
|
||||
|
||||
if (!sectionId || !course || course.id === siteHomeId) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return this.getCourseActions(url, course.id, { sectionId });
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
ion-checkbox {
|
||||
&.checkbox-disabled::part(label) {
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
ion-input {
|
||||
&.input-disabled.md, &.input-disabled.ios {
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
ion-radio {
|
||||
&.radio-disabled::part(label) {
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
|
@ -6,6 +6,9 @@ ion-select {
|
|||
&::part(icon) {
|
||||
opacity: 1;
|
||||
}
|
||||
&.select-disabled {
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
||||
|
||||
ion-select-popover {
|
||||
|
|
|
@ -32,15 +32,18 @@ html {
|
|||
@import "components/ion-back-button.scss";
|
||||
@import "components/ion-button.scss";
|
||||
@import "components/ion-card.scss";
|
||||
@import "components/ion-checkbox.scss";
|
||||
@import "components/ion-chip.scss";
|
||||
@import "components/ion-content.scss";
|
||||
@import "components/ion-header.scss";
|
||||
@import "components/ion-icon.scss";
|
||||
@import "components/ion-input.scss";
|
||||
@import "components/ion-item.scss";
|
||||
@import "components/ion-item-divider.scss";
|
||||
@import "components/ion-loading.scss";
|
||||
@import "components/ion-note.scss";
|
||||
@import "components/ion-popover.scss";
|
||||
@import "components/ion-radio.scss";
|
||||
@import "components/ion-searchbar.scss";
|
||||
@import "components/ion-select.scss";
|
||||
@import "components/ion-spinner.scss";
|
||||
|
|
Loading…
Reference in New Issue