From 4b45b3120b09195d896f2492c199cbaf0b699a30 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Fri, 20 Jul 2018 13:27:34 +0200 Subject: [PATCH] MOBILE-2478 linux: Fix LTI in Linux --- src/addon/mod/lti/providers/lti.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/addon/mod/lti/providers/lti.ts b/src/addon/mod/lti/providers/lti.ts index f2a453ce6..64f6f6e6a 100644 --- a/src/addon/mod/lti/providers/lti.ts +++ b/src/addon/mod/lti/providers/lti.ts @@ -14,6 +14,7 @@ import { Injectable } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; +import { CoreAppProvider } from '@providers/app'; import { CoreFileProvider } from '@providers/file'; import { CoreSitesProvider } from '@providers/sites'; import { CoreTextUtilsProvider } from '@providers/utils/text'; @@ -40,7 +41,8 @@ export class AddonModLtiProvider { private textUtils: CoreTextUtilsProvider, private urlUtils: CoreUrlUtilsProvider, private utils: CoreUtilsProvider, - private translate: TranslateService) {} + private translate: TranslateService, + private appProvider: CoreAppProvider) {} /** * Delete launcher. @@ -84,7 +86,11 @@ export class AddonModLtiProvider { ' \n'; return this.fileProvider.writeFile(this.LAUNCHER_FILE_NAME, text).then((entry) => { - return entry.toURL(); + if (this.appProvider.isDesktop()) { + return entry.toInternalURL(); + } else { + return entry.toURL(); + } }); }