Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-778 META: Migrate to Ionic
  3. MOBILE-989

getMoodleFilePath: using .toInternalURL on a promise (error)

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: File system
    • Labels:
    • Testing Instructions:
      Hide
      1. Execute the application in a real device.
      2. Check that the images affected by mm-format-text (like the user avatars in sites list, or images in course description) are correctly downloaded and replaced. Check that in the log there's no message saying "File not downloaded, but cordova is not available."
      Show
      Execute the application in a real device. Check that the images affected by mm-format-text (like the user avatars in sites list, or images in course description) are correctly downloaded and replaced. Check that in the log there's no message saying "File not downloaded, but cordova is not available."
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Pull Master Branch:

      Description

      In $mmSitesManager.getMoodleFilePath, when a file needs to be downloaded we have the following code:

      return $mmWS.downloadFile(downloadURL, path.file).toInternalURL();
      

      $mmWS.downloadFile always return a promise, so an exception is thrown.

        Attachments

          Activity

            People

            Assignee:
            dpalou Dani Palou
            Reporter:
            dpalou Dani Palou
            Peer reviewer:
            Frédéric Massart Frédéric Massart
            Integrator:
            Juan Leyva Juan Leyva
            Tester:
            Juan Leyva Juan Leyva
            Participants:
            Component watchers:
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              31/Jul/15