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

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.8.6, 3.9.3
    • 3.6.2
    • Other
    • MOODLE_36_STABLE
    • MOODLE_38_STABLE, MOODLE_39_STABLE
    • MDL-64657-master
    • 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)    

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

        1. MDL-64657.jpg
          38 kB
          Anna Carissa Sadia

            jleyva Juan Leyva
            jleyva Juan Leyva
            Dani Palou Dani Palou
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Anna Carissa Sadia Anna Carissa Sadia
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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