Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

IMS common cartridge: Difference between revisions

From MoodleDocs
mNo edit summary
Line 11: Line 11:


=== Implementation ===
=== Implementation ===
To be added...


Since Moodle 2.0 is still not ready for integration of any third-party format we will start development on experimental import extension for Moodle 1.9. In Moodle 1.9 the only supported third-party format (other than native moodle) is [http://www.blackboard.com/ Blackboard] 5.5&6. Blackboard package support is implemented through use of XSL transformation. That means that if we try to upload directly blacboard package moodle will detect that and transform package manifest using XSL transformation, reorder it's resources thus creating a moodle package and import that transformed package. This is a prefferd way of implementing support for importing any third-party format. The main reason for this is that there is no currently any API for managing restore of course content and that would mean that any third-party format developer would have to develop all that code again from scratch.
As we can see in restorelib.php blackboard conversion is initiated in function restore_precheck. That would be appropriate place for adding precheck for any other third-party format.
<code php>
<?php
...
function restore_precheck($id,$file,&$errorstr,$noredirect=false) {
...
        //Check for Blackboard backups and convert
        if ($status){
            require_once("$CFG->dirroot/backup/bb/restore_bb.php");
            if (!defined('RESTORE_SILENTLY')) {
                echo "<li>".get_string("checkingforbbexport").'</li>';
            }
            $status = blackboard_convert($CFG->dataroot."/temp/backup/".$backup_unique_code);
        }
...
        //Check for IMS Common Cartridge backups and convert
        if ($status){
            require_once("$CFG->dirroot/backup/cc/restore_cc.php");
            if (!defined('RESTORE_SILENTLY')) {
                echo "<li>".get_string("checkingforccexport").'</li>';
            }
            $status = ims_cc_convert($CFG->dataroot."/temp/backup/".$backup_unique_code);
        }
}       
</code>


=== Additional Information ===
=== Additional Information ===
*[http://www.imsglobal.org/cc/index.html IMS Common Cartridge Specification]
*[http://www.imsglobal.org/cc/index.html IMS Common Cartridge Specification]
*[http://www.imsglobal.org/cc/ccfaqs.html IMS Common Cartridge FAQ]
*[http://www.imsglobal.org/cc/ccfaqs.html IMS Common Cartridge FAQ]

Revision as of 20:27, 27 April 2009

Note: This page is a work-in-progress. Feedback and suggested improvements are welcome. Please join the discussion on moodle.org or use the page comments.

Moodle1.9 Moodle 2.0


What is Common Cartridge?

Common Cartridge is a specification that describes format for creating and sharing primarily educational digital content. The specification is developed by IMS Global Learning Consortium and describes in details the packaging format and infrastructure needed to support format for presenting it to the end-user. (See FAQ for more info especially What is Common Cartridge?)

Why Common Cartridge?

Common Cartridge solves two problems. The first is to provide a standard way to represent digital course materials for use in on-line learning systems so that such content can be developed in one format and used across a wide variety of learning systems (often referred to as course management systems, learning management systems, virtual learning environments, or instructional management systems). The second is to enable new publishing models for on-line course materials and digital books that are modular, web-distributed, interactive, and customizable. (cited from CC FAQ - http://www.imsglobal.org/cc/ccfaqs.html#2) We feel that it is important to support all efforts in on-line educational community and try to standardize content exchange format(s). That way we support openness of Moodle and increase possibility of interoperability with other LMS systems.

Implementation

Since Moodle 2.0 is still not ready for integration of any third-party format we will start development on experimental import extension for Moodle 1.9. In Moodle 1.9 the only supported third-party format (other than native moodle) is Blackboard 5.5&6. Blackboard package support is implemented through use of XSL transformation. That means that if we try to upload directly blacboard package moodle will detect that and transform package manifest using XSL transformation, reorder it's resources thus creating a moodle package and import that transformed package. This is a prefferd way of implementing support for importing any third-party format. The main reason for this is that there is no currently any API for managing restore of course content and that would mean that any third-party format developer would have to develop all that code again from scratch.

As we can see in restorelib.php blackboard conversion is initiated in function restore_precheck. That would be appropriate place for adding precheck for any other third-party format.

<?php

...

function restore_precheck($id,$file,&$errorstr,$noredirect=false) {

...

       //Check for Blackboard backups and convert
       if ($status){
           require_once("$CFG->dirroot/backup/bb/restore_bb.php");
           if (!defined('RESTORE_SILENTLY')) {

echo "

  • ".get_string("checkingforbbexport").'
  • '; } $status = blackboard_convert($CFG->dataroot."/temp/backup/".$backup_unique_code); } ... //Check for IMS Common Cartridge backups and convert if ($status){ require_once("$CFG->dirroot/backup/cc/restore_cc.php"); if (!defined('RESTORE_SILENTLY')) { echo "

  • ".get_string("checkingforccexport").'
  • '; } $status = ims_cc_convert($CFG->dataroot."/temp/backup/".$backup_unique_code); } }

    Additional Information