Details

      Description

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

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              mjollnir Penny Leach added a comment -

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

              Show
              mjollnir Penny Leach added a comment - I've been thinking about whether we can use events for this, I'll investigate.
              Hide
              mjollnir 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
              mjollnir 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
              skodak Petr Skoda 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
              skodak Petr Skoda 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
              mjollnir 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
              mjollnir 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
              bushido 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
              bushido 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
              bushido Mark Nielsen added a comment -

              Added new git urls for master

              Show
              bushido Mark Nielsen added a comment - Added new git urls for master
              Hide
              stronk7 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
              stronk7 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
              bushido 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
              bushido 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
              bushido 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
              bushido 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
              stronk7 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
              stronk7 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
              poltawski Dan Poltawski added a comment -

              Thanks a lot Mark!

              I've integrated this now

              Show
              poltawski Dan Poltawski added a comment - Thanks a lot Mark! I've integrated this now
              Hide
              abgreeve 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
              abgreeve 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
              stronk7 Eloy Lafuente (stronk7) added a comment -

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

              (not really)

              Closing, thanks!

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - Amazed. Inspired. Grateful. That’s how your generosity makes me feel. (not really) Closing, thanks!
              Hide
              salvetore 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
              salvetore 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:
                    Fix Release Date:
                    3/Dec/12