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

Return the "defaulthomepage" setting in the get_site_info web service

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.1
    • Fix Version/s: 3.1
    • Component/s: Web Services
    • Labels:
    • Testing Instructions:
      Hide
      1. Search for the defaulthomepage admin setting, set its value to Site
      2. Enable "Mobile services": Plugins ► Web Services ► Mobile
      3. Create a Token for the user (student) your are going to test with:
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
        • Click add, select user and service (Mobile Service)
      4. Next, you can do a CURL REST call simulating a WS client:
        • You need to replace the wstoken and the URL of your moodle instance

          curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'wsfunction=core_webservice_get_site_info&wstoken=ffbe3a3002f235bf9d01fd9369e10b66' --compressed

      5. Confirm that:
        • You receive a new element in the json response "userhomepage" with a value of 0
      6. As admin, search for the defaulthomepage admin setting, set its value to Dashboard
      7. Run again the WS, userhomepage must have a value of 1
      8. As admin, search for the defaulthomepage admin setting, set its value to User preference
      9. Log in in the site using the same user linked to the token
      10. Confirm that your default home page is the dashboard (my)
      11. Run the WS again, userhomepage must have a value of 1
      12. Go to the "Site Home" (via the Site Home link in the navigation menu) and in the administration block, under Front page settings, click the Make this my default home page link
      13. Run the WS again, userhomepage must have a value of 0
      Show
      Search for the defaulthomepage admin setting, set its value to Site Enable "Mobile services": Plugins ► Web Services ► Mobile Create a Token for the user (student) your are going to test with: Click on Site administration ► Plugins ► Web services ► Manage tokens Click add, select user and service (Mobile Service) Next, you can do a CURL REST call simulating a WS client: You need to replace the wstoken and the URL of your moodle instance curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'wsfunction=core_webservice_get_site_info&wstoken=ffbe3a3002f235bf9d01fd9369e10b66' --compressed Confirm that: You receive a new element in the json response "userhomepage" with a value of 0 As admin, search for the defaulthomepage admin setting, set its value to Dashboard Run again the WS, userhomepage must have a value of 1 As admin, search for the defaulthomepage admin setting, set its value to User preference Log in in the site using the same user linked to the token Confirm that your default home page is the dashboard (my) Run the WS again, userhomepage must have a value of 1 Go to the "Site Home" (via the Site Home link in the navigation menu) and in the administration block, under Front page settings, click the Make this my default home page link Run the WS again, userhomepage must have a value of 0
    • Affected Branches:
      MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-52586-master

      Description

      In the Mobile app we support both the site page and the "my courses" page.

      We should redirect to the user to the Site page if is configured (forced or in the user profile) thus we need that information returned in the get_site_info web service

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  23/May/16