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

Restore 1.9 backup into 2.X fails on missing assignment type

    XMLWordPrintable

Details

    • MOODLE_22_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • MOODLE_24_STABLE, MOODLE_25_STABLE
    • MDL-32690_restoreMissingAssignment_master
    • Hide
      1. Restore the attached file the course should be succesfully restored (Ignore the debugging notice 'Incorrect assignment type: nanogong')
      2. The assignment should be inaccessible with a nice error mesage on the restored course
      3. The forum should be accessible

      For bonus points

      1. Create a course on Moodle 1.9
      2. Install the nanogong assignment type: https://moodle.org/mod/data/view.php?rid=2882 (needs to be uncopressed into mod/assignment/type/)
      3. Create all different types of modules
        # Verify that you can restore the contents of this course
      Show
      Restore the attached file the course should be succesfully restored (Ignore the debugging notice 'Incorrect assignment type: nanogong') The assignment should be inaccessible with a nice error mesage on the restored course The forum should be accessible For bonus points Create a course on Moodle 1.9 Install the nanogong assignment type: https://moodle.org/mod/data/view.php?rid=2882 (needs to be uncopressed into mod/assignment/type/) Create all different types of modules # Verify that you can restore the contents of this course

    Description

      Steps to reproduce:

      • Backup a 1.9 course that has an assignment type that doesn't exist in 2.X (EG: some third party plugin)
      • Restore that backup into 2.X
      • Here is the error:

        error/unsupported_subplugin
         
        More information about this error
        Stack trace:
         
        line 197 of /mod/assignment/backup/moodle1/lib.php: moodle1_convert_exception thrown
        line 132 of /mod/assignment/backup/moodle1/lib.php: call to moodle1_mod_assignment_handler->get_subplugin_handler()
        line 111 of /mod/assignment/backup/moodle1/lib.php: call to moodle1_mod_assignment_handler->handle_assignment_subplugin()
        line 299 of /backup/converter/moodle1/lib.php: call to moodle1_mod_assignment_handler->process_assignment()
        line 737 of /backup/converter/moodle1/lib.php: call to moodle1_converter->process_chunk()
        line 125 of /backup/util/xml/parser/processors/grouped_parser_processor.class.php: call to moodle1_parser_processor->dispatch_chunk()
        line 148 of /backup/util/xml/parser/processors/simplified_parser_processor.class.php: call to grouped_parser_processor->postprocess_chunk()
        line 92 of /backup/util/xml/parser/processors/progressive_parser_processor.class.php: call to simplified_parser_processor->process_chunk()
        line 169 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser_processor->receive_chunk()
        line 253 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->publish()
        line ? of unknownfile: call to progressive_parser->end_tag()
        line 158 of /backup/util/xml/parser/progressive_parser.class.php: call to xml_parse()
        line 137 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->parse()
        line 150 of /backup/converter/moodle1/lib.php: call to progressive_parser->process()
        line 128 of /backup/converter/convertlib.php: call to moodle1_converter->execute()
        line 215 of /backup/util/helper/convert_helper.class.php: call to base_converter->convert()
        line 408 of /backup/controller/restore_controller.class.php: call to convert_helper::to_moodle2_format()
        line 35 of /backup/restore.php: call to restore_controller->convert()

      Ideally, the moodle1 conversion process would just skip the unknown assignment type, but I haven't found a straight forward way to accomplish this.

      Attachments

        Issue Links

          Activity

            People

              bushido Mark Nielsen
              bushido Mark Nielsen
              Dan Poltawski Dan Poltawski
              Damyon Wiese Damyon Wiese
              David Monllaó David Monllaó
              Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                9/Sep/13