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..3cf0aea18c 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,73 @@
- arrow_back
-
-
-
-
+
+
- {{headingStart ? headingStart + ' ' : ''}}
Course Progress
Test Progress
+
+
+
+
+
+
+ {{ headingStart ? headingStart + ' ' : '' }}
+
+
+
+
1" [planetCodes]="planetCodes" (selectionChange)="planetSelectionChange($event)">
- 1">
+ 1" class="margin-lr-3">
{{ step.stepTitle || 'Step ' + (step.index + 1) }}
-
-
-
-
-
-
No Progress record available
-
+
+
+
+
+
+ {{ headingStart ? headingStart + ' ' : '' }}
+
+
+
+
+
+ filter_list
+
+
+
+ 1" [planetCodes]="planetCodes" (selectionChange)="planetSelectionChange($event)">
+ 1" class="margin-lr-3">
+
+
+ {{ step.stepTitle || 'Step ' + (step.index + 1) }}
+
+
+
+
+ Show full course
+
+
+ Export
+
+
+
+
+
+
+
+
+
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..00ab1a2c62 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,10 @@ export class CoursesProgressLeaderComponent implements OnInit, OnDestroy {
submittedExamSteps: any[] = [];
planetCodes: string[] = [];
selectedPlanetCode: string;
+ deviceType: DeviceType;
+ deviceTypes = DeviceType;
+ isMobile = false;
+ showFiltersRow = false;
constructor(
private router: Router,
@@ -40,9 +43,12 @@ 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();
+ this.isMobile = this.deviceType === DeviceType.MOBILE;
}
ngOnInit() {
@@ -66,6 +72,17 @@ export class CoursesProgressLeaderComponent implements OnInit, OnDestroy {
this.onDestroy$.complete();
}
+ @HostListener('window:resize')
+ onResize() {
+ this.deviceType = this.deviceInfoService.getDeviceType();
+ this.isMobile = this.deviceType === DeviceType.MOBILE;
+ this.showFiltersRow = false;
+ }
+
+ toggleFiltersRow() {
+ this.showFiltersRow = !this.showFiltersRow;
+ }
+
setProgress(course) {
this.coursesService.findProgress([ course._id ], { allUsers: true }).subscribe((progress) => {
this.progress = progress;