MOBILE-2491 filter: Minimize WS calls for module context

main
Dani Palou 2019-10-03 17:37:51 +02:00
parent 31caccc396
commit 30a5e83056
149 changed files with 507 additions and 348 deletions

View File

@ -7,7 +7,7 @@
<ion-card>
<a ion-item text-wrap detail-none class="core-course-module-handler item-media" (click)="action($event, item)" [title]="item.name">
<img item-start [src]="item.iconUrl" alt="" role="presentation" *ngIf="item.iconUrl" class="core-module-icon">
<h2><core-format-text [text]="item.name" contextLevel="module" [contextInstanceId]="item.cmid"></core-format-text></h2>
<h2><core-format-text [text]="item.name" contextLevel="module" [contextInstanceId]="item.cmid" [courseId]="item.courseid"></core-format-text></h2>
<p><core-format-text [text]="item.coursename" contextLevel="course" [contextInstanceId]="item.courseid"></core-format-text></p>
</a>
</ion-card>

View File

@ -5,7 +5,7 @@
<ng-container *ngFor="let event of dayEvents.events">
<a ion-item text-wrap detail-none class="core-course-module-handler item-media" (click)="action($event, event.url)" [title]="event.name">
<img item-start [src]="event.iconUrl" alt="" role="presentation" *ngIf="event.iconUrl" class="core-module-icon">
<h2><core-format-text [text]="event.name" contextLevel="module" [contextInstanceId]="event.id"></core-format-text></h2>
<h2><core-format-text [text]="event.name" contextLevel="module" [contextInstanceId]="event.id" [courseId]="event.course.id"></core-format-text></h2>
<p *ngIf="showCourse">
<core-format-text [text]="event.course.fullnamedisplay" contextLevel="course" [contextInstanceId]="event.course.id"></core-format-text>
</p>

View File

@ -31,7 +31,7 @@ import { AddonCalendarOfflineProvider } from '../../providers/calendar-offline';
import { AddonCalendarHelperProvider } from '../../providers/helper';
import { AddonCalendarSyncProvider } from '../../providers/calendar-sync';
import { CoreSite } from '@classes/site';
import { CoreFilterProvider } from '@core/filter/providers/filter';
import { CoreFilterHelperProvider } from '@core/filter/providers/helper';
/**
* Page that displays a form to create/edit an event.
@ -93,7 +93,7 @@ export class AddonCalendarEditEventPage implements OnInit, OnDestroy {
private calendarSync: AddonCalendarSyncProvider,
private fb: FormBuilder,
private syncProvider: CoreSyncProvider,
private filterProvider: CoreFilterProvider,
private filterHelper: CoreFilterHelperProvider,
@Optional() private svComponent: CoreSplitViewComponent) {
this.eventId = navParams.get('eventId');
@ -244,7 +244,7 @@ export class AddonCalendarEditEventPage implements OnInit, OnDestroy {
// Format the name of the courses.
const subPromises = [];
courses.forEach((course) => {
subPromises.push(this.filterProvider.getFiltersAndFormatText(course.fullname, 'course', course.id)
subPromises.push(this.filterHelper.getFiltersAndFormatText(course.fullname, 'course', course.id)
.then((text) => {
course.fullname = text;
}).catch(() => {

View File

@ -69,7 +69,7 @@
</p>
<a ion-item text-wrap *ngFor="let activity of competency.coursemodules" [href]="activity.url" [title]="activity.name" core-link capture="true" class="core-course-module-handler item-media">
<img item-start [src]="activity.iconurl" core-external-content alt="" role="presentation" *ngIf="activity.iconurl" class="core-module-icon">
<core-format-text [text]="activity.name" contextLevel="module" [contextInstanceId]="activity.id"></core-format-text>
<core-format-text [text]="activity.name" contextLevel="module" [contextInstanceId]="activity.id" [courseId]="courseId"></core-format-text>
</a>
</div>
<div *ngIf="competency.plans">

View File

@ -48,7 +48,7 @@
</p>
<a ion-item text-wrap *ngFor="let activity of coursemodules" [href]="activity.url" [title]="activity.name" core-link capture="true">
<img item-start core-external-content [src]="activity.iconurl" alt="" role="presentation" *ngIf="activity.iconurl" class="core-module-icon">
<core-format-text [text]="activity.name" contextLevel="module" [contextInstanceId]="activity.id"></core-format-text>
<core-format-text [text]="activity.name" contextLevel="module" [contextInstanceId]="activity.id" [courseId]="courseId"></core-format-text>
</a>
</ion-item>
<ion-item text-wrap *ngIf="userCompetency.status">

View File

@ -24,7 +24,7 @@ import { CoreLocalNotificationsProvider } from '@providers/local-notifications';
import { CorePushNotificationsProvider } from '@core/pushnotifications/providers/pushnotifications';
import { CorePushNotificationsDelegate } from '@core/pushnotifications/providers/delegate';
import { CoreEmulatorHelperProvider } from '@core/emulator/providers/helper';
import { CoreFilterProvider } from '@core/filter/providers/filter';
import { CoreFilterHelperProvider } from '@core/filter/providers/helper';
/**
* Handler to inject an option into main menu.
@ -49,7 +49,7 @@ export class AddonMessagesMainMenuHandler implements CoreMainMenuHandler, CoreCr
constructor(private messagesProvider: AddonMessagesProvider, private sitesProvider: CoreSitesProvider,
eventsProvider: CoreEventsProvider, private appProvider: CoreAppProvider,
private localNotificationsProvider: CoreLocalNotificationsProvider, private filterProvider: CoreFilterProvider,
private localNotificationsProvider: CoreLocalNotificationsProvider, private filterHelper: CoreFilterHelperProvider,
private pushNotificationsProvider: CorePushNotificationsProvider, utils: CoreUtilsProvider,
pushNotificationsDelegate: CorePushNotificationsDelegate, private emulatorHelper: CoreEmulatorHelperProvider) {
@ -297,7 +297,7 @@ export class AddonMessagesMainMenuHandler implements CoreMainMenuHandler, CoreCr
title: message.name || message.userfromfullname,
};
return this.filterProvider.getFiltersAndFormatText(message.text, 'system', this.sitesProvider.getCurrentSiteHomeId(),
return this.filterHelper.getFiltersAndFormatText(message.text, 'system', this.sitesProvider.getCurrentSiteHomeId(),
{clean: true, singleLine: true}).catch(() => {
return message.text;
}).then((formattedText) => {

View File

@ -8,7 +8,7 @@
{{ 'addon.mod_assign.feedbacknotsupported' | translate }}
</ion-badge>
<p *ngIf="text">
<core-format-text [component]="component" [componentId]="assign.cmid" [maxHeight]="80" [fullOnClick]="true" [fullTitle]="plugin.name" [text]="text" contextLevel="module" [contextInstanceId]="assign.cmid"></core-format-text>
<core-format-text [component]="component" [componentId]="assign.cmid" [maxHeight]="80" [fullOnClick]="true" [fullTitle]="plugin.name" [text]="text" contextLevel="module" [contextInstanceId]="assign.cmid" [courseId]="assign.course"></core-format-text>
</p>
<core-file *ngFor="let file of files" [file]="file" [component]="component" [componentId]="assign.cmid" [alwaysDownload]="true"></core-file>
</ion-item>

View File

@ -17,7 +17,7 @@
<!-- Description and intro attachments. -->
<ion-card *ngIf="description" (click)="expandDescription($event)">
<ion-item text-wrap>
<core-format-text [text]="description" [component]="component" [componentId]="componentId" maxHeight="120" contextLevel="module" [contextInstanceId]="module.id" (click)="expandDescription($event)"></core-format-text>
<core-format-text [text]="description" [component]="component" [componentId]="componentId" maxHeight="120" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId" (click)="expandDescription($event)"></core-format-text>
</ion-item>
</ion-card>

View File

@ -134,7 +134,7 @@ export class AddonModAssignIndexComponent extends CoreCourseModuleMainActivityCo
if (this.assign && (this.description || this.assign.introattachments)) {
this.textUtils.expandText(this.translate.instant('core.description'), this.description, this.component,
this.module.id, this.assign.introattachments, true, 'module', this.module.id);
this.module.id, this.assign.introattachments, true, 'module', this.module.id, this.courseId);
}
}

View File

@ -8,7 +8,7 @@
{{ 'addon.mod_assign.submissionnotsupported' | translate }}
</ion-badge>
<p *ngIf="text">
<core-format-text [component]="component" [componentId]="assign.cmid" [maxHeight]="80" [fullOnClick]="true" [fullTitle]="plugin.name" [text]="text" contextLevel="module" [contextInstanceId]="assign.cmid"></core-format-text>
<core-format-text [component]="component" [componentId]="assign.cmid" [maxHeight]="80" [fullOnClick]="true" [fullTitle]="plugin.name" [text]="text" contextLevel="module" [contextInstanceId]="assign.cmid" [courseId]="assign.course"></core-format-text>
</p>
<core-file *ngFor="let file of files" [file]="file" [component]="component" [componentId]="assign.cmid" [alwaysDownload]="true"></core-file>
</ion-item>

View File

@ -2,7 +2,7 @@
<ion-item text-wrap *ngIf="(text || canEdit) && !edit">
<h2>{{ plugin.name }}</h2>
<p>
<core-format-text [component]="component" [componentId]="assign.cmid" [maxHeight]="80" [fullOnClick]="true" [fullTitle]="plugin.name" [text]="text" contextLevel="module" [contextInstanceId]="assign.cmid"></core-format-text>
<core-format-text [component]="component" [componentId]="assign.cmid" [maxHeight]="80" [fullOnClick]="true" [fullTitle]="plugin.name" [text]="text" contextLevel="module" [contextInstanceId]="assign.cmid" [courseId]="assign.course"></core-format-text>
</p>
<div item-end>
<div text-end>

View File

@ -66,7 +66,7 @@ export class AddonModAssignFeedbackCommentsComponent extends AddonModAssignFeedb
if (this.text) {
// Open a new state with the text.
this.textUtils.expandText(this.plugin.name, this.text, this.component, this.assign.cmid, undefined, true,
'module', this.assign.cmid);
'module', this.assign.cmid, this.assign.course);
}
});
} else if (this.edit) {

View File

@ -1,6 +1,6 @@
<ion-header>
<ion-navbar core-back-button>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="moduleId"></core-format-text></ion-title>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="moduleId" [courseId]="courseId"></core-format-text></ion-title>
<ion-buttons end>
<button ion-button clear (click)="save()" [attr.aria-label]="'core.save' | translate">

View File

@ -1,6 +1,6 @@
<ion-header>
<ion-navbar core-back-button>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id"></core-format-text></ion-title>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text></ion-title>
<ion-buttons end>
<!-- The buttons defined by the component will be added in here. -->

View File

@ -1,6 +1,6 @@
<ion-header>
<ion-navbar core-back-button>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="moduleId"></core-format-text></ion-title>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="moduleId" [courseId]="courseId"></core-format-text></ion-title>
<ion-buttons end></ion-buttons>
</ion-navbar>

View File

@ -1,6 +1,6 @@
<ion-header>
<ion-navbar core-back-button>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="moduleId"></core-format-text></ion-title>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="moduleId" [courseId]="courseId"></core-format-text></ion-title>
<ion-buttons end></ion-buttons>
</ion-navbar>

View File

@ -1,4 +1,4 @@
<a *ngIf="commentsEnabled" ion-item text-wrap (click)="showComments($event)" detail-none>
<h2>{{plugin.name}}</h2>
<core-comments contextLevel="module" [instanceId]="assign.cmid" component="assignsubmission_comments" [itemId]="submission.id" area="submission_comments" [title]="plugin.name"></core-comments>
<core-comments contextLevel="module" [instanceId]="assign.cmid" component="assignsubmission_comments" [itemId]="submission.id" area="submission_comments" [title]="plugin.name" [courseId]="assign.course"></core-comments>
</a>

View File

@ -3,7 +3,7 @@
<h2>{{ plugin.name }}</h2>
<p *ngIf="words">{{ 'addon.mod_assign.numwords' | translate: {'$a': words} }}</p>
<p>
<core-format-text [component]="component" [componentId]="assign.cmid" [maxHeight]="80" [fullOnClick]="true" [fullTitle]="plugin.name" [text]="text" contextLevel="module" [contextInstanceId]="assign.cmid"></core-format-text>
<core-format-text [component]="component" [componentId]="assign.cmid" [maxHeight]="80" [fullOnClick]="true" [fullTitle]="plugin.name" [text]="text" contextLevel="module" [contextInstanceId]="assign.cmid" [courseId]="assign.course"></core-format-text>
</p>
</ion-item>

View File

@ -76,7 +76,7 @@ export class AddonModAssignSubmissionOnlineTextComponent extends AddonModAssignS
if (text) {
// Open a new state with the interpolated contents.
this.textUtils.expandText(this.plugin.name, text, this.component, this.assign.cmid, undefined, true,
'module', this.assign.cmid);
'module', this.assign.cmid, this.assign.course);
}
});
} else {

View File

@ -16,11 +16,11 @@
<!-- Content. -->
<core-loading [hideUntil]="loaded" class="core-loading-center">
<core-course-module-description [description]="description" [component]="component" [componentId]="componentId" contextLevel="module" [contextInstanceId]="module.id"></core-course-module-description>
<core-course-module-description [description]="description" [component]="component" [componentId]="componentId" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-course-module-description>
<div padding class="safe-padding-horizontal">
<core-navigation-bar [previous]="previousChapter > 0 && previousChapter" [next]="nextChapter > 0 && nextChapter" (action)="changeChapter($event)"></core-navigation-bar>
<core-format-text [component]="component" [componentId]="componentId" [text]="chapterContent" contextLevel="module" [contextInstanceId]="module.id"></core-format-text>
<core-format-text [component]="component" [componentId]="componentId" [text]="chapterContent" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text>
<div margin-top *ngIf="tagsEnabled && contentsMap && contentsMap[currentChapter] && contentsMap[currentChapter].tags && contentsMap[currentChapter].tags.length > 0">
<b>{{ 'core.tag.tags' | translate }}:</b>
<core-tag-list [tags]="contentsMap[currentChapter].tags"></core-tag-list>

View File

@ -68,7 +68,8 @@ export class AddonModBookIndexComponent extends CoreCourseModuleMainResourceComp
const modal = this.modalCtrl.create('AddonModBookTocPage', {
moduleId: this.module.id,
chapters: this.chapters,
selected: this.currentChapter
selected: this.currentChapter,
courseId: this.courseId
}, { cssClass: 'core-modal-lateral',
showBackdrop: true,
enableBackdropDismiss: true,

View File

@ -1,6 +1,6 @@
<ion-header>
<ion-navbar core-back-button>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id"></core-format-text></ion-title>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text></ion-title>
<ion-buttons end>
<!-- The buttons defined by the component will be added in here. -->

View File

@ -12,7 +12,7 @@
<nav>
<ion-list>
<a ion-item text-wrap *ngFor="let chapter of chapters" (click)="loadChapter(chapter.id)" [class.core-nav-item-selected]="selected == chapter.id" [class.item-dimmed]="chapter.hidden">
<p [attr.padding-left]="chapter.level == 1 ? true : null">{{chapter.number}} <core-format-text [text]="chapter.title" contextLevel="module" [contextInstanceId]="moduleId"></core-format-text></p>
<p [attr.padding-left]="chapter.level == 1 ? true : null">{{chapter.number}} <core-format-text [text]="chapter.title" contextLevel="module" [contextInstanceId]="moduleId" [courseId]="courseId"></core-format-text></p>
</a>
</ion-list>
</nav>

View File

@ -28,11 +28,13 @@ export class AddonModBookTocPage {
moduleId: number;
chapters: AddonModBookTocChapter[];
selected: number;
courseId: number;
constructor(navParams: NavParams, private viewCtrl: ViewController) {
this.moduleId = navParams.get('moduleId');
this.chapters = navParams.get('chapters') || [];
this.selected = navParams.get('selected');
this.courseId = navParams.get('courseId');
}
/**

View File

@ -12,7 +12,7 @@
<!-- Content. -->
<core-loading [hideUntil]="loaded" class="core-loading-center safe-area-page">
<core-course-module-description [description]="description" [component]="component" [componentId]="componentId" contextLevel="module" [contextInstanceId]="module.id"></core-course-module-description>
<core-course-module-description [description]="description" [component]="component" [componentId]="componentId" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-course-module-description>
<ion-card icon-start class="core-info-card" *ngIf="chatInfo">
<ion-icon name="time"></ion-icon> {{ 'addon.mod_chat.sessionstart' | translate:{$a: chatInfo} }}

View File

@ -1,6 +1,6 @@
<ion-header>
<ion-navbar core-back-button>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="cmId"></core-format-text></ion-title>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="cmId" [courseId]="courseId"></core-format-text></ion-title>
<ion-buttons end>
<button *ngIf="loaded" ion-button icon-only (click)="showChatUsers()">
<ion-icon name="people"></ion-icon>
@ -43,7 +43,7 @@
<ion-badge text-wrap color="info" *ngIf="!message.system && !message.beep">
<span><core-icon name="fa-asterisk"></core-icon> {{ message.timestamp * 1000 | coreFormatDate:"strftimetime" }}
<strong>{{ message.userfullname }} <core-format-text [text]="message.message" contextLevel="module" [contextInstanceId]="cmId" (afterRender)="last && scrollToBottom()"></core-format-text></strong></span>
<strong>{{ message.userfullname }} <core-format-text [text]="message.message" contextLevel="module" [contextInstanceId]="cmId" [courseId]="courseId" (afterRender)="last && scrollToBottom()"></core-format-text></strong></span>
</ion-badge>
</div>
@ -56,7 +56,7 @@
</h2>
<p class="addon-message-text">
<core-format-text [text]="message.message" contextLevel="module" [contextInstanceId]="cmId" (afterRender)="last && scrollToBottom()"></core-format-text>
<core-format-text [text]="message.message" contextLevel="module" [contextInstanceId]="cmId" [courseId]="courseId" (afterRender)="last && scrollToBottom()"></core-format-text>
</p>
<div class="tail" *ngIf="message.showTail"></div>
</ion-item>

View File

@ -1,6 +1,6 @@
<ion-header>
<ion-navbar core-back-button>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id"></core-format-text></ion-title>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text></ion-title>
<ion-buttons end>
<!-- The buttons defined by the component will be added in here. -->

View File

@ -40,7 +40,7 @@
<ion-badge text-wrap color="info" *ngIf="!message.issystem && !message.beep">
<span><core-icon name="fa-asterisk"></core-icon> {{ message.timestamp * 1000 | coreFormatDate:"strftimetime" }}
<strong>{{ message.userfullname }} <core-format-text [text]="message.message" contextLevel="module" [contextInstanceId]="cmId"></core-format-text></strong></span>
<strong>{{ message.userfullname }} <core-format-text [text]="message.message" contextLevel="module" [contextInstanceId]="cmId" [courseId]="courseId"></core-format-text></strong></span>
</ion-badge>
</div>
@ -53,7 +53,7 @@
</h2>
<p class="addon-message-text">
<core-format-text [text]="message.message" contextLevel="module" [contextInstanceId]="cmId"></core-format-text>
<core-format-text [text]="message.message" contextLevel="module" [contextInstanceId]="cmId" [courseId]="courseId"></core-format-text>
</p>
<div class="tail" *ngIf="message.showTail"></div>
</ion-item>

View File

@ -14,7 +14,7 @@
<!-- Content. -->
<core-loading [hideUntil]="loaded" class="core-loading-center">
<core-course-module-description [description]="description" [component]="component" [componentId]="componentId" contextLevel="module" [contextInstanceId]="module.id"></core-course-module-description>
<core-course-module-description [description]="description" [component]="component" [componentId]="componentId" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-course-module-description>
<!-- Activity availability messages -->
<ion-card class="core-info-card" icon-start *ngIf="choiceNotOpenYet">
@ -24,7 +24,7 @@
</ion-card>
<ion-card class="core-info-card" icon-start *ngIf="choiceClosed">
<ion-icon name="information-circle"></ion-icon>
<p *ngIf="options && options.length">{{ 'addon.mod_choice.yourselection' | translate }} <core-format-text [text]="options[0].text" contextLevel="module" [contextInstanceId]="module.id"></core-format-text></p>
<p *ngIf="options && options.length">{{ 'addon.mod_choice.yourselection' | translate }} <core-format-text [text]="options[0].text" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text></p>
<p>{{ 'addon.mod_choice.expired' | translate:{$a: closeTimeReadable} }}</p>
</ion-card>
@ -43,13 +43,13 @@
<ion-card *ngIf="options && options.length">
<ng-container *ngIf="choice.allowmultiple">
<ion-item text-wrap *ngFor="let option of options">
<ion-label><core-format-text [text]="option.text" contextLevel="module" [contextInstanceId]="module.id"></core-format-text> <span *ngIf="choice.limitanswers && option.countanswers >= option.maxanswers">{{ 'addon.mod_choice.full' | translate }}</span></ion-label>
<ion-label><core-format-text [text]="option.text" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text> <span *ngIf="choice.limitanswers && option.countanswers >= option.maxanswers">{{ 'addon.mod_choice.full' | translate }}</span></ion-label>
<ion-checkbox item-end [(ngModel)]="option.checked" [disabled]="option.disabled || !canEdit"></ion-checkbox>
</ion-item>
</ng-container>
<ng-container *ngIf="!choice.allowmultiple">
<ion-item text-wrap *ngFor="let option of options" radio-group [(ngModel)]="selectedOption.id">
<ion-label><core-format-text [text]="option.text" contextLevel="module" [contextInstanceId]="module.id"></core-format-text> <span *ngIf="choice.limitanswers && option.countanswers >= option.maxanswers">{{ 'addon.mod_choice.full' | translate }}</span></ion-label>
<ion-label><core-format-text [text]="option.text" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text> <span *ngIf="choice.limitanswers && option.countanswers >= option.maxanswers">{{ 'addon.mod_choice.full' | translate }}</span></ion-label>
<ion-radio color="primary" [value]="option.id" [disabled]="option.disabled || !canEdit"></ion-radio>
</ion-item>
</ng-container>
@ -73,13 +73,13 @@
<ion-icon item-start name="warning" color="warning"></ion-icon> {{ 'addon.mod_choice.resultsnotsynced' | translate }}
</ion-item>
<ion-item>
<core-chart type="pie" [data]="data" [labels]="labels" height="300" contextLevel="module" [contextInstanceId]="module.id"></core-chart>
<core-chart type="pie" [data]="data" [labels]="labels" height="300" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-chart>
</ion-item>
</ion-col>
<ion-col *ngIf="choice.publish && results" col-12 col-lg-7>
<ion-item-group *ngFor="let result of results">
<ion-item-divider text-wrap>
<h2><core-format-text [text]="result.text" contextLevel="module" [contextInstanceId]="module.id"></core-format-text></h2>
<h2><core-format-text [text]="result.text" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text></h2>
<p>{{ 'addon.mod_choice.numberofuser' | translate }}: {{ result.numberofuser }} ({{ 'core.percentagenumber' | translate: {$a: result.percentageamountfixed} }})</p>
</ion-item-divider>
<a ion-item *ngFor="let user of result.userresponses" core-user-link [courseId]="courseid" [userId]="user.userid" [title]="user.fullname" text-wrap>

View File

@ -1,6 +1,6 @@
<ion-header>
<ion-navbar core-back-button>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id"></core-format-text></ion-title>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text></ion-title>
<ion-buttons end>
<!-- The buttons defined by the component will be added in here. -->

View File

@ -22,15 +22,15 @@
<ion-icon name="thumbs-down"></ion-icon>
</a>
<core-comments *ngIf="action == 'comments' && mode == 'list'" contextLevel="module" [instanceId]="database.coursemodule" component="mod_data" [itemId]="entry.id" area="database_entry"></core-comments>
<core-comments *ngIf="action == 'comments' && mode == 'list'" contextLevel="module" [instanceId]="database.coursemodule" component="mod_data" [itemId]="entry.id" area="database_entry" [courseId]="database.course"></core-comments>
<span *ngIf="action == 'timeadded'">{{ entry.timecreated * 1000 | coreFormatDate }}</span>
<span *ngIf="action == 'timemodified'">{{ entry.timemodified * 1000 | coreFormatDate }}</span>
<a *ngIf="action == 'userpicture'" core-user-link [courseId]="database.courseid" [userId]="entry.userid" [title]="entry.fullname">
<a *ngIf="action == 'userpicture'" core-user-link [courseId]="database.course" [userId]="entry.userid" [title]="entry.fullname">
<img class="avatar-round" [src]="userPicture" [alt]="'core.pictureof' | translate:{$a: entry.fullname}" core-external-content onError="this.src='assets/img/user-avatar.png'" role="presentation">
</a>
<a *ngIf="action == 'user' && entry" core-user-link [courseId]="database.courseid" [userId]="entry.userid" [title]="entry.fullname">{{entry.fullname}}</a>
<a *ngIf="action == 'user' && entry" core-user-link [courseId]="database.course" [userId]="entry.userid" [title]="entry.fullname">{{entry.fullname}}</a>
<core-tag-list *ngIf="tagsEnabled && action == 'tags' && entry" [tags]="entry.tags"></core-tag-list>

View File

@ -19,7 +19,7 @@
<!-- Content. -->
<core-loading [hideUntil]="loaded" class="core-loading-center">
<core-course-module-description [description]="description" [component]="component" [componentId]="componentId" contextLevel="module" [contextInstanceId]="module.id"></core-course-module-description>
<core-course-module-description [description]="description" [component]="component" [componentId]="componentId" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-course-module-description>
<!-- Data done in offline but not synchronized -->
<div class="core-warning-card" icon-start *ngIf="hasOffline || hasOfflineRatings">

View File

@ -6,4 +6,4 @@
<core-input-errors *ngIf="error && mode == 'edit'" [control]="form.controls['f_'+field.id]" [errorText]="error"></core-input-errors>
</span>
<core-format-text *ngIf="isShowOrListMode() && value" [text]="format(value)" [component]="component" [componentId]="componentId" contextLevel="module" [contextInstanceId]="componentId"></core-format-text>
<core-format-text *ngIf="isShowOrListMode() && value" [text]="format(value)" [component]="component" [componentId]="componentId" contextLevel="module" [contextInstanceId]="componentId" [courseId]="database.course"></core-format-text>

View File

@ -1,6 +1,6 @@
<ion-header>
<ion-navbar core-back-button>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id"></core-format-text></ion-title>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text></ion-title>
<ion-buttons end>
<button *ngIf="entry" ion-button clear (click)="save($event)" [attr.aria-label]="'core.save' | translate">
{{ 'core.save' | translate }}

View File

@ -1,6 +1,6 @@
<ion-header>
<ion-navbar core-back-button>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id"></core-format-text></ion-title>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text></ion-title>
</ion-navbar>
</ion-header>
<ion-content>
@ -32,7 +32,7 @@
<core-rating-aggregate *ngIf="data && entry && ratingInfo" [ratingInfo]="ratingInfo" contextLevel="module" [instanceId]="data.coursemodule" [itemId]="entry.id" [courseId]="courseId" [aggregateMethod]="data.assessed" [scaleId]="data.scale"></core-rating-aggregate>
<ion-item *ngIf="data && data.comments && entry && entry.id > 0 && commentsEnabled">
<core-comments contextLevel="module" [instanceId]="data.coursemodule" component="mod_data" [itemId]="entry.id" area="database_entry" [displaySpinner]="false" (onLoading)="setLoadingComments($event)"></core-comments>
<core-comments contextLevel="module" [instanceId]="data.coursemodule" component="mod_data" [itemId]="entry.id" area="database_entry" [displaySpinner]="false" [courseId]="courseId" (onLoading)="setLoadingComments($event)"></core-comments>
</ion-item>
<ion-grid *ngIf="previousOffset != null || nextOffset != null">

View File

@ -1,6 +1,6 @@
<ion-header>
<ion-navbar core-back-button>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id"></core-format-text></ion-title>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text></ion-title>
<ion-buttons end>
<!-- The buttons defined by the component will be added in here. -->

View File

@ -14,7 +14,7 @@
<!-- Content. -->
<core-loading [hideUntil]="loaded" class="core-loading-center">
<core-course-module-description [description]="description" [component]="component" [componentId]="componentId" contextLevel="module" [contextInstanceId]="module.id"></core-course-module-description>
<core-course-module-description [description]="description" [component]="component" [componentId]="componentId" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-course-module-description>
<ng-container *ngIf="showTabs">
<core-tabs [hideUntil]="tabsReady" [selectedIndex]="firstSelectedTab">
@ -98,7 +98,7 @@
</ion-item>
<ion-item text-wrap *ngIf="access.canedititems && feedback.page_after_submit">
<h2>{{ 'addon.mod_feedback.page_after_submit' | translate }}</h2>
<core-format-text [component]="component" [componentId]="componentId" [text]="feedback.page_after_submit" contextLevel="module" [contextInstanceId]="module.id"></core-format-text>
<core-format-text [component]="component" [componentId]="componentId" [text]="feedback.page_after_submit" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text>
</ion-item>
<ng-container *ngIf="!access.isempty">
<ion-item text-wrap>
@ -145,8 +145,8 @@
<ion-list *ngIf="items && items.length">
<ion-item text-wrap *ngFor="let item of items" class="core-analysis">
<h2>{{item.number}}. <core-format-text [component]="component" [componentId]="componentId" [text]="item.name" contextLevel="module" [contextInstanceId]="module.id"></core-format-text></h2>
<p><core-format-text [component]="component" [componentId]="componentId" [text]="item.label" contextLevel="module" [contextInstanceId]="module.id"></core-format-text></p>
<h2>{{item.number}}. <core-format-text [component]="component" [componentId]="componentId" [text]="item.name" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text></h2>
<p><core-format-text [component]="component" [componentId]="componentId" [text]="item.label" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text></p>
<ng-container [ngSwitch]="item.template">
<ng-container *ngSwitchCase="'numeric'">
<ul>
@ -162,7 +162,7 @@
</ul>
</ng-container>
<ng-container *ngSwitchCase="'chart'">
<core-chart [type]="item.chartType" [data]="item.chartData" [labels]="item.labels" height="300" contextLevel="module" [contextInstanceId]="module.id" [wsNotFiltered]="true"></core-chart>
<core-chart [type]="item.chartType" [data]="item.chartData" [labels]="item.labels" height="300" contextLevel="module" [contextInstanceId]="module.id" [wsNotFiltered]="true" [courseId]="courseId"></core-chart>
<p *ngIf="item.average">{{ 'addon.mod_feedback.average' | translate }}: {{item.average | number : '1.2-2'}}</p>
</ng-container>
</ng-container>

View File

@ -24,9 +24,9 @@
<ion-item-divider *ngIf="item.typ == 'pagebreak'"></ion-item-divider>
<ion-item text-wrap *ngIf="item.typ != 'pagebreak'" [color]="item.dependitem > 0 ? 'light' : ''">
<h2 *ngIf="item.name" [core-mark-required]="item.required">
<span *ngIf="feedback.autonumbering && item.itemnumber">{{item.itemnumber}}. </span><core-format-text [component]="component" [componentId]="componentId" [text]="item.name" contextLevel="module" [contextInstanceId]="feedback.coursemodule"></core-format-text>
<span *ngIf="feedback.autonumbering && item.itemnumber">{{item.itemnumber}}. </span><core-format-text [component]="component" [componentId]="componentId" [text]="item.name" contextLevel="module" [contextInstanceId]="feedback.coursemodule" [courseId]="courseId"></core-format-text>
</h2>
<p *ngIf="item.submittedValue"><core-format-text [component]="component" [componentId]="componentId" [text]=" item.submittedValue" contextLevel="module" [contextInstanceId]="feedback.coursemodule"></core-format-text></p>
<p *ngIf="item.submittedValue"><core-format-text [component]="component" [componentId]="componentId" [text]=" item.submittedValue" contextLevel="module" [contextInstanceId]="feedback.coursemodule" [courseId]="courseId"></core-format-text></p>
</ion-item>
</ng-container>
</ng-container>

View File

@ -1,6 +1,6 @@
<ion-header>
<ion-navbar core-back-button>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id"></core-format-text></ion-title>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text></ion-title>
</ion-navbar>
</ion-header>
<ion-content>
@ -17,13 +17,13 @@
<ion-item text-wrap *ngIf="item.typ != 'pagebreak'" [color]="item.dependitem > 0 ? 'light' : ''" [class.core-danger-item]="item.isEmpty || item.hasError">
<ion-label *ngIf="item.name" [core-mark-required]="item.required" stacked>
<span *ngIf="feedback.autonumbering && item.itemnumber">{{item.itemnumber}}. </span>
<core-format-text [component]="component" [componentId]="componentId" [text]="item.name" contextLevel="module" [contextInstanceId]="module.id"></core-format-text>
<core-format-text [component]="component" [componentId]="componentId" [text]="item.name" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text>
<span *ngIf="item.postfix" class="addon-mod_feedback-postfix">{{item.postfix}}</span>
</ion-label>
<div item-content class="addon-mod_feedback-form-content" *ngIf="item.template">
<ng-container [ngSwitch]="item.template">
<ng-container *ngSwitchCase="'label'">
<p><core-format-text [component]="component" [componentId]="componentId" [text]="item.presentation" contextLevel="module" [contextInstanceId]="module.id" [wsNotFiltered]="true"></core-format-text></p>
<p><core-format-text [component]="component" [componentId]="componentId" [text]="item.presentation" contextLevel="module" [contextInstanceId]="module.id" [wsNotFiltered]="true" [courseId]="courseId"></core-format-text></p>
</ng-container>
<ng-container *ngSwitchCase="'textfield'">
<ion-input type="text" [(ngModel)]="item.value" autocorrect="off" name="{{item.typ}}_{{item.id}}" maxlength="{{item.maxlength}}" [required]="item.required"></ion-input>
@ -38,20 +38,20 @@
<ng-container *ngSwitchCase="'multichoice-r'">
<ion-list radio-group [(ngModel)]="item.value" [required]="item.required" name="{{item.typ}}_{{item.id}}">
<ion-item *ngFor="let option of item.choices">
<ion-label><core-format-text [component]="component" [componentId]="componentId" [text]="option.label" contextLevel="module" [contextInstanceId]="module.id" [wsNotFiltered]="true"></core-format-text></ion-label>
<ion-label><core-format-text [component]="component" [componentId]="componentId" [text]="option.label" contextLevel="module" [contextInstanceId]="module.id" [wsNotFiltered]="true" [courseId]="courseId"></core-format-text></ion-label>
<ion-radio [value]="option.value"></ion-radio>
</ion-item>
</ion-list>
</ng-container>
<ion-list *ngSwitchCase="'multichoice-c'">
<ion-item *ngFor="let option of item.choices">
<ion-label><core-format-text [component]="component" [componentId]="componentId" [text]="option.label" contextLevel="module" [contextInstanceId]="module.id" [wsNotFiltered]="true"></core-format-text></ion-label>
<ion-label><core-format-text [component]="component" [componentId]="componentId" [text]="option.label" contextLevel="module" [contextInstanceId]="module.id" [wsNotFiltered]="true" [courseId]="courseId"></core-format-text></ion-label>
<ion-checkbox [required]="item.required" name="{{item.typ}}_{{item.id}}" [(ngModel)]="option.checked" value="option.value"></ion-checkbox>
</ion-item>
</ion-list>
<ng-container *ngSwitchCase="'multichoice-d'">
<ion-select [required]="item.required" name="{{item.typ}}_{{item.id}}" [(ngModel)]="item.value" interface="action-sheet">
<ion-option *ngFor="let option of item.choices" [value]="option.value"><core-format-text [component]="component" [componentId]="componentId" [text]="option.label" contextLevel="module" [contextInstanceId]="module.id" [wsNotFiltered]="true"></core-format-text></ion-option>
<ion-option *ngFor="let option of item.choices" [value]="option.value"><core-format-text [component]="component" [componentId]="componentId" [text]="option.label" contextLevel="module" [contextInstanceId]="module.id" [wsNotFiltered]="true" [courseId]="courseId"></core-format-text></ion-option>
</ion-select>
</ng-container>
<ng-container *ngSwitchCase="'captcha'">
@ -93,7 +93,7 @@
<ion-icon name="checkmark"></ion-icon>
<p *ngIf="!completionPageContents && !completedOffline">{{ 'addon.mod_feedback.this_feedback_is_already_submitted' | translate }}</p>
<p *ngIf="!completionPageContents && completedOffline">{{ 'addon.mod_feedback.feedback_submitted_offline' | translate }}</p>
<p *ngIf="completionPageContents"><core-format-text [component]="component" componentId="componentId" [text]="completionPageContents" contextLevel="module" [contextInstanceId]="module.id"></core-format-text></p>
<p *ngIf="completionPageContents"><core-format-text [component]="component" componentId="componentId" [text]="completionPageContents" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text></p>
</div>
<ion-grid *ngIf="completed">

View File

@ -1,6 +1,6 @@
<ion-header>
<ion-navbar core-back-button>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id"></core-format-text></ion-title>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text></ion-title>
<ion-buttons end>
<!-- The buttons defined by the component will be added in here. -->

View File

@ -13,7 +13,7 @@
<!-- Content. -->
<core-loading [hideUntil]="loaded" class="core-loading-center">
<core-course-module-description [description]="description" [component]="component" [componentId]="componentId" contextLevel="module" [contextInstanceId]="module.id"></core-course-module-description>
<core-course-module-description [description]="description" [component]="component" [componentId]="componentId" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-course-module-description>
<ion-list *ngIf="contents && contents.length > 0">
<ng-container *ngFor="let file of contents">

View File

@ -1,6 +1,6 @@
<ion-header>
<ion-navbar core-back-button>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id"></core-format-text></ion-title>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text></ion-title>
<ion-buttons end>
<!-- The buttons defined by the component will be added in here. -->

View File

@ -19,7 +19,7 @@
<ion-refresher-content pullingText="{{ 'core.pulltorefresh' | translate }}"></ion-refresher-content>
</ion-refresher>
<core-loading [hideUntil]="loaded" class="core-loading-center">
<core-course-module-description *ngIf="forum && forum.type != 'single'" [description]="description" [component]="component" [componentId]="componentId" [note]="descriptionNote" contextLevel="module" [contextInstanceId]="module.id"></core-course-module-description>
<core-course-module-description *ngIf="forum && forum.type != 'single'" [description]="description" [component]="component" [componentId]="componentId" [note]="descriptionNote" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-course-module-description>
<!-- Forum discussions found to be synchronized -->
<ion-card class="core-warning-card" icon-start *ngIf="hasOffline || hasOfflineRatings">
@ -45,7 +45,7 @@
<ng-container *ngFor="let discussion of offlineDiscussions">
<ion-item text-wrap (click)="openNewDiscussion(discussion.timecreated)" [attr.no-lines]="discussion.groupname" [class.core-split-item-selected]="discussion.timecreated == -selectedDiscussion">
<ion-avatar core-user-avatar [user]="discussion" item-start [courseId]="courseId"></ion-avatar>
<h2><core-format-text [text]="discussion.subject" contextLevel="module" [contextInstanceId]="module.id"></core-format-text></h2>
<h2><core-format-text [text]="discussion.subject" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text></h2>
<h3 *ngIf="discussion.userfullname">
<ion-note float-end padding-left><ion-icon name="time"></ion-icon> {{ 'core.notsent' | translate }}</ion-note>
{{discussion.userfullname}}
@ -63,7 +63,7 @@
<h2>
<core-icon name="fa-map-pin" *ngIf="discussion.pinned"></core-icon>
<core-icon name="fa-star" class="addon-forum-star" *ngIf="!discussion.pinned && discussion.starred"></core-icon>
<core-format-text [text]="discussion.subject" contextLevel="module" [contextInstanceId]="module.id"></core-format-text>
<core-format-text [text]="discussion.subject" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text>
</h2>
<h3>
<ion-note float-end padding-left text-end>

View File

@ -4,7 +4,7 @@
<h2>
<core-icon name="fa-map-pin" *ngIf="post.parent == 0 && post.pinned"></core-icon>
<core-icon name="fa-star" class="addon-forum-star" *ngIf="post.parent == 0 && !post.pinned && post.starred"></core-icon>
<span [class.core-bold]="post.parent == 0"><core-format-text [text]="post.subject" contextLevel="module" [contextInstanceId]="forum && forum.cmid"></core-format-text></span>
<span [class.core-bold]="post.parent == 0"><core-format-text [text]="post.subject" contextLevel="module" [contextInstanceId]="forum && forum.cmid" [courseId]="courseId"></core-format-text></span>
</h2>
<p>
<ion-note float-end padding-left *ngIf="!post.modified"><ion-icon name="time"></ion-icon> {{ 'core.notsent' | translate }}</ion-note>
@ -20,7 +20,7 @@
<div padding-bottom *ngIf="post.isprivatereply">
<ion-note>{{ 'addon.mod_forum.postisprivatereply' | translate }}</ion-note>
</div>
<core-format-text [component]="component" [componentId]="componentId" [text]="post.message" contextLevel="module" [contextInstanceId]="forum && forum.cmid"></core-format-text>
<core-format-text [component]="component" [componentId]="componentId" [text]="post.message" contextLevel="module" [contextInstanceId]="forum && forum.cmid" [courseId]="courseId"></core-format-text>
<div no-lines>
<ng-container *ngFor="let attachment of post.attachments">
<!-- Files already attached to the submission. -->

View File

@ -1,6 +1,6 @@
<ion-header>
<ion-navbar core-back-button>
<ion-title *ngIf="discussion"><core-format-text [text]="discussion.subject" contextLevel="module" [contextInstanceId]="cmId"></core-format-text></ion-title>
<ion-title *ngIf="discussion"><core-format-text [text]="discussion.subject" contextLevel="module" [contextInstanceId]="cmId" [courseId]="courseId"></core-format-text></ion-title>
<ion-buttons end>
<!-- The context menu will be added in here. -->
</ion-buttons>

View File

@ -309,6 +309,7 @@ export class AddonModForumDiscussionPage implements OnDestroy {
this.forumId = forum.id;
this.cmId = forum.cmid;
this.courseId = forum.course;
this.forum = forum;
this.availabilityMessage = this.forumHelper.getAvailabilityMessage(forum);

View File

@ -1,6 +1,6 @@
<ion-header>
<ion-navbar core-back-button>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id"></core-format-text></ion-title>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text></ion-title>
<ion-buttons end>
<!-- The buttons defined by the component will be added in here. -->

View File

@ -22,7 +22,7 @@
<ion-refresher-content pullingText="{{ 'core.pulltorefresh' | translate }}"></ion-refresher-content>
</ion-refresher>
<core-course-module-description [description]="description" [component]="component" [componentId]="componentId" contextLevel="module" [contextInstanceId]="module.id"></core-course-module-description>
<core-course-module-description [description]="description" [component]="component" [componentId]="componentId" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-course-module-description>
<!-- Glossary entries found to be synchronized -->
<ion-card class="core-warning-card" icon-start *ngIf="hasOffline || hasOfflineRatings">

View File

@ -1,6 +1,6 @@
<ion-header>
<ion-navbar core-back-button>
<ion-title><core-format-text [text]="module.name" contextLevel="module" [contextInstanceId]="module.id"></core-format-text></ion-title>
<ion-title><core-format-text [text]="module.name" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text></ion-title>
<ion-buttons end>
<button ion-button (click)="save()"> {{ 'core.save' | translate }}</button>
</ion-buttons>

View File

@ -1,6 +1,6 @@
<ion-header>
<ion-navbar core-back-button>
<ion-title *ngIf="entry"><core-format-text [text]="entry.concept" contextLevel="module" [contextInstanceId]="glossary && glossary.coursemodule"></core-format-text></ion-title>
<ion-title *ngIf="entry"><core-format-text [text]="entry.concept" contextLevel="module" [contextInstanceId]="glossary && glossary.coursemodule" [courseId]="courseId"></core-format-text></ion-title>
</ion-navbar>
</ion-header>
<ion-content>
@ -12,7 +12,7 @@
<ng-container *ngIf="entry">
<ion-item text-wrap *ngIf="showAuthor">
<ion-avatar core-user-avatar [user]="entry" (click)="openUserProfile(post.userid)" item-start></ion-avatar>
<h2><core-format-text [text]="entry.concept" contextLevel="module" [contextInstanceId]="glossary && glossary.coursemodule"></core-format-text></h2>
<h2><core-format-text [text]="entry.concept" contextLevel="module" [contextInstanceId]="glossary && glossary.coursemodule" [courseId]="courseId"></core-format-text></h2>
<ion-note item-end *ngIf="showDate">{{ entry.timemodified | coreDateDayOrTime }}</ion-note>
<p>{{ entry.userfullname }}</p>
</ion-item>
@ -21,7 +21,7 @@
<ion-note item-end *ngIf="showDate">{{ entry.timemodified | coreDateDayOrTime }}</ion-note>
</ion-item>
<ion-item text-wrap>
<core-format-text [component]="component" [componentId]="componentId" [text]="entry.definition" contextLevel="module" [contextInstanceId]="glossary && glossary.coursemodule"></core-format-text>
<core-format-text [component]="component" [componentId]="componentId" [text]="entry.definition" contextLevel="module" [contextInstanceId]="glossary && glossary.coursemodule" [courseId]="courseId"></core-format-text>
</ion-item>
<ng-container *ngIf="entry.attachment">
<div no-lines>

View File

@ -1,6 +1,6 @@
<ion-header>
<ion-navbar core-back-button>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id"></core-format-text></ion-title>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text></ion-title>
<ion-buttons end>
<!-- The buttons defined by the component will be added in here. -->

View File

@ -16,7 +16,7 @@
<!-- Content. -->
<core-loading [hideUntil]="loaded" class="core-loading-center safe-area-page">
<div class="addon-mod-imscp-container">
<core-navigation-bar [previous]="previousItem" [next]="nextItem" (action)="loadItem($event)" [info]="description" [title]="'core.description' | translate" [component]="component" [componentId]="componentId" contextLevel="module" [contextInstanceId]="module.id"></core-navigation-bar>
<core-navigation-bar [previous]="previousItem" [next]="nextItem" (action)="loadItem($event)" [info]="description" [title]="'core.description' | translate" [component]="component" [componentId]="componentId" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-navigation-bar>
<core-iframe [src]="src"></core-iframe>
</div>
</core-loading>

View File

@ -1,6 +1,6 @@
<ion-header>
<ion-navbar core-back-button>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id"></core-format-text></ion-title>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text></ion-title>
<ion-buttons end>
<!-- The buttons defined by the component will be added in here. -->

View File

@ -18,7 +18,7 @@
<!-- Index/Preview tab. -->
<core-tab [title]="'addon.mod_lesson.preview' | translate" (ionSelect)="indexSelected()">
<ng-template>
<core-course-module-description [description]="description" [component]="component" [componentId]="componentId" contextLevel="module" [contextInstanceId]="module.id"></core-course-module-description>
<core-course-module-description [description]="description" [component]="component" [componentId]="componentId" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-course-module-description>
<!-- Prevent access messages. Only show the first one. -->
<div class="core-info-card" icon-start *ngIf="lesson && preventMessages && preventMessages.length">

View File

@ -1,6 +1,6 @@
<ion-header>
<ion-navbar core-back-button>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id"></core-format-text></ion-title>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text></ion-title>
<ion-buttons end>
<!-- The buttons defined by the component will be added in here. -->

View File

@ -26,7 +26,7 @@
<div *ngIf="!pageInstance.loadingMenu">
<ng-container *ngFor="let page of pageInstance.lessonPages">
<a ion-item text-wrap *ngIf="page.display && page.displayinmenublock" (click)="loadPage(page.id)" [ngClass]='{"addon-mod_lesson-selected core-white-push-arrow": !pageInstance.eolData && pageInstance.currentPage == page.id}'>
<p><core-format-text [text]="page.title" contextLevel="module" [contextInstanceId]="pageInstance && pageInstance.lesson && pageInstance.lesson.coursemodule"></core-format-text></p>
<p><core-format-text [text]="page.title" contextLevel="module" [contextInstanceId]="pageInstance && pageInstance.lesson && pageInstance.lesson.coursemodule" [courseId]="pageInstance && pageInstance.courseId"></core-format-text></p>
</a>
</ng-container>
</div>

View File

@ -1,6 +1,6 @@
<ion-header>
<ion-navbar core-back-button>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="lesson && lesson.coursemodule"></core-format-text></ion-title>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="lesson && lesson.coursemodule" [courseId]="courseId"></core-format-text></ion-title>
<ion-buttons end>
<button *ngIf="displayMenu || mediaFile" ion-button icon-only [attr.aria-label]="'addon.mod_lesson.lessonmenu' | translate" (click)="menuModal.present()">
@ -33,14 +33,14 @@
<ion-card *ngIf="!eolData && !processData">
<!-- Content page. -->
<ion-item text-wrap *ngIf="!question && pageContent">
<core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]="pageContent" contextLevel="module" [contextInstanceId]="lesson.coursemodule"></core-format-text>
<core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]="pageContent" contextLevel="module" [contextInstanceId]="lesson.coursemodule" [courseId]="courseId"></core-format-text>
</ion-item>
<!-- Question page. -->
<!-- We need to set ngIf loaded to make formGroup directive restart every time a page changes, see MOBILE-2540. -->
<form *ngIf="question && loaded" ion-list [formGroup]="questionForm">
<ion-item-divider text-wrap *ngIf="pageContent">
<core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]="pageContent" contextLevel="module" [contextInstanceId]="lesson.coursemodule"></core-format-text>
<core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]="pageContent" contextLevel="module" [contextInstanceId]="lesson.coursemodule" [courseId]="courseId"></core-format-text>
</ion-item-divider>
<input *ngFor="let input of question.hiddenInputs" type="hidden" [name]="input.name" [value]="input.value" />
@ -61,7 +61,7 @@
</ion-item>
<ion-item text-wrap *ngIf="!question.textarea && question.useranswer">
<p class="item-heading">{{ 'addon.mod_lesson.youranswer' | translate }}</p>
<p><core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]="question.useranswer" contextLevel="module" [contextInstanceId]="lesson.coursemodule"></core-format-text></p>
<p><core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]="question.useranswer" contextLevel="module" [contextInstanceId]="lesson.coursemodule" [courseId]="courseId"></core-format-text></p>
</ion-item>
</ng-container>
@ -71,7 +71,7 @@
<div *ngIf="!question.multi" radio-group [formControlName]="question.controlName">
<ion-item text-wrap *ngFor="let option of question.options">
<ion-label>
<core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]="option.text" contextLevel="module" [contextInstanceId]="lesson.coursemodule"></core-format-text>
<core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]="option.text" contextLevel="module" [contextInstanceId]="lesson.coursemodule" [courseId]="courseId"></core-format-text>
</ion-label>
<ion-radio [id]="option.id" [value]="option.value" [disabled]="option.disabled"></ion-radio>
</ion-item>
@ -81,7 +81,7 @@
<ng-container *ngIf="question.multi">
<ion-item text-wrap *ngFor="let option of question.options">
<ion-label>
<core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]="option.text" contextLevel="module" [contextInstanceId]="lesson.coursemodule"></core-format-text>
<core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]="option.text" contextLevel="module" [contextInstanceId]="lesson.coursemodule" [courseId]="courseId"></core-format-text>
</ion-label>
<ion-checkbox [id]="option.id" [formControlName]="option.name" item-end></ion-checkbox>
</ion-item>
@ -94,7 +94,7 @@
<ion-grid item-content>
<ion-row>
<ion-col>
<p><core-format-text id="addon-mod_lesson-matching-{{row.id}}" [component]="component" [componentId]="lesson.coursemodule" [text]="row.text" contextLevel="module" [contextInstanceId]="lesson.coursemodule"></core-format-text></p>
<p><core-format-text id="addon-mod_lesson-matching-{{row.id}}" [component]="component" [componentId]="lesson.coursemodule" [text]="row.text" contextLevel="module" [contextInstanceId]="lesson.coursemodule" [courseId]="courseId"></core-format-text></p>
</ion-col>
<ion-col>
<ion-select [id]="row.id" [formControlName]="row.name" [attr.aria-labelledby]="'addon-mod_lesson-matching-' + row.id" interface="action-sheet">
@ -186,12 +186,12 @@
<ng-container *ngIf="eolData.activitylink.value.formatted">
<!-- Activity link was successfully formatted, render the button. -->
<a ion-button block text-wrap color="light" [href]="eolData.activitylink.value.href" core-link [capture]="true" class="button-no-uppercase">
<core-format-text [text]="eolData.activitylink.value.label" contextLevel="module" [contextInstanceId]="lesson.coursemodule"></core-format-text>
<core-format-text [text]="eolData.activitylink.value.label" contextLevel="module" [contextInstanceId]="lesson.coursemodule" [courseId]="courseId"></core-format-text>
</a>
</ng-container>
<ng-container *ngIf="!eolData.activitylink.value.formatted">
<!-- Activity link wasn't formatted, render the original link. -->
<core-format-text [text]="eolData.activitylink.value.label" contextLevel="module" [contextInstanceId]="lesson.coursemodule"></core-format-text>
<core-format-text [text]="eolData.activitylink.value.label" contextLevel="module" [contextInstanceId]="lesson.coursemodule" [courseId]="courseId"></core-format-text>
</ng-container>
</ion-item>
</ion-card>
@ -203,7 +203,7 @@
</ion-item>
<ion-item text-wrap *ngIf="!processData.reviewmode || review">
<p *ngIf="!processData.reviewmode">
<core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]="processData.feedback" contextLevel="module" [contextInstanceId]="lesson.coursemodule"></core-format-text>
<core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]="processData.feedback" contextLevel="module" [contextInstanceId]="lesson.coursemodule" [courseId]="courseId"></core-format-text>
</p>
<div *ngIf="review">
<p>{{ 'addon.mod_lesson.gotoendoflesson' | translate }}</p>

View File

@ -64,7 +64,7 @@
</ion-card-header>
<ion-item text-wrap>
<p class="item-heading">{{ 'addon.mod_lesson.question' | translate }}</p>
<p><core-format-text [component]="component" [componentId]="lesson.coursemodule" [maxHeight]="50" [text]="page.contents" contextLevel="module" [contextInstanceId]="lesson.coursemodule"></core-format-text></p>
<p><core-format-text [component]="component" [componentId]="lesson.coursemodule" [maxHeight]="50" [text]="page.contents" contextLevel="module" [contextInstanceId]="lesson.coursemodule" [courseId]="courseId"></core-format-text></p>
</ion-item>
<ion-item text-wrap>
<p class="item-heading">{{ 'addon.mod_lesson.answer' | translate }}</p>
@ -92,9 +92,9 @@
<!-- Truefalse or matching. -->
<ion-item text-wrap *ngIf="answer[0].isCheckbox" [ngClass]="{'addon-mod_lesson-highlight': answer[0].highlight}">
<ion-label>
<p><core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]="answer[0].content" contextLevel="module" [contextInstanceId]="lesson.coursemodule"></core-format-text></p>
<p><core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]="answer[0].content" contextLevel="module" [contextInstanceId]="lesson.coursemodule" [courseId]="courseId"></core-format-text></p>
<ion-badge *ngIf="answer[1]" color="dark">
<core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]="answer[1]" contextLevel="module" [contextInstanceId]="lesson.coursemodule"></core-format-text>
<core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]="answer[1]" contextLevel="module" [contextInstanceId]="lesson.coursemodule" [courseId]="courseId"></core-format-text>
</ion-badge>
</ion-label>
<ion-checkbox [attr.name]="answer[0].name" [ngModel]="answer[0].checked" [disabled]="true" item-end>
@ -105,7 +105,7 @@
<ion-item text-wrap *ngIf="answer[0].isText">
<p>{{ answer[0].value }}</p>
<ion-badge *ngIf="answer[1]" color="dark">
<core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]="answer[1]" contextLevel="module" [contextInstanceId]="lesson.coursemodule"></core-format-text>
<core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]="answer[1]" contextLevel="module" [contextInstanceId]="lesson.coursemodule" [courseId]="courseId"></core-format-text>
</ion-badge>
</ion-item>
@ -113,12 +113,12 @@
<ion-item text-wrap *ngIf="answer[0].isSelect">
<ion-row>
<ion-col>
<p><core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]=" answer[0].content" contextLevel="module" [contextInstanceId]="lesson.coursemodule"></core-format-text></p>
<p><core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]=" answer[0].content" contextLevel="module" [contextInstanceId]="lesson.coursemodule" [courseId]="courseId"></core-format-text></p>
</ion-col>
<ion-col>
<p>{{answer[0].value}}</p>
<ion-badge *ngIf="answer[1]" color="dark">
<core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]="answer[1]" contextLevel="module" [contextInstanceId]="lesson.coursemodule"></core-format-text>
<core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]="answer[1]" contextLevel="module" [contextInstanceId]="lesson.coursemodule" [courseId]="courseId"></core-format-text>
</ion-badge>
</ion-col>
</ion-row>
@ -126,25 +126,25 @@
<!-- Essay or couldn't determine. -->
<ion-item text-wrap *ngIf="!answer[0].isCheckbox && !answer[0].isText && !answer[0].isSelect">
<p><core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]="answer[0]" contextLevel="module" [contextInstanceId]="lesson.coursemodule"></core-format-text></p>
<p><core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]="answer[0]" contextLevel="module" [contextInstanceId]="lesson.coursemodule" [courseId]="courseId"></core-format-text></p>
<ion-badge *ngIf="answer[1]" color="dark">
<core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]="answer[1]" contextLevel="module" [contextInstanceId]="lesson.coursemodule"></core-format-text>
<core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]="answer[1]" contextLevel="module" [contextInstanceId]="lesson.coursemodule" [courseId]="courseId"></core-format-text>
</ion-badge>
</ion-item>
</div>
<ion-item text-wrap *ngIf="!page.isContent && !page.isQuestion">
<!-- Another page (end of branch, ...). -->
<p><core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]="answer[0]" contextLevel="module" [contextInstanceId]="lesson.coursemodule"></core-format-text></p>
<p><core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]="answer[0]" contextLevel="module" [contextInstanceId]="lesson.coursemodule" [courseId]="courseId"></core-format-text></p>
<ion-badge *ngIf="answer[1]" color="dark">
<core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]="answer[1]" contextLevel="module" [contextInstanceId]="lesson.coursemodule"></core-format-text>
<core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]="answer[1]" contextLevel="module" [contextInstanceId]="lesson.coursemodule" [courseId]="courseId"></core-format-text>
</ion-badge>
</ion-item>
</div>
<ion-item text-wrap *ngIf="page.answerdata.response">
<p class="item-heading">{{ 'addon.mod_lesson.response' | translate }}</p>
<p><core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]="page.answerdata.response" contextLevel="module" [contextInstanceId]="lesson.coursemodule"></core-format-text></p>
<p><core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]="page.answerdata.response" contextLevel="module" [contextInstanceId]="lesson.coursemodule" [courseId]="courseId"></core-format-text></p>
</ion-item>
<ion-item text-wrap *ngIf="page.answerdata.score">
<p>{{page.answerdata.score}}</p>

View File

@ -11,7 +11,7 @@
<!-- Content. -->
<core-loading [hideUntil]="loaded" class="core-loading-center safe-area-page">
<core-course-module-description *ngIf="lti && lti.showdescriptionlaunch" [description]="description" [component]="component" [componentId]="componentId" contextLevel="module" [contextInstanceId]="module.id"></core-course-module-description>
<core-course-module-description *ngIf="lti && lti.showdescriptionlaunch" [description]="description" [component]="component" [componentId]="componentId" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-course-module-description>
<div padding>
<button ion-button block icon-left (click)="launch()">

View File

@ -1,6 +1,6 @@
<ion-header>
<ion-navbar core-back-button>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id"></core-format-text></ion-title>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text></ion-title>
<ion-buttons end>
<!-- The buttons defined by the component will be added in here. -->

View File

@ -13,10 +13,10 @@
<!-- Content. -->
<core-loading [hideUntil]="loaded" class="core-loading-center safe-area-page">
<core-course-module-description *ngIf="displayDescription" [description]="description" [component]="component" [componentId]="componentId" contextLevel="module" [contextInstanceId]="module.id"></core-course-module-description>
<core-course-module-description *ngIf="displayDescription" [description]="description" [component]="component" [componentId]="componentId" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-course-module-description>
<div padding>
<core-format-text [component]="component" [componentId]="componentId" [text]="contents" contextLevel="module" [contextInstanceId]="module.id"></core-format-text>
<core-format-text [component]="component" [componentId]="componentId" [text]="contents" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text>
<p padding-bottom class="addon-mod_page-timemodified" *ngIf="displayTimemodified && page && page.timemodified">
{{ 'core.lastmodified' | translate}}: {{ page.timemodified * 1000 | coreFormatDate }}
</p>

View File

@ -1,6 +1,6 @@
<ion-header>
<ion-navbar core-back-button>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id"></core-format-text></ion-title>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text></ion-title>
<ion-buttons end>
<!-- The buttons defined by the component will be added in here. -->

View File

@ -14,7 +14,7 @@
<!-- Content. -->
<core-loading [hideUntil]="loaded" class="core-loading-center">
<core-course-module-description [description]="description" [component]="component" [componentId]="componentId" contextLevel="module" [contextInstanceId]="module.id"></core-course-module-description>
<core-course-module-description [description]="description" [component]="component" [componentId]="componentId" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-course-module-description>
<!-- Access rules description messages. -->
<ion-card *ngIf="(quiz && quiz.gradeMethodReadable) || (accessRules && accessRules.length) || syncTime">
@ -73,11 +73,11 @@
<ion-item text-wrap *ngIf="gradeOverridden">{{ 'core.course.overriddennotice' | translate }}</ion-item>
<ion-item text-wrap *ngIf="gradebookFeedback">
<p class="item-heading">{{ 'addon.mod_quiz.comment' | translate }}</p>
<p><core-format-text [component]="component" [componentId]="componentId" [text]="gradebookFeedback" contextLevel="module" [contextInstanceId]="module.id"></core-format-text></p>
<p><core-format-text [component]="component" [componentId]="componentId" [text]="gradebookFeedback" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text></p>
</ion-item>
<ion-item text-wrap *ngIf="quiz.showFeedbackColumn && overallFeedback">
<p class="item-heading">{{ 'addon.mod_quiz.overallfeedback' | translate }}</p>
<p><core-format-text [component]="component" [componentId]="componentId" [text]="overallFeedback" contextLevel="module" [contextInstanceId]="module.id"></core-format-text></p>
<p><core-format-text [component]="component" [componentId]="componentId" [text]="overallFeedback" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text></p>
</ion-item>
</ion-list>
</ion-card>

View File

@ -1,6 +1,6 @@
<ion-header>
<ion-navbar core-back-button>
<ion-title><core-format-text *ngIf="quiz" [text]="quiz.name" contextLevel="module" [contextInstanceId]="quiz.coursemodule"></core-format-text></ion-title>
<ion-title><core-format-text *ngIf="quiz" [text]="quiz.name" contextLevel="module" [contextInstanceId]="quiz.coursemodule" [courseId]="courseId"></core-format-text></ion-title>
</ion-navbar>
</ion-header>
<ion-content>
@ -28,7 +28,7 @@
</ion-item>
<ion-item text-wrap no-lines *ngIf="quiz.showFeedbackColumn && attempt.feedback">
<h2>{{ 'addon.mod_quiz.feedback' | translate }}</h2>
<p><core-format-text [component]="component" [componentId]="componentId" [text]="attempt.feedback" contextLevel="module" [contextInstanceId]="quiz.coursemodule"></core-format-text></p>
<p><core-format-text [component]="component" [componentId]="componentId" [text]="attempt.feedback" contextLevel="module" [contextInstanceId]="quiz.coursemodule" [courseId]="courseId"></core-format-text></p>
</ion-item>
<ion-item *ngIf="quiz.showReviewColumn && attempt.finished">
<button ion-button block icon-start [navPush]="'AddonModQuizReviewPage'" [navParams]="{courseId: courseId, quizId: quiz.id, attemptId: attempt.id}">

View File

@ -1,6 +1,6 @@
<ion-header>
<ion-navbar core-back-button>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id"></core-format-text></ion-title>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text></ion-title>
<ion-buttons end>
<!-- The buttons defined by the component will be added in here. -->

View File

@ -1,6 +1,6 @@
<ion-header>
<ion-navbar core-back-button>
<ion-title><core-format-text *ngIf="quiz" [text]="quiz.name" contextLevel="module" [contextInstanceId]="quiz.coursemodule"></core-format-text></ion-title>
<ion-title><core-format-text *ngIf="quiz" [text]="quiz.name" contextLevel="module" [contextInstanceId]="quiz.coursemodule" [courseId]="courseId"></core-format-text></ion-title>
<ion-buttons end>
<button id="addon-mod_quiz-connection-error-button" ion-button icon-only [hidden]="!autoSaveError" (click)="showConnectionError($event)" [attr.aria-label]="'core.error' | translate">
@ -58,7 +58,7 @@
</ion-note>
</ion-item-divider>
<!-- Body of the question. -->
<core-question text-wrap [question]="question" [component]="component" [componentId]="quiz.coursemodule" [attemptId]="attempt.id" [usageId]="attempt.uniqueid" [offlineEnabled]="offline" contextLevel="module" [contextInstanceId]="quiz.coursemodule" (onAbort)="abortQuiz()" (buttonClicked)="behaviourButtonClicked($event)"></core-question>
<core-question text-wrap [question]="question" [component]="component" [componentId]="quiz.coursemodule" [attemptId]="attempt.id" [usageId]="attempt.uniqueid" [offlineEnabled]="offline" contextLevel="module" [contextInstanceId]="quiz.coursemodule" [courseId]="courseId" (onAbort)="abortQuiz()" (buttonClicked)="behaviourButtonClicked($event)"></core-question>
</ion-card>
</div>
</form>

View File

@ -54,7 +54,7 @@
</ion-item>
<ion-item text-wrap no-lines *ngFor="let data of additionalData">
<h2>{{ data.title }}</h2>
<core-format-text [component]="component" [componentId]="componentId" [text]="data.content" contextLevel="module" [contextInstanceId]="quiz.coursemodule"></core-format-text>
<core-format-text [component]="component" [componentId]="componentId" [text]="data.content" contextLevel="module" [contextInstanceId]="quiz.coursemodule" [courseId]="courseId"></core-format-text>
</ion-item>
</ion-list>
</ion-card>
@ -77,7 +77,7 @@
</ion-note>
</ion-item-divider>
<!-- Body of the question. -->
<core-question text-wrap [question]="question" [component]="component" [componentId]="componentId" [attemptId]="attempt.id" [usageId]="attempt.uniqueid" [offlineEnabled]="false" contextLevel="module" [contextInstanceId]="quiz.coursemodule"></core-question>
<core-question text-wrap [question]="question" [component]="component" [componentId]="componentId" [attemptId]="attempt.id" [usageId]="attempt.uniqueid" [offlineEnabled]="false" contextLevel="module" [contextInstanceId]="quiz.coursemodule" [courseId]="courseId"></core-question>
</ion-card>
</div>

View File

@ -13,7 +13,7 @@
<!-- Content. -->
<core-loading [hideUntil]="loaded" class="core-loading-center safe-area-page">
<core-course-module-description *ngIf="mode != 'iframe' && (mode != 'embedded' || displayDescription)" [description]="description" [component]="component" [componentId]="componentId" contextLevel="module" [contextInstanceId]="module.id"></core-course-module-description>
<core-course-module-description *ngIf="mode != 'iframe' && (mode != 'embedded' || displayDescription)" [description]="description" [component]="component" [componentId]="componentId" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-course-module-description>
<ng-container *ngIf="mode == 'iframe'">
<core-iframe [src]="src"></core-iframe>

View File

@ -1,6 +1,6 @@
<ion-header>
<ion-navbar core-back-button>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id"></core-format-text></ion-title>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text></ion-title>
<ion-buttons end>
<!-- The buttons defined by the component will be added in here. -->

View File

@ -14,7 +14,7 @@
<!-- Content. -->
<core-loading [hideUntil]="loaded" class="core-loading-center">
<core-course-module-description [description]="description" [component]="component" [componentId]="componentId" contextLevel="module" [contextInstanceId]="module.id"></core-course-module-description>
<core-course-module-description [description]="description" [component]="component" [componentId]="componentId" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-course-module-description>
<!-- Warning message. -->
<div *ngIf="scorm && scorm.warningMessage" class="core-info-card" icon-start>
@ -98,8 +98,8 @@
<div *ngFor="let sco of toc" class="core-padding-{{sco.level}}">
<p *ngIf="sco.isvisible">
<img [src]="sco.image.url" [alt]="sco.image.description" />
<a *ngIf="sco.prereq && sco.launch" (click)="open($event, sco.id)"><core-format-text [text]="sco.title" contextLevel="module" [contextInstanceId]="module.id"></core-format-text></a>
<span *ngIf="!sco.prereq || !sco.launch"><core-format-text [text]="sco.title" contextLevel="module" [contextInstanceId]="module.id"></core-format-text></span>
<a *ngIf="sco.prereq && sco.launch" (click)="open($event, sco.id)"><core-format-text [text]="sco.title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text></a>
<span *ngIf="!sco.prereq || !sco.launch"><core-format-text [text]="sco.title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text></span>
</p>
</div>
</ion-item>

View File

@ -1,6 +1,6 @@
<ion-header>
<ion-navbar core-back-button>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id"></core-format-text></ion-title>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text></ion-title>
<ion-buttons end>
<!-- The buttons defined by the component will be added in here. -->

View File

@ -1,6 +1,6 @@
<ion-header>
<ion-navbar core-back-button>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="scorm.coursemodule"></core-format-text></ion-title>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="scorm.coursemodule" [courseId]="scorm.course"></core-format-text></ion-title>
<ion-buttons end>
<button *ngIf="showToc && !loadingToc && toc && toc.length" ion-button icon-only (click)="openToc($event)"[attr.aria-label]="'addon.mod_scorm.toc' | translate" aria-haspopup="true">

View File

@ -393,7 +393,8 @@ export class AddonModScormPlayerPage implements OnInit, OnDestroy {
attemptToContinue: this.attemptToContinue,
mode: this.mode,
selected: this.currentSco && this.currentSco.id,
moduleId: this.scorm.coursemodule
moduleId: this.scorm.coursemodule,
courseId: this.scorm.course
}, { cssClass: 'core-modal-lateral',
showBackdrop: true,
enableBackdropDismiss: true,

View File

@ -25,7 +25,7 @@
<ng-container *ngFor="let sco of toc">
<a *ngIf="sco.isvisible" ion-item text-wrap [ngClass]="'core-padding-' + sco.level" [class.core-nav-item-selected]="selected == sco.id" (click)="loadSco(sco)" [attr.disabled]="!sco.prereq || !sco.launch ? true : null" [attr.detail-none]="!sco.prereq || !sco.launch ? true : null">
<img [src]="sco.image.url" [alt]="sco.image.description" />
<core-format-text [text]="sco.title" contextLevel="module" [contextInstanceId]="moduleId"></core-format-text>
<core-format-text [text]="sco.title" contextLevel="module" [contextInstanceId]="moduleId" [courseId]="courseId"></core-format-text>
</a>
</ng-container>
</ion-list>

View File

@ -31,11 +31,13 @@ export class AddonModScormTocPage {
attemptToContinue: number;
selected: number;
moduleId: number;
courseId: number;
constructor(navParams: NavParams, private viewCtrl: ViewController) {
this.toc = navParams.get('toc') || [];
this.attemptToContinue = navParams.get('attemptToContinue');
this.moduleId = navParams.get('moduleId');
this.courseId = navParams.get('courseId');
const mode = navParams.get('mode');
this.selected = navParams.get('selected');

View File

@ -14,7 +14,7 @@
<!-- Content. -->
<core-loading [hideUntil]="loaded" class="core-loading-center safe-area-page">
<core-course-module-description *ngIf="survey && !survey.surveydone && !hasOffline" [description]="description" [component]="component" [componentId]="componentId" contextLevel="module" [contextInstanceId]="module.id"></core-course-module-description>
<core-course-module-description *ngIf="survey && !survey.surveydone && !hasOffline" [description]="description" [component]="component" [componentId]="componentId" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-course-module-description>
<!-- Survey already done -->
<ion-card padding *ngIf="survey && survey.surveydone">

View File

@ -11,7 +11,7 @@
<!-- Content. -->
<core-loading [hideUntil]="loaded" class="core-loading-center">
<core-course-module-description *ngIf="displayDescription" [description]="description" [component]="component" [componentId]="componentId" contextLevel="module" [contextInstanceId]="module.id"></core-course-module-description>
<core-course-module-description *ngIf="displayDescription" [description]="description" [component]="component" [componentId]="componentId" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-course-module-description>
<div *ngIf="shouldIframe || (shouldEmbed && isOther)" class="addon-mod_url-embedded-url">
<core-iframe [src]="url"></core-iframe>

View File

@ -25,7 +25,7 @@
<!-- Content. -->
<core-loading [hideUntil]="loaded" class="core-loading-center">
<div padding *ngIf="description || pageIsOffline || hasOffline || pageWarning">
<core-course-module-description [description]="description" [component]="component" [componentId]="componentId" contextLevel="module" [contextInstanceId]="module.id"></core-course-module-description>
<core-course-module-description [description]="description" [component]="component" [componentId]="componentId" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-course-module-description>
<!-- Wiki has something offline. -->
<div class="core-warning-card" icon-start *ngIf="pageIsOffline || hasOffline">
@ -42,7 +42,7 @@
</div>
<div padding class="addon-mod_wiki-page-content">
<article [ngClass]="{'addon-mod_wiki-noedit': !canEdit}">
<core-format-text *ngIf="pageContent" [component]="component" [componentId]="componentId" [text]="pageContent" contextLevel="module" [contextInstanceId]="module.id"></core-format-text>
<core-format-text *ngIf="pageContent" [component]="component" [componentId]="componentId" [text]="pageContent" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text>
<core-empty-box *ngIf="!pageContent" icon="document" [message]="'addon.mod_wiki.nocontent' | translate" [inline]="true"></core-empty-box>
</article>

View File

@ -553,7 +553,8 @@ export class AddonModWikiIndexComponent extends CoreCourseModuleMainActivityComp
pages: this.subwikiPages,
selected: this.currentPageObj && this.currentPageObj.id,
homeView: this.getWikiHomeView(),
moduleId: this.module.id
moduleId: this.module.id,
courseId: this.courseId
}, { cssClass: 'core-modal-lateral',
showBackdrop: true,
enableBackdropDismiss: true,

View File

@ -1,6 +1,6 @@
<ion-header>
<ion-navbar core-back-button>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id"></core-format-text></ion-title>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text></ion-title>
<ion-buttons end>
<button ion-button clear (click)="save()" [attr.aria-label]="'core.save' | translate">

View File

@ -1,6 +1,6 @@
<ion-header>
<ion-navbar core-back-button>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id"></core-format-text></ion-title>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text></ion-title>
<ion-buttons end>
<!-- The buttons defined by the component will be added in here. -->

View File

@ -20,7 +20,7 @@
{{ letter.label }}
</ion-item-divider>
<a ion-item text-wrap *ngFor="let page of letter.pages" (click)="goToPage(page)" [class.core-nav-item-selected]="selected == page.id">
<ion-icon name="home" item-start *ngIf="page.firstpage"></ion-icon> <core-format-text [text]="page.title" contextLevel="module" [contextInstanceId]="moduleId"></core-format-text>
<ion-icon name="home" item-start *ngIf="page.firstpage"></ion-icon> <core-format-text [text]="page.title" contextLevel="module" [contextInstanceId]="moduleId" [courseId]="courseId"></core-format-text>
<ion-note *ngIf="!page.id" item-end>
<ion-icon name="time"></ion-icon>
<span text-wrap>{{ 'core.notsent' | translate }}</span>

View File

@ -27,6 +27,7 @@ export class AddonModWikiMapPage {
map: any[] = []; // Map of pages, categorized by letter.
selected: number;
moduleId: number;
courseId: number;
homeView: ViewController;
constructor(navParams: NavParams, protected viewCtrl: ViewController) {
@ -35,6 +36,7 @@ export class AddonModWikiMapPage {
this.selected = navParams.get('selected');
this.homeView = navParams.get('homeView');
this.moduleId = navParams.get('moduleId');
this.courseId = navParams.get('courseId');
}
/**

View File

@ -2,7 +2,7 @@
<ion-card *ngIf="n < assessment.form.dimenssionscount">
<ion-item text-wrap>
<h2>{{ field.dimtitle }}</h2>
<core-format-text [text]="field.description" contextLevel="module" [contextInstanceId]="moduleId"></core-format-text>
<core-format-text [text]="field.description" contextLevel="module" [contextInstanceId]="moduleId" [courseId]="courseId"></core-format-text>
</ion-item>
<ion-item *ngIf="edit && field.grades">
<ion-label [core-mark-required]="true" stacked>{{ 'addon.mod_workshop_assessment_accumulative.dimensiongradefor' | translate : {'$a': field.dimtitle } }}</ion-label>
@ -23,7 +23,7 @@
</ion-item>
<ion-item *ngIf="!edit" text-wrap>
<h2>{{ 'addon.mod_workshop_assessment_accumulative.dimensioncommentfor' | translate : {'$a': field.dimtitle } }}</h2>
<p><core-format-text [text]="selectedValues[n].peercomment" contextLevel="module" [contextInstanceId]="moduleId"></core-format-text></p>
<p><core-format-text [text]="selectedValues[n].peercomment" contextLevel="module" [contextInstanceId]="moduleId" [courseId]="courseId"></core-format-text></p>
</ion-item>
</ion-card>
</ng-container>

View File

@ -2,7 +2,7 @@
<ion-card *ngIf="n < assessment.form.dimenssionscount">
<ion-item text-wrap>
<h2>{{ field.dimtitle }}</h2>
<core-format-text [text]="field.description" contextLevel="module" [contextInstanceId]="moduleId"></core-format-text>
<core-format-text [text]="field.description" contextLevel="module" [contextInstanceId]="moduleId" [courseId]="courseId"></core-format-text>
</ion-item>
<ion-item *ngIf="edit">
<ion-label stacked [core-mark-required]="true">{{ 'addon.mod_workshop_assessment_comments.dimensioncommentfor' | translate : {'$a': field.dimtitle } }}</ion-label>
@ -11,7 +11,7 @@
</ion-item>
<ion-item *ngIf="!edit" text-wrap>
<h2>{{ 'addon.mod_workshop_assessment_comments.dimensioncommentfor' | translate : {'$a': field.dimtitle } }}</h2>
<p><core-format-text [text]="selectedValues[n].peercomment" contextLevel="module" [contextInstanceId]="moduleId"></core-format-text></p>
<p><core-format-text [text]="selectedValues[n].peercomment" contextLevel="module" [contextInstanceId]="moduleId" [courseId]="courseId"></core-format-text></p>
</ion-item>
</ion-card>
</ng-container>

View File

@ -2,7 +2,7 @@
<ion-card *ngIf="n < assessment.form.dimenssionscount">
<ion-item text-wrap>
<h2>{{ field.dimtitle }}</h2>
<core-format-text [text]="field.description" contextLevel="module" [contextInstanceId]="moduleId"></core-format-text>
<core-format-text [text]="field.description" contextLevel="module" [contextInstanceId]="moduleId" [courseId]="courseId"></core-format-text>
</ion-item>
<ion-list radio-group [(ngModel)]="selectedValues[n].grade" [name]="'grade_' + n">
<ion-item>
@ -24,7 +24,7 @@
</ion-item>
<ion-item *ngIf="!edit" text-wrap>
<h2>{{ 'addon.mod_workshop_assessment_numerrors.dimensioncommentfor' | translate : {'$a': field.dimtitle } }}</h2>
<p><core-format-text [text]="selectedValues[n].peercomment" contextLevel="module" [contextInstanceId]="moduleId"></core-format-text></p>
<p><core-format-text [text]="selectedValues[n].peercomment" contextLevel="module" [contextInstanceId]="moduleId" [courseId]="courseId"></core-format-text></p>
</ion-item>
</ion-card>
</ng-container>

View File

@ -2,12 +2,12 @@
<ion-card *ngIf="n < assessment.form.dimenssionscount">
<ion-item text-wrap>
<h2 [core-mark-required]="edit">{{ field.dimtitle }}</h2>
<core-format-text [text]="field.description" contextLevel="module" [contextInstanceId]="moduleId"></core-format-text>
<core-format-text [text]="field.description" contextLevel="module" [contextInstanceId]="moduleId" [courseId]="courseId"></core-format-text>
<core-input-errors *ngIf="edit && fieldErrors['chosenlevelid_' + n]" [errorText]="fieldErrors['chosenlevelid_' + n]"></core-input-errors>
</ion-item>
<ion-list radio-group [(ngModel)]="selectedValues[n].chosenlevelid" [name]="'chosenlevelid_' + n">
<ion-item *ngFor="let subfield of field.fields">
<ion-label><p><core-format-text [text]="subfield.definition" contextLevel="module" [contextInstanceId]="moduleId"></core-format-text></p></ion-label>
<ion-label><p><core-format-text [text]="subfield.definition" contextLevel="module" [contextInstanceId]="moduleId" [courseId]="courseId"></core-format-text></p></ion-label>
<ion-radio [value]="subfield.levelid" [disabled]="!edit"></ion-radio>
</ion-item>
</ion-list>

View File

@ -25,6 +25,7 @@ export class AddonModWorkshopAssessmentStrategyComponentBase {
@Input() fieldErrors: any;
@Input() strategy: string;
@Input() moduleId: number;
@Input() courseId: number;
constructor() {
// Nothing to do.

View File

@ -28,7 +28,7 @@
</ion-select>
</ion-item>
<ion-item text-wrap *ngIf="!edit && data.assessment.feedbackauthor">
<core-format-text [component]="component" [componentId]="componentId" [text]="data.assessment.feedbackauthor" contextLevel="module" [contextInstanceId]="workshop.coursemodule"></core-format-text>
<core-format-text [component]="component" [componentId]="componentId" [text]="data.assessment.feedbackauthor" contextLevel="module" [contextInstanceId]="workshop.coursemodule" [courseId]="workshop.course"></core-format-text>
</ion-item>
<ion-item *ngIf="!edit && workshop.overallfeedbackfiles && data.assessment.feedbackattachmentfiles && data.assessment.feedbackattachmentfiles.length">
<div no-lines>

View File

@ -52,7 +52,8 @@ export class AddonModWorkshopAssessmentStrategyComponent implements OnInit {
selectedValues: [],
fieldErrors: {},
strategy: '',
moduleId: 0
moduleId: 0,
courseId: null
};
assessmentStrategyLoaded = false;
notSupported = false;
@ -103,6 +104,7 @@ export class AddonModWorkshopAssessmentStrategyComponent implements OnInit {
this.data.edit = this.edit;
this.data.strategy = this.strategy;
this.data.moduleId = this.workshop.coursemodule;
this.data.courseId = this.workshop.course;
this.componentClass = this.strategyDelegate.getComponentForPlugin(this.injector, this.strategy);
if (this.componentClass) {

View File

@ -41,7 +41,7 @@
<ion-card *ngIf="description && workshop && workshop.phase == workshopPhases.PHASE_SETUP">
<ion-item text-wrap>
<h2>{{ 'core.description' | translate }}</h2>
<core-format-text [text]="description" [component]="component" [componentId]="componentId" contextLevel="module" [contextInstanceId]="module.id"></core-format-text>
<core-format-text [text]="description" [component]="component" [componentId]="componentId" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text>
</ion-item>
</ion-card>
@ -51,7 +51,7 @@
<ion-card *ngIf="workshop.conclusion">
<ion-item text-wrap>
<h2>{{ 'addon.mod_workshop.conclusion' | translate }}</h2>
<core-format-text fullOnClick="true" [component]="component" [componentId]="module.id" [text]="workshop.conclusion" contextLevel="module" [contextInstanceId]="module.id"></core-format-text>
<core-format-text fullOnClick="true" [component]="component" [componentId]="module.id" [text]="workshop.conclusion" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text>
</ion-item>
</ion-card>
@ -74,7 +74,7 @@
<ion-card *ngIf="workshop.phase == workshopPhases.PHASE_SUBMISSION && workshop.instructauthors">
<ion-item text-wrap>
<h2>{{ 'addon.mod_workshop.areainstructauthors' | translate }}</h2>
<core-format-text fullOnClick="true" [component]="component" [componentId]="module.id" [text]="workshop.instructauthors" contextLevel="module" [contextInstanceId]="module.id"></core-format-text>
<core-format-text fullOnClick="true" [component]="component" [componentId]="module.id" [text]="workshop.instructauthors" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text>
</ion-item>
</ion-card>
@ -122,7 +122,7 @@
<ion-card *ngIf="workshop.phase == workshopPhases.PHASE_ASSESSMENT && workshop.instructreviewers">
<ion-item text-wrap>
<h2>{{ 'addon.mod_workshop.areainstructreviewers' | translate }}</h2>
<core-format-text fullOnClick="true" [component]="component" [componentId]="module.id" [text]="workshop.instructreviewers" contextLevel="module" [contextInstanceId]="module.id"></core-format-text>
<core-format-text fullOnClick="true" [component]="component" [componentId]="module.id" [text]="workshop.instructreviewers" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text>
</ion-item>
</ion-card>

View File

@ -2,7 +2,7 @@
<div *ngIf="!summary">
<ion-list-header text-wrap>
<ion-avatar core-user-avatar [user]="profile" [courseId]="courseId" [userId]="profile && profile.id" item-start></ion-avatar>
<h2><core-format-text [text]="submission.title" contextLevel="module" [contextInstanceId]="module.id"></core-format-text></h2>
<h2><core-format-text [text]="submission.title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text></h2>
<p *ngIf="profile && profile.fullname">{{profile.fullname}}</p>
<p *ngIf="showGrade(submission.submissiongrade)" [class.addon-has-overriden-grade]="showGrade(submission.submissiongradeover)">
{{ 'addon.mod_workshop.submissiongradeof' | translate:{$a: workshop.grade } }}: {{submission.submissiongrade}}
@ -23,7 +23,7 @@
</ion-note>
</ion-list-header>
<ion-item text-wrap *ngIf="submission.content">
<core-format-text [component]="component" [componentId]="componentId" [text]="submission.content" contextLevel="module" [contextInstanceId]="module.id"></core-format-text>
<core-format-text [component]="component" [componentId]="componentId" [text]="submission.content" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text>
</ion-item>
<ion-item *ngFor="let attachment of submission.attachmentfiles">
<!-- Files already attached to the submission. -->
@ -35,7 +35,7 @@
<ion-avatar *ngIf="evaluateByProfile" core-user-avatar [user]="evaluateByProfile" item-start [courseId]="courseId" [userId]="evaluateByProfile.id"></ion-avatar>
<h2 *ngIf="evaluateByProfile && evaluateByProfile.fullname">{{ 'addon.mod_workshop.feedbackby' | translate : {$a: evaluateByProfile.fullname} }}</h2>
<core-format-text [text]="submission.feedbackauthor" contextLevel="module" [contextInstanceId]="module.id"></core-format-text>
<core-format-text [text]="submission.feedbackauthor" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text>
</ion-item>
<ion-item *ngIf="viewDetails">
<button ion-button block (click)="gotoSubmission()">
@ -48,7 +48,7 @@
<a ion-item text-wrap *ngIf="summary" [attr.detail-none]="submission.timemodified ? null : true" (click)="gotoSubmission()">
<ion-avatar core-user-avatar [user]="profile" item-start [courseId]="courseId" [userId]="profile && profile.id"></ion-avatar>
<h2><core-format-text [text]="submission.title" contextLevel="module" [contextInstanceId]="module.id"></core-format-text></h2>
<h2><core-format-text [text]="submission.title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text></h2>
<p *ngIf="profile && profile.fullname">{{profile.fullname}}</p>
<p *ngIf="submission.reviewedbycount">
{{ 'addon.mod_workshop.receivedgrades' | translate }}: {{submission.reviewedbycount}} / {{submission.reviewedby.length}}

View File

@ -1,6 +1,6 @@
<ion-header>
<ion-navbar core-back-button>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="workshop && workshop.coursemodule"></core-format-text></ion-title>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="workshop && workshop.coursemodule" [courseId]="courseId"></core-format-text></ion-title>
<ion-buttons end [hidden]="!evaluating">
<button ion-button clear (click)="saveEvaluation()" [attr.aria-label]="'core.save' | translate">
{{ 'core.save' | translate }}
@ -67,7 +67,7 @@
<ion-item text-wrap>
<ion-avatar core-user-avatar *ngIf="evaluateGradingByProfile" [user]="evaluateGradingByProfile" item-start [courseId]="courseId" [userId]="evaluateGradingByProfile.id"></ion-avatar>
<h2 *ngIf="evaluateGradingByProfile && evaluateGradingByProfile.fullname">{{ 'addon.mod_workshop.feedbackby' | translate : {$a: evaluateGradingByProfile.fullname} }}</h2>
<core-format-text [text]="evaluate.text" contextLevel="module" [contextInstanceId]="workshop.coursemodule"></core-format-text>
<core-format-text [text]="evaluate.text" contextLevel="module" [contextInstanceId]="workshop.coursemodule" [courseId]="courseId"></core-format-text>
</ion-item>
</ion-list>
</core-loading>

View File

@ -1,6 +1,6 @@
<ion-header>
<ion-navbar core-back-button>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id"></core-format-text></ion-title>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text></ion-title>
<ion-buttons end>
<!-- The buttons defined by the component will be added in here. -->

View File

@ -1,6 +1,6 @@
<ion-header>
<ion-navbar core-back-button>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id"></core-format-text></ion-title>
<ion-title><core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text></ion-title>
<ion-buttons end [hidden]="!loaded">
<button *ngIf="assessmentId && access.assessingallowed" ion-button clear (click)="saveAssessment()" [attr.aria-label]="'core.save' | translate">
{{ 'core.save' | translate }}
@ -38,7 +38,7 @@
<ion-item text-wrap>
<ion-avatar core-user-avatar *ngIf="evaluateByProfile" [user]="evaluateByProfile" item-start [courseId]="courseId" [userId]="evaluateByProfile.id"></ion-avatar>
<h2 *ngIf="evaluateByProfile && evaluateByProfile.fullname">{{ 'addon.mod_workshop.feedbackby' | translate : {$a: evaluateByProfile.fullname} }}</h2>
<core-format-text [text]="evaluate.text" contextLevel="module" [contextInstanceId]="module.id"></core-format-text>
<core-format-text [text]="evaluate.text" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text>
</ion-item>
</ion-list>
@ -97,7 +97,7 @@
<ion-item text-wrap>
<ion-avatar core-user-avatar *ngIf="evaluateGradingByProfile" [user]="evaluateGradingByProfile" item-start [courseId]="courseId" [userId]="evaluateGradingByProfile.id"></ion-avatar>
<h2 *ngIf="evaluateGradingByProfile && evaluateGradingByProfile.fullname">{{ 'addon.mod_workshop.feedbackby' | translate : {$a: evaluateGradingByProfile.fullname} }}</h2>
<core-format-text [text]="assessment.feedbackreviewer" contextLevel="module" [contextInstanceId]="module.id"></core-format-text>
<core-format-text [text]="assessment.feedbackreviewer" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text>
</ion-item>
</ion-list>
</core-loading>

View File

@ -1,6 +1,6 @@
<section ion-list class="addon-qtype-calculated-container" *ngIf="question.text || question.text === ''">
<ion-item text-wrap>
<p><core-format-text [component]="component" [componentId]="componentId" [text]="question.text" [contextLevel]="contextLevel" [contextInstanceId]="contextInstanceId"></core-format-text></p>
<p><core-format-text [component]="component" [componentId]="componentId" [text]="question.text" [contextLevel]="contextLevel" [contextInstanceId]="contextInstanceId" [courseId]="courseId"></core-format-text></p>
</ion-item>
<!-- Display unit options before the answer input. -->

View File

@ -7,7 +7,7 @@
<ion-icon name="information-circle"></ion-icon>
{{ 'core.question.howtodraganddrop' | translate }}
</p>
<p><core-format-text [component]="component" [componentId]="componentId" [text]="question.text" [contextLevel]="contextLevel" [contextInstanceId]="contextInstanceId"></core-format-text></p>
<p><core-format-text [component]="component" [componentId]="componentId" [text]="question.text" [contextLevel]="contextLevel" [contextInstanceId]="contextInstanceId" [courseId]="courseId"></core-format-text></p>
<core-format-text *ngIf="question.ddArea" [adaptImg]="false" [component]="component" [componentId]="componentId" [text]="question.ddArea" [filter]="false" (afterRender)="questionRendered()"></core-format-text>
</ion-item>
</section>

View File

@ -7,7 +7,7 @@
<ion-icon name="information-circle"></ion-icon>
{{ 'core.question.howtodraganddrop' | translate }}
</p>
<p><core-format-text [component]="component" [componentId]="componentId" [text]="question.text" #questiontext [contextLevel]="contextLevel" [contextInstanceId]="contextInstanceId"></core-format-text></p>
<p><core-format-text [component]="component" [componentId]="componentId" [text]="question.text" #questiontext [contextLevel]="contextLevel" [contextInstanceId]="contextInstanceId" [courseId]="courseId"></core-format-text></p>
<core-format-text *ngIf="question.ddArea" [adaptImg]="false" [component]="component" [componentId]="componentId" [text]="question.ddArea" [filter]="false" (afterRender)="questionRendered()"></core-format-text>
</ion-item>
</section>

View File

@ -7,7 +7,7 @@
<ion-icon name="information-circle"></ion-icon>
{{ 'core.question.howtodraganddrop' | translate }}
</p>
<p><core-format-text [component]="component" [componentId]="componentId" [text]="question.text" [contextLevel]="contextLevel" [contextInstanceId]="contextInstanceId" #questiontext></core-format-text></p>
<p><core-format-text [component]="component" [componentId]="componentId" [text]="question.text" [contextLevel]="contextLevel" [contextInstanceId]="contextInstanceId" [courseId]="courseId" #questiontext></core-format-text></p>
<core-format-text *ngIf="question.answers" [component]="component" [componentId]="componentId" [text]="question.answers" [filter]="false" (afterRender)="questionRendered()"></core-format-text>
<div class="drags"></div>
</ion-item>

View File

@ -96,7 +96,7 @@ export class AddonQtypeDdwtosComponent extends CoreQuestionBaseComponent impleme
this.question, this.question.readOnly, this.inputIds, this.textUtils);
this.questionHelper.treatCorrectnessIconsClicks(this.element, this.component, this.componentId, this.contextLevel,
this.contextInstanceId);
this.contextInstanceId, this.courseId);
this.question.loaded = true;
});

Some files were not shown because too many files have changed in this diff Show More