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

Missing rule BOOKSTART restoring 19_STABLE book backups

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.2, 2.3
    • 2.3.2
    • Book
    • MOODLE_22_STABLE, MOODLE_23_STABLE
    • MOODLE_23_STABLE
    • MDL-33362-master
    • 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@$

    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

              ankit_frenz Ankit Agarwal
              stronk7 Eloy Lafuente (stronk7)
              Rossiani Wijaya Rossiani Wijaya
              Dan Poltawski Dan Poltawski
              Rajesh Taneja Rajesh Taneja
              David Jones, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                10/Sep/12