MOBILE-4653 core: Improve detection of Workplace sites
parent
bd41c5d064
commit
b29f76d2ba
|
@ -807,7 +807,9 @@ export class CoreSitesProvider {
|
||||||
* @returns Either VALID_VERSION, WORKPLACE_APP or MOODLE_APP.
|
* @returns Either VALID_VERSION, WORKPLACE_APP or MOODLE_APP.
|
||||||
*/
|
*/
|
||||||
protected validateWorkplaceVersion(info: CoreSiteInfoResponse): number {
|
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();
|
const isWPEnabled = this.isWorkplaceEnabled();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue