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

Received Invalidresponse when non-editing teacher try to grade student post from different group

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.9.4
    • Fix Version/s: None
    • Component/s: Forum
    • Labels:
      None
    • Affected Branches:
      MOODLE_39_STABLE

      Description

      Hello,

      We ran into an issue when non-editing teacher tries to grade students' forum posts and received "invalidresponse" error.

      Each non-editing teacher is assigned to just one group, and the non-editing teacher is only seeing posts from the assigned group. (this is the expected behaviour)

      However, when non-editing teacher tries to grade the posts, all students' post shows up and caused Moodle to generate invalidreponse error because he/she is not able to view the post from another group.

      To replicate the issue:

      1. Create a course
      2. Create 2 students and 2 groups (group A and B).
      3. Assign student 1 to group A, and student 2 to group B
      4. Create 2 non-editing teachers (aka TA)
      5. Assign TA 1 to group A, and TA 2 to group B
      6. Create a forum activity with "Each person posts one discussion"
      7. Have both students post a topic in the forum
      8. TA1 sees posts from group A only
      9. TA1 tries to "Grade users"
      10. TA1 will see principal/teacher/manager and other non-editing teacher first.
      11. TA1 will then see student 1's post and able to grade
      12. TA1 click next student
      13. TA1 will receive invalidresponse because student 2 is not in the same group as TA1.

       

       

      Stack trace:

      discussions => Invalid response value detected: posts => Invalid response value detected: userposts => Invalid response detected: timecreated => Invalid response value detected: Invalid external api response: the value is "" of PHP type "NULL", the server was expecting "int" type

      Error code: invalidresponse

      *line 459 of /lib/externallib.php: invalid_response_exception thrown
      *line 267 of /lib/externallib.php: call to external_api::clean_returnvalue()
      *line 81 of /lib/ajax/service.php: call to external_api::call_external_function()

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            makusan Yu-cheng Chang
            Participants:
            Component watchers:
            Andrew Nicols, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: