2021-03-31 09:25:57 +02:00
|
|
|
<ion-header>
|
|
|
|
<ion-toolbar>
|
|
|
|
<ion-buttons slot="start">
|
2023-11-24 13:34:54 +01:00
|
|
|
<ion-back-button [text]="'core.back' | translate" />
|
2021-03-31 09:25:57 +02:00
|
|
|
</ion-buttons>
|
2021-11-23 15:06:01 +01:00
|
|
|
<ion-title>
|
|
|
|
<h1>
|
2023-11-24 13:34:54 +01:00
|
|
|
<core-format-text [text]="title" contextLevel="module" [contextInstanceId]="moduleId" [courseId]="courseId" />
|
2021-11-23 15:06:01 +01:00
|
|
|
</h1>
|
|
|
|
</ion-title>
|
2021-03-31 09:25:57 +02:00
|
|
|
</ion-toolbar>
|
|
|
|
</ion-header>
|
2022-03-25 10:16:12 +01:00
|
|
|
<ion-content class="limited-width">
|
2021-11-23 15:06:01 +01:00
|
|
|
<ion-refresher slot="fixed" [disabled]="!entryLoaded || !(isPullingToRefresh || !renderingEntry && !loadingRating && !loadingComments)"
|
2021-03-31 09:25:57 +02:00
|
|
|
(ionRefresh)="refreshDatabase($event.target)">
|
2023-11-24 13:34:54 +01:00
|
|
|
<ion-refresher-content pullingText="{{ 'core.pulltorefresh' | translate }}" />
|
2021-03-31 09:25:57 +02:00
|
|
|
</ion-refresher>
|
2022-03-25 10:16:12 +01:00
|
|
|
<core-loading [hideUntil]="entryLoaded && (isPullingToRefresh || !renderingEntry && !loadingRating && !loadingComments)">
|
2021-03-31 09:25:57 +02:00
|
|
|
<!-- Database entries found to be synchronized -->
|
|
|
|
<ion-card class="core-warning-card" *ngIf="entry && entry.hasOffline">
|
|
|
|
<ion-item>
|
2023-11-24 13:34:54 +01:00
|
|
|
<ion-icon name="fas-triangle-exclamation" slot="start" aria-hidden="true" />
|
2021-03-31 09:25:57 +02:00
|
|
|
<ion-label>{{ 'core.hasdatatosync' | translate: {$a: moduleName} }}</ion-label>
|
|
|
|
</ion-item>
|
|
|
|
</ion-card>
|
|
|
|
|
2023-05-03 11:53:23 +02:00
|
|
|
<core-group-selector [groupInfo]="groupInfo" [(selected)]="selectedGroup" (selectedChange)="setGroup(selectedGroup)"
|
2023-11-24 13:34:54 +01:00
|
|
|
[courseId]="courseId" />
|
2021-03-31 09:25:57 +02:00
|
|
|
|
2021-05-31 12:28:58 +02:00
|
|
|
<div class="addon-data-contents addon-data-entry addon-data-entries-{{database.id}}" *ngIf="database && entry">
|
2023-11-24 13:34:54 +01:00
|
|
|
<core-style [css]="database.csstemplate" prefix=".addon-data-entries-{{database.id}}" />
|
2021-03-31 09:25:57 +02:00
|
|
|
|
2023-11-24 13:34:54 +01:00
|
|
|
<core-compile-html [text]="entryHtml" [jsData]="jsData" [extraImports]="extraImports" (compiling)="setRenderingEntry($event)" />
|
2021-03-31 09:25:57 +02:00
|
|
|
</div>
|
|
|
|
|
2021-11-23 15:06:01 +01:00
|
|
|
<core-rating-rate *ngIf="database && entry && ratingInfo && (!database.approval || entry.approved)" [ratingInfo]="ratingInfo"
|
|
|
|
contextLevel="module" [instanceId]="database.coursemodule" [itemId]="entry.id" [itemSetId]="0" [courseId]="courseId"
|
|
|
|
[aggregateMethod]="database.assessed" [scaleId]="database.scale" [userId]="entry.userid" (onLoading)="setLoadingRating($event)"
|
2023-11-24 13:34:54 +01:00
|
|
|
(onUpdate)="ratingUpdated()" />
|
2021-03-31 09:25:57 +02:00
|
|
|
<core-rating-aggregate *ngIf="database && entry && ratingInfo" [ratingInfo]="ratingInfo" contextLevel="module"
|
|
|
|
[instanceId]="database.coursemodule" [itemId]="entry.id" [courseId]="courseId" [aggregateMethod]="database.assessed"
|
2023-11-24 13:34:54 +01:00
|
|
|
[scaleId]="database.scale" />
|
2021-03-31 09:25:57 +02:00
|
|
|
|
2021-11-23 15:06:01 +01:00
|
|
|
<core-comments *ngIf="database && database.comments && entry && entry.id > 0 && commentsEnabled" contextLevel="module"
|
|
|
|
[instanceId]="database.coursemodule" component="mod_data" [itemId]="entry.id" area="database_entry" [courseId]="courseId"
|
2023-11-24 13:34:54 +01:00
|
|
|
(onLoading)="setLoadingComments($event)" [showItem]="true" />
|
2021-03-31 09:25:57 +02:00
|
|
|
</core-loading>
|
2022-03-11 10:17:03 +01:00
|
|
|
<div collapsible-footer *ngIf="entryLoaded && hasPrevious || hasNext" slot="fixed" appearOnBottom>
|
|
|
|
<ion-row class="ion-justify-content-between ion-align-items-center ion-no-padding ion-wrap">
|
|
|
|
<ion-col class="ion-text-start ion-no-padding core-navigation-arrow" size="auto">
|
|
|
|
<ion-button [disabled]="!hasPrevious" fill="clear" [attr.aria-label]="'core.previous' | translate"
|
|
|
|
(click)="gotoEntry(offset! -1)">
|
2023-11-24 13:34:54 +01:00
|
|
|
<ion-icon name="fas-chevron-left" slot="icon-only" aria-hidden="true" />
|
2022-03-11 10:17:03 +01:00
|
|
|
</ion-button>
|
|
|
|
</ion-col>
|
2023-11-24 13:34:54 +01:00
|
|
|
<ion-col class="ion-text-center" />
|
2022-03-11 10:17:03 +01:00
|
|
|
<ion-col class="ion-text-end ion-no-padding core-navigation-arrow" size="auto">
|
|
|
|
<ion-button [disabled]="!hasNext" fill="clear" [attr.aria-label]=" 'core.next' | translate"
|
|
|
|
(click)="gotoEntry(offset! + 1)">
|
2023-11-24 13:34:54 +01:00
|
|
|
<ion-icon name="fas-chevron-right" slot="icon-only" aria-hidden="true" />
|
2022-03-11 10:17:03 +01:00
|
|
|
</ion-button>
|
|
|
|
</ion-col>
|
|
|
|
</ion-row>
|
|
|
|
</div>
|
2021-03-31 09:25:57 +02:00
|
|
|
</ion-content>
|