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

Can’t get data from course elements Feedback via Rest API

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a bug
    • Icon: Minor Minor
    • None
    • 4.1 regressions
    • Web Services
    • None

      Hello! I tried it in Moodle 3.11 and 4.1.

      I am automating the filling of documents through Python by accessing the moodle via the rest api. In the moodle, students fill out a questionnaire (last name, first name, gender, document numbers, etc.), designed as a Feedback course element.

       
      I'm trying to get student responses in the Feedback element, but the only method that manages to get anything is mod_feedback_get_analysis. The remaining methods return an empty array {'responses': [], 'warnings': []}. As parameters I pass feedbackid and courseid (the id of the course in which this feedback is located).

       
      What am I doing wrong? How to get user responses without mod_feedback_get_analysis method?

       
      The problem with the mod_feedback_get_analysis method is that multiple choice questions (through which, for example, fields such as “Gender” - male or female) are given in the form of statistics, for example, “male - 0.8, female 0.2” and to which students which answer corresponds is not understand.

       

      curl "https://my_moodlecom/webservice/rest/[server|https://moodle.org/mod/glossary/showentry.php?eid=30&displayformat=dictionary].php?wstoken=b6514g31f7aebf617d4659d97b1f7fh3&wsfunction=mod_feedback_get_finished_responses&moodlewsrestformat=json&feedbackid=2&courseid=292"

      {"responses":[],"warnings":[]}

            Unassigned Unassigned
            alex-smirnov-sh alex-smirnov-sh
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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