Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.18
    • Fix Version/s: 1.9.19
    • Component/s: Module: HotPot
    • Labels:
      None
    • Database:
      Any
    • Workaround:
      Hide

      use attached mod/hotpot/restorelib.php

      Show
      use attached mod/hotpot/restorelib.php
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      Attempt to restore cousre containing HotPot activities fails with fatal error: undefined $DB

      CAUSE: use of $DB at line 303 in mod/hotpot/restorelib.php.
      SOLUTION: use $db instead (see lines 301 - 302 in attached file)

        Gliffy Diagrams

        1. restorelib.php
          23 kB
          Gordon Bateson

          Issue Links

            Activity

            Hide
            xxxxxxx Gordon Bateson added a comment -

            This issue was introduced by the commit for CONTRIB-3469

            Show
            xxxxxxx Gordon Bateson added a comment - This issue was introduced by the commit for CONTRIB-3469
            Hide
            danmarsden Dan Marsden added a comment -

            thanks Gordon - adding Aparup here - could you please get one of the integrators to pull this one in for Moodle 1.9?

            thanks!

            Show
            danmarsden Dan Marsden added a comment - thanks Gordon - adding Aparup here - could you please get one of the integrators to pull this one in for Moodle 1.9? thanks!
            Hide
            xxxxxxx Gordon Bateson added a comment -

            Added backup of simple course containing one HotPot activity and its associated JCloze files.

            The backup file can be used to ...
            (a) reproduce the error when restoring with standard mod/hotpot/restorelib.php
            (b) confirm the fix using modified mod/hotpot/restorelib.php

            Show
            xxxxxxx Gordon Bateson added a comment - Added backup of simple course containing one HotPot activity and its associated JCloze files. The backup file can be used to ... (a) reproduce the error when restoring with standard mod/hotpot/restorelib.php (b) confirm the fix using modified mod/hotpot/restorelib.php
            Hide
            nebgor Aparup Banerjee added a comment -

            Hi there, happy to integrate this fix.

            (noting that theres some whitespace fixes and a data check thats added from the commit here as well)

            its now been integrated into the MOODLE_19_STABLE branch.

            Show
            nebgor Aparup Banerjee added a comment - Hi there, happy to integrate this fix. (noting that theres some whitespace fixes and a data check thats added from the commit here as well) its now been integrated into the MOODLE_19_STABLE branch.
            Hide
            nebgor Aparup Banerjee added a comment -

            setting to fixed, please close the issue when tested

            Show
            nebgor Aparup Banerjee added a comment - setting to fixed, please close the issue when tested
            Hide
            danmarsden Dan Marsden added a comment -

            Thanks Aparup/Gordon,

            tested backup/restore of hotpot against MOODLE_19_STABLE integration and it worked fine - closing this one off.

            Show
            danmarsden Dan Marsden added a comment - Thanks Aparup/Gordon, tested backup/restore of hotpot against MOODLE_19_STABLE integration and it worked fine - closing this one off.
            Hide
            xxxxxxx Gordon Bateson added a comment -

            Thanks Dan and Aparup for you help in getting this into MOODLE_19_STABLE ^-)

            Show
            xxxxxxx Gordon Bateson added a comment - Thanks Dan and Aparup for you help in getting this into MOODLE_19_STABLE ^-)

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  9/Jul/12

                  Development