Moodle
  1. Moodle
  2. MDL-44971

Provide an "add_attempt" hook for mod/assign/submissions plugins

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5.5, 2.6.2
    • Fix Version/s: 2.7
    • Component/s: Assignment
    • Labels:

      Description

      Working on the "Mahara" assignment submission plugin, I need to be able to tell Mahara to unlock the submitted page on the Mahara side if an assignment is reopened. The mod/assign/submission plugin provides hooks for most actions you can take in the gradebook, but not for reopen aka "add_attempt".

        Gliffy Diagrams

          Activity

          Hide
          Aaron Wells added a comment -

          Added my patches for this. They follow the same coding pattern as the hooks added in MDL-39760.

          Show
          Aaron Wells added a comment - Added my patches for this. They follow the same coding pattern as the hooks added in MDL-39760 .
          Hide
          Damyon Wiese added a comment -

          Is this ready for review (the status is still "Open") - the current patch looks fine to me for master only (haven't run unit tests on it though).

          For stables - we backported MDL-39760 - but on reflection that caused some issues - there were some regressions introduced and some flow on effects for strict standards warnings reported by Davo.

          It also creates a wonky API - because functions appear and then disappear as you increase the version number: (2.5.6 would have the function, 2.6.2 would not, 2.6.3 would).

          +1 to submit the current master branch if there are no more changes pending.

          Show
          Damyon Wiese added a comment - Is this ready for review (the status is still "Open") - the current patch looks fine to me for master only (haven't run unit tests on it though). For stables - we backported MDL-39760 - but on reflection that caused some issues - there were some regressions introduced and some flow on effects for strict standards warnings reported by Davo. It also creates a wonky API - because functions appear and then disappear as you increase the version number: (2.5.6 would have the function, 2.6.2 would not, 2.6.3 would). +1 to submit the current master branch if there are no more changes pending.
          Hide
          Aaron Wells added a comment -

          Hi Damyon,

          Yep, no more changes needed. I just forgot to click the "Request peer review" button. It's been maybe 2 years since I submitted a Moodle patch, and some parts of the process seem to have changed since then, so please do let me know if I'm missing anything else.

          It would be handy for users of our plugin if the additional function was backported into the 2.5 & 2.6 stable releases, but you do have a point about the problems caused by doing the same for MDL-39760.

          Cheers,
          Aaron

          Show
          Aaron Wells added a comment - Hi Damyon, Yep, no more changes needed. I just forgot to click the "Request peer review" button. It's been maybe 2 years since I submitted a Moodle patch, and some parts of the process seem to have changed since then, so please do let me know if I'm missing anything else. It would be handy for users of our plugin if the additional function was backported into the 2.5 & 2.6 stable releases, but you do have a point about the problems caused by doing the same for MDL-39760 . Cheers, Aaron
          Hide
          CiBoT added a comment -

          Results for MDL-44971

          Show
          CiBoT added a comment - Results for MDL-44971 Remote repository: https://github.com/catalyst/moodle Remote branch wip- MDL-44971 -2.5-submission_reopen_hook to be integrated into upstream MOODLE_25_STABLE Executed job http://integration.moodle.org/job/Precheck%20remote%20branch/2822 Details: http://integration.moodle.org/job/Precheck%20remote%20branch/2822/artifact/work/smurf.html Remote branch wip- MDL-44971 -2.6-submission_reopen_hook to be integrated into upstream MOODLE_26_STABLE Executed job http://integration.moodle.org/job/Precheck%20remote%20branch/2823 Details: http://integration.moodle.org/job/Precheck%20remote%20branch/2823/artifact/work/smurf.html Remote branch wip- MDL-44971 -2.7-submission_reopen_hook to be integrated into upstream master Executed job http://integration.moodle.org/job/Precheck%20remote%20branch/2824 Details: http://integration.moodle.org/job/Precheck%20remote%20branch/2824/artifact/work/smurf.html
          Hide
          Damyon Wiese added a comment -

          Thanks Aaron - submitting for integration for master only.

          Show
          Damyon Wiese added a comment - Thanks Aaron - submitting for integration for master only.
          Hide
          CiBoT added a comment -

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

          Show
          CiBoT added a comment - Moving this issue to current integration cycle, will be reviewed soon. Thanks for the hard work!
          Hide
          Sam Hemelryk added a comment - - edited

          Thanks Aaron! - this has been integrated now - master only

          Show
          Sam Hemelryk added a comment - - edited Thanks Aaron! - this has been integrated now - master only
          Hide
          Michael de Raadt added a comment -

          Test result: Passed

          Tested in master only.

          Thanks for working on this, Aaron.

          I think the testing instructions could have been more explicit. I knew what to test, but others might not have, and "works as expected" always depends on perspective.

          Show
          Michael de Raadt added a comment - Test result: Passed Tested in master only. Thanks for working on this, Aaron. I think the testing instructions could have been more explicit. I knew what to test, but others might not have, and "works as expected" always depends on perspective.
          Hide
          Dan Poltawski added a comment -

          Thanks for your efforts, this change is now part of Moodle!

          Show
          Dan Poltawski added a comment - Thanks for your efforts, this change is now part of Moodle!

            People

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

              Dates

              • Created:
                Updated:
                Resolved: