Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-82385

Course hierarchy support for the mobile app

XMLWordPrintable

    • MOODLE_405_STABLE
    • MOODLE_405_STABLE
    • MDL-82385-main
    • Hide

      To test this issue you will need either a device with Android 7+ or a device with iOS 14+.

      1. In Moodle as admin, enable subsections if needed: Site administration > Plugins > Manage activities > Subsection.
      2. Enable Web Services for the app: Site administration > General > Advanced features > Enable web services for mobile devices.
      3. Create a new course and enrol a user in it.
      4. In the course, click to add a new activity and select "Subsection". Just give it a name and save.
      5. Create a new activity inside the subsection. It can be anything: a label, a page, etc.
      6. Install the Moodle app from Google Play or App Store in a device with Android 7+ or iOS 14+.
      7. Login with the student account, select the "My courses" tab using bottom tabs (if not already selected) and open the course created in step 3. Check that you see the subsection as if it was a "normal" activity, the subsection contents are not displayed inline for app 4.4 and older.
      8. Click the subsection. Check that the section is displayed and you can see the activity you created in step 5.
      9. Open the course index using the floating button in the course. Check that:
        1. If the device you're using has a modern webview, the subsection should NOT be displayed in the list of sections of the course index (e.g. when all sections are collapsed). You can still see the subsection name inside the parent section if you expand the parent section, but without displaying the subsection contents in the course index. 
        2. If the device you're using has an old webview, the subsection should be displayed using italics in the list of sections (e.g. when all sections are collapsed), while other sections don't use italics. 
      Show
      To test this issue you will need either a device with Android 7+ or a device with iOS 14+. In Moodle as admin, enable subsections if needed: Site administration > Plugins > Manage activities > Subsection. Enable Web Services for the app: Site administration > General > Advanced features > Enable web services for mobile devices. Create a new course and enrol a user in it. In the course, click to add a new activity and select "Subsection". Just give it a name and save. Create a new activity inside the subsection. It can be anything: a label, a page, etc. Install the Moodle app from Google Play or App Store in a device with Android 7+ or iOS 14+. Login with the student account, select the "My courses" tab using bottom tabs (if not already selected) and open the course created in step 3. Check that you see the subsection as if it was a "normal" activity, the subsection contents are not displayed inline for app 4.4 and older. Click the subsection. Check that the section is displayed and you can see the activity you created in step 5. Open the course index using the floating button in the course. Check that: If the device you're using has a modern webview, the subsection should NOT be displayed in the list of sections of the course index (e.g. when all sections are collapsed). You can still see the subsection name inside the parent section if you expand the parent section, but without displaying the subsection contents in the course index.  If the device you're using has an old webview, the subsection should be displayed using italics in the list of sections (e.g. when all sections are collapsed), while other sections don't use italics. 
    • Moppies PB candidates

      Supporting the new course hierarchy, specifically, subsections, comes with some challenges for the mobile app as we need to support older versions of the apps (people not updating, devices that cannot update to the app 4.5 because minimum Android/iOS versions or custom apps) but also support the new functionality in 4.5

      After discussing this with tusefomal we've drafted the following plan:

      For older versions of the Moodle app, 4.4 and previous:
      Option 1:

      • Support the subsection by adding site plugin support to mod_subsection in order to print a link to a page in the app itself that will display the section contents
      • The previous should work as delegated sections should not be displayed in the app even if we receive them by WS because they will have the field hiddenbysections set to 1, the previous does not prevent to display the section when linked directly
      • The site plugin will be ignored by the version 4.5 of the app
      • In 5.5 the site plugin should be removed from core

      Option 2:

      • Change the core_course_get_contents to avoid returning the mod_subsection module (older versions of the app)
      • Display sections at the end of re-order them

      Option 3:

      • Create a Site plugin to display the subsection when clicking on the mod_subsection activity
      • Change the core_course_get_contents to return the sub sections name within a span or div tag with a class
      • Hide the subsections content, course index link and bottom buttons via site plugin CSS using the previous class

      For app version 4.5:

      • The site plugin will be ignored by the version 4.5 of the app
      • Return via the core_course_get_contents the id of the delegated section for the mod_subsection instances returned as part of the structure. This can be achieved using the module->customdata field (that is set via lib.php callback get_coursemodule_info)
      • Add a new field in the section structure to indicate whether it is a delegated section or not

        1. courseindex.PNG
          courseindex.PNG
          130 kB
        2. MDL-82385.png
          MDL-82385.png
          139 kB

            dpalou Dani Palou
            jleyva Juan Leyva
            Juan Leyva Juan Leyva
            Jun Pataleta Jun Pataleta
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours, 25 minutes
                3h 25m

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