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

Unnecessary handling of files based on sectionnumber

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3
    • Component/s: Backup
    • Labels:
    • Testing Instructions:
      Hide

      0) DEBUG developer required and access to db too.

      1) Create one course manually by inserting one record in the mdl_course table (only category = 1, shortname and longname is ok).

      2) Without visiting that course at all, in the settings block, select restore and pick (upload) the attached "test_book_for_qa_20120522.mbz" file.

      3) When asked in the restored process, select the course created in 1) as the target course.

      4) All default settings, next, next, until you get the "Restore ended ok" message.

      5) TEST: No notice is shown together with the "restore ended ok" message.

      6) Click on the button.

      7) TEST: You are redirected to the course created in 1).

      8) Enable edit mode.

      9) TEST: It has the section 0 (empty) and section 1, with one book activity ("Test Book for QA").

      10) Access to the book activity.

      11) TEST: One page with contents "This is chapter 1. With some formatted...." is shown, with one "M" image.

      That's all, ciao

      Show
      0) DEBUG developer required and access to db too. 1) Create one course manually by inserting one record in the mdl_course table (only category = 1, shortname and longname is ok). 2) Without visiting that course at all, in the settings block, select restore and pick (upload) the attached "test_book_for_qa_20120522.mbz" file. 3) When asked in the restored process, select the course created in 1) as the target course. 4) All default settings, next, next, until you get the "Restore ended ok" message. 5) TEST: No notice is shown together with the "restore ended ok" message. 6) Click on the button. 7) TEST: You are redirected to the course created in 1). 8) Enable edit mode. 9) TEST: It has the section 0 (empty) and section 1, with one book activity ("Test Book for QA"). 10) Access to the book activity. 11) TEST: One page with contents "This is chapter 1. With some formatted...." is shown, with one "M" image. That's all, ciao
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      Was testing MDL-33480 and, trying to restore it to one course I saw 2 notices ("undefined restorefiles @ #2574").

      To reproduce such notices is really tricky (it's required to have one course record without any section record, but I had one of those).

      Conceptually, it's clear that there are no fileareas based on course_sectionnumber, so that parameter in the set_mapping() call should be omited (aka, defaults to false).

      So this is simply one change to omit it and avoid that "potential" notice. Note it can be considered a minor regression of MDL-32766.

      Ciao

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              stronk7 Eloy Lafuente (stronk7)
              Reporter:
              stronk7 Eloy Lafuente (stronk7)
              Integrator:
              Dan Poltawski
              Tester:
              Tim Barker
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                25/Jun/12