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

SQL error when granting extension with date erlier than assignment duedate/allowsubmissionfromdate

    XMLWordPrintable

    Details

    • Database:
      Any
    • Testing Instructions:
      Hide

      In assignment settings enable allowsubmissionfromdate and duedate. Try to grant extension to a user with extension date earlier than allowsubmissionfromdate or duedate

      1) Go to assignment page as a teacher
      2) Go to assignment setting (Assignment administration->Edit settings)
      3) In Availability section enable 'Allow submission from' and 'Due date'. Click 'Save and display'
      4) Click 'View all submissions' button - after that you should see a list of users
      5) For any user click Edit->Grant extension
      5a) Confirm that you see the user name and avatar as part of the form
      6) Enable Extension due date. Make sure it is earlier than 'Allow submission from' or 'Due date'. Click 'Save changes'
      7) You should see a validation error and NOT an SQL exception error page.
      8) Disable all submission plugin for that assignment
      9) View all submissions and select a few of them, then select "Grant extension" in the bulk actions select box
      9a) Confirm that you see up to 5 user names and avatars as part of the form
      10) Enable Extension due date. Make sure it is earlier than 'Allow submission from' or 'Due date'. Click 'Save changes'
      11) You should see a validation error and NOT an SQL exception error page.

      Show
      In assignment settings enable allowsubmissionfromdate and duedate. Try to grant extension to a user with extension date earlier than allowsubmissionfromdate or duedate 1) Go to assignment page as a teacher 2) Go to assignment setting (Assignment administration->Edit settings) 3) In Availability section enable 'Allow submission from' and 'Due date'. Click 'Save and display' 4) Click 'View all submissions' button - after that you should see a list of users 5) For any user click Edit->Grant extension 5a) Confirm that you see the user name and avatar as part of the form 6) Enable Extension due date. Make sure it is earlier than 'Allow submission from' or 'Due date'. Click 'Save changes' 7) You should see a validation error and NOT an SQL exception error page. 8) Disable all submission plugin for that assignment 9) View all submissions and select a few of them, then select "Grant extension" in the bulk actions select box 9a) Confirm that you see up to 5 user names and avatars as part of the form 10) Enable Extension due date. Make sure it is earlier than 'Allow submission from' or 'Due date'. Click 'Save changes' 11) You should see a validation error and NOT an SQL exception error page.
    • Affected Branches:
      MOODLE_31_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE
    • Pull Master Branch:
      MDL-55472-assign-extend-ignored-validation

      Description

      If you try to grant extension to a user with extension date earlier than assignment duedate/allowsubmissionfromdate, Moodle throws SQL error caused by $submitteddata not being populated in view_grant_extension function in mod/assgn/locallib.php as $form failed validation. The functionality is broken by commit 26670f5ee963547a7e16b7079ee704d8c668d7e1 .

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ilyatregubov Ilya Tregubov
              Reporter:
              ilyatregubov Ilya Tregubov
              Peer reviewer:
              Frédéric Massart
              Integrator:
              Dan Poltawski
              Tester:
              Jun Pataleta
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                14/Nov/16