Actions

Developer Area/Import//Export: Difference between revisions

From Mahara Wiki

< Developer Area
Line 13: Line 13:
===How do I use it?===
===How do I use it?===


Visiting the 'Export' tab of 'My Portfolio' will allow you to choose between Leap2A or HTML website export.
In Mahara we have the possibility to export and import individual portfolios or a whole account. The different ways we can do this will depend on whether we are logged in as site administrator or not.


To import a Leap2A file, go to the Administration section and choose Add User. You will be able to upload a Leap2A file in order to create a new user account. There's no progress bar in the UI, so be patient - it might take quite a while for the form to submit to create the new user account.
A '''site admin''' is able to import and export many accounts at once by using the admin bulk tools:
 
* To do a bulk export
# access this URL ''<sitename>/admin/users/bulkexport.php''
# You'll see a form with a field 'Users to export'
# Fill in the usernames of the accounts to export, each one a new line and export
[[File:Bulkexport.png|thumb|Bulk export page]]
 
* To do a bulk import
# access this URL ''<sitename>/admin/users/bulkimport.php''
# You'll see a form where you'll need to fill the 'Bulk export file' field with the exported accounts to be added to the site. The file used here has to be one obtained by doing a bulk export on the same or a different site.
 
* A site admin can import one single account manually as well:
# By going to Admin menu -> People -> Add person, we get a form that allows us to manually add a new account.
# On the first step we can add the details by filling up the fields, or check the Leap2A import and attach a file containing an account details. The files we can user here can come from a simple account export done by the owners account or take one of the zip files inside of a bulk export (you'll have to unzip the bulk export to get it, there should be one for each account exported)
 
A '''common user''' is able to import and export their whole account or some of the portfolios
 
# Main menu -> Manage -> Export: Where we can export the account or portfolios
# Main menu -> Manage -> Import: Where we can import the files exported form the same or different site, containing an account or just a few portfolios
 
'''IMPORTANT''' note for developers:
When modifying a blocktype, view structure or artefacts, or anything that needs to be added to an export when exporting an account, the tests should contain all of these export/import alternatives. Some of them follow a different path on the code because they can be imported following a different strategy. For example, a bulk import will be non interactive while a personal portfolio import will let you choose what artefact/portfolios from the file to import.


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

Revision as of 15:22, 2 October 2020

In Mahara, import and export refer to the ability for users to export their portfolios (or parts of them), and then to import them again. This system is designed to allow transfer of all manner of portfolio information in to, and out of, Mahara.

In early 2009, Mahara took part in a JISC CETIS project called PIOP - Portfolio Interoperability Projects. The goals of the project involved implementing import and export of data using the LeapA standard. Mahara took the opportunity to add generic import/export APIs to allow other formats to be integrated in future, as well as implementing a standalone HTML export plugin and fully integrating the work into the UI.

Status

Full Leap2A import and export support is included in Mahara 1.2. You can fully export and import portfolios between Mahara installations. Some preliminary results are available regarding interoperability with the other PIOP partners. You can watch a video demonstration of the import/export functionality:

How do I use it?

In Mahara we have the possibility to export and import individual portfolios or a whole account. The different ways we can do this will depend on whether we are logged in as site administrator or not.

A site admin is able to import and export many accounts at once by using the admin bulk tools:

  • To do a bulk export
  1. access this URL <sitename>/admin/users/bulkexport.php
  2. You'll see a form with a field 'Users to export'
  3. Fill in the usernames of the accounts to export, each one a new line and export
Bulk export page
  • To do a bulk import
  1. access this URL <sitename>/admin/users/bulkimport.php
  2. You'll see a form where you'll need to fill the 'Bulk export file' field with the exported accounts to be added to the site. The file used here has to be one obtained by doing a bulk export on the same or a different site.
  • A site admin can import one single account manually as well:
  1. By going to Admin menu -> People -> Add person, we get a form that allows us to manually add a new account.
  2. On the first step we can add the details by filling up the fields, or check the Leap2A import and attach a file containing an account details. The files we can user here can come from a simple account export done by the owners account or take one of the zip files inside of a bulk export (you'll have to unzip the bulk export to get it, there should be one for each account exported)

A common user is able to import and export their whole account or some of the portfolios

  1. Main menu -> Manage -> Export: Where we can export the account or portfolios
  2. Main menu -> Manage -> Import: Where we can import the files exported form the same or different site, containing an account or just a few portfolios

IMPORTANT note for developers: When modifying a blocktype, view structure or artefacts, or anything that needs to be added to an export when exporting an account, the tests should contain all of these export/import alternatives. Some of them follow a different path on the code because they can be imported following a different strategy. For example, a bulk import will be non interactive while a personal portfolio import will let you choose what artefact/portfolios from the file to import.

Meeting Notes

For the meetings we had during development.

Subpages