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

New Web Service mod_quiz_get_quiz_feedback_for_grade

XMLWordPrintable

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

      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

            jleyva Juan Leyva
            jleyva Juan Leyva
            Tim Hunt Tim Hunt
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Ryan Wyllie Ryan Wyllie
            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.