Refacted updateMainPageCourseList function. Use for page refresh.