forked from CIT/Vmeda.Online
		
	MOBILE-3814 mod: Move completion to course module navigation component
This commit is contained in:
		
							parent
							
								
									4a83b2b29f
								
							
						
					
					
						commit
						6998c05d5c
					
				@ -30,8 +30,8 @@
 | 
			
		||||
<core-loading [hideUntil]="loaded">
 | 
			
		||||
 | 
			
		||||
    <!-- Activity info. -->
 | 
			
		||||
    <core-course-module-info [module]="module" (completionChanged)="onCompletionChange()" [description]="description"
 | 
			
		||||
        [component]="component" [componentId]="componentId" [courseId]="courseId" [hasDataToSync]="hasOffline">
 | 
			
		||||
    <core-course-module-info [module]="module" [description]="description" [component]="component" [componentId]="componentId"
 | 
			
		||||
        [courseId]="courseId" [hasDataToSync]="hasOffline">
 | 
			
		||||
        <ion-list inset="true" description *ngIf="assign && assign.introattachments && assign.introattachments.length">
 | 
			
		||||
            <core-file *ngFor="let file of assign.introattachments" [file]="file" [component]="component" [componentId]="componentId">
 | 
			
		||||
            </core-file>
 | 
			
		||||
@ -148,4 +148,5 @@
 | 
			
		||||
    </addon-mod-assign-submission>
 | 
			
		||||
</core-loading>
 | 
			
		||||
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModuleId]="module.id"></core-course-module-navigation>
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModule]="module" (completionChanged)="onCompletionChange()">
 | 
			
		||||
</core-course-module-navigation>
 | 
			
		||||
 | 
			
		||||
@ -23,8 +23,8 @@
 | 
			
		||||
<core-loading [hideUntil]="loaded" class="safe-area-page">
 | 
			
		||||
 | 
			
		||||
    <!-- Activity info. -->
 | 
			
		||||
    <core-course-module-info [module]="module" (completionChanged)="onCompletionChange()" [description]="description"
 | 
			
		||||
        [component]="component" [componentId]="componentId" [courseId]="courseId">
 | 
			
		||||
    <core-course-module-info [module]="module" [description]="description" [component]="component" [componentId]="componentId"
 | 
			
		||||
        [courseId]="courseId">
 | 
			
		||||
    </core-course-module-info>
 | 
			
		||||
 | 
			
		||||
    <ng-container *ngIf="groupInfo && (groupInfo.separateGroups || groupInfo.visibleGroups)">
 | 
			
		||||
@ -126,5 +126,5 @@
 | 
			
		||||
    </ng-container>
 | 
			
		||||
</core-loading>
 | 
			
		||||
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModuleId]="module.id">
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModule]="module" (completionChanged)="onCompletionChange()">
 | 
			
		||||
</core-course-module-navigation>
 | 
			
		||||
 | 
			
		||||
@ -24,8 +24,8 @@
 | 
			
		||||
<core-loading [hideUntil]="loaded">
 | 
			
		||||
 | 
			
		||||
    <!-- Activity info. -->
 | 
			
		||||
    <core-course-module-info [module]="module" (completionChanged)="onCompletionChange()" [description]="description"
 | 
			
		||||
        [component]="component" [componentId]="componentId" [courseId]="courseId">
 | 
			
		||||
    <core-course-module-info [module]="module" [description]="description" [component]="component" [componentId]="componentId"
 | 
			
		||||
        [courseId]="courseId">
 | 
			
		||||
    </core-course-module-info>
 | 
			
		||||
 | 
			
		||||
    <ion-card class="core-warning-card" *ngIf="warning">
 | 
			
		||||
@ -56,5 +56,5 @@
 | 
			
		||||
 | 
			
		||||
</core-loading>
 | 
			
		||||
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModuleId]="module.id">
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModule]="module" (completionChanged)="onCompletionChange()">
 | 
			
		||||
</core-course-module-navigation>
 | 
			
		||||
 | 
			
		||||
@ -27,8 +27,8 @@
 | 
			
		||||
<core-loading [hideUntil]="loaded" class="safe-area-padding">
 | 
			
		||||
 | 
			
		||||
    <!-- Activity info. -->
 | 
			
		||||
    <core-course-module-info [module]="module" (completionChanged)="onCompletionChange()" [description]="description"
 | 
			
		||||
        [component]="component" [componentId]="componentId" [courseId]="courseId">
 | 
			
		||||
    <core-course-module-info [module]="module" [description]="description" [component]="component" [componentId]="componentId"
 | 
			
		||||
        [courseId]="courseId">
 | 
			
		||||
    </core-course-module-info>
 | 
			
		||||
 | 
			
		||||
    <ion-card *ngIf="chatInfo" class="core-info-card">
 | 
			
		||||
@ -48,5 +48,5 @@
 | 
			
		||||
    </ng-container>
 | 
			
		||||
</core-loading>
 | 
			
		||||
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModuleId]="module.id">
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModule]="module" (completionChanged)="onCompletionChange()">
 | 
			
		||||
</core-course-module-navigation>
 | 
			
		||||
 | 
			
		||||
@ -29,8 +29,8 @@
 | 
			
		||||
<core-loading [hideUntil]="loaded">
 | 
			
		||||
 | 
			
		||||
    <!-- Activity info. -->
 | 
			
		||||
    <core-course-module-info [module]="module" (completionChanged)="onCompletionChange()" [description]="description"
 | 
			
		||||
        [component]="component" [componentId]="componentId" [courseId]="courseId" [hasDataToSync]="hasOffline">
 | 
			
		||||
    <core-course-module-info [module]="module" [description]="description" [component]="component" [componentId]="componentId"
 | 
			
		||||
        [courseId]="courseId" [hasDataToSync]="hasOffline">
 | 
			
		||||
    </core-course-module-info>
 | 
			
		||||
 | 
			
		||||
    <!-- Activity availability messages -->
 | 
			
		||||
@ -155,7 +155,7 @@
 | 
			
		||||
    </ion-card>
 | 
			
		||||
</core-loading>
 | 
			
		||||
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModuleId]="module.id">
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModule]="module" (completionChanged)="onCompletionChange()">
 | 
			
		||||
</core-course-module-navigation>
 | 
			
		||||
 | 
			
		||||
<!-- Template to render a choice option label. -->
 | 
			
		||||
 | 
			
		||||
@ -39,8 +39,8 @@
 | 
			
		||||
<core-loading [hideUntil]="loaded">
 | 
			
		||||
 | 
			
		||||
    <!-- Activity info. -->
 | 
			
		||||
    <core-course-module-info [module]="module" (completionChanged)="onCompletionChange()" [description]="description"
 | 
			
		||||
        [component]="component" [componentId]="componentId" [courseId]="courseId" [hasDataToSync]="hasOffline || hasOfflineRatings">
 | 
			
		||||
    <core-course-module-info [module]="module" [description]="description" [component]="component" [componentId]="componentId"
 | 
			
		||||
        [courseId]="courseId" [hasDataToSync]="hasOffline || hasOfflineRatings">
 | 
			
		||||
    </core-course-module-info>
 | 
			
		||||
 | 
			
		||||
    <ion-item class="ion-text-wrap" *ngIf="groupInfo && (groupInfo.separateGroups || groupInfo.visibleGroups)">
 | 
			
		||||
@ -138,7 +138,7 @@
 | 
			
		||||
 | 
			
		||||
</core-loading>
 | 
			
		||||
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModuleId]="module.id">
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModule]="module" (completionChanged)="onCompletionChange()">
 | 
			
		||||
</core-course-module-navigation>
 | 
			
		||||
 | 
			
		||||
<ion-fab slot="fixed" core-fab vertical="bottom" horizontal="end" *ngIf="canAdd">
 | 
			
		||||
 | 
			
		||||
@ -29,8 +29,8 @@
 | 
			
		||||
<core-loading [hideUntil]="loaded">
 | 
			
		||||
 | 
			
		||||
    <!-- Activity info. -->
 | 
			
		||||
    <core-course-module-info [module]="module" (completionChanged)="onCompletionChange()" [description]="description"
 | 
			
		||||
        [component]="component" [componentId]="componentId" [courseId]="courseId" [hasDataToSync]="hasOffline">
 | 
			
		||||
    <core-course-module-info [module]="module" [description]="description" [component]="component" [componentId]="componentId"
 | 
			
		||||
        [courseId]="courseId" [hasDataToSync]="hasOffline">
 | 
			
		||||
    </core-course-module-info>
 | 
			
		||||
 | 
			
		||||
    <core-tabs [hideUntil]="tabsReady" [selectedIndex]="firstSelectedTab">
 | 
			
		||||
@ -55,7 +55,7 @@
 | 
			
		||||
    </core-tabs>
 | 
			
		||||
</core-loading>
 | 
			
		||||
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModuleId]="module.id">
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModule]="module" (completionChanged)="onCompletionChange()">
 | 
			
		||||
</core-course-module-navigation>
 | 
			
		||||
 | 
			
		||||
<ng-template #basicInfo>
 | 
			
		||||
 | 
			
		||||
@ -26,8 +26,8 @@
 | 
			
		||||
<core-loading [hideUntil]="loaded">
 | 
			
		||||
 | 
			
		||||
    <!-- Activity info. -->
 | 
			
		||||
    <core-course-module-info *ngIf="!subfolder" [module]="module" (completionChanged)="onCompletionChange()" [description]="description"
 | 
			
		||||
        [component]="component" [componentId]="componentId" [courseId]="courseId">
 | 
			
		||||
    <core-course-module-info *ngIf="!subfolder" [module]="module" [description]="description" [component]="component"
 | 
			
		||||
        [componentId]="componentId" [courseId]="courseId">
 | 
			
		||||
    </core-course-module-info>
 | 
			
		||||
 | 
			
		||||
    <ion-list *ngIf="contents && (contents.files.length + contents.folders.length > 0)">
 | 
			
		||||
@ -49,5 +49,5 @@
 | 
			
		||||
 | 
			
		||||
</core-loading>
 | 
			
		||||
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModuleId]="module.id">
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModule]="module" (completionChanged)="onCompletionChange()">
 | 
			
		||||
</core-course-module-navigation>
 | 
			
		||||
 | 
			
		||||
@ -38,9 +38,8 @@
 | 
			
		||||
 | 
			
		||||
    <core-loading [hideUntil]="discussions && discussions.loaded">
 | 
			
		||||
        <!-- Activity info. -->
 | 
			
		||||
        <core-course-module-info [module]="module" (completionChanged)="onCompletionChange()"
 | 
			
		||||
            [description]="forum && forum.type != 'single' && description" [component]="component" [componentId]="componentId"
 | 
			
		||||
            [courseId]="courseId" [hasDataToSync]="hasOffline || hasOfflineRatings">
 | 
			
		||||
        <core-course-module-info [module]="module" [description]="forum && forum.type != 'single' && description" [component]="component"
 | 
			
		||||
            [componentId]="componentId" [courseId]="courseId" [hasDataToSync]="hasOffline || hasOfflineRatings">
 | 
			
		||||
            <ion-item lines="none" class="ion-text-wrap">
 | 
			
		||||
                <ion-label>
 | 
			
		||||
                    {{descriptionNote}}
 | 
			
		||||
@ -140,7 +139,8 @@
 | 
			
		||||
        </ng-container>
 | 
			
		||||
    </core-loading>
 | 
			
		||||
 | 
			
		||||
    <core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModuleId]="module.id">
 | 
			
		||||
    <core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModule]="module"
 | 
			
		||||
        (completionChanged)="onCompletionChange()">
 | 
			
		||||
    </core-course-module-navigation>
 | 
			
		||||
 | 
			
		||||
    <ion-fab slot="fixed" core-fab vertical="bottom" horizontal="end" *ngIf="forum && canAddDiscussion">
 | 
			
		||||
 | 
			
		||||
@ -50,8 +50,8 @@
 | 
			
		||||
 | 
			
		||||
    <core-loading [hideUntil]="loaded">
 | 
			
		||||
        <!-- Activity info. -->
 | 
			
		||||
        <core-course-module-info *ngIf="!isSearch" [module]="module" (completionChanged)="onCompletionChange()" [description]="description"
 | 
			
		||||
            [component]="component" [componentId]="componentId" [courseId]="courseId" [hasDataToSync]="hasOffline || hasOfflineRatings">
 | 
			
		||||
        <core-course-module-info *ngIf="!isSearch" [module]="module" [description]="description" [component]="component"
 | 
			
		||||
            [componentId]="componentId" [courseId]="courseId" [hasDataToSync]="hasOffline || hasOfflineRatings">
 | 
			
		||||
        </core-course-module-info>
 | 
			
		||||
 | 
			
		||||
        <ion-list *ngIf="!isSearch && entries && entries.offlineEntries.length > 0">
 | 
			
		||||
@ -96,7 +96,8 @@
 | 
			
		||||
        </core-infinite-loading>
 | 
			
		||||
    </core-loading>
 | 
			
		||||
 | 
			
		||||
    <core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModuleId]="module.id">
 | 
			
		||||
    <core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModule]="module"
 | 
			
		||||
        (completionChanged)="onCompletionChange()">
 | 
			
		||||
    </core-course-module-navigation>
 | 
			
		||||
 | 
			
		||||
    <ion-fab slot="fixed" core-fab vertical="bottom" horizontal="end" *ngIf="canAdd">
 | 
			
		||||
 | 
			
		||||
@ -36,8 +36,8 @@
 | 
			
		||||
<core-loading [hideUntil]="loaded" class="safe-area-padding">
 | 
			
		||||
 | 
			
		||||
    <!-- Activity info. -->
 | 
			
		||||
    <core-course-module-info [module]="module" (completionChanged)="onCompletionChange()" [description]="description"
 | 
			
		||||
        [component]="component" [componentId]="componentId" [courseId]="courseId" [hasDataToSync]="hasOffline">
 | 
			
		||||
    <core-course-module-info [module]="module" [description]="description" [component]="component" [componentId]="componentId"
 | 
			
		||||
        [courseId]="courseId" [hasDataToSync]="hasOffline">
 | 
			
		||||
    </core-course-module-info>
 | 
			
		||||
 | 
			
		||||
    <!-- Offline disabled. -->
 | 
			
		||||
@ -85,5 +85,5 @@
 | 
			
		||||
    </core-h5p-iframe>
 | 
			
		||||
</core-loading>
 | 
			
		||||
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModuleId]="module.id">
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModule]="module" (completionChanged)="onCompletionChange()">
 | 
			
		||||
</core-course-module-navigation>
 | 
			
		||||
 | 
			
		||||
@ -29,7 +29,7 @@
 | 
			
		||||
<core-loading [hideUntil]="loaded" class="safe-area-padding">
 | 
			
		||||
 | 
			
		||||
    <!-- Activity info. -->
 | 
			
		||||
    <core-course-module-info [module]="module" (completionChanged)="onCompletionChange()">
 | 
			
		||||
    <core-course-module-info [module]="module">
 | 
			
		||||
    </core-course-module-info>
 | 
			
		||||
 | 
			
		||||
    <ion-card class="core-warning-card" *ngIf="warning">
 | 
			
		||||
@ -46,5 +46,5 @@
 | 
			
		||||
    </div>
 | 
			
		||||
</core-loading>
 | 
			
		||||
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModuleId]="module.id">
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModule]="module" (completionChanged)="onCompletionChange()">
 | 
			
		||||
</core-course-module-navigation>
 | 
			
		||||
 | 
			
		||||
@ -33,8 +33,8 @@
 | 
			
		||||
            <ng-template>
 | 
			
		||||
 | 
			
		||||
                <!-- Activity info. -->
 | 
			
		||||
                <core-course-module-info [module]="module" (completionChanged)="onCompletionChange()" [description]="description"
 | 
			
		||||
                    [component]="component" [componentId]="componentId" [courseId]="courseId" [hasDataToSync]="hasOffline">
 | 
			
		||||
                <core-course-module-info [module]="module" [description]="description" [component]="component" [componentId]="componentId"
 | 
			
		||||
                    [courseId]="courseId" [hasDataToSync]="hasOffline">
 | 
			
		||||
                </core-course-module-info>
 | 
			
		||||
 | 
			
		||||
                <!-- Prevent access messages. Only show the first one. -->
 | 
			
		||||
@ -298,5 +298,5 @@
 | 
			
		||||
    </core-tabs>
 | 
			
		||||
</core-loading>
 | 
			
		||||
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModuleId]="module.id">
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModule]="module" (completionChanged)="onCompletionChange()">
 | 
			
		||||
</core-course-module-navigation>
 | 
			
		||||
 | 
			
		||||
@ -20,9 +20,8 @@
 | 
			
		||||
<core-loading [hideUntil]="loaded" class="safe-area-padding">
 | 
			
		||||
 | 
			
		||||
    <!-- Activity info. -->
 | 
			
		||||
    <core-course-module-info [module]="module" (completionChanged)="onCompletionChange()"
 | 
			
		||||
        [description]="lti && lti.showdescriptionlaunch && description" [component]="component" [componentId]="componentId"
 | 
			
		||||
        [courseId]="courseId">
 | 
			
		||||
    <core-course-module-info [module]="module" [description]="lti && lti.showdescriptionlaunch && description" [component]="component"
 | 
			
		||||
        [componentId]="componentId" [courseId]="courseId">
 | 
			
		||||
    </core-course-module-info>
 | 
			
		||||
 | 
			
		||||
    <div class="ion-padding">
 | 
			
		||||
@ -33,5 +32,5 @@
 | 
			
		||||
    </div>
 | 
			
		||||
</core-loading>
 | 
			
		||||
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModuleId]="module.id">
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModule]="module" (completionChanged)="onCompletionChange()">
 | 
			
		||||
</core-course-module-navigation>
 | 
			
		||||
 | 
			
		||||
@ -26,8 +26,8 @@
 | 
			
		||||
<core-loading [hideUntil]="loaded" class="safe-area-padding">
 | 
			
		||||
 | 
			
		||||
    <!-- Activity info. -->
 | 
			
		||||
    <core-course-module-info [module]="module" (completionChanged)="onCompletionChange()" [description]="displayDescription && description"
 | 
			
		||||
        [component]="component" [componentId]="componentId" [courseId]="courseId">
 | 
			
		||||
    <core-course-module-info [module]="module" [description]="displayDescription && description" [component]="component"
 | 
			
		||||
        [componentId]="componentId" [courseId]="courseId">
 | 
			
		||||
    </core-course-module-info>
 | 
			
		||||
 | 
			
		||||
    <ion-card class="core-warning-card" *ngIf="warning">
 | 
			
		||||
@ -49,5 +49,5 @@
 | 
			
		||||
 | 
			
		||||
</core-loading>
 | 
			
		||||
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModuleId]="module.id">
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModule]="module" (completionChanged)="onCompletionChange()">
 | 
			
		||||
</core-course-module-navigation>
 | 
			
		||||
 | 
			
		||||
@ -29,9 +29,8 @@
 | 
			
		||||
<core-loading [hideUntil]="loaded">
 | 
			
		||||
 | 
			
		||||
    <!-- Activity info. -->
 | 
			
		||||
    <core-course-module-info [module]="module" (completionChanged)="onCompletionChange()" [description]="description"
 | 
			
		||||
        [component]="component" [componentId]="componentId" [courseId]="courseId"
 | 
			
		||||
        [hasDataToSync]="buttonText && hasOffline && !showStatusSpinner">
 | 
			
		||||
    <core-course-module-info [module]="module" [description]="description" [component]="component" [componentId]="componentId"
 | 
			
		||||
        [courseId]="courseId" [hasDataToSync]="buttonText && hasOffline && !showStatusSpinner">
 | 
			
		||||
    </core-course-module-info>
 | 
			
		||||
 | 
			
		||||
    <!-- Access rules description messages. -->
 | 
			
		||||
@ -227,5 +226,5 @@
 | 
			
		||||
    </ion-card>
 | 
			
		||||
</core-loading>
 | 
			
		||||
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModuleId]="module.id">
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModule]="module" (completionChanged)="onCompletionChange()">
 | 
			
		||||
</core-course-module-navigation>
 | 
			
		||||
 | 
			
		||||
@ -21,7 +21,7 @@
 | 
			
		||||
<core-loading [hideUntil]="loaded" class="safe-area-padding">
 | 
			
		||||
 | 
			
		||||
    <!-- Activity info. -->
 | 
			
		||||
    <core-course-module-info [module]="module" [courseId]="courseId" (completionChanged)="onCompletionChange()"
 | 
			
		||||
    <core-course-module-info [module]="module" [courseId]="courseId"
 | 
			
		||||
        [description]="mode != 'iframe' && (mode != 'embedded' || displayDescription) && description" [component]="component"
 | 
			
		||||
        [componentId]="componentId">
 | 
			
		||||
    </core-course-module-info>
 | 
			
		||||
@ -61,5 +61,5 @@
 | 
			
		||||
    </ng-container>
 | 
			
		||||
</core-loading>
 | 
			
		||||
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModuleId]="module.id">
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModule]="module" (completionChanged)="onCompletionChange()">
 | 
			
		||||
</core-course-module-navigation>
 | 
			
		||||
 | 
			
		||||
@ -29,8 +29,8 @@
 | 
			
		||||
<core-loading [hideUntil]="loaded" class="safe-area-padding">
 | 
			
		||||
 | 
			
		||||
    <!-- Activity info. -->
 | 
			
		||||
    <core-course-module-info [module]="module" (completionChanged)="onCompletionChange()" [description]="description"
 | 
			
		||||
        [component]="component" [componentId]="componentId" [courseId]="courseId" [hasDataToSync]="!errorMessage && hasOffline">
 | 
			
		||||
    <core-course-module-info [module]="module" [description]="description" [component]="component" [componentId]="componentId"
 | 
			
		||||
        [courseId]="courseId" [hasDataToSync]="!errorMessage && hasOffline">
 | 
			
		||||
    </core-course-module-info>
 | 
			
		||||
 | 
			
		||||
    <!-- Warning message. -->
 | 
			
		||||
@ -237,5 +237,5 @@
 | 
			
		||||
    </ng-container>
 | 
			
		||||
</core-loading>
 | 
			
		||||
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModuleId]="module.id">
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModule]="module" (completionChanged)="onCompletionChange()">
 | 
			
		||||
</core-course-module-navigation>
 | 
			
		||||
 | 
			
		||||
@ -30,9 +30,8 @@
 | 
			
		||||
<core-loading [hideUntil]="loaded" class="safe-area-padding">
 | 
			
		||||
 | 
			
		||||
    <!-- Activity info. -->
 | 
			
		||||
    <core-course-module-info [module]="module" (completionChanged)="onCompletionChange()"
 | 
			
		||||
        [description]="survey && !survey.surveydone && !hasOffline && description" [component]="component" [componentId]="componentId"
 | 
			
		||||
        [courseId]="courseId" [hasDataToSync]="hasOffline">
 | 
			
		||||
    <core-course-module-info [module]="module" [description]="survey && !survey.surveydone && !hasOffline && description"
 | 
			
		||||
        [component]="component" [componentId]="componentId" [courseId]="courseId" [hasDataToSync]="hasOffline">
 | 
			
		||||
    </core-course-module-info>
 | 
			
		||||
 | 
			
		||||
    <!-- Survey already done -->
 | 
			
		||||
@ -148,5 +147,5 @@
 | 
			
		||||
 | 
			
		||||
</core-loading>
 | 
			
		||||
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModuleId]="module.id">
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModule]="module" (completionChanged)="onCompletionChange()">
 | 
			
		||||
</core-course-module-navigation>
 | 
			
		||||
 | 
			
		||||
@ -16,8 +16,8 @@
 | 
			
		||||
<core-loading [hideUntil]="loaded">
 | 
			
		||||
 | 
			
		||||
    <!-- Activity info. -->
 | 
			
		||||
    <core-course-module-info [module]="module" (completionChanged)="onCompletionChange()" [description]="displayDescription && description"
 | 
			
		||||
        [component]="component" [componentId]="componentId" [courseId]="courseId">
 | 
			
		||||
    <core-course-module-info [module]="module" [description]="displayDescription && description" [component]="component"
 | 
			
		||||
        [componentId]="componentId" [courseId]="courseId">
 | 
			
		||||
    </core-course-module-info>
 | 
			
		||||
 | 
			
		||||
    <div *ngIf="shouldIframe || (shouldEmbed && isOther)" class="addon-mod_url-embedded-url">
 | 
			
		||||
@ -53,5 +53,5 @@
 | 
			
		||||
    </ion-list>
 | 
			
		||||
</core-loading>
 | 
			
		||||
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModuleId]="module.id">
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModule]="module" (completionChanged)="onCompletionChange()">
 | 
			
		||||
</core-course-module-navigation>
 | 
			
		||||
 | 
			
		||||
@ -48,8 +48,8 @@
 | 
			
		||||
<core-loading [hideUntil]="loaded">
 | 
			
		||||
 | 
			
		||||
    <!-- Activity info. -->
 | 
			
		||||
    <core-course-module-info [module]="module" (completionChanged)="onCompletionChange()" [description]="description"
 | 
			
		||||
        [component]="component" [componentId]="componentId" [courseId]="courseId">
 | 
			
		||||
    <core-course-module-info [module]="module" [description]="description" [component]="component" [componentId]="componentId"
 | 
			
		||||
        [courseId]="courseId">
 | 
			
		||||
    </core-course-module-info>
 | 
			
		||||
 | 
			
		||||
    <div *ngIf="pageIsOffline || hasOffline || pageWarning">
 | 
			
		||||
@ -89,7 +89,7 @@
 | 
			
		||||
    </div>
 | 
			
		||||
</core-loading>
 | 
			
		||||
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModuleId]="module.id">
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModule]="module" (completionChanged)="onCompletionChange()">
 | 
			
		||||
</core-course-module-navigation>
 | 
			
		||||
 | 
			
		||||
<ion-fab slot="fixed" core-fab vertical="bottom" horizontal="end" *ngIf="canEdit">
 | 
			
		||||
 | 
			
		||||
@ -30,7 +30,7 @@
 | 
			
		||||
<core-loading [hideUntil]="loaded">
 | 
			
		||||
 | 
			
		||||
    <!-- Activity info. -->
 | 
			
		||||
    <core-course-module-info [module]="module" (completionChanged)="onCompletionChange()" [hasDataToSync]="hasOffline">
 | 
			
		||||
    <core-course-module-info [module]="module" [hasDataToSync]="hasOffline">
 | 
			
		||||
    </core-course-module-info>
 | 
			
		||||
 | 
			
		||||
    <ion-card *ngIf="phases">
 | 
			
		||||
@ -254,5 +254,5 @@
 | 
			
		||||
    </div>
 | 
			
		||||
</core-loading>
 | 
			
		||||
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModuleId]="module.id">
 | 
			
		||||
<core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModule]="module" (completionChanged)="onCompletionChange()">
 | 
			
		||||
</core-course-module-navigation>
 | 
			
		||||
 | 
			
		||||
@ -19,21 +19,12 @@
 | 
			
		||||
    </ion-label>
 | 
			
		||||
</ion-item>
 | 
			
		||||
<ng-content select="[description]"></ng-content>
 | 
			
		||||
<ion-item class="ion-text-wrap" lines="none" *ngIf="showCompletion && (module.dates?.length ||
 | 
			
		||||
        (module.completiondata && (module.completiondata.isautomatic || showManualCompletion) && module.uservisible))">
 | 
			
		||||
<!-- Activity dates. -->
 | 
			
		||||
<ion-item class="ion-text-wrap core-module-dates" lines="none" *ngIf="showCompletion && module.dates?.length">
 | 
			
		||||
    <ion-label>
 | 
			
		||||
        <!-- Activity dates. -->
 | 
			
		||||
        <div *ngIf="module.dates?.length" class="core-module-dates">
 | 
			
		||||
            <p *ngFor="let date of module.dates">
 | 
			
		||||
                <strong>{{ date.label }}</strong> {{ date.timestamp * 1000 | coreFormatDate:'strftimedatetime' }}
 | 
			
		||||
            </p>
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
        <!-- Module completion. -->
 | 
			
		||||
        <core-course-module-completion *ngIf="module.completiondata && module.uservisible" [completion]="module.completiondata"
 | 
			
		||||
            [moduleName]="module.name" [moduleId]="module.id" [showCompletionConditions]="true"
 | 
			
		||||
            [showManualCompletion]="showManualCompletion" (completionChanged)="completionChanged.emit($event)">
 | 
			
		||||
        </core-course-module-completion>
 | 
			
		||||
        <p *ngFor="let date of module.dates">
 | 
			
		||||
            <strong>{{ date.label }}</strong> {{ date.timestamp * 1000 | coreFormatDate:'strftimedatetime' }}
 | 
			
		||||
        </p>
 | 
			
		||||
    </ion-label>
 | 
			
		||||
</ion-item>
 | 
			
		||||
<ng-content></ng-content>
 | 
			
		||||
 | 
			
		||||
@ -12,9 +12,9 @@
 | 
			
		||||
// See the License for the specific language governing permissions and
 | 
			
		||||
// limitations under the License.
 | 
			
		||||
 | 
			
		||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
 | 
			
		||||
import { Component, Input, OnInit } from '@angular/core';
 | 
			
		||||
import { CoreCourse } from '@features/course/services/course';
 | 
			
		||||
import { CoreCourseModuleData, CoreCourseModuleCompletionData } from '@features/course/services/course-helper';
 | 
			
		||||
import { CoreCourseModuleData } from '@features/course/services/course-helper';
 | 
			
		||||
import { CoreCourseModuleDelegate } from '@features/course/services/module-delegate';
 | 
			
		||||
import { CoreSites } from '@services/sites';
 | 
			
		||||
 | 
			
		||||
@ -36,7 +36,6 @@ import { CoreSites } from '@services/sites';
 | 
			
		||||
export class CoreCourseModuleInfoComponent implements OnInit {
 | 
			
		||||
 | 
			
		||||
    @Input() module!: CoreCourseModuleData; // The module to render.
 | 
			
		||||
    @Input() showManualCompletion = true; // Whether to show manual completion, true by default.
 | 
			
		||||
    @Input() courseId!: number; // The courseId the module belongs to.
 | 
			
		||||
 | 
			
		||||
    @Input() component!: string; // Component for format text directive.
 | 
			
		||||
@ -47,8 +46,6 @@ export class CoreCourseModuleInfoComponent implements OnInit {
 | 
			
		||||
 | 
			
		||||
    @Input() hasDataToSync = false; // If the activity has any data to be synced.
 | 
			
		||||
 | 
			
		||||
    @Output() completionChanged = new EventEmitter<CoreCourseModuleCompletionData>(); // Notify when completion changes.
 | 
			
		||||
 | 
			
		||||
    modicon = '';
 | 
			
		||||
    showCompletion = false; // Whether to show completion.
 | 
			
		||||
    moduleNameTranslated = '';
 | 
			
		||||
@ -60,7 +57,6 @@ export class CoreCourseModuleInfoComponent implements OnInit {
 | 
			
		||||
        this.modicon = await CoreCourseModuleDelegate.getModuleIconSrc(this.module.modname, this.module.modicon, this.module);
 | 
			
		||||
 | 
			
		||||
        this.moduleNameTranslated = CoreCourse.translateModuleName(this.module.modname || '');
 | 
			
		||||
 | 
			
		||||
        this.showCompletion = CoreSites.getRequiredCurrentSite().isVersionGreaterEqualThan('3.11');
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -6,6 +6,14 @@
 | 
			
		||||
                <ion-icon name="fas-arrow-left" slot="icon-only" aria-hidden="true"></ion-icon>
 | 
			
		||||
            </ion-button>
 | 
			
		||||
        </ion-col>
 | 
			
		||||
        <ion-col *ngIf="showCompletion && (currentModule.completiondata &&
 | 
			
		||||
            (currentModule.completiondata.isautomatic || showManualCompletion) && currentModule.uservisible)">
 | 
			
		||||
            <!-- Module completion. -->
 | 
			
		||||
            <core-course-module-completion [completion]="currentModule.completiondata" [moduleName]="currentModule.name"
 | 
			
		||||
                [moduleId]="currentModule.id" [showCompletionConditions]="true" [showManualCompletion]="showManualCompletion"
 | 
			
		||||
                (completionChanged)="completionChanged.emit($event)">
 | 
			
		||||
            </core-course-module-completion>
 | 
			
		||||
        </ion-col>
 | 
			
		||||
        <ion-col size="auto">
 | 
			
		||||
            <ion-button fill="clear" class="core-course-next-module" *ngIf="nextModule" (click)="goToActivity(true)"
 | 
			
		||||
                [attr.aria-label]="'core.course.gotonextactivity' | translate">
 | 
			
		||||
 | 
			
		||||
@ -12,9 +12,9 @@
 | 
			
		||||
// See the License for the specific language governing permissions and
 | 
			
		||||
// limitations under the License.
 | 
			
		||||
 | 
			
		||||
import { Component, ElementRef, Input, OnDestroy, OnInit } from '@angular/core';
 | 
			
		||||
import { Component, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';
 | 
			
		||||
import { CoreCourse, CoreCourseProvider, CoreCourseWSSection } from '@features/course/services/course';
 | 
			
		||||
import { CoreCourseModuleData } from '@features/course/services/course-helper';
 | 
			
		||||
import { CoreCourseModuleCompletionData, CoreCourseModuleData } from '@features/course/services/course-helper';
 | 
			
		||||
import { CoreCourseModuleDelegate } from '@features/course/services/module-delegate';
 | 
			
		||||
import { IonContent } from '@ionic/angular';
 | 
			
		||||
import { ScrollDetail } from '@ionic/core';
 | 
			
		||||
@ -29,7 +29,7 @@ import { CoreMath } from '@singletons/math';
 | 
			
		||||
 * Component to show a button to go to the next resource/activity.
 | 
			
		||||
 *
 | 
			
		||||
 * Example usage:
 | 
			
		||||
 * <core-course-module-navigation [courseId]="courseId" [currentModuleId]="module.id"></core-course-module-navigation>
 | 
			
		||||
 * <core-course-module-navigation [courseId]="courseId" [currentModule]="module"></core-course-module-navigation>
 | 
			
		||||
 */
 | 
			
		||||
@Component({
 | 
			
		||||
    selector: 'core-course-module-navigation',
 | 
			
		||||
@ -39,13 +39,17 @@ import { CoreMath } from '@singletons/math';
 | 
			
		||||
export class CoreCourseModuleNavigationComponent implements OnInit, OnDestroy {
 | 
			
		||||
 | 
			
		||||
    @Input() courseId!: number; // Course ID.
 | 
			
		||||
    @Input() currentModuleId!: number; // Current module ID.
 | 
			
		||||
    @Input() currentModule!: CoreCourseModuleData; // Current module.
 | 
			
		||||
    @Input() showManualCompletion = true; // Whether to show manual completion, true by default.
 | 
			
		||||
 | 
			
		||||
    @Output() completionChanged = new EventEmitter<CoreCourseModuleCompletionData>(); // Notify when completion changes.
 | 
			
		||||
 | 
			
		||||
    nextModule?: CoreCourseModuleData;
 | 
			
		||||
    previousModule?: CoreCourseModuleData;
 | 
			
		||||
    nextModuleSection?: CoreCourseWSSection;
 | 
			
		||||
    previousModuleSection?: CoreCourseWSSection;
 | 
			
		||||
    loaded = false;
 | 
			
		||||
    showCompletion = false; // Whether to show completion.
 | 
			
		||||
 | 
			
		||||
    protected element: HTMLElement;
 | 
			
		||||
    protected initialHeight = 0;
 | 
			
		||||
@ -78,6 +82,8 @@ export class CoreCourseModuleNavigationComponent implements OnInit, OnDestroy {
 | 
			
		||||
     * @inheritdoc
 | 
			
		||||
     */
 | 
			
		||||
    async ngOnInit(): Promise<void> {
 | 
			
		||||
        this.showCompletion = CoreSites.getRequiredCurrentSite().isVersionGreaterEqualThan('3.11');
 | 
			
		||||
 | 
			
		||||
        try {
 | 
			
		||||
            await this.setNextAndPreviousModules(CoreSitesReadingStrategy.PREFER_CACHE);
 | 
			
		||||
        } finally {
 | 
			
		||||
@ -172,6 +178,7 @@ export class CoreCourseModuleNavigationComponent implements OnInit, OnDestroy {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        const preSets = CoreSites.getReadingStrategyPreSets(readingStrategy);
 | 
			
		||||
        const currentModuleId = this.currentModule.id;
 | 
			
		||||
 | 
			
		||||
        const sections = await CoreCourse.getSections(this.courseId, false, true, preSets);
 | 
			
		||||
 | 
			
		||||
@ -184,7 +191,7 @@ export class CoreCourseModuleNavigationComponent implements OnInit, OnDestroy {
 | 
			
		||||
                return false;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            currentModuleIndex = section.modules.findIndex((module: CoreCourseModuleData) => module.id == this.currentModuleId);
 | 
			
		||||
            currentModuleIndex = section.modules.findIndex((module: CoreCourseModuleData) => module.id == currentModuleId);
 | 
			
		||||
 | 
			
		||||
            return currentModuleIndex >= 0;
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
@ -25,8 +25,7 @@
 | 
			
		||||
    </ion-refresher>
 | 
			
		||||
    <core-loading [hideUntil]="loaded">
 | 
			
		||||
        <core-course-module-info [module]="module" [courseId]="courseId" [description]="module.description" [component]="module.modname"
 | 
			
		||||
            [componentId]="module.id" (completionChanged)="onCompletionChange()" [expandDescription]="true"
 | 
			
		||||
            [showManualCompletion]="showManualCompletion">
 | 
			
		||||
            [componentId]="module.id" [expandDescription]="true">
 | 
			
		||||
 | 
			
		||||
            <div class="safe-area-padding-horizontal ion-padding" *ngIf="module.handlerData?.extraBadge">
 | 
			
		||||
                <ion-badge class="ion-text-wrap ion-text-start" [color]="module.handlerData?.extraBadgeColor">
 | 
			
		||||
@ -61,5 +60,6 @@
 | 
			
		||||
        </core-course-module-info>
 | 
			
		||||
    </core-loading>
 | 
			
		||||
 | 
			
		||||
    <core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModuleId]="module.id"></core-course-module-navigation>
 | 
			
		||||
    <core-course-module-navigation [hidden]="!loaded" [courseId]="courseId" [currentModule]="module"
 | 
			
		||||
        (completionChanged)="onCompletionChange()" [showManualCompletion]="showManualCompletion"></core-course-module-navigation>
 | 
			
		||||
</ion-content>
 | 
			
		||||
 | 
			
		||||
@ -30,4 +30,5 @@
 | 
			
		||||
    (onLoadingContent)="contentLoading()">
 | 
			
		||||
</core-site-plugins-plugin-content>
 | 
			
		||||
 | 
			
		||||
<core-course-module-navigation *ngIf="module" [courseId]="courseId" [currentModuleId]="module.id"></core-course-module-navigation>
 | 
			
		||||
<core-course-module-navigation *ngIf="module" [courseId]="courseId" [currentModule]="module">
 | 
			
		||||
</core-course-module-navigation>
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user