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

Return common module settings in core_course_get_course_module

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.2
    • 3.1.1
    • Web Services
    • MOODLE_31_STABLE
    • MOODLE_32_STABLE
    • MDL-55739-master
    • Hide
      1. Ensure that Outcomes are enabled in advanced features
      2. Create some Outcomes at site level using any one of the existing scales
      3. Create a new assignment activity, configure it to use outcomes and to use and advanced grading method like rubrics, force it to use a numeric grade and a grade to pass
      4. Enrol a user as student in the course and another user as teacher
      5. As admin, enable "Mobile services": Plugins ► Web Services ► Mobile
      6. Create a Token for the student and teacher user:
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      7. Next, you can do a CURL REST call simulating a WS client with the student user.
        • You need to replace the wstoken, cmid (with the activity course module id) and the URL of your moodle instance

          curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'cmid=81&wsfunction=core_course_get_course_module&wstoken=ffbe3a3002f235bf9d01fd9369e10b66' | python -m "json.tool"

      8. Confirm that you receive the basic module information 11 fields, you cannot see information like the grades settings and outcomes
      9. As a teacher run the same curl command replacing the token
      10. Confirm that you can see all the module information, including grade, gradepass, gradecat, outcomes and advanced grading methods
      11. Ensure that the information match the one in the web interface
      12. Now, update the assign and change the grade to use a scale (any).
      13. Run as teacher the curl command again, the grade should be now a negative value with the scale id.
      14. You should see a new field "scale" with the selected scalue values (comma separated)
      Show
      Ensure that Outcomes are enabled in advanced features Create some Outcomes at site level using any one of the existing scales Create a new assignment activity, configure it to use outcomes and to use and advanced grading method like rubrics, force it to use a numeric grade and a grade to pass Enrol a user as student in the course and another user as teacher As admin, enable "Mobile services": Plugins ► Web Services ► Mobile Create a Token for the student and teacher user: Click on Site administration ► Plugins ► Web services ► Manage tokens Next, you can do a CURL REST call simulating a WS client with the student user. You need to replace the wstoken, cmid (with the activity course module id) and the URL of your moodle instance curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'cmid=81&wsfunction=core_course_get_course_module&wstoken=ffbe3a3002f235bf9d01fd9369e10b66' | python -m "json.tool" Confirm that you receive the basic module information 11 fields, you cannot see information like the grades settings and outcomes As a teacher run the same curl command replacing the token Confirm that you can see all the module information, including grade, gradepass, gradecat, outcomes and advanced grading methods Ensure that the information match the one in the web interface Now, update the assign and change the grade to use a scale (any). Run as teacher the curl command again, the grade should be now a negative value with the scale id. You should see a new field "scale" with the selected scalue values (comma separated)

      In some cases, when we are using the app as teacher, we'd to retrieve some information like the grading settings or outcomes configuration (for example, to check if we can grade an assignment submission in the app).

            jleyva Juan Leyva
            jleyva Juan Leyva
            Dani Palou Dani Palou
            Dan Poltawski Dan Poltawski
            Adrian Greeve Adrian Greeve
            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.