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

Revert the changes for forcing the course overview block for the app in 4.0

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 4.2
    • 4.1
    • Blocks
    • MOODLE_401_STABLE
    • MOODLE_402_STABLE
    • MDL-73670-master
    • Hide

      Setup

      1. As an admin, enable “Web services for mobile devices” on Site administration ► Advanced features
      2. Ensure that in the users' Dashboard the "Course overview" block is not available

       

      Test WS

      1. Create a Token in the mobile app service for any user on the site (not an admin account)
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      2. Open the console and execute this new curl request, replacing WS_TOKEN with the token you just created and the SITE_URL with yours.

        curl 'SITE_URL/webservice/rest/server.php?moodlewsrestformat=json' -H 'User-Agent: Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.91 Mobile Safari/537.36 MoodleMobile' --data 'wsfunction=core_block_get_dashboard_blocks&wstoken=WS_TOKEN&mypage=__default' | python -m "json.tool"

      3. Confirm that in the curl request response, you see a list of block instances, and none of the instances has the field name set to "myoverview" and the region field set to "forced".

       

      Test for regressions

      1. Edit the default Dashboard (Administration ► Appearance ► Default Dashboard page) for users and add the "Courses overview" block (edit mode must be enabled)
      2. Using the Moodle app, access your Moodle site using a non-admin account. The easiest way to get it working is:
        1. Install Chromium browser.
        2. Launch it using the command in the Installation and configuration section.
        3. Open the hosted version of the app, https://master.apps.moodledemo.net/, in the Chromium browser.
        4. Access your site using the hosted version of the app and login using a non-admin account.
      3. Open the My courses pages and confirm:
        • Confirm you see the My courses block displaying courses information.
      4. Open the Dashboard page and confirm:
        • Confirm you see the Course overview block displaying courses information.
      Show
      Setup As an admin, enable “Web services for mobile devices” on Site administration ► Advanced features Ensure that in the users' Dashboard the "Course overview" block is not available   Test WS Create a Token in the mobile app service for any user on the site (not an admin account) Click on Site administration ► Plugins ► Web services ► Manage tokens Open the console and execute this new curl request, replacing WS_TOKEN with the token you just created and the SITE_URL with yours. curl 'SITE_URL/webservice/rest/server.php?moodlewsrestformat=json' -H 'User-Agent: Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.91 Mobile Safari/537.36 MoodleMobile' --data 'wsfunction=core_block_get_dashboard_blocks&wstoken=WS_TOKEN&mypage=__default' | python -m "json.tool" Confirm that in the curl request response, you see a list of block instances, and none of the instances has the field name set to "myoverview" and the region field set to "forced".   Test for regressions Edit the default Dashboard (Administration ► Appearance ► Default Dashboard page) for users and add the "Courses overview" block (edit mode must be enabled) Using the Moodle app , access your Moodle site using a non-admin account. The easiest way to get it working is: Install Chromium browser. Launch it using the command in the Installation and configuration section . Open the hosted version of the app, https://master.apps.moodledemo.net/ , in the Chromium browser. Access your site using the hosted version of the app and login using a non-admin account. Open the My courses pages and confirm: Confirm you see the My courses block displaying courses information. Open the Dashboard page and confirm: Confirm you see the Course overview block displaying courses information.

      Some changes were introduced in MDL-72092 to always return the course overview block via Web Services for the mobile app.

      This was a temporary hack just to be removed in 4.1

            jleyva Juan Leyva
            jleyva Juan Leyva
            Rodrigo Mady Rodrigo Mady
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            2 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 - 2 hours, 34 minutes
                2h 34m

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