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

New Web Service mod_quiz_get_combined_review_options

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.1
    • 3.0.2
    • Quiz, Web Services
    • MOODLE_30_STABLE
    • MOODLE_31_STABLE
    • MDL-52786-master
    • Hide
      1. Bump your /version.php file to force Moodle to reload the Mobile service
      2. Create a course with a student.
      3. Create a mod_quiz activity with at least one question (self-evaluable)
      4. As admin, enable "Mobile services": Plugins ► Web Services ► Mobile
      5. Create a Token for the student user
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      6. Next, you can do a CURL REST call simulating a WS client with the student user .
        • You need to replace the wstoken, quizid (the quiz instance value) and the URL of your moodle instance

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

      7. Confirm that
        • You see that all someoptions are equal to 0
        • You see that all alloptions are equal to 0
      8. Attempt the quiz with the student now, execute the curl request and check that
        • All the options (same and all) are equal to 1 except marks that are equal to 2 in both cases
      9. Obtain a token for a user in a different course, check that running the curl command return access_exception
      Show
      Bump your /version.php file to force Moodle to reload the Mobile service Create a course with a student. Create a mod_quiz activity with at least one question (self-evaluable) As admin, enable "Mobile services": Plugins ► Web Services ► Mobile Create a Token for the student 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, quizid (the quiz instance value) and the URL of your moodle instance curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'quizid=2&wsfunction=mod_quiz_get_combined_review_options&wstoken=ffbe3a3002f235bf9d01fd9369e10b66' --compressed Confirm that You see that all someoptions are equal to 0 You see that all alloptions are equal to 0 Attempt the quiz with the student now, execute the curl request and check that All the options (same and all) are equal to 1 except marks that are equal to 2 in both cases Obtain a token for a user in a different course, check that running the curl command return access_exception

      Combines the review options from a number of different quiz attempts.

            jleyva Juan Leyva
            jleyva Juan Leyva
            Tim Hunt Tim Hunt
            David Monllaó David Monllaó
            Rajesh Taneja Rajesh Taneja
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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