Moodle
  1. Moodle
  2. MDL-37629

Assignment: Undefined property stdclass::teamsubmission

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.4
    • Fix Version/s: 2.3.5
    • Component/s: Assignment
    • Labels:
    • Testing Instructions:
      Hide
      • Make sure you are in debug mode with messages displayed.
      • Create a new assignment in a course with "Submission comments" to "yes"
      • As a student, submit an assignment.
      • Click on the assignment. Verify that you do not see an Undefined property error and the comments section should be displayable.
      Show
      Make sure you are in debug mode with messages displayed. Create a new assignment in a course with "Submission comments" to "yes" As a student, submit an assignment. Click on the assignment. Verify that you do not see an Undefined property error and the comments section should be displayable.
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull from Repository:
    • Rank:
      47321

      Description

      Regression caused by security fix MDL-37244 for Moodle 2.3 stable branch.

      Steps to reproduce :

      • Make sure you are in debug mode with messages displayed.
      • Create a new assignment in a course with "Submission comments" to "yes"
      • As a student, submit an assignment.
      • Click on the assignment. You should see an Undefined property error and the comments section should not be displayable.

        Issue Links

          Activity

          Hide
          Jean-Philippe Gaudreau added a comment -

          Am I wrong to say that team submission is not a feature from 2.3? If so, it's pretty simple to fix you only have to remove the check condition on teamsubmission attribut.

          I've submitted the patch. Hope it helps!

          Show
          Jean-Philippe Gaudreau added a comment - Am I wrong to say that team submission is not a feature from 2.3? If so, it's pretty simple to fix you only have to remove the check condition on teamsubmission attribut. I've submitted the patch. Hope it helps!
          Hide
          Damyon Wiese added a comment -

          Confirmed and tested the fix on 23.

          Show
          Damyon Wiese added a comment - Confirmed and tested the fix on 23.
          Hide
          Damyon Wiese added a comment -

          Thanks for reporting this Jean-Philippe,

          The fix is correct. There are a couple of issues with your patch - they are small so I'll fix them and send this on.

          1. There were no testing instructions - this is required even if you have provided instructions on how to reproduce a bug
          2. The git commit message must be in this format:

          MDL-37629 <componentname> <short message>
          
          <optional long message>
          

          Full peer review checklist:

          [Y] Syntax
          [-] Output
          [Y] Whitespace
          [-] Language
          [-] Databases
          [N] Testing - (I added them from the description)
          [Y] Security (Patch makes sense for 23 assignment)
          [-] Documentation
          [N] Git - Git commit message not in the correct format
          [Y] Sanity check

          Show
          Damyon Wiese added a comment - Thanks for reporting this Jean-Philippe, The fix is correct. There are a couple of issues with your patch - they are small so I'll fix them and send this on. 1. There were no testing instructions - this is required even if you have provided instructions on how to reproduce a bug 2. The git commit message must be in this format: MDL-37629 <componentname> < short message> <optional long message> Full peer review checklist: [Y] Syntax [-] Output [Y] Whitespace [-] Language [-] Databases [N] Testing - (I added them from the description) [Y] Security (Patch makes sense for 23 assignment) [-] Documentation [N] Git - Git commit message not in the correct format [Y] Sanity check
          Hide
          Damyon Wiese added a comment -

          For 2.3 only.

          Show
          Damyon Wiese added a comment - For 2.3 only.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          TIA and ciao

          Show
          Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
          Hide
          Sam Hemelryk added a comment -

          Thanks guys, this has been integrated now.

          Show
          Sam Hemelryk added a comment - Thanks guys, this has been integrated now.
          Hide
          Damyon Wiese added a comment -

          Adding chat log:

          I'm going to test on 2.3 now but wanted to ask smth first
          (11:33:09) marina: on master i have a copy of "moodle features demo" from qa
          (11:33:23) marina: there is an assignment type called "offline assignment"
          (11:33:45) marina: in the edit form there is a "submission comments" dropdown
          (11:34:02) marina: but regardless of what I indicate there comments are unavailable for both teacher and student
          (11:34:19) marina: this may be not related to the tested issue though
          (11:36:13) marina: IMHO it should either has effect or dropdown not present on edit form
          (11:36:19) marina: (greyed out)
          (12:05:58) Damyon: Hi Marina - that would be a separate issue (and a tricky one to solve). The submission comments do not appear until a submission has been made (because they need a submission id). To disable this setting in edit for would need a "disabledIf all other submission plugins are disabled"
          (12:06:21) Damyon: But you can log a bug for it

          Show
          Damyon Wiese added a comment - Adding chat log: I'm going to test on 2.3 now but wanted to ask smth first (11:33:09) marina: on master i have a copy of "moodle features demo" from qa (11:33:23) marina: there is an assignment type called "offline assignment" (11:33:45) marina: in the edit form there is a "submission comments" dropdown (11:34:02) marina: but regardless of what I indicate there comments are unavailable for both teacher and student (11:34:19) marina: this may be not related to the tested issue though (11:36:13) marina: IMHO it should either has effect or dropdown not present on edit form (11:36:19) marina: (greyed out) (12:05:58) Damyon: Hi Marina - that would be a separate issue (and a tricky one to solve). The submission comments do not appear until a submission has been made (because they need a submission id). To disable this setting in edit for would need a "disabledIf all other submission plugins are disabled" (12:06:21) Damyon: But you can log a bug for it
          Hide
          Marina Glancy added a comment -

          without Javascript as a teacher I can neither view nor add comments. Is this expected behaviour?
          Otherwise comments work ok for students and teachers

          Show
          Marina Glancy added a comment - without Javascript as a teacher I can neither view nor add comments. Is this expected behaviour? Otherwise comments work ok for students and teachers
          Hide
          Marina Glancy added a comment -

          I pass the test because the issue fixed what it was supposed to fix

          But I created two new issues with related bugs (see links)

          Show
          Marina Glancy added a comment - I pass the test because the issue fixed what it was supposed to fix But I created two new issues with related bugs (see links)
          Hide
          Eloy Lafuente (stronk7) added a comment -

          A brilliant future is awaiting us out there, better with your code. Let's look towards the future together, this is now closed.

          (and won't be revisiting it unless some regression is found)

          Thanks and ciao

          Show
          Eloy Lafuente (stronk7) added a comment - A brilliant future is awaiting us out there, better with your code. Let's look towards the future together, this is now closed. (and won't be revisiting it unless some regression is found) Thanks and ciao

            People

            • Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: