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

mod_quiz_get_quizzes_by_courses is not returning required data when the quiz is closed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.1.6, 3.2.3
    • 3.2.2
    • Quiz
    • MOODLE_32_STABLE
    • MOODLE_31_STABLE, MOODLE_32_STABLE
    • MDL-58628-master
    • Hide
      1. Create one quiz activity, configured it so is not available until the next week for example (time restriction).
      2. Enable "Mobile services": Plugins ► Web Services ► Mobile
      3. Create a Token for one student in the course where the quiz is.
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      4. Next, you can do a couple of CURL REST call simulating a WS client with the student user
        • You need to replace the wstoken, courseid and the URL of your moodle instance

          curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'courseids%5B0%5D=4&wsfunction=mod_quiz_get_quizzes_by_courses&wstoken=1b9cc9f44630b554bb2c9428b8744338' | python -m "json.tool"

      5. Confirm that
        • In the response you see these fields (amont others):
          'attempts', 'timelimit', 'grademethod', 'decimalpoints', 'questiondecimalpoints', 'sumgrades', 'grade', 'preferredbehaviour', 'hasfeedback'
      Show
      Create one quiz activity, configured it so is not available until the next week for example (time restriction). Enable "Mobile services": Plugins ► Web Services ► Mobile Create a Token for one student in the course where the quiz is. Click on Site administration ► Plugins ► Web services ► Manage tokens Next, you can do a couple of CURL REST call simulating a WS client with the student user You need to replace the wstoken, courseid and the URL of your moodle instance curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'courseids%5B0%5D=4&wsfunction=mod_quiz_get_quizzes_by_courses&wstoken=1b9cc9f44630b554bb2c9428b8744338' | python -m "json.tool" Confirm that In the response you see these fields (amont others): 'attempts', 'timelimit', 'grademethod', 'decimalpoints', 'questiondecimalpoints', 'sumgrades', 'grade', 'preferredbehaviour', 'hasfeedback'

      When the quiz is closed, Moodle don't return some required information required to display attempts information, this was originally reported in: MOBILE-2086

            jleyva Juan Leyva
            jleyva Juan Leyva
            Tim Hunt Tim Hunt
            David Monllaó David Monllaó
            Marcus Green Marcus Green
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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