Merge pull request #4259 from dpalou/MOBILE-4653

Mobile 4653
main
Pau Ferrer Ocaña 2024-12-11 10:03:28 +01:00 committed by GitHub
commit 0bd461799e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -49,7 +49,7 @@
<div collapsible-footer appearOnBottom *ngIf="loaded && actions && actions.length > 0" slot="fixed">
<div class="list-item-limited-width adaptable-buttons-row">
<ion-button expand="block" (click)="action.action()" *ngFor="let action of actions">
<ion-button expand="block" (click)="action.action(action.sites[0])" *ngFor="let action of actions">
<ion-icon slot="start" name="{{action.icon}}" aria-hidden="true" />
{{ action.message | translate }}
</ion-button>

View File

@ -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();