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

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

XMLWordPrintable

    • Any
    • MOODLE_31_STABLE
    • MOODLE_31_STABLE
    • MDL-55472-assign-extend-ignored-validation
    • 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.

      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 .

            ilyatregubov Ilya Tregubov
            ilyatregubov Ilya Tregubov
            Frédéric Massart Frédéric Massart
            Dan Poltawski Dan Poltawski
            Jun Pataleta Jun Pataleta
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.