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

Fix static method call in backup code for IMS CC

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Test

      1. Login as Admin.
      2. Go to Site home.
      3. Click on 'Restore' in the settings menu ('settings' cog)
      4. In the Files area upload the attached sample IMS Common Cartridge package (exploring_the_english_language_imscc.zip)
        (Alternatively you can download a sample IMS Common Cartridge package from http://openlearn.open.ac.uk/ by following the instructions in the description of this issue)
      5. After the file is added in the Files area, click on "Restore".
      6. In the 'Confirm' restore step, click 'Continue'.
      7. In the 'Destination' restore step:
        1. Select 'Restore as a new course'
        2. Select 'Miscellaneous' as a course category
        3. Click 'Continue' (below the category selection)
      8. Confirm you have been successfully directed to the 'Settings' restore step and you don't see any " Deprecated: Non-static method cc2moodle::critical_error() should not be called statically" error (if debugging is enabled, some warnings might be displayed).
      9. Go through the rest of the restore steps while keeping the default settings (Next > Next > Perform restore)
        • Confirm the course have been successfully restored.
      Show
      Test Login as Admin. Go to Site home. Click on 'Restore' in the settings menu ('settings' cog) In the Files area upload the attached sample IMS Common Cartridge package ( exploring_the_english_language_imscc.zip ) (Alternatively you can download a sample IMS Common Cartridge package from http://openlearn.open.ac.uk/ by following the instructions in the description of this issue) After the file is added in the Files area, click on "Restore". In the 'Confirm' restore step, click 'Continue'. In the 'Destination' restore step: Select 'Restore as a new course' Select 'Miscellaneous' as a course category Click 'Continue' (below the category selection) Confirm you have been successfully directed to the 'Settings' restore step and you don't see any " Deprecated: Non-static method cc2moodle::critical_error() should not be called statically" error (if debugging is enabled, some warnings might be displayed). Go through the rest of the restore steps while keeping the default settings (Next > Next > Perform restore) Confirm the course have been successfully restored.
    • Affected Branches:
      MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_38_STABLE, MOODLE_39_STABLE
    • Pull 3.9 Branch:
    • Pull 3.10 Branch:
      MDL-69900-310
    • Pull Master Branch:
      MDL-69900-master

      Description

      When trying to restore an IMS CC file into Moodle, if the code encounters an error it will try to call cc2moodle::critical_error() but it is not a static method.

      Replication steps:

      1. Download a sample IMS Common Cartridge package from http://openlearn.open.ac.uk/ (Click one of the courses and above the comments, select the "Alternative formats" tab. IMS Common Cartridge should be available there).
      2. Try to restore the file. When restoring it should say that it is restoring a IMS CC 1.0 file.
      3. Almost all of the packages here are not actually 1.0 and so should hit the above error method.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sbourget Stephen Bourget
              Reporter:
              abgreeve Adrian Greeve
              Peer reviewer:
              Mihail Geshoski Mihail Geshoski
              Integrator:
              Sara Arjona (@sarjona) Sara Arjona (@sarjona)
              Tester:
              Anna Carissa Sadia Anna Carissa Sadia
              Participants:
              Component watchers:
              Darko Miletic, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                9/Nov/20

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours, 15 minutes
                  2h 15m