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

New Web Service mod_quiz_get_attempt_review

    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
    • Labels:
    • Testing Instructions:
      Hide
      1. Bump your /version.php file to force Moodle to reload the Mobile service
      2. Create a course with a one student
      3. Create a mod_quiz activity with at least two questions (not essay)
      4. In the feedback section, add a couple of overall feedbacks for two different ranges
      5. Enable "Mobile services": Plugins ► Web Services ► Mobile
      6. Create a Token for the student
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      7. As student do the quiz, reply all the quiz questions and finish it, open the review page
      8. Now, replace the wstoken and attemptid (and your site URL) and execute the following curl command

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

      9. Confirm that the information you see match with the answer report in Moodle:
      10. * The attemp information is the same (note that for example for times we return the timestamps not formatted dates)
        • The grade is the same
        • You see the same number of questions
        • The feedback is correct
        • The question state and names are correct
        • You may also check that the html for each question match the one rendered in the attempt review in Moodle
      Show
      Bump your /version.php file to force Moodle to reload the Mobile service Create a course with a one student Create a mod_quiz activity with at least two questions (not essay) In the feedback section, add a couple of overall feedbacks for two different ranges Enable "Mobile services": Plugins ► Web Services ► Mobile Create a Token for the student Click on Site administration ► Plugins ► Web services ► Manage tokens As student do the quiz, reply all the quiz questions and finish it, open the review page Now, replace the wstoken and attemptid (and your site URL) and execute the following curl command curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'attemptid=15&wsfunction=mod_quiz_get_attempt_review&wstoken=ffbe3a3002f235bf9d01fd9369e10b66 | python -m "json.tool" Confirm that the information you see match with the answer report in Moodle: * The attemp information is the same (note that for example for times we return the timestamps not formatted dates) The grade is the same You see the same number of questions The feedback is correct The question state and names are correct You may also check that the html for each question match the one rendered in the attempt review in Moodle
    • Affected Branches:
      MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-52868-master

      Description

      Returns review information for the given attempt, can be used by users or teaches

      parameters
      attemptid - the attempt id
      page - return information only for questions in this page (optional, leave empty for all the questions in all the pages)

      returns
      attempt - the complete attempt data
      additionaldata - additional data from the behaviour and the feedback
      questions list of:
      slot - slot number
      html - question rendered

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jleyva Juan Leyva
                Reporter:
                jleyva Juan Leyva
                Peer reviewer:
                Tim Hunt
                Integrator:
                Eloy Lafuente (stronk7)
                Tester:
                Simey Lameze
                Participants:
                Component watchers:
                Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

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