Actions

Developer Area/Import//Export/LEAP Import: Difference between revisions

From Mahara Wiki

< Developer Area‎ | Import//Export
(Created page with "Mahara's Leap Import is implemented as a plugin for Mahara's "Import" plugin type. It allows Mahara to import [http://wiki.cetis.ac.…")
 
No edit summary
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Mahara's Leap Import is implemented as a plugin for Mahara's [[Developer Area/Import//Export/LEAP Import|"Import" plugin type]]. It allows Mahara to import [http://wiki.cetis.ac.uk/LEAP2A_specification Leap2A] files, which Mahara can also [[Developer Area/Import//Export/LEAP Export|export]].
Mahara's Leap Import is implemented as a plugin for Mahara's [[Developer Area/Import%2f%2fExport/LEAP Import|"Import" plugin type]]. It allows Mahara to import [http://wiki.cetis.ac.uk/LEAP2A_specification Leap2A] files, which Mahara can also [[Developer Area/Import%2f%2fExport/LEAP Export|export]].


'''''Note:''' A working understanding of the ''[http://wiki.cetis.ac.uk/LEAP2A_specification ''Leap2A spec'']'' will help you understand the documentation written here. We suggest you at least partially familiarise yourself with the spec before diving into the code or this documentation.''
'''''Note:''' A working understanding of the ''[http://wiki.cetis.ac.uk/LEAP2A_specification ''Leap2A spec'']'' will help you understand the documentation written here. We suggest you at least partially familiarise yourself with the spec before diving into the code or this documentation.''
Line 5: Line 5:
<div id="section_1">
<div id="section_1">


=== Architecture ===
===Architecture===


The Leap import plugin lives in <code>htdocs/import/leap/</code>. The core import algorithm is implemented here, as well as other parts necessary to implement the Mahara import API. Most of the work is done by the PluginImportLeap class, which represents a Leap export and the process of importing it.
The Leap import plugin lives in <code>htdocs/import/leap/</code>. The core import algorithm is implemented here, as well as other parts necessary to implement the Mahara import API. Most of the work is done by the PluginImportLeap class, which represents a Leap export and the process of importing it.
Line 15: Line 15:
</div><div id="section_2">
</div><div id="section_2">


=== Importing Algorithm ===
===Importing Algorithm===


This algorithm is still under development. Please see the [[Developer Area/Import//Export/Import: Implementation Plan|implementation plan]] for an exhaustive description of the algorithm as it was planned. The algorithm has not changed much from how that document describes it.
This algorithm is still under development. Please see the [[Developer Area/Import%2f%2fExport/Import%3a Implementation Plan|implementation plan]] for an exhaustive description of the algorithm as it was planned. The algorithm has not changed much from how that document describes it.


</div><div id="section_3">
</div><div id="section_3">


=== Artefact Plugins and Leap Import ===
===Artefact Plugins and Leap Import===


From a Leap export:
From a Leap export:


* The [[Developer Area/Import//Export/LEAP Import/Blog Artefact Plugin|blog artefact plugin]] imports blogs, blog posts and their attachments.
* The [[Developer Area/Import%2f%2fExport/LEAP Import/Blog Artefact Plugin|blog artefact plugin]] imports blogs, blog posts and their attachments.
* The [[Developer Area/Import//Export/LEAP Import/File Artefact Plugin|file artefact plugin]] imports files and folders, and detects and imports profile icons.
* The [[Developer Area/Import%2f%2fExport/LEAP Import/File Artefact Plugin|file artefact plugin]] imports files and folders, and detects and imports profile icons.
* The [[Developer Area/Import//Export/LEAP Import/Resume Artefact Plugin|resume artefact plugin]] imports employment history and other personal/professional records.
* The [[Developer Area/Import%2f%2fExport/LEAP Import/Resume Artefact Plugin|resume artefact plugin]] imports employment history and other personal/professional records.
* The [[Developer Area/Import//Export/LEAP Import/Internal Artefact Plugin|internal artefact plugin]] imports basic profile information.
* The [[Developer Area/Import%2f%2fExport/LEAP Import/Internal Artefact Plugin|internal artefact plugin]] imports basic profile information.
* The Leap import plugin itself handles the importing of Views
* The Leap import plugin itself handles the importing of Views


</div><div id="section_4">
</div><div id="section_4">


=== Importing from Other Systems ===
===Importing from Other Systems===


We have documented the results of importing from other systems, as well as exporting, in the [[Developer Area/Import//Export/Interoperability|Interoperability]] section.
We have documented the results of importing from other systems, as well as exporting, in the [[Developer Area/Import%2f%2fExport/Interoperability|Interoperability]] section.


You should probably validate incoming Leap2A exports before [https://bugs.launchpad.net/mahara/+filebug filing a bug] against the Mahara Leap importer.
You should probably [http://www.leapspecs.org/validator/2A/ validate incoming Leap2A exports] before [https://bugs.launchpad.net/mahara/+filebug filing a bug] against the Mahara Leap importer.


</div>
</div>
Line 51: Line 51:
* [[Developer_Area/Import//Export/LEAP_Import/Internal_Artefact_Plugin|Internal Artefact Plugin]]
* [[Developer_Area/Import//Export/LEAP_Import/Internal_Artefact_Plugin|Internal Artefact Plugin]]
* [[Developer_Area/Import//Export/LEAP_Import/Resume_Artefact_Plugin|Resume Artefact Plugin]]
* [[Developer_Area/Import//Export/LEAP_Import/Resume_Artefact_Plugin|Resume Artefact Plugin]]
[[Category:Developer Area]][[Category:LEAP]]

Latest revision as of 16:39, 16 Mayıs 2011

Mahara's Leap Import is implemented as a plugin for Mahara's "Import" plugin type. It allows Mahara to import Leap2A files, which Mahara can also export.

Note: A working understanding of the Leap2A spec will help you understand the documentation written here. We suggest you at least partially familiarise yourself with the spec before diving into the code or this documentation.

Architecture

The Leap import plugin lives in htdocs/import/leap/. The core import algorithm is implemented here, as well as other parts necessary to implement the Mahara import API. Most of the work is done by the PluginImportLeap class, which represents a Leap export and the process of importing it.

In addition to this, each artefact plugin can provide the import/leap/lib.php file which the core searches for in order to do most of the heavy lifting. The core Mahara artefact plugins provide this so that, for example, files and blogs in Leap files are imported as files and blogs in Mahara. If you are writing an artefact plugin and your plugin does not supply any artefact type that can be meaningly imported from a Leap file, you don't have to provide the import/leap/ directory at all.

The code uses the PHP extension simplexml to parse the Leap files. This extension is bundled with PHP5 by default, so you're very likely to have it available.

Importing Algorithm

This algorithm is still under development. Please see the implementation plan for an exhaustive description of the algorithm as it was planned. The algorithm has not changed much from how that document describes it.

Artefact Plugins and Leap Import

From a Leap export:

Importing from Other Systems

We have documented the results of importing from other systems, as well as exporting, in the Interoperability section.

You should probably validate incoming Leap2A exports before filing a bug against the Mahara Leap importer.

Files

Subpages