<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>http://wiki.mipt.ru/index.php?action=history&amp;feed=atom&amp;title=Development%3AIMS_common_cartridge_Implementation_specifics</id>
	<title>Development:IMS common cartridge Implementation specifics - История изменений</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.mipt.ru/index.php?action=history&amp;feed=atom&amp;title=Development%3AIMS_common_cartridge_Implementation_specifics"/>
	<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=Development:IMS_common_cartridge_Implementation_specifics&amp;action=history"/>
	<updated>2026-05-07T13:00:45Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>http://wiki.mipt.ru/index.php?title=Development:IMS_common_cartridge_Implementation_specifics&amp;diff=11240&amp;oldid=prev</id>
		<title>Олег Давидович: 1 версия импортирована</title>
		<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=Development:IMS_common_cartridge_Implementation_specifics&amp;diff=11240&amp;oldid=prev"/>
		<updated>2024-10-21T08:51:20Z</updated>

		<summary type="html">&lt;p&gt;1 версия импортирована&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Предыдущая версия&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Версия от 08:51, 21 октября 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Олег Давидович</name></author>
	</entry>
	<entry>
		<id>http://wiki.mipt.ru/index.php?title=Development:IMS_common_cartridge_Implementation_specifics&amp;diff=11239&amp;oldid=prev</id>
		<title>1&gt;Mudrd8mz: Text replacement - &quot;class=&quot;nicetable&quot;&quot; to &quot;class=&quot;wikitable&quot;&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=Development:IMS_common_cartridge_Implementation_specifics&amp;diff=11239&amp;oldid=prev"/>
		<updated>2021-07-14T13:24:01Z</updated>

		<summary type="html">&lt;p&gt;Text replacement - &amp;quot;class=&amp;quot;nicetable&amp;quot;&amp;quot; to &amp;quot;class=&amp;quot;wikitable&amp;quot;&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Template:Development:common cartridge}}{{Work in progress}}{{Moodle 1.9}}{{Moodle_2.0}}&lt;br /&gt;
&lt;br /&gt;
== Package import implementation ==&lt;br /&gt;
&lt;br /&gt;
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&amp;amp;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&amp;#039;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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
function restore_precheck($id,$file,&amp;amp;$errorstr,$noredirect=false) {&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
        //Check for IMS Common Cartridge backups and convert&lt;br /&gt;
        //Note that CC check goes before blackboard which is&lt;br /&gt;
        //important based on how current detection of blackboard package is&lt;br /&gt;
        //implemented&lt;br /&gt;
        if ($status){&lt;br /&gt;
            require_once(&amp;quot;$CFG-&amp;gt;dirroot/backup/cc/restore_cc.php&amp;quot;);&lt;br /&gt;
            if (!defined(&amp;#039;RESTORE_SILENTLY&amp;#039;)) {&lt;br /&gt;
                echo &amp;quot;&amp;lt;li&amp;gt;&amp;quot;.get_string(&amp;quot;checkingforccexport&amp;quot;).&amp;#039;&amp;lt;/li&amp;gt;&amp;#039;;&lt;br /&gt;
            }&lt;br /&gt;
            $status = ims_cc_convert($CFG-&amp;gt;dataroot.&amp;quot;/temp/backup/&amp;quot;.$backup_unique_code);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
        //Check for Blackboard backups and convert&lt;br /&gt;
        if ($status){&lt;br /&gt;
            require_once(&amp;quot;$CFG-&amp;gt;dirroot/backup/bb/restore_bb.php&amp;quot;);&lt;br /&gt;
            if (!defined(&amp;#039;RESTORE_SILENTLY&amp;#039;)) {&lt;br /&gt;
                echo &amp;quot;&amp;lt;li&amp;gt;&amp;quot;.get_string(&amp;quot;checkingforbbexport&amp;quot;).&amp;#039;&amp;lt;/li&amp;gt;&amp;#039;;&lt;br /&gt;
            }&lt;br /&gt;
            $status = blackboard_convert($CFG-&amp;gt;dataroot.&amp;quot;/temp/backup/&amp;quot;.$backup_unique_code);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
}        &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional notes regarding package type detection ===&lt;br /&gt;
&lt;br /&gt;
Current third-party format checking in Moodle 1.9 is far from being adequate. In case of blackboard type detection system only checks for existence of imsmanifest.xml. Almost all IMS based content packages use this file name for their manifest (blackboard, SCORM, Common Cartridge etc.). Therefore a better file type detection is needed, not only for the presence of the manifest file but also regarding it&amp;#039;s content. &lt;br /&gt;
&lt;br /&gt;
Every manifest has a specific xml namespaces that define organization of the file. By checking for specific item described in particular standard for a content type in question we can detect what type of package we are working with.&lt;br /&gt;
&lt;br /&gt;
For example Common Cartridge manifest looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code xml&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; ?&amp;gt; &lt;br /&gt;
&amp;lt;manifest identifier=&amp;quot;M102815&amp;quot; xmlns=&amp;quot;http://www.imsglobal.org/xsd/imscc/imscp_v1p1&amp;quot;&lt;br /&gt;
                               xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/manifest&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By checking for existence and value of xmlns attribute we can reliably detect the type in question. As additional check a validation can be performed using XSD files from common cartridge definition.&lt;br /&gt;
&lt;br /&gt;
This would be basic example of format detection function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
function detect_backup_format(DOMDocument $xml_dom) {&lt;br /&gt;
&lt;br /&gt;
	$format = FORMAT_UNKNOWN;&lt;br /&gt;
	&lt;br /&gt;
	$rootNode = $xml_dom-&amp;gt;documentElement;&lt;br /&gt;
    &lt;br /&gt;
    //Is it IMS manifest at all?&lt;br /&gt;
    if (   is_object($rootNode) &lt;br /&gt;
        &amp;amp;&amp;amp; ($rootNode-&amp;gt;tagName == &amp;#039;manifest&amp;#039;)&lt;br /&gt;
        ) {&lt;br /&gt;
&lt;br /&gt;
        //Is it common cartridge&lt;br /&gt;
        if ( $rootNode-&amp;gt;hasAttribute(&amp;#039;xmlns&amp;#039;) ) {&lt;br /&gt;
            $xmlns = $rootNode-&amp;gt;getAttribute(&amp;#039;xmlns&amp;#039;);&lt;br /&gt;
            if ($xmlns == &amp;lt;common cartridge namespace uri&amp;gt;) {&lt;br /&gt;
                $format = FORMAT_COMMON_CARTRIDGE;&lt;br /&gt;
            }&lt;br /&gt;
        } &lt;br /&gt;
&lt;br /&gt;
        //Is it Blackboard&lt;br /&gt;
        if ( ($format == FORMAT_UNKNOWN) &amp;amp;&amp;amp; $rootNode-&amp;gt;hasAttribute(&amp;#039;xmlns:bb&amp;#039;) ) {&lt;br /&gt;
            $xmlns = $rootNode-&amp;gt;getAttribute(&amp;#039;xmlns:bb&amp;#039;);&lt;br /&gt;
            if ($xmlns == &amp;lt;blackboard 5.5 &amp;amp; 6 namespace uri&amp;gt;) {&lt;br /&gt;
                $format = FORMAT_BLACK_BOARD;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    return $format;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Mapping specific content type inside common cartridge into appropriate Moodle type ===&lt;br /&gt;
&lt;br /&gt;
Based on the common cartridge profile document supported content types in common cartridge are these:&lt;br /&gt;
&lt;br /&gt;
*folder&lt;br /&gt;
*web content&lt;br /&gt;
*web link&lt;br /&gt;
*discussion topic&lt;br /&gt;
*assesment (QTI assesment - quiz)&lt;br /&gt;
*associated content&lt;br /&gt;
*intra-package reference&lt;br /&gt;
*metadata&lt;br /&gt;
*question bank (in qti 1.2 format) &lt;br /&gt;
&lt;br /&gt;
Investigation is required to determine exactly what maps to what, how long will it take to implement appropriate transformation etc. &lt;br /&gt;
&lt;br /&gt;
For now we can say that following mappings apply:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Moodle&lt;br /&gt;
! Common Cartridge&lt;br /&gt;
|-&lt;br /&gt;
| Forum&lt;br /&gt;
| Discussion topic&lt;br /&gt;
|-&lt;br /&gt;
| Quiz&lt;br /&gt;
| QTI assesment&lt;br /&gt;
|-&lt;br /&gt;
| Link to static web page&lt;br /&gt;
| Web link or web content&lt;br /&gt;
|-&lt;br /&gt;
| Text page&lt;br /&gt;
| Web content&lt;br /&gt;
|-&lt;br /&gt;
| Web page&lt;br /&gt;
| Web content&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====CC Discussion topic transformation to Moodle Forum====&lt;br /&gt;
&lt;br /&gt;
An example of forum discussion topic:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;dt:topic xmlns:dt=&amp;quot;http://www.imsglobal.org/xsd/imsdt_v1p0&amp;quot; &lt;br /&gt;
         xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;title&amp;gt;Discussion Topic&amp;lt;/title&amp;gt;&lt;br /&gt;
  &amp;lt;text texttype=&amp;quot;text/html&amp;quot;&amp;gt;&amp;lt;h3&amp;gt;Hello World!&amp;lt;/h3&amp;gt;&amp;lt;/text&amp;gt;&lt;br /&gt;
  &amp;lt;attachments&amp;gt;&lt;br /&gt;
    &amp;lt;attachment href=&amp;quot;media/info.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/attachments&amp;gt;&lt;br /&gt;
&amp;lt;/dt:topic&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Common Cartridge supports storing only forum topics. Forum topic contains only topic title, message text and optional attachments.&lt;br /&gt;
&lt;br /&gt;
====CC QTI assesment transformation to Moodle Quiz====&lt;br /&gt;
{Description to be added...}&lt;br /&gt;
&lt;br /&gt;
====CC web link/web content - web content transformation to Moodle web link/text page/web page====&lt;br /&gt;
&lt;br /&gt;
Example of web link xml:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;wl:webLink xmlns:wl=&amp;quot;http://www.imsglobal.org/xsd/imswl_v1p0&amp;quot; &lt;br /&gt;
           xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; &amp;gt;&lt;br /&gt;
  &amp;lt;title&amp;gt;WebLink Example&amp;lt;/title&amp;gt;&lt;br /&gt;
  &amp;lt;url href=&amp;quot;http://www.uvcms.com&amp;quot; target=&amp;quot;_parent&amp;quot; windowFeatures=&amp;quot;&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/wl:webLink&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This link will be transformed during import from common cartridge into moodle link pointing to the specified url.&lt;br /&gt;
&lt;br /&gt;
In case we are importing item that points to static html file that will be also imported as moodle link pointing to that static file. &lt;br /&gt;
&lt;br /&gt;
Since common cartridge does not support pages with embedded HTML/txt no such pages can be imported.&lt;br /&gt;
&lt;br /&gt;
== Package export implementation ==&lt;br /&gt;
&lt;br /&gt;
As stated before export in common cartridge format will be supported only in Moodle 2.0. Before we dwell into details of how is something like this to be accomplished let us start with some data regarding moodle.&lt;br /&gt;
&lt;br /&gt;
=== Types of data available for export ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Resource name&lt;br /&gt;
! Type of resource&lt;br /&gt;
! Equivalent in Common Cartridge&lt;br /&gt;
|-&lt;br /&gt;
| Forum&lt;br /&gt;
| Activity&lt;br /&gt;
| Discussion topic&lt;br /&gt;
|-&lt;br /&gt;
| Quiz&lt;br /&gt;
| Activity&lt;br /&gt;
| QTI assesment&lt;br /&gt;
|-&lt;br /&gt;
| Link to static web page&lt;br /&gt;
| Static&lt;br /&gt;
| Web link or web content&lt;br /&gt;
|-&lt;br /&gt;
| Text page&lt;br /&gt;
| Static&lt;br /&gt;
| Web content&lt;br /&gt;
|-&lt;br /&gt;
| Web page&lt;br /&gt;
| Static&lt;br /&gt;
| Web content&lt;br /&gt;
|-&lt;br /&gt;
| Label&lt;br /&gt;
| Static&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Display a directory&lt;br /&gt;
| Static&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Advanced uploading of files&lt;br /&gt;
| Activity&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Online Text&lt;br /&gt;
| Activity&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Upload a single file&lt;br /&gt;
| Activity&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Offline activity&lt;br /&gt;
| Activity&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Chat&lt;br /&gt;
| Activity&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Choice&lt;br /&gt;
| Activity&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Database&lt;br /&gt;
| Activity&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Flashcard-Trainer&lt;br /&gt;
| Activity&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Glosarry&lt;br /&gt;
| Activity&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Lesson&lt;br /&gt;
| Activity&lt;br /&gt;
| &lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>1&gt;Mudrd8mz</name></author>
	</entry>
</feed>