Skip to content

Commit

Permalink
Remove duplicate userId field
Browse files Browse the repository at this point in the history
  • Loading branch information
Mutugiii committed Oct 14, 2024
1 parent 0ec7bca commit 591b8cf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ export class ReportsDetailComponent implements OnInit, OnDestroy {
this.activityService.courseProgressReport().subscribe(({ enrollments, completions, steps, courses }) => {
this.progress.enrollments.data = enrollments;
this.progress.completions.data = completions;
this.progress.steps.data = steps.map(step => ({ ...step, user: step.userId.replace('org.couchdb.user:', '') }));
this.progress.steps.data = steps.map(({ userId, ...step }) => ({ ...step, user: userId.replace('org.couchdb.user:', '') }));
this.setStepCompletion();
this.courseActivities.total.data = this.courseActivities.total.data.map(courseActivity => {
const course = courses.find(c => c._id === courseActivity.courseId) || { steps: 0, exams: 0 };
Expand Down

0 comments on commit 591b8cf

Please sign in to comment.