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

Fix static method call in backup code for IMS CC

    XMLWordPrintable

Details

    • MOODLE_39_STABLE
    • MOODLE_38_STABLE, MOODLE_39_STABLE
    • MDL-69900-master
    • 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.

    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

        1. MDL-69900.jpg
          63 kB
          Anna Carissa Sadia

        Issue Links

          Activity

            People

              sbourget Stephen Bourget
              abgreeve Adrian Greeve
              Mihail Geshoski Mihail Geshoski
              Sara Arjona (@sarjona) Sara Arjona (@sarjona)
              Anna Carissa Sadia Anna Carissa Sadia
              Darko Miletic, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                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