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

Late submissions with extension calculate period of lateness incorrectly

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5.2, 2.6, 2.6.3, 2.7
    • Fix Version/s: 2.6.4, 2.7.1
    • Component/s: Assignment
    • Labels:
    • Testing Instructions:
      Hide
      1. Create an assignment with a due date 5 days in the past but a cut off date that extends 5 days into the future.
      2. Grant an extension to a student 4 days past the assignment due date (this should be yesterdays date)
      3. Login as the student an extension was granted to
      4. Create a submission for this student
      5. Login as administrator
      6. View the grading table and ensure the status column lists the correct late information (this should be the difference between the students extension due date and when they actually submitted)
      Show
      Create an assignment with a due date 5 days in the past but a cut off date that extends 5 days into the future. Grant an extension to a student 4 days past the assignment due date (this should be yesterdays date) Login as the student an extension was granted to Create a submission for this student Login as administrator View the grading table and ensure the status column lists the correct late information (this should be the difference between the students extension due date and when they actually submitted)
    • Affected Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE
    • Pull 2.7 Branch:
      m27_MDL-44098

      Description

      If a student is given an extension and submits their assignment past this extension due date (while the cut off date is still active) the late field in the status column of the grading table calculates the period of lateness based off of the assignment due date, rather than the students extension due date.

      This only occurs in the grading table (or downloading the grading table) and is correct when viewing an individual assignment.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              cibot CiBoT added a comment -

              Results for MDL-44098

              • Remote repository: git://github.com/greg-or/moodle.git
              Show
              cibot CiBoT added a comment - Results for MDL-44098 Remote repository: git://github.com/greg-or/moodle.git Remote branch m25_ MDL-44098 to be integrated into upstream MOODLE_25_STABLE Executed job http://integration.moodle.org/job/Precheck%20remote%20branch/1298 Details: http://integration.moodle.org/job/Precheck%20remote%20branch/1298/artifact/work/smurf.html Remote branch m26_ MDL-44098 to be integrated into upstream MOODLE_26_STABLE Executed job http://integration.moodle.org/job/Precheck%20remote%20branch/1299 Details: http://integration.moodle.org/job/Precheck%20remote%20branch/1299/artifact/work/smurf.html Remote branch master_ MDL-44098 to be integrated into upstream master Executed job http://integration.moodle.org/job/Precheck%20remote%20branch/1300 Details: http://integration.moodle.org/job/Precheck%20remote%20branch/1300/artifact/work/smurf.html
              Hide
              andyjdavis Andrew Davis added a comment -

              Would it be worth putting the logic to figure out the due date into a function? There is basically the same logic at around line 140.

              Particularly if we can get it into a separate function it would be great to get this covered by a unit test in /mod/assign/tests.

              Show
              andyjdavis Andrew Davis added a comment - Would it be worth putting the logic to figure out the due date into a function? There is basically the same logic at around line 140. Particularly if we can get it into a separate function it would be great to get this covered by a unit test in /mod/assign/tests.
              Hide
              gregor89 Greg Faller added a comment -

              Hi Andrew Davis

              I'm not sure if a function would benefit greatly in this case. I take your point about the same logic further into the function and have re-written the patch, overriding the duedate with the extensiondue (if available) seems to remove some duplication.

              Thanks,
              Greg

              Show
              gregor89 Greg Faller added a comment - Hi Andrew Davis I'm not sure if a function would benefit greatly in this case. I take your point about the same logic further into the function and have re-written the patch, overriding the duedate with the extensiondue (if available) seems to remove some duplication. Thanks, Greg
              Hide
              cibot CiBoT added a comment -

              Results for MDL-44098

              • Remote repository: git://github.com/greg-or/moodle-mod_assign.git
              Show
              cibot CiBoT added a comment - Results for MDL-44098 Remote repository: git://github.com/greg-or/moodle-mod_assign.git Remote branch m26_ MDL-44098 to be integrated into upstream MOODLE_26_STABLE Executed job http://integration.moodle.org/job/Precheck%20remote%20branch/3583 Details: http://integration.moodle.org/job/Precheck%20remote%20branch/3583/artifact/work/smurf.html Remote branch m27_ MDL-44098 to be integrated into upstream MOODLE_27_STABLE Executed job http://integration.moodle.org/job/Precheck%20remote%20branch/3584 Details: http://integration.moodle.org/job/Precheck%20remote%20branch/3584/artifact/work/smurf.html
              Hide
              andyjdavis Andrew Davis added a comment -

              Looks good. Putting this up for integration.

              Show
              andyjdavis Andrew Davis added a comment - Looks good. Putting this up for integration.
              Hide
              stronk7 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
              stronk7 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
              cibot CiBoT added a comment -

              Moving this issue to current integration cycle, will be reviewed soon. Thanks for the hard work!

              Show
              cibot CiBoT added a comment - Moving this issue to current integration cycle, will be reviewed soon. Thanks for the hard work!
              Hide
              damyon Damyon Wiese added a comment -

              Thanks Greg,

              This patch looks really good to me. It would have been perfect with a unit test (wink wink).

              Integrated to 26, 27 and master.

              Show
              damyon Damyon Wiese added a comment - Thanks Greg, This patch looks really good to me. It would have been perfect with a unit test (wink wink). Integrated to 26, 27 and master.
              Hide
              dobedobedoh Andrew Nicols added a comment -

              Thanks Greg,

              This is passing the instructions as described. I also tested a few other things with placing due dates in the future, and checking that students without an extension still appear correctly.

              Cheers,

              Andrew

              Show
              dobedobedoh Andrew Nicols added a comment - Thanks Greg, This is passing the instructions as described. I also tested a few other things with placing due dates in the future, and checking that students without an extension still appear correctly. Cheers, Andrew
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              Nice to see your contributions coming, and coming, now that we are back to normality. Many thanks for all them!

              Normal is an illusion.
              What is normal for the spider
              is chaos for the fly.

              – Morticia Addams

              Closing as fixed, ciao

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - Nice to see your contributions coming, and coming, now that we are back to normality. Many thanks for all them! Normal is an illusion. What is normal for the spider is chaos for the fly. – Morticia Addams Closing as fixed, ciao
              Hide
              netspot_dbezborodov Damien Bezborodov added a comment - - edited

              I have written a unit test for this ticket in MDL-42179.

              Show
              netspot_dbezborodov Damien Bezborodov added a comment - - edited I have written a unit test for this ticket in MDL-42179 .

                People

                • Votes:
                  1 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    14/Jul/14