Developer Area/Import//Export/LEAP Extensions: Difference between revisions
From Mahara Wiki
< Developer Area | Import//Export
Brettwilkins (talk | contribs) (Created page with "This page documents Mahara-specific extensions to the LEAP2A standard. <div id="section_1"> === artefactplugin === This element is used to provide information about what artef…") |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
<div id="section_1"> | <div id="section_1"> | ||
=== artefactplugin === | ===artefactplugin=== | ||
This element is used to provide information about what artefact type the entry represents, and (slightly redundantly) what artefact plugin provides that artefact type. Mahara uses this at import time for some entries, in order to make smarter decisions about how an entry should be imported. | This element is used to provide information about what artefact type the entry represents, and (slightly redundantly) what artefact plugin provides that artefact type. Mahara uses this at import time for some entries, in order to make smarter decisions about how an entry should be imported. | ||
Line 11: | Line 11: | ||
<div id="section_2"> | <div id="section_2"> | ||
===== Example: ===== | =====Example:===== | ||
Line 17: | Line 17: | ||
<div id="section_3"> | <div id="section_3"> | ||
==== type ==== | ====type==== | ||
This attribute on the mahara:artefactplugin element indicates the type of artefact a given entry corresponds to. | This attribute on the mahara:artefactplugin element indicates the type of artefact a given entry corresponds to. | ||
Line 23: | Line 23: | ||
</div><div id="section_4"> | </div><div id="section_4"> | ||
==== plugin ==== | ====plugin==== | ||
This attribute on the mahara:artefactplugin element indicates the artefact plugin that exported the entry. This information is somewhat redundant, as it can be calculated from the type, but its presence makes import routines easier. | This attribute on the mahara:artefactplugin element indicates the artefact plugin that exported the entry. This information is somewhat redundant, as it can be calculated from the type, but its presence makes import routines easier. | ||
Line 29: | Line 29: | ||
</div></div></div><div id="section_5"> | </div></div></div><div id="section_5"> | ||
=== ownerformat === | ===ownerformat=== | ||
This element is used to pass the 'owner format' field around. This field describes how the author of a View wants their name displayed. It is seen in Mahara when you look at a View, and you see "View Title by '''Person's Name'''". | This element is used to pass the 'owner format' field around. This field describes how the author of a View wants their name displayed. It is seen in Mahara when you look at a View, and you see "View Title by '''Person's Name'''". |
Latest revision as of 18:06, 12 Mayıs 2011
This page documents Mahara-specific extensions to the LEAP2A standard.
artefactplugin
This element is used to provide information about what artefact type the entry represents, and (slightly redundantly) what artefact plugin provides that artefact type. Mahara uses this at import time for some entries, in order to make smarter decisions about how an entry should be imported.
An example is profile icons - Mahara stores these in a separate area to the rest of a user's files, but there is no concept of a profile icon in the LEAP2A specification, which means it would be impossible to detect them again when importing. This element allows Mahara to recognise these profile icons.
Example:
type
This attribute on the mahara:artefactplugin element indicates the type of artefact a given entry corresponds to.
plugin
This attribute on the mahara:artefactplugin element indicates the artefact plugin that exported the entry. This information is somewhat redundant, as it can be calculated from the type, but its presence makes import routines easier.
ownerformat
This element is used to pass the 'owner format' field around. This field describes how the author of a View wants their name displayed. It is seen in Mahara when you look at a View, and you see "View Title by Person's Name".
This field takes an integer value with its meaning defined by the FORMAT_NAME_*
constants defined at the bottom of Mahara's lib/view.php
. Here, they are reproduced for convenience:
/** * display format for author names in views - firstname */ define('FORMAT_NAME_FIRSTNAME', 1); /** * display format for author names in views - lastname */ define('FORMAT_NAME_LASTNAME', 2); /** * display format for author names in views - firstname lastname */ define('FORMAT_NAME_FIRSTNAMELASTNAME', 3); /** * display format for author names in views - preferred name */ define('FORMAT_NAME_PREFERREDNAME', 4); /** * display format for author names in views - student id */ define('FORMAT_NAME_STUDENTID', 5); /** * display format for author names in views - obeys display_name */ define('FORMAT_NAME_DISPLAYNAME', 6);