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

New Web Service mod_quiz_get_quiz_feedback_for_grade

    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. Create a course, enrol a user as student
      2. Create a quiz, configure it with at least 2 feedback boundaries (for exaple, 0-50% and 50%-100%)
      3. Add some questions to the quiz, and now as the student do the quiz (several attempts) and check that you see the quiz feedback according the boundaries. (is better to start failing the quiz to see the lower boundary feedback)
      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, and the URL of your moodle instance

          curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'quizid=10&grade=7.4&wsfunction=mod_quiz_get_quiz_feedback_for_grade&wstoken=ffbe3a3002f235bf9d01fd9369e10b66' | python -m "json.tool"

      7. Confirm that you see the correct feedback message when passing a grade (if you pass a grade 5 (when max grade is 10) you should see the message for the boundary 50%/100%)
      Show
      Create a course, enrol a user as student Create a quiz, configure it with at least 2 feedback boundaries (for exaple, 0-50% and 50%-100%) Add some questions to the quiz, and now as the student do the quiz (several attempts) and check that you see the quiz feedback according the boundaries. (is better to start failing the quiz to see the lower boundary feedback) 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, and the URL of your moodle instance curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'quizid=10&grade=7.4&wsfunction=mod_quiz_get_quiz_feedback_for_grade&wstoken=ffbe3a3002f235bf9d01fd9369e10b66' | python -m "json.tool" Confirm that you see the correct feedback message when passing a grade (if you pass a grade 5 (when max grade is 10) you should see the message for the boundary 50%/100%)
    • Affected Branches:
      MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-53034-master

      Description

      Get the feedback text that should be show to a student who got the given grade in the given quiz.

      Parameters:
      quizid - Int, the quiz instance id
      grade - Float, the grade

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jleyva Juan Leyva
              Reporter:
              jleyva Juan Leyva
              Peer reviewer:
              Tim Hunt
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Ryan Wyllie
              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