Difference between revisions of "Developer Area/Import//Export/LEAP Import/Internal Artefact Plugin"

From Mahara Wiki

< Developer Area‎ | Import//Export‎ | LEAP Import
Line 34: Line 34:
[[Category:Developer Area]][[Category:Plugins]][[Category:LEAP]]
[[Category:Developer Area]][[Category:Plugins]][[Category:Artefact Plugins]][[Category:LEAP]]

Latest revision as of 16:49, 16 May 2011

The internal artefact plugin hooks into the LEAP import system to import basic profile data for the user being imported - excluding profile icons, which are handled by the file artefact plugin.

Import Strategies Provided

This plugin provides one strategy to import raw entries that correspond to some profile fields that don't map nicely to the LEAP standard persondata. The bulk of the importing is handled by the import_author_data hook.

How Entries are Imported

As this plugin has to potentially deal with details about the feed itself, rather than just the entries inside it, there is a special hook called import_author_data called to deal with importing data about the feed owner. This hook uses the person entry corresponding to the user if present, otherwise it does the best it can with the element for the feed (also if present).

This hook attempts to map the LEAP persondata fields to Mahara's profile fields, although there isn't a perfect mapping. Sometimes, the non-standard mahara: attributes have to be examined to determine what to do with an imported field.

Three fields are imported from raw entries, by examining the mahara:plugin attribute to see if it is "internal" - Occupation, Industry and Student ID. Neither occupation nor industry map well to a LEAP persondata field. While Student IDs are covered by the LEAP spec, the Student ID field in Mahara does not correspond to a particular service, so cannot be exported as persondata.


  • How do we want to handle potentially overwriting data?
  • Address for person (leap:spatial) - our export might have to be modified to output them in a more "correct" order for other systems
  • Validate the values of profile fields coming in? Especially email
  • Refactor the bunches of duplicate code