Merge pull request #3770 from dpalou/MOBILE-4367

MOBILE-4367 courses: Check if core_my_view_page is available
main
Pau Ferrer Ocaña 2023-08-22 15:39:06 +02:00 committed by GitHub
commit 2f7136f574
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -1287,6 +1287,10 @@ export class CoreCoursesProvider {
*/ */
async logView(page: 'my' | 'dashboard'): Promise<void> { async logView(page: 'my' | 'dashboard'): Promise<void> {
const site = CoreSites.getRequiredCurrentSite(); const site = CoreSites.getRequiredCurrentSite();
if (!site.wsAvailable('core_my_view_page')) {
return;
}
const params: CoreMyViewPageWSParams = { page }; const params: CoreMyViewPageWSParams = { page };
await site.write('core_my_view_page', params); await site.write('core_my_view_page', params);