Details

    • Rank:
      240

      Description

      I added some hooks for local backup and restore, commit to HEAD and document.

        Issue Links

          Activity

          Hide
          Penny Leach added a comment -

          I've been thinking about whether we can use events for this, I'll investigate.

          Show
          Penny Leach added a comment - I've been thinking about whether we can use events for this, I'll investigate.
          Hide
          Penny Leach added a comment -

          Eloy - here's the original patch I wrote for this (about to attach it).

          Do you think we could use the event API instead ? I am inclined to think not..... anyway feedback will be awesome.

          Show
          Penny Leach added a comment - Eloy - here's the original patch I wrote for this (about to attach it). Do you think we could use the event API instead ? I am inclined to think not..... anyway feedback will be awesome.
          Hide
          Petr Škoda added a comment -

          oh, events were intended for "notification" - not for communication with moodle core

          and yes I remember the portfolio needs some better cron scheduling so that we can stop using events there

          Show
          Petr Škoda added a comment - oh, events were intended for "notification" - not for communication with moodle core and yes I remember the portfolio needs some better cron scheduling so that we can stop using events there
          Hide
          Penny Leach added a comment -

          Disagree. Moodle needs some better cron scheduling. Portfolio just uses what is available.

          Anyway - about this patch - do you then think that it should be hooks, not events?

          Show
          Penny Leach added a comment - Disagree. Moodle needs some better cron scheduling. Portfolio just uses what is available. Anyway - about this patch - do you then think that it should be hooks, not events?
          Hide
          Mark Nielsen added a comment -

          Hi Eloy, Sam Chaffee has coded up local plugin hooks into the backup/restore process. Please take a look, we would love for this to make it into core!

          Show
          Mark Nielsen added a comment - Hi Eloy, Sam Chaffee has coded up local plugin hooks into the backup/restore process. Please take a look, we would love for this to make it into core!
          Hide
          Mark Nielsen added a comment -

          Added new git urls for master

          Show
          Mark Nielsen added a comment - Added new git urls for master
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Some really minor comments, otherwise I think it's perfect to be added.

          1) Missing defined('MOODLE_INTERNAL')... in restore_local_plugin.class.php
          2) Both file and class phpdocs must have one-line definitions
          3) I think it's better to set in both new files:

           * @package     core_backup
           * @category    backup
          

          4) Reconsider if we really need to hook @ all those points. I can assume course/section/module easily (like was done for plagiarism), but the other 4 hooks should have some logic "Say I've one local plugin.... to achieve that we need to hook @ [question|gradingarea|gradingdefinition|gradingform]"

          Thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - Some really minor comments, otherwise I think it's perfect to be added. 1) Missing defined('MOODLE_INTERNAL')... in restore_local_plugin.class.php 2) Both file and class phpdocs must have one-line definitions 3) I think it's better to set in both new files: * @ package core_backup * @category backup 4) Reconsider if we really need to hook @ all those points. I can assume course/section/module easily (like was done for plagiarism), but the other 4 hooks should have some logic "Say I've one local plugin.... to achieve that we need to hook @ [question|gradingarea|gradingdefinition|gradingform] " Thanks!
          Hide
          Mark Nielsen added a comment -

          Thanks Eloy, these changes are on my todo list.

          FYI, we are indeed using the grading hooks. We are not using the question one (I think), but I think our reasoning was, why not?

          Show
          Mark Nielsen added a comment - Thanks Eloy, these changes are on my todo list. FYI, we are indeed using the grading hooks. We are not using the question one (I think), but I think our reasoning was, why not?
          Hide
          Mark Nielsen added a comment -

          Updated branch with PHPDoc and MOODLE_INTERNAL fixes. Let me know if you want me to rebase to a single commit.

          Show
          Mark Nielsen added a comment - Updated branch with PHPDoc and MOODLE_INTERNAL fixes. Let me know if you want me to rebase to a single commit.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Everything seems to be correct and it's using 100% the standard way to handle plugins so... thanks and sending to integration!

          Show
          Eloy Lafuente (stronk7) added a comment - Everything seems to be correct and it's using 100% the standard way to handle plugins so... thanks and sending to integration!
          Hide
          Dan Poltawski added a comment -

          Thanks a lot Mark!

          I've integrated this now

          Show
          Dan Poltawski added a comment - Thanks a lot Mark! I've integrated this now
          Hide
          Adrian Greeve added a comment -

          Tested on the integration branch.
          I backed up and restored a course with:

          • An assignment using a rubric.
          • A quiz with questions.
          • A wiki.
          • A forum.
          • A choice.
          • A workshop.

          Everything imported over with no problems.
          Test passed.

          Show
          Adrian Greeve added a comment - Tested on the integration branch. I backed up and restored a course with: An assignment using a rubric. A quiz with questions. A wiki. A forum. A choice. A workshop. Everything imported over with no problems. Test passed.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Amazed. Inspired. Grateful. That’s how your generosity makes me feel.

          (not really)

          Closing, thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - Amazed. Inspired. Grateful. That’s how your generosity makes me feel. (not really) Closing, thanks!
          Hide
          Michael de Raadt added a comment -

          This issue is labelled with dev_docs_required. I couldn't find anything in the dev docs covering this. Is a change needed in the dev docs?

          Show
          Michael de Raadt added a comment - This issue is labelled with dev_docs_required. I couldn't find anything in the dev docs covering this. Is a change needed in the dev docs?

            People

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

              Dates

              • Created:
                Updated:
                Resolved: