2021-02-12 16:43:59 +01:00
|
|
|
<!-- Read only -->
|
|
|
|
<ion-item class="ion-text-wrap" *ngIf="!edit && text">
|
|
|
|
<ion-label>
|
|
|
|
<h2>{{ plugin.name }}</h2>
|
|
|
|
<p *ngIf="words">{{ 'addon.mod_assign.numwords' | translate: {'$a': words} }}</p>
|
|
|
|
<p>
|
2022-03-09 16:18:03 +01:00
|
|
|
<core-format-text [component]="component" [componentId]="assign.cmid" collapsible-item [text]="text" contextLevel="module"
|
|
|
|
[contextInstanceId]="assign.cmid" [courseId]="assign.course">
|
2021-02-12 16:43:59 +01:00
|
|
|
</core-format-text>
|
|
|
|
</p>
|
|
|
|
</ion-label>
|
|
|
|
</ion-item>
|
|
|
|
|
|
|
|
<!-- Edit -->
|
|
|
|
<div *ngIf="edit && loaded">
|
2023-11-13 10:05:19 +01:00
|
|
|
<ion-item-divider class="ion-text-wrap" [sticky]="true">
|
2021-11-17 11:46:37 +01:00
|
|
|
<ion-label>
|
|
|
|
<h2>{{ plugin.name }}</h2>
|
|
|
|
</ion-label>
|
2021-02-12 16:43:59 +01:00
|
|
|
</ion-item-divider>
|
|
|
|
<ion-item class="ion-text-wrap" *ngIf="wordLimitEnabled && words >= 0">
|
|
|
|
<ion-label>
|
2023-02-13 12:09:10 +01:00
|
|
|
<p class="item-heading">{{ 'addon.mod_assign.wordlimit' | translate }}</p>
|
2021-02-12 16:43:59 +01:00
|
|
|
<p>{{ 'core.numwords' | translate: {'$a': words + ' / ' + wordLimit} }}</p>
|
|
|
|
</ion-label>
|
|
|
|
</ion-item>
|
|
|
|
<ion-item class="ion-text-wrap">
|
2021-06-07 17:22:19 +02:00
|
|
|
<ion-label class="sr-only">{{ plugin.name }}</ion-label>
|
2021-11-17 11:46:37 +01:00
|
|
|
<core-rich-text-editor [control]="control" [placeholder]="plugin.name" name="onlinetext_editor_text"
|
|
|
|
(contentChanged)="onChange($event)" [component]="component" [componentId]="assign.cmid" [autoSave]="true" contextLevel="module"
|
|
|
|
[contextInstanceId]="assign.cmid" elementId="onlinetext_editor"
|
|
|
|
[draftExtraParams]="{userid: currentUserId, action: 'editsubmission'}">
|
2021-02-19 12:41:30 +01:00
|
|
|
</core-rich-text-editor>
|
2021-02-12 16:43:59 +01:00
|
|
|
</ion-item>
|
|
|
|
</div>
|