Merge pull request #1867 from dpalou/MOBILE-2944

MOBILE-2944 course: Hide completion for teachers
main
Juan Leyva 2019-04-30 21:03:52 +02:00 committed by GitHub
commit ec58a14603
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View File

@ -27,7 +27,7 @@
<div *ngIf="course.imageThumb" class="core-course-thumb"> <div *ngIf="course.imageThumb" class="core-course-thumb">
<img [src]="course.imageThumb" core-external-content alt=""/> <img [src]="course.imageThumb" core-external-content alt=""/>
</div> </div>
<ion-item class="core-course-progress" *ngIf="selectedSection && selectedSection.id == allSectionsId && course.progress != null && course.progress >= 0"> <ion-item class="core-course-progress" *ngIf="selectedSection && selectedSection.id == allSectionsId && course.progress != null && course.progress >= 0 && course.completionusertracked !== false">
<core-progress-bar [progress]="course.progress"></core-progress-bar> <core-progress-bar [progress]="course.progress"></core-progress-bar>
</ion-item> </ion-item>
</ion-list> </ion-list>

View File

@ -36,7 +36,8 @@ export class CoreCourseSectionSelectorPage {
this.selected = navParams.get('selected'); this.selected = navParams.get('selected');
const course = navParams.get('course'); const course = navParams.get('course');
if (course && course.enablecompletion && course.courseformatoptions && course.courseformatoptions.coursedisplay == 1) { if (course && course.enablecompletion && course.courseformatoptions && course.courseformatoptions.coursedisplay == 1 &&
course.completionusertracked !== false) {
this.sections.forEach((section) => { this.sections.forEach((section) => {
let complete = 0, let complete = 0,
total = 0; total = 0;

View File

@ -30,7 +30,7 @@
</button> </button>
</div> </div>
</ion-item> </ion-item>
<ion-item *ngIf="showAll && course.progress != null && course.progress >= 0"> <ion-item *ngIf="showAll && course.progress != null && course.progress >= 0 && course.completionusertracked !== false">
<core-progress-bar [progress]="course.progress"></core-progress-bar> <core-progress-bar [progress]="course.progress"></core-progress-bar>
</ion-item> </ion-item>
<ng-content></ng-content> <ng-content></ng-content>