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

New Web Service mod_quiz_get_attempt_review

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.1
    • 3.0.2
    • Quiz
    • MOODLE_30_STABLE
    • MOODLE_31_STABLE
    • MDL-52868-master
    • 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

      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

            jleyva Juan Leyva
            jleyva Juan Leyva
            Tim Hunt Tim Hunt
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Simey Lameze Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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