Skip to content

Commit

Permalink
Merge pull request #3770 from dpalou/MOBILE-4367
Browse files Browse the repository at this point in the history
MOBILE-4367 courses: Check if core_my_view_page is available
  • Loading branch information
crazyserver authored Aug 22, 2023
2 parents 813f731 + 4e27bb6 commit 2f7136f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/features/courses/services/courses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1287,6 +1287,10 @@ export class CoreCoursesProvider {
*/
async logView(page: 'my' | 'dashboard'): Promise<void> {
const site = CoreSites.getRequiredCurrentSite();
if (!site.wsAvailable('core_my_view_page')) {
return;
}

const params: CoreMyViewPageWSParams = { page };

await site.write('core_my_view_page', params);
Expand Down

0 comments on commit 2f7136f

Please sign in to comment.