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

Warnings when student views offline assignment

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.1
    • Fix Version/s: 2.3.5, 2.4.2
    • Component/s: Assignment
    • Labels:
    • Testing Instructions:
      Hide
      1. For master - run the assignment unit tests
      2. For 23 and 24
      3. Enable debugging
      4. Create an assignment in a course with no submission types enabled ("Offline assignment")
      5. Duplicate the assignment
      6. View the duplicate assignment as a student
      7. Verify you do not see errors in the page
      8. Create an assignment with feedback comments enabled
      9. Hide the gradebook column for the assignment
      10. Grade a student and provide a grade + feedback comment
      11. View the assignment as a student and verify you can see the feedback but not the grade.
      Show
      For master - run the assignment unit tests For 23 and 24 Enable debugging Create an assignment in a course with no submission types enabled ("Offline assignment") Duplicate the assignment View the duplicate assignment as a student Verify you do not see errors in the page Create an assignment with feedback comments enabled Hide the gradebook column for the assignment Grade a student and provide a grade + feedback comment View the assignment as a student and verify you can see the feedback but not the grade.
    • Affected Branches:
      MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-37635-master

      Description

      When student views offline assignment without any grades, the page displays numerous notices, first of them is:

      Notice: Undefined offset: 0 in /.../mod/assign/locallib.php on line 3043
      Call Stack

      1. Time Memory Function Location
        1 0.0003 241208 {main}

        ( ) ../view.php:0
        2 0.3413 33315480 assign->view( ) ../view.php:47
        3 0.3413 33316680 assign->view_submission_page( ) ../locallib.php:431
        4 0.4782 39706864 assign->view_student_summary( ) ../locallib.php:314

        Gliffy Diagrams

          Activity

          Hide
          marina Marina Glancy added a comment -

          I tested on master only

          Show
          marina Marina Glancy added a comment - I tested on master only
          Hide
          damyon Damyon Wiese added a comment -

          Hi Marina,

          I can't reproduce this (I tried on master and 24). I with a new assignment and all plugins disabled and grade set to "No grade". I also tried upgrading an old 2.2 offline assignment with the grade set to no grade.

          From the error it looks like there is no column in the gradebook for this assignment - which shouldn't be the case because it always adds a column (even if it's just for comments).

          Can you provide any more info on how you set this assignment up?

          Thanks - Damyon

          Show
          damyon Damyon Wiese added a comment - Hi Marina, I can't reproduce this (I tried on master and 24). I with a new assignment and all plugins disabled and grade set to "No grade". I also tried upgrading an old 2.2 offline assignment with the grade set to no grade. From the error it looks like there is no column in the gradebook for this assignment - which shouldn't be the case because it always adds a column (even if it's just for comments). Can you provide any more info on how you set this assignment up? Thanks - Damyon
          Hide
          marina Marina Glancy added a comment - - edited

          Hi Damyon. I backed up "moodle feature demo" course (without users) from qa.moodle.net and restored it on my site. After that I enrolled student it in

          Show
          marina Marina Glancy added a comment - - edited Hi Damyon. I backed up "moodle feature demo" course (without users) from qa.moodle.net and restored it on my site. After that I enrolled student it in
          Hide
          damyon Damyon Wiese added a comment -

          Added unit tests for this on master branch. The assignment unit tests have not been backported yet so I removed the unit tests on the backport branches for this issue.

          Show
          damyon Damyon Wiese added a comment - Added unit tests for this on master branch. The assignment unit tests have not been backported yet so I removed the unit tests on the backport branches for this issue.
          Hide
          damyon Damyon Wiese added a comment -

          The commit for 23 was hand crafted because the git conflict was nonsense.

          Show
          damyon Damyon Wiese added a comment - The commit for 23 was hand crafted because the git conflict was nonsense.
          Hide
          poltawski Dan Poltawski added a comment -

          Integrated to master, 24 and 23. Thanks Damyon

          Show
          poltawski Dan Poltawski added a comment - Integrated to master, 24 and 23. Thanks Damyon
          Hide
          dmonllao David Monllaó added a comment -

          It passes, all working as expected, tested in 24 and 23

          Show
          dmonllao David Monllaó added a comment - It passes, all working as expected, tested in 24 and 23
          Hide
          damyon Damyon Wiese added a comment -

          Congratulations! This issue has been resolved. Thanks for helping to make Moodle better for everyone!

          Regards, Damyon

          Show
          damyon Damyon Wiese added a comment - Congratulations! This issue has been resolved. Thanks for helping to make Moodle better for everyone! Regards, Damyon

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/Mar/13