Merge pull request #2874 from dpalou/MOBILE-3320

Mobile 3320
main
Pau Ferrer Ocaña 2021-07-06 12:17:15 +02:00 committed by GitHub
commit 4c870c072c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 17 deletions

View File

@ -164,23 +164,12 @@ export class AddonCalendarHelperProvider {
formatEventData(event: AddonCalendarEvent | AddonCalendarEventBase | AddonCalendarGetEventsEvent): AddonCalendarEventToDisplay { formatEventData(event: AddonCalendarEvent | AddonCalendarEventBase | AddonCalendarGetEventsEvent): AddonCalendarEventToDisplay {
const eventFormatted: AddonCalendarEventToDisplay = { const eventFormatted: AddonCalendarEventToDisplay = {
id: event.id!, ...event,
name: event.name, location: 'location' in event ? event.location : undefined,
eventtype: event.eventtype, eventcount: 'eventcount' in event ? event.eventcount || 0 : 0,
categoryid: event.categoryid,
groupid: event.groupid,
description: event.description,
location: 'location' in event? event.location : undefined,
timestart: event.timestart,
timeduration: event.timeduration,
eventcount: 'eventcount' in event? event.eventcount || 0 : 0,
repeatid: event.repeatid || 0, repeatid: event.repeatid || 0,
// repeateditall: event.repeateditall,
userid: event.userid,
timemodified: event.timemodified,
eventIcon: this.getEventIcon(event.eventtype), eventIcon: this.getEventIcon(event.eventtype),
formattedType: AddonCalendar.getEventType(event), formattedType: AddonCalendar.getEventType(event),
modulename: event.modulename,
format: 1, format: 1,
visible: 1, visible: 1,
offline: false, offline: false,

View File

@ -78,7 +78,7 @@ export class AddonModLtiModuleHandlerService implements CoreCourseModuleHandler
CoreNavigator.navigateToSitePath(AddonModLtiModuleHandlerService.PAGE_NAME + routeParams, options); CoreNavigator.navigateToSitePath(AddonModLtiModuleHandlerService.PAGE_NAME + routeParams, options);
}, },
buttons: [{ buttons: [{
icon: 'link', icon: 'fas-external-link-alt',
label: 'addon.mod_lti.launchactivity', label: 'addon.mod_lti.launchactivity',
action: (event: Event, module: CoreCourseModule, courseId: number): void => { action: (event: Event, module: CoreCourseModule, courseId: number): void => {
// Launch the LTI. // Launch the LTI.

View File

@ -107,7 +107,7 @@ export class AddonModUrlModuleHandlerService implements CoreCourseModuleHandler
}, },
buttons: [{ buttons: [{
hidden: true, // Hide it until we calculate if it should be displayed or not. hidden: true, // Hide it until we calculate if it should be displayed or not.
icon: 'link', icon: 'fas-link',
label: 'core.openmodinbrowser', label: 'core.openmodinbrowser',
action: (event: Event, module: CoreCourseModule, courseId: number): void => { action: (event: Event, module: CoreCourseModule, courseId: number): void => {
openUrl(module, courseId); openUrl(module, courseId);

View File

@ -125,6 +125,7 @@ export class CoreSite {
public loggedOut?: boolean, public loggedOut?: boolean,
) { ) {
this.logger = CoreLogger.getInstance('CoreSite'); this.logger = CoreLogger.getInstance('CoreSite');
this.siteUrl = CoreUrlUtils.removeUrlParams(this.siteUrl); // Make sure the URL doesn't have params.
this.setInfo(infos); this.setInfo(infos);
this.calculateOfflineDisabled(); this.calculateOfflineDisabled();
@ -1460,7 +1461,7 @@ export class CoreSite {
// Use the wwwroot returned by the server. // Use the wwwroot returned by the server.
if (config!.httpswwwroot) { if (config!.httpswwwroot) {
this.siteUrl = config!.httpswwwroot; this.siteUrl = CoreUrlUtils.removeUrlParams(config!.httpswwwroot); // Make sure the URL doesn't have params.
} }
return config!; return config!;