diff --git a/package.json b/package.json index f728fb8f3a..05e6afc14e 100755 --- a/package.json +++ b/package.json @@ -1,10 +1,10 @@ { "name": "planet", "license": "AGPL-3.0", - "version": "0.15.81", + "version": "0.15.82", "myplanet": { - "latest": "v0.21.27", - "min": "v0.20.27" + "latest": "v0.21.28", + "min": "v0.20.28" }, "scripts": { "ng": "ng", diff --git a/src/app/courses/progress-courses/courses-progress-leader.component.html b/src/app/courses/progress-courses/courses-progress-leader.component.html index e978628454..0cff81fd1f 100644 --- a/src/app/courses/progress-courses/courses-progress-leader.component.html +++ b/src/app/courses/progress-courses/courses-progress-leader.component.html @@ -1,31 +1,43 @@ arrow_back + + Course Progress + Test Progress + -
- - - {{headingStart ? headingStart + ' ' : ''}} - Course Progress - Test Progress - + +

{{ headingStart }}

+ - - - - - {{ step.stepTitle || 'Step ' + (step.index + 1) }} - - - - - -
-
- - - No Progress record available -
+ + + + + + + + + + + +
+ + + + + + {{ step.stepTitle || 'Step ' + (step.index + 1) }} + + + + + + + + +
+ + + No Progress record available
diff --git a/src/app/courses/progress-courses/courses-progress-leader.component.ts b/src/app/courses/progress-courses/courses-progress-leader.component.ts index 8ab04286f6..c6a36c59d9 100644 --- a/src/app/courses/progress-courses/courses-progress-leader.component.ts +++ b/src/app/courses/progress-courses/courses-progress-leader.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, OnDestroy } from '@angular/core'; +import { Component, OnInit, OnDestroy, HostListener } from '@angular/core'; import { Router, ActivatedRoute, ParamMap } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; import { Subject } from 'rxjs'; @@ -10,15 +10,14 @@ import { dedupeObjectArray } from '../../shared/utils'; import { DialogsLoadingService } from '../../shared/dialogs/dialogs-loading.service'; import { findDocuments } from '../../shared/mangoQueries'; import { UserProfileDialogComponent } from '../../users/users-profile/users-profile-dialog.component'; +import { DeviceInfoService, DeviceType } from '../../shared/device-info.service'; @Component({ - templateUrl: 'courses-progress-leader.component.html', - styleUrls: [ 'courses-progress.scss' ] + templateUrl: 'courses-progress-leader.component.html' }) export class CoursesProgressLeaderComponent implements OnInit, OnDestroy { course: any; - // Need to define this variable for template which is shared with CoursesProgressLearner headingStart = ''; chartLabel = $localize`Steps`; selectedStep: any; @@ -32,6 +31,8 @@ export class CoursesProgressLeaderComponent implements OnInit, OnDestroy { submittedExamSteps: any[] = []; planetCodes: string[] = []; selectedPlanetCode: string; + deviceType: DeviceType; + deviceTypes = DeviceType; constructor( private router: Router, @@ -40,9 +41,11 @@ export class CoursesProgressLeaderComponent implements OnInit, OnDestroy { private submissionsService: SubmissionsService, private csvService: CsvService, private dialogsLoadingService: DialogsLoadingService, - private dialog: MatDialog + private dialog: MatDialog, + private deviceInfoService: DeviceInfoService ) { this.dialogsLoadingService.start(); + this.deviceType = this.deviceInfoService.getDeviceType(); } ngOnInit() { @@ -66,6 +69,11 @@ export class CoursesProgressLeaderComponent implements OnInit, OnDestroy { this.onDestroy$.complete(); } + @HostListener('window:resize') + onResize() { + this.deviceType = this.deviceInfoService.getDeviceType(); + } + setProgress(course) { this.coursesService.findProgress([ course._id ], { allUsers: true }).subscribe((progress) => { this.progress = progress;