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

Return the "defaulthomepage" setting in the get_site_info web service

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.1
    • 3.0.1
    • Web Services
    • MOODLE_30_STABLE
    • MOODLE_31_STABLE
    • MDL-52586-master
    • 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

      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

            jleyva Juan Leyva
            jleyva Juan Leyva
            cameron1729 cameron1729
            Andrew Lyons Andrew Lyons
            David Monllaó David Monllaó
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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