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

Missing rule BOOKSTART restoring 19_STABLE book backups

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.2, 2.3
    • Fix Version/s: 2.3.2
    • Component/s: Book
    • Labels:
    • Testing Instructions:
      Hide
      1. Run upgrades on all branches before proceeding with the testing
      2. install book module on your 1.9 install http://moodle.org/plugins/pluginversions.php?plugin=mod_book
      3. create a book instance
      4. create a lesson and add a question page to the lesson, add a link to the book module in the question description
      5. backup the course with all defaults
      6. Restore the course as "new course" in 2.3/master
      7. Go to the lesson and make sure the link to book module now points to the restored book module in the course and doesnt say something like $@BOOKSTART*7@$
      Show
      Run upgrades on all branches before proceeding with the testing install book module on your 1.9 install http://moodle.org/plugins/pluginversions.php?plugin=mod_book create a book instance create a lesson and add a question page to the lesson, add a link to the book module in the question description backup the course with all defaults Restore the course as "new course" in 2.3/master Go to the lesson and make sure the link to book module now points to the restored book module in the course and doesnt say something like $@BOOKSTART*7@$
    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull Master Branch:
      MDL-33362-master

      Description

      From https://github.com/skodak/moodle-mod_book/issues/23:

      Petr I found also another problem, this time with backup in 1.9 and restore in 2.2.

      The problem is, that ju didnt handle restore_decode_rule for BOOKSTART, you generate in moodle 1.9 backup for links to books. (line 123 in moodle 1.9/mod/book/backuplib.php).

      I fix this problem adding $rules[] = new restore_decode_rule('BOOKSTART', '/mod/book/view.php?id=$1', 'course_module'); in moodle22/mod/book/backup/moodle2/restore_book_activity_task.class.php in function define_decode_rules()

      Just letting you know, so you can fix it for everybody

      So this needs verification and fix, at least in 2.3, ideally to 2.2 too.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ankit_frenz Ankit Agarwal
              Reporter:
              stronk7 Eloy Lafuente (stronk7)
              Peer reviewer:
              Rossiani Wijaya
              Integrator:
              Dan Poltawski
              Tester:
              Rajesh Taneja
              Participants:
              Component watchers:
              David Jones, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                10/Sep/12