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

get_contents WS should honor hidden sections setting, returning hidden section names if configured

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.6.2
    • Fix Version/s: 3.8.6, 3.9.3
    • Component/s: Other
    • Labels:
    • Testing Instructions:
      Hide
      Prerequisite
      1. Moodle mobile app or https://mobileapp.moodledemo.net/.
      2. Your Moodle mobile app should be able to connect to your Moodle website. You can either do the following:
        • Ensure that the phone with the mobile app and the web server are on the same network. Or
        • Expose the web server over the internet via ngrok.
      Test
      1. As admin, enable "Mobile services": Site administration ► Mobile app ► Mobile settings
      2. Create a new course configured to use "Topics" as of course format, using 4 sections
      3. Ensure that in the course settings "Course format -> Hidden sections" , the option "Hidden sections are shown in collapsed form" is selected
      4. Turn editing on
      5. In each section add a new resource, it could be just a HTML page or something, you can triplicate the same resource and place it in each section
      6. Make the second section not visible
      7. Set a "Date" availability condition in the third section, indicating a future day (next year) and ensuring that is configured so the availability restrictions are displayed to the user (via the eye icon)
      8. Set a "Date" availability condition in the fourth section, indicating a future day (next year) and ensuring that is configured so the availability restrictions are NOT displayed to the user (via the eye icon)
      9. Enrol one user as student in the course
      10. Enrol another user as editing teacher in the course
      11. Now, access to the course using the moodle app with the student user and confirm that:
        • in the Moodle app, when you choose "all sections" (using the section selector at the top) you don't see the hidden section contents but you can see the section name
        • you don't see the contents of the third section but you see the availability information indicating the future date
        • you don't see the contents and the name of the fourth section
      12. Now, access to the course using the moodle app with the teacher user and confirm that:
        • in the Moodle app, when you choose "all sections" (using the section selector at the top) you can see the hidden section contents, including a "Hidden from students" label
      13. Access Moodle as admin again
      14. Go to course settings "Course format -> Hidden sections" , and change the value so the option "Hidden sections are completely invisible" is selected (Save changes)
      15. Now, access to the course using the moodle app with the student user, perform a "Pull To Refresh" to make sure data is updated and confirm that:
        • in the Moodle app, when you choose "all sections" (using the section selector at the top) you don't see the hidden section name or contents at all (nothing is displayed about that section)

       
       

      Show
      Prerequisite Moodle mobile app or https://mobileapp.moodledemo.net/ . Your Moodle mobile app should be able to connect to your Moodle website. You can either do the following: Ensure that the phone with the mobile app and the web server are on the same network. Or Expose the web server over the internet via ngrok. Test As admin, enable "Mobile services": Site administration ► Mobile app ► Mobile settings Create a new course configured to use "Topics" as of course format, using 4 sections Ensure that in the course settings "Course format -> Hidden sections" , the option "Hidden sections are shown in collapsed form" is selected Turn editing on In each section add a new resource, it could be just a HTML page or something, you can triplicate the same resource and place it in each section Make the second section not visible Set a "Date" availability condition in the third section, indicating a future day (next year) and ensuring that is configured so the availability restrictions are displayed to the user (via the eye icon) Set a "Date" availability condition in the fourth section, indicating a future day (next year) and ensuring that is configured so the availability restrictions are NOT displayed to the user (via the eye icon) Enrol one user as student in the course Enrol another user as editing teacher in the course Now, access to the course using the moodle app with the student user and confirm that: in the Moodle app, when you choose "all sections" (using the section selector at the top) you don't see the hidden section contents but you can see the section name you don't see the contents of the third section but you see the availability information indicating the future date you don't see the contents and the name of the fourth section Now, access to the course using the moodle app with the teacher user and confirm that: in the Moodle app, when you choose "all sections" (using the section selector at the top) you can see the hidden section contents, including a "Hidden from students" label Access Moodle as admin again Go to course settings "Course format -> Hidden sections" , and change the value so the option "Hidden sections are completely invisible" is selected (Save changes) Now, access to the course using the moodle app with the student user, perform a "Pull To Refresh" to make sure data is updated and confirm that: in the Moodle app, when you choose "all sections" (using the section selector at the top) you don't see the hidden section name or contents at all (nothing is displayed about that section)    
    • Affected Branches:
      MOODLE_36_STABLE
    • Fixed Branches:
      MOODLE_38_STABLE, MOODLE_39_STABLE
    • Pull from Repository:
    • Pull 3.8 Branch:
    • Pull 3.9 Branch:
    • Pull 3.10 Branch:
      MDL-64657-310
    • Pull Master Branch:
      MDL-64657-master

      Description

      Right now the WS is not returning hidden sections names when is configured to be able to see them

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jleyva Juan Leyva
              Reporter:
              jleyva Juan Leyva
              Peer reviewer:
              Dani Palou
              Integrator:
              Sara Arjona (@sarjona)
              Tester:
              Anna Carissa Sadia
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                9/Nov/20

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day, 1 hour, 1 minute
                  1d 1h 1m