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

New Web Service mod_quiz_get_combined_review_options

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.2
    • Fix Version/s: 3.1
    • Component/s: Quiz, Web Services
    • Labels:
    • Testing Instructions:
      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
    • Affected Branches:
      MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-52786-master

      Description

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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

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