Skip to content

Commit

Permalink
Remove duplicate call to loadfeedbacksessionsforcourse (#13130)
Browse files Browse the repository at this point in the history
  • Loading branch information
Respirayson committed Jun 22, 2024
1 parent 6114677 commit 40350ef
Showing 1 changed file with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,6 @@ export class StudentHomePageComponent implements OnInit {
});

this.sortCoursesBy(SortBy.COURSE_CREATION_DATE);
this.courses.slice(0, 3).forEach((course: StudentCourse) => {
course.isTabExpanded = true;
this.loadFeedbackSessionsForCourse(course.course.courseId);
});
},
error: (e: ErrorMessageOutput) => {
this.hasCoursesLoadingFailed = true;
Expand Down Expand Up @@ -306,11 +302,9 @@ export class StudentHomePageComponent implements OnInit {
this.courses = copy;

// open the first three panels
this.courses.forEach((course: StudentCourse, idx: number) => {
course.isTabExpanded = idx < 3;
if (idx < 3) {
this.loadFeedbackSessionsForCourse(course.course.courseId);
}
this.courses.slice(0, 3).forEach((course: StudentCourse) => {
course.isTabExpanded = true;
this.loadFeedbackSessionsForCourse(course.course.courseId);
});
}

Expand Down

0 comments on commit 40350ef

Please sign in to comment.