Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-2907

Obtain the resource file mimetype and other required information from the course_get_contents WS

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Major Major
    • 3.7.0
    • 3.6.1
    • Resource add-on
    • Hide

      This issue should only be tested in 1 OS.

      1. Install the app in the device and login in mobilemaster.
      2. Open "MM Dev Testing > Resource: File". Check that the "labels" (size, modified date, etc.) and the icons displayed in the activities match the ones displayed in web. Please notice that these labels will be in the site language, not the app language.
      3. Now open "Nextcloud course > Linked files" and enable the download. Check that you see a download/refresh icon in each resource.
      4. Now login in mobile36.
      5. Open "MM Dev Testing > Resource: File". Check that the "labels" (size, modified date, etc.) and the icons displayed in the activities match the ones displayed in web. In this case, the labels will be in the app language, not the site language.
      6. Now open "Nextcloud course > Linked files" and enable the download. Check that the resources cannot be downloaded.

      Extra test:

      1. Run the app in an environment that can be inspected (browser or iOS).
      2. Login in mobilemaster.
      3. Open the inspector, go to the Network tab and clear the requests.
      4. Open the MM Dev Testing course.
      5. Check that there is no request to server.php with wsfunction=core_course_get_contents and modname=resource, and no request with wsfunction=mod_resource_get_resources_by_courses.
      Show
      This issue should only be tested in 1 OS. Install the app in the device and login in mobilemaster. Open "MM Dev Testing > Resource: File". Check that the "labels" (size, modified date, etc.) and the icons displayed in the activities match the ones displayed in web. Please notice that these labels will be in the site language, not the app language. Now open "Nextcloud course > Linked files" and enable the download. Check that you see a download/refresh icon in each resource. Now login in mobile36. Open "MM Dev Testing > Resource: File". Check that the "labels" (size, modified date, etc.) and the icons displayed in the activities match the ones displayed in web. In this case, the labels will be in the app language, not the site language. Now open "Nextcloud course > Linked files" and enable the download. Check that the resources cannot be downloaded. Extra test: Run the app in an environment that can be inspected (browser or iOS). Login in mobilemaster. Open the inspector, go to the Network tab and clear the requests. Open the MM Dev Testing course. Check that there is no request to server.php with wsfunction=core_course_get_contents and modname=resource, and no request with wsfunction=mod_resource_get_resources_by_courses.
    • MOODLE_36_STABLE
    • MOODLE_37_STABLE
    • Moodle App 3.7.0

      Right now the only way to get the mime type of a file resource was via getting all the files to iterate them and the the first file mime type.

      In MDL-63958 we introduced some code in Moodle 3.7 to return the mimetype via the course_get_contents WS (before getting all the module contents)

      Also, thanks MDL-64026, via the same course_get_contents WS we are now able to obtain the filescount, filessize and last modified time of all the resource files so we can save extra WS requests.

            dpalou Dani Palou
            jleyva Juan Leyva
            Albert Gasset Albert Gasset
            Juan Leyva Juan Leyva
            Isabel Renedo Rouco Isabel Renedo Rouco
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.