MOBILE-3947 chore: Remove unneeded optional chaining on HTML
parent
a76b18a127
commit
8265f0fbe1
|
@ -5,7 +5,7 @@
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
<ion-title>
|
<ion-title>
|
||||||
<h1>
|
<h1>
|
||||||
<core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module?.id" [courseId]="courseId">
|
<core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId">
|
||||||
</core-format-text>
|
</core-format-text>
|
||||||
</h1>
|
</h1>
|
||||||
</ion-title>
|
</ion-title>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
<ion-title>
|
<ion-title>
|
||||||
<h1>
|
<h1>
|
||||||
<core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module?.id" [courseId]="courseId">
|
<core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId">
|
||||||
</core-format-text>
|
</core-format-text>
|
||||||
</h1>
|
</h1>
|
||||||
</ion-title>
|
</ion-title>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
<ion-title>
|
<ion-title>
|
||||||
<h1>
|
<h1>
|
||||||
<core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module?.id" [courseId]="courseId">
|
<core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId">
|
||||||
</core-format-text>
|
</core-format-text>
|
||||||
</h1>
|
</h1>
|
||||||
</ion-title>
|
</ion-title>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
<ion-title>
|
<ion-title>
|
||||||
<h1>
|
<h1>
|
||||||
<core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module?.id" [courseId]="courseId">
|
<core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId">
|
||||||
</core-format-text>
|
</core-format-text>
|
||||||
</h1>
|
</h1>
|
||||||
</ion-title>
|
</ion-title>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
<ion-title>
|
<ion-title>
|
||||||
<h1>
|
<h1>
|
||||||
<core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module?.id" [courseId]="courseId">
|
<core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId">
|
||||||
</core-format-text>
|
</core-format-text>
|
||||||
</h1>
|
</h1>
|
||||||
</ion-title>
|
</ion-title>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
<ion-title>
|
<ion-title>
|
||||||
<h1>
|
<h1>
|
||||||
<core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module?.id" [courseId]="courseId">
|
<core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId">
|
||||||
</core-format-text>
|
</core-format-text>
|
||||||
</h1>
|
</h1>
|
||||||
</ion-title>
|
</ion-title>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
<ion-title>
|
<ion-title>
|
||||||
<h1>
|
<h1>
|
||||||
<core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module?.id" [courseId]="courseId">
|
<core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId">
|
||||||
</core-format-text>
|
</core-format-text>
|
||||||
</h1>
|
</h1>
|
||||||
</ion-title>
|
</ion-title>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
<ion-title>
|
<ion-title>
|
||||||
<h1>
|
<h1>
|
||||||
<core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module?.id" [courseId]="courseId">
|
<core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId">
|
||||||
</core-format-text>
|
</core-format-text>
|
||||||
</h1>
|
</h1>
|
||||||
</ion-title>
|
</ion-title>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
<ion-title>
|
<ion-title>
|
||||||
<h1>
|
<h1>
|
||||||
<core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module?.id" [courseId]="courseId">
|
<core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId">
|
||||||
</core-format-text>
|
</core-format-text>
|
||||||
</h1>
|
</h1>
|
||||||
</ion-title>
|
</ion-title>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
<ion-title>
|
<ion-title>
|
||||||
<h1>
|
<h1>
|
||||||
<core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module?.id" [courseId]="courseId">
|
<core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId">
|
||||||
</core-format-text>
|
</core-format-text>
|
||||||
</h1>
|
</h1>
|
||||||
</ion-title>
|
</ion-title>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
<ion-title>
|
<ion-title>
|
||||||
<h1>
|
<h1>
|
||||||
<core-format-text [text]="title" contextLevel="module" [contextInstanceId]="lesson?.coursemodule" [courseId]="courseId">
|
<core-format-text [text]="title" contextLevel="module" [contextInstanceId]="lesson.coursemodule" [courseId]="courseId">
|
||||||
</core-format-text>
|
</core-format-text>
|
||||||
</h1>
|
</h1>
|
||||||
</ion-title>
|
</ion-title>
|
||||||
|
@ -63,7 +63,7 @@
|
||||||
<ion-item-divider class="ion-text-wrap" *ngIf="pageContent">
|
<ion-item-divider class="ion-text-wrap" *ngIf="pageContent">
|
||||||
<ion-label>
|
<ion-label>
|
||||||
<h2>
|
<h2>
|
||||||
<core-format-text [component]="component" [componentId]="lesson?.coursemodule" [text]="pageContent"
|
<core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]="pageContent"
|
||||||
contextLevel="module" [contextInstanceId]="lesson.coursemodule" [courseId]="courseId">
|
contextLevel="module" [contextInstanceId]="lesson.coursemodule" [courseId]="courseId">
|
||||||
</core-format-text>
|
</core-format-text>
|
||||||
</h2>
|
</h2>
|
||||||
|
@ -87,8 +87,8 @@
|
||||||
<ion-item *ngIf="question.textarea">
|
<ion-item *ngIf="question.textarea">
|
||||||
<ion-label class="sr-only">{{ 'core.content' | translate }}</ion-label>
|
<ion-label class="sr-only">{{ 'core.content' | translate }}</ion-label>
|
||||||
<core-rich-text-editor placeholder="{{ 'addon.mod_lesson.youranswer' | translate }}"
|
<core-rich-text-editor placeholder="{{ 'addon.mod_lesson.youranswer' | translate }}"
|
||||||
[control]="question.control" [component]="component" [componentId]="lesson?.coursemodule"
|
[control]="question.control" [component]="component" [componentId]="lesson.coursemodule"
|
||||||
[autoSave]="true" contextLevel="module" [contextInstanceId]="lesson?.coursemodule"
|
[autoSave]="true" contextLevel="module" [contextInstanceId]="lesson.coursemodule"
|
||||||
elementId="answer_editor">
|
elementId="answer_editor">
|
||||||
</core-rich-text-editor>
|
</core-rich-text-editor>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
|
@ -96,8 +96,8 @@
|
||||||
<ion-label>
|
<ion-label>
|
||||||
<p class="item-heading">{{ 'addon.mod_lesson.youranswer' | translate }}</p>
|
<p class="item-heading">{{ 'addon.mod_lesson.youranswer' | translate }}</p>
|
||||||
<p>
|
<p>
|
||||||
<core-format-text [component]="component" [componentId]="lesson?.coursemodule"
|
<core-format-text [component]="component" [componentId]="lesson.coursemodule"
|
||||||
[text]="question.useranswer" contextLevel="module" [contextInstanceId]="lesson?.coursemodule"
|
[text]="question.useranswer" contextLevel="module" [contextInstanceId]="lesson.coursemodule"
|
||||||
[courseId]="courseId">
|
[courseId]="courseId">
|
||||||
</core-format-text>
|
</core-format-text>
|
||||||
</p>
|
</p>
|
||||||
|
@ -112,7 +112,7 @@
|
||||||
<ion-item class="ion-text-wrap" *ngFor="let option of question.options">
|
<ion-item class="ion-text-wrap" *ngFor="let option of question.options">
|
||||||
<ion-label>
|
<ion-label>
|
||||||
<core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]="option.text"
|
<core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]="option.text"
|
||||||
contextLevel="module" [contextInstanceId]="lesson?.coursemodule" [courseId]="courseId">
|
contextLevel="module" [contextInstanceId]="lesson.coursemodule" [courseId]="courseId">
|
||||||
</core-format-text>
|
</core-format-text>
|
||||||
</ion-label>
|
</ion-label>
|
||||||
<ion-radio slot="end" [id]="option.id" [value]="option.value" [disabled]="option.disabled">
|
<ion-radio slot="end" [id]="option.id" [value]="option.value" [disabled]="option.disabled">
|
||||||
|
@ -124,8 +124,8 @@
|
||||||
<ng-container *ngIf="question.multi">
|
<ng-container *ngIf="question.multi">
|
||||||
<ion-item class="ion-text-wrap" *ngFor="let option of question.options">
|
<ion-item class="ion-text-wrap" *ngFor="let option of question.options">
|
||||||
<ion-label>
|
<ion-label>
|
||||||
<core-format-text [component]="component" [componentId]="lesson?.coursemodule" [text]="option.text"
|
<core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]="option.text"
|
||||||
contextLevel="module" [contextInstanceId]="lesson?.coursemodule" [courseId]="courseId">
|
contextLevel="module" [contextInstanceId]="lesson.coursemodule" [courseId]="courseId">
|
||||||
</core-format-text>
|
</core-format-text>
|
||||||
</ion-label>
|
</ion-label>
|
||||||
<ion-checkbox [id]="option.id" [formControlName]="option.name" slot="end"></ion-checkbox>
|
<ion-checkbox [id]="option.id" [formControlName]="option.name" slot="end"></ion-checkbox>
|
||||||
|
@ -138,8 +138,8 @@
|
||||||
<ion-item class="ion-text-wrap" *ngFor="let row of question.rows">
|
<ion-item class="ion-text-wrap" *ngFor="let row of question.rows">
|
||||||
<ion-label>
|
<ion-label>
|
||||||
<p>
|
<p>
|
||||||
<core-format-text [component]="component" [componentId]="lesson?.coursemodule" [text]="row.text"
|
<core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]="row.text"
|
||||||
contextLevel="module" [contextInstanceId]="lesson?.coursemodule" [courseId]="courseId">
|
contextLevel="module" [contextInstanceId]="lesson.coursemodule" [courseId]="courseId">
|
||||||
</core-format-text>
|
</core-format-text>
|
||||||
</p>
|
</p>
|
||||||
</ion-label>
|
</ion-label>
|
||||||
|
@ -173,7 +173,7 @@
|
||||||
</ion-col>
|
</ion-col>
|
||||||
</ion-row>
|
</ion-row>
|
||||||
</ion-grid>
|
</ion-grid>
|
||||||
<ion-item class="ion-text-wrap" *ngIf="lesson?.progressbar && !canManage && pageData">
|
<ion-item class="ion-text-wrap" *ngIf="lesson.progressbar && !canManage && pageData">
|
||||||
<ion-label>
|
<ion-label>
|
||||||
<span id="addon-mod_lesson-{{cmId}}-progress">
|
<span id="addon-mod_lesson-{{cmId}}-progress">
|
||||||
{{ 'addon.mod_lesson.progresscompleted' | translate:{$a: pageData.progress} }}
|
{{ 'addon.mod_lesson.progresscompleted' | translate:{$a: pageData.progress} }}
|
||||||
|
@ -182,7 +182,7 @@
|
||||||
</core-progress-bar>
|
</core-progress-bar>
|
||||||
</ion-label>
|
</ion-label>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-card class="core-info-card" *ngIf="lesson?.progressbar && canManage">
|
<ion-card class="core-info-card" *ngIf="lesson.progressbar && canManage">
|
||||||
<ion-item class="ion-text-wrap">
|
<ion-item class="ion-text-wrap">
|
||||||
<ion-icon name="fas-circle-info" slot="start" aria-hidden="true"></ion-icon>
|
<ion-icon name="fas-circle-info" slot="start" aria-hidden="true"></ion-icon>
|
||||||
<ion-label>{{ 'addon.mod_lesson.progressbarteacherwarning2' | translate }}</ion-label>
|
<ion-label>{{ 'addon.mod_lesson.progressbarteacherwarning2' | translate }}</ion-label>
|
||||||
|
@ -253,14 +253,14 @@
|
||||||
<!-- If activity link was successfully formatted, render the button. -->
|
<!-- If activity link was successfully formatted, render the button. -->
|
||||||
<ion-button *ngIf="activityLink && activityLink.formatted" expand="block" fill="outline" [href]="activityLink.href"
|
<ion-button *ngIf="activityLink && activityLink.formatted" expand="block" fill="outline" [href]="activityLink.href"
|
||||||
core-link [capture]="true" class="ion-text-wrap ion-margin button-no-uppercase">
|
core-link [capture]="true" class="ion-text-wrap ion-margin button-no-uppercase">
|
||||||
<core-format-text [text]="activityLink.label" contextLevel="module" [contextInstanceId]="lesson?.coursemodule"
|
<core-format-text [text]="activityLink.label" contextLevel="module" [contextInstanceId]="lesson.coursemodule"
|
||||||
[courseId]="courseId">
|
[courseId]="courseId">
|
||||||
</core-format-text>
|
</core-format-text>
|
||||||
</ion-button>
|
</ion-button>
|
||||||
<ion-item class="ion-text-wrap" *ngIf="activityLink && !activityLink.formatted">
|
<ion-item class="ion-text-wrap" *ngIf="activityLink && !activityLink.formatted">
|
||||||
<!-- Activity link wasn't formatted, render the original link. -->
|
<!-- Activity link wasn't formatted, render the original link. -->
|
||||||
<ion-label>
|
<ion-label>
|
||||||
<core-format-text [text]="activityLink.label" contextLevel="module" [contextInstanceId]="lesson?.coursemodule"
|
<core-format-text [text]="activityLink.label" contextLevel="module" [contextInstanceId]="lesson.coursemodule"
|
||||||
[courseId]="courseId">
|
[courseId]="courseId">
|
||||||
</core-format-text>
|
</core-format-text>
|
||||||
</ion-label>
|
</ion-label>
|
||||||
|
@ -275,8 +275,8 @@
|
||||||
<ion-item class="ion-text-wrap" *ngIf="!processData.reviewmode || review">
|
<ion-item class="ion-text-wrap" *ngIf="!processData.reviewmode || review">
|
||||||
<ion-label>
|
<ion-label>
|
||||||
<div *ngIf="!processData.reviewmode">
|
<div *ngIf="!processData.reviewmode">
|
||||||
<core-format-text [component]="component" [componentId]="lesson?.coursemodule" [text]="processData.feedback"
|
<core-format-text [component]="component" [componentId]="lesson.coursemodule" [text]="processData.feedback"
|
||||||
contextLevel="module" [contextInstanceId]="lesson?.coursemodule" [courseId]="courseId">
|
contextLevel="module" [contextInstanceId]="lesson.coursemodule" [courseId]="courseId">
|
||||||
</core-format-text>
|
</core-format-text>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="review">
|
<div *ngIf="review">
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
<ion-title>
|
<ion-title>
|
||||||
<h1>
|
<h1>
|
||||||
<core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module?.id" [courseId]="courseId">
|
<core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId">
|
||||||
</core-format-text>
|
</core-format-text>
|
||||||
</h1>
|
</h1>
|
||||||
</ion-title>
|
</ion-title>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
<ion-title>
|
<ion-title>
|
||||||
<h1>
|
<h1>
|
||||||
<core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module?.id" [courseId]="courseId">
|
<core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId">
|
||||||
</core-format-text>
|
</core-format-text>
|
||||||
</h1>
|
</h1>
|
||||||
</ion-title>
|
</ion-title>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
<ion-title>
|
<ion-title>
|
||||||
<h1>
|
<h1>
|
||||||
<core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module?.id" [courseId]="courseId">
|
<core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId">
|
||||||
</core-format-text>
|
</core-format-text>
|
||||||
</h1>
|
</h1>
|
||||||
</ion-title>
|
</ion-title>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
<ion-title>
|
<ion-title>
|
||||||
<h1>
|
<h1>
|
||||||
<core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module?.id" [courseId]="courseId">
|
<core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId">
|
||||||
</core-format-text>
|
</core-format-text>
|
||||||
</h1>
|
</h1>
|
||||||
</ion-title>
|
</ion-title>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
<ion-title>
|
<ion-title>
|
||||||
<h1>
|
<h1>
|
||||||
<core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module?.id"></core-format-text>
|
<core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id"></core-format-text>
|
||||||
</h1>
|
</h1>
|
||||||
</ion-title>
|
</ion-title>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
<ion-title>
|
<ion-title>
|
||||||
<h1>
|
<h1>
|
||||||
<core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module?.id" [courseId]="courseId">
|
<core-format-text [text]="title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId">
|
||||||
</core-format-text>
|
</core-format-text>
|
||||||
</h1>
|
</h1>
|
||||||
</ion-title>
|
</ion-title>
|
||||||
|
|
Loading…
Reference in New Issue