Developer Area/Import//Export/LEAP Import/Internal Artefact Plugin
From Mahara Wiki
< Developer Area | Import//Export | LEAP ImportRevision as of 16:34, 16 May 2011 by Dirkca
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
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