From b29f76d2ba30c863c3b68f18b1804024a4b1be0c Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Wed, 11 Dec 2024 09:18:19 +0100 Subject: [PATCH] MOBILE-4653 core: Improve detection of Workplace sites --- src/core/services/sites.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/services/sites.ts b/src/core/services/sites.ts index f3a713209..d052b9338 100644 --- a/src/core/services/sites.ts +++ b/src/core/services/sites.ts @@ -807,7 +807,9 @@ export class CoreSitesProvider { * @returns Either VALID_VERSION, WORKPLACE_APP or MOODLE_APP. */ protected validateWorkplaceVersion(info: CoreSiteInfoResponse): number { - const isWorkplace = !!info.functions && info.functions.some((func) => func.name == 'tool_program_get_user_programs'); + const isWorkplace = !!info.functions && info.functions.some((func) => + func.name === 'tool_program_get_user_programs' || + func.name === 'tool_catalogue_get_user_catalogue'); const isWPEnabled = this.isWorkplaceEnabled();