Moodle
  1. Moodle
  2. MDL-20591

Import IMS Common Cartridge packages

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.9.5, 2.0
    • Fix Version/s: 1.9.7, 2.0
    • Component/s: Backup
    • Labels:
      None
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE
    • Rank:
      24330

      Description

      After some months spent in various iterations with UVCMS (Moodle Partner) it seems that the IMS-CC import facility is ready to land into 19_STABLE.

      So I'm going to commit all their code (/backup/cc whole directory) to CVS now in order to have it under control.

      Apart from that dir, there are two small modifications to make in Moodle Core (backuplib + new admin experimental setting), in order to definetively have the IMS-CC enabled. I'll commit them later (surely after 1.9.6 release).

      Ciao

        Activity

        Hide
        Eloy Lafuente (stronk7) added a comment -

        Done. Now the whole backup/cc dir is in CVS, both in 19_STABLE and HEAD.

        Missing are the integration lines to be added to Moodle core in order to make the functionality available on restore. Going to add it here as a patch.

        Show
        Eloy Lafuente (stronk7) added a comment - Done. Now the whole backup/cc dir is in CVS, both in 19_STABLE and HEAD. Missing are the integration lines to be added to Moodle core in order to make the functionality available on restore. Going to add it here as a patch.
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Adding patch that enables the import of IMSCC packages from Moodle restore if experimental setting is enabled in server.

        Show
        Eloy Lafuente (stronk7) added a comment - Adding patch that enables the import of IMSCC packages from Moodle restore if experimental setting is enabled in server.
        Hide
        Eloy Lafuente (stronk7) added a comment - - edited

        TODO:

        • Decide when to enable this (simply apply the patch and done). Before or after 1.9.6. Initially I've addressed this after 1.9.6 but I cannot imagine any major problem by doing it before, so will be included in 1.9.6.

        KNOW PROBLEM:

        • Question answers having regexp matching won't be imported as far as Moodle short-answer qtype doesn't support regexp matching. Only exact match (varequal) and wild-card match (varsubstring) are supported by Moodle).
        Show
        Eloy Lafuente (stronk7) added a comment - - edited TODO: Decide when to enable this (simply apply the patch and done). Before or after 1.9.6. Initially I've addressed this after 1.9.6 but I cannot imagine any major problem by doing it before , so will be included in 1.9.6. KNOW PROBLEM: Question answers having regexp matching won't be imported as far as Moodle short-answer qtype doesn't support regexp matching. Only exact match (varequal) and wild-card match (varsubstring) are supported by Moodle).
        Hide
        Martin Dougiamas added a comment -

        YAY! CONGRATS TO UVCMS AND ELOY!!!!!!!! :-D

        Show
        Martin Dougiamas added a comment - YAY! CONGRATS TO UVCMS AND ELOY!!!!!!!! :-D
        Hide
        Martin Dougiamas added a comment - - edited

        Been trying this on 1.9.6, got three errors and it failed. Am I missing a pre-requisite?

        ( ! ) Warning: DOMDocument::schemaValidate() [domdocument.schemavalidate]: Internal error: xmlSchemaIDCRegisterMatchers, Could not find an augmented IDC item for an IDC definition. in /web/19/backup/cc/restore_cc.php on line 66
        Call Stack

        1. Time Memory Function Location
          1 0.0008 114236 {main}( ) ../restore.php:0
          2 0.2192 17759244 include_once( '/web/19/backup/restore_precheck.html' ) ../restore.php:152
          3 0.2205 17763036 restore_precheck( ) ../restore_precheck.html:42
          4 0.5907 19529416 cc_convert( ) ../restorelib.php:7668
          5 0.5916 19531192 DOMDocument->schemaValidate( ) ../restore_cc.php:66

          ( ! ) Warning: DOMDocument::schemaValidate() [domdocument.schemavalidate]: Internal error: xmlSchemaValidateElem, calling xmlSchemaValidateElemDecl(). in /web/19/backup/cc/restore_cc.php on line 66
          Call Stack
          # Time Memory Function Location
          1 0.0008 114236 {main}

          ( ) ../restore.php:0
          2 0.2192 17759244 include_once( '/web/19/backup/restore_precheck.html' ) ../restore.php:152
          3 0.2205 17763036 restore_precheck( ) ../restore_precheck.html:42
          4 0.5907 19529416 cc_convert( ) ../restorelib.php:7668
          5 0.5916 19531192 DOMDocument->schemaValidate( ) ../restore_cc.php:66

        ( ! ) Warning: DOMDocument::schemaValidate() [domdocument.schemavalidate]: Internal error: xmlSchemaDocWalk, calling xmlSchemaValidateElem(). in /web/19/backup/cc/restore_cc.php on line 66
        Call Stack

        1. Time Memory Function Location
          1 0.0008 114236 {main}

          ( ) ../restore.php:0
          2 0.2192 17759244 include_once( '/web/19/backup/restore_precheck.html' ) ../restore.php:152
          3 0.2205 17763036 restore_precheck( ) ../restore_precheck.html:42
          4 0.5907 19529416 cc_convert( ) ../restorelib.php:7668
          5 0.5916 19531192 DOMDocument->schemaValidate( ) ../restore_cc.php:66

        The schema is not valid.

        Show
        Martin Dougiamas added a comment - - edited Been trying this on 1.9.6, got three errors and it failed. Am I missing a pre-requisite? ( ! ) Warning: DOMDocument::schemaValidate() [domdocument.schemavalidate] : Internal error: xmlSchemaIDCRegisterMatchers, Could not find an augmented IDC item for an IDC definition. in /web/19/backup/cc/restore_cc.php on line 66 Call Stack Time Memory Function Location 1 0.0008 114236 {main}( ) ../restore.php:0 2 0.2192 17759244 include_once( '/web/19/backup/restore_precheck.html' ) ../restore.php:152 3 0.2205 17763036 restore_precheck( ) ../restore_precheck.html:42 4 0.5907 19529416 cc_convert( ) ../restorelib.php:7668 5 0.5916 19531192 DOMDocument->schemaValidate( ) ../restore_cc.php:66 ( ! ) Warning: DOMDocument::schemaValidate() [domdocument.schemavalidate] : Internal error: xmlSchemaValidateElem, calling xmlSchemaValidateElemDecl(). in /web/19/backup/cc/restore_cc.php on line 66 Call Stack # Time Memory Function Location 1 0.0008 114236 {main} ( ) ../restore.php:0 2 0.2192 17759244 include_once( '/web/19/backup/restore_precheck.html' ) ../restore.php:152 3 0.2205 17763036 restore_precheck( ) ../restore_precheck.html:42 4 0.5907 19529416 cc_convert( ) ../restorelib.php:7668 5 0.5916 19531192 DOMDocument->schemaValidate( ) ../restore_cc.php:66 ( ! ) Warning: DOMDocument::schemaValidate() [domdocument.schemavalidate] : Internal error: xmlSchemaDocWalk, calling xmlSchemaValidateElem(). in /web/19/backup/cc/restore_cc.php on line 66 Call Stack Time Memory Function Location 1 0.0008 114236 {main} ( ) ../restore.php:0 2 0.2192 17759244 include_once( '/web/19/backup/restore_precheck.html' ) ../restore.php:152 3 0.2205 17763036 restore_precheck( ) ../restore_precheck.html:42 4 0.5907 19529416 cc_convert( ) ../restorelib.php:7668 5 0.5916 19531192 DOMDocument->schemaValidate( ) ../restore_cc.php:66 The schema is not valid.
        Hide
        Eloy Lafuente (stronk7) added a comment -

        And which package are you trying to deploy, Martin?

        It simply seems to be validation errors, so the package is invalid and won't be imported.

        Ciao

        Show
        Eloy Lafuente (stronk7) added a comment - And which package are you trying to deploy, Martin? It simply seems to be validation errors, so the package is invalid and won't be imported. Ciao
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Uhm... or buggy libxml... looking for the error "Could not find an augmented IDC item for an IDC definition" I've found a lot of references, like this:

        http://codespeak.net/pipermail/lxml-dev/2007-May/002412.html

        Ciao

        Show
        Eloy Lafuente (stronk7) added a comment - Uhm... or buggy libxml... looking for the error "Could not find an augmented IDC item for an IDC definition" I've found a lot of references, like this: http://codespeak.net/pipermail/lxml-dev/2007-May/002412.html Ciao
        Hide
        Martin Dougiamas added a comment -

        Ah I should have mentioned the packages: I got them from http://www.imsglobal.org/developers/alliance/examples.cfm

        OrganicChemistry.zip
        Understanding_Binary.zip

        Attaching one here.

        Show
        Martin Dougiamas added a comment - Ah I should have mentioned the packages: I got them from http://www.imsglobal.org/developers/alliance/examples.cfm OrganicChemistry.zip Understanding_Binary.zip Attaching one here.
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Aha, the IMS-CC Alliance examples. I've tested all them and are working ok:

        • OrganicChemistry: Is my favourite, with practically everything.
        • Understanding_Binary.zip: Won't be imported as far as it requires authentication and we aren't supporting that.

        But in any case, both are working ok here... so I guess it's a libxml problem. Ideally version 2.6.30 is the min req, obviously avoiding those buggy versions (2.7.1, 2.7.2 and 2.7.3) prone to eat html tags.

        If you can confirm your versions...

        Also note it's http://test.moodle.org/imscc/ ... but I'm having some problems to get it updated so it isn't operative yet due to MDLSITE-812. I've created all the shell courses and uploaded the ims-cc packages and am waiting for that bug to import all the examples there.

        Ciao

        Show
        Eloy Lafuente (stronk7) added a comment - Aha, the IMS-CC Alliance examples. I've tested all them and are working ok: OrganicChemistry: Is my favourite, with practically everything. Understanding_Binary.zip: Won't be imported as far as it requires authentication and we aren't supporting that. But in any case, both are working ok here... so I guess it's a libxml problem. Ideally version 2.6.30 is the min req, obviously avoiding those buggy versions (2.7.1, 2.7.2 and 2.7.3) prone to eat html tags. If you can confirm your versions... Also note it's http://test.moodle.org/imscc/ ... but I'm having some problems to get it updated so it isn't operative yet due to MDLSITE-812 . I've created all the shell courses and uploaded the ims-cc packages and am waiting for that bug to import all the examples there. Ciao
        Hide
        Eloy Lafuente (stronk7) added a comment - - edited

        Related with this:

        Due to some bugs in libxml we need at least libxml >= 2.6.30 installed in the php server (right now we have 2.6.26).

        I'm going to include that requisite in the code (ims-cc pre-checks). Here it's some help the UVCMS guys gave me to get updated to that version:

        yum install python-devel
        cd /tmp
        wget ftp://xmlsoft.org/libxml2/libxml2-2.6.30-1.src.rpm
        rpmbuild --rebuild libxml2-2.6.30-1.src.rpm
        rpm -Uvh /usr/src/redhat/RPMS/i386/libxml2-*
        

        (requires apache restart, of course)

        Hope it helps, ciao

        Show
        Eloy Lafuente (stronk7) added a comment - - edited Related with this: Due to some bugs in libxml we need at least libxml >= 2.6.30 installed in the php server (right now we have 2.6.26). I'm going to include that requisite in the code (ims-cc pre-checks). Here it's some help the UVCMS guys gave me to get updated to that version: yum install python-devel cd /tmp wget ftp: //xmlsoft.org/libxml2/libxml2-2.6.30-1.src.rpm rpmbuild --rebuild libxml2-2.6.30-1.src.rpm rpm -Uvh /usr/src/redhat/RPMS/i386/libxml2-* (requires apache restart, of course) Hope it helps, ciao
        Hide
        Martin Dougiamas added a comment -

        OK, that must be it. I have 2.6.29 on my Mac. Some version checks in the code sound essential, thanks!

        Show
        Martin Dougiamas added a comment - OK, that must be it. I have 2.6.29 on my Mac. Some version checks in the code sound essential, thanks!
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Now IMS-CC import performs the check so any libxml < 2.6.30 import displays message and stops. Would be great to have test server updated asap to load all those packages and show them there.

        Ciao

        Show
        Eloy Lafuente (stronk7) added a comment - Now IMS-CC import performs the check so any libxml < 2.6.30 import displays message and stops. Would be great to have test server updated asap to load all those packages and show them there. Ciao
        Hide
        Jordan Tomkinson added a comment -

        test.moodle.org now runs libxml2 2.6.20 and fresh php rpms have been rolled against this also

        phpinfo() now reports:

        libXML Version 2.6.30

        Show
        Jordan Tomkinson added a comment - test.moodle.org now runs libxml2 2.6.20 and fresh php rpms have been rolled against this also phpinfo() now reports: libXML Version 2.6.30
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Thanks Jordan!

        confirmed 2.6.30 works ok, I've been able to restore all the test packages successfully in test.moodle.org/imscc

        Show
        Eloy Lafuente (stronk7) added a comment - Thanks Jordan! confirmed 2.6.30 works ok, I've been able to restore all the test packages successfully in test.moodle.org/imscc
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Resolving as fixed. Integration is now committed and working. So weekly builds starting tomorrow (1.9.6+) will introduce them for the masses.

        Ciao

        Show
        Eloy Lafuente (stronk7) added a comment - Resolving as fixed. Integration is now committed and working. So weekly builds starting tomorrow (1.9.6+) will introduce them for the masses. Ciao
        Hide
        Helen Foster added a comment -

        I've just downloaded an IMS CC package 'Creativity, community and ICT' from OpenLearn and imported it http://test.moodle.org/imscc Everything is perfect! Many thanks UVCMS and Eloy.

        Documentation: http://docs.moodle.org/en/IMS_Common_Cartridge_import

        Show
        Helen Foster added a comment - I've just downloaded an IMS CC package 'Creativity, community and ICT' from OpenLearn and imported it http://test.moodle.org/imscc Everything is perfect! Many thanks UVCMS and Eloy. Documentation: http://docs.moodle.org/en/IMS_Common_Cartridge_import
        Hide
        Tim Hunt added a comment -

        Why was this checked in with stupid class names like quiz and forum? MDL-25048

        Show
        Tim Hunt added a comment - Why was this checked in with stupid class names like quiz and forum? MDL-25048
        Hide
        Darko Miletic added a comment -

        We submitted the code and nobody complained at the time.

        Show
        Darko Miletic added a comment - We submitted the code and nobody complained at the time.
        Hide
        Scott Leslie added a comment -

        Just tried to upload CC packages created via Angel and these were rejected in Moodle 1.9.13 with the Critical Error that the course title was missing. This seems like perhaps too harsh an error. Is there any work continuing to be done on this importer? I ask because this is likely to become more and more significant; the courses I were trying were part of the OpenCourseLibrary's contents (cf http://cnx.org/lenses/sbctc/endorsements?b_start:int=10&-C= and follow the links to the courses for the actual CC downloads) but in addition, systems like Instructure and Blackboard are both now supporting (or saying they soon will) CC exports.

        Show
        Scott Leslie added a comment - Just tried to upload CC packages created via Angel and these were rejected in Moodle 1.9.13 with the Critical Error that the course title was missing. This seems like perhaps too harsh an error. Is there any work continuing to be done on this importer? I ask because this is likely to become more and more significant; the courses I were trying were part of the OpenCourseLibrary's contents (cf http://cnx.org/lenses/sbctc/endorsements?b_start:int=10&-C= and follow the links to the courses for the actual CC downloads) but in addition, systems like Instructure and Blackboard are both now supporting (or saying they soon will) CC exports.

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: