mod/referentiel/import instance: Difference between revisions
From MoodleDocs
Jean FRUITET (talk | contribs) (New page: ==Import a skills repository== If you have a repository backup in XML format (produced by the export function) you can restore it in your Moodle course. Then, two situations can occur: ...) |
Jean FRUITET (talk | contribs) |
||
Line 1: | Line 1: | ||
=Import a skills repository= | |||
If you have a repository backup in XML format (produced by the export function) you can restore it in your Moodle course. | If you have a repository backup in XML format (produced by the export function) you can restore it in your Moodle course. | ||
Line 9: | Line 9: | ||
** If you choose to overwrite the existing version, it will be replaced by the imported version; | ** If you choose to overwrite the existing version, it will be replaced by the imported version; | ||
** If you choose to keep the existing version; the import process will be canceled; | ** If you choose to keep the existing version; the import process will be canceled; | ||
==Importation / exportation Formats== | |||
* XML is a textual data format representing the information as a tag hierarchies and nested data. It allows the backup and restore of skills repositories, activities and certificates. | |||
<referentiel> | |||
<id>2</id> | |||
<name>Test</name> | |||
<domaine> | |||
<id>3</id> | |||
<code_domaine>test1</code_domaine> | |||
<description_domaine> | |||
<text>Description Test1</text> | |||
</description_domaine> | |||
<ref_referentiel>2</ref_referentiel> | |||
<competence> | |||
<id>8</id> | |||
<code_competence>Test1.1</code_competence> | |||
<description_competence> | |||
<text>Description Test1.1</text> | |||
</description_competence> | |||
<item> | |||
<id>28</id> | |||
<code>Test1.1.1</code> | |||
<description_item> | |||
<text>Description Test1.1.1</text> | |||
</description_item> | |||
</item> | |||
<item> | |||
<id>30</id> | |||
<code>Test1.1.2</code> | |||
<description_item> | |||
<text>Description Test1.1.2</text> | |||
</description_item> | |||
</item> | |||
</competence> | |||
</domaine> | |||
</referentiel> | |||
* The XHTML format is an export-type format intended for Web page display. | |||
* The CSV is a textual format of tabular data (like in a spreadsheet). | |||
The CSV uses a separator, in general ';' between the cells of a table. | |||
For example: | |||
nom;prenom;mell;ville;cours1;role1;cours2;role2; | |||
HADDOCK;Archibald;a.haddock@moulinsart.be;Moulinsart;Navigation;professeur; | |||
TOURNESOL;Tryphon;t.tournesol@moulinsart.be;Moulinsart;Physique;professeur; | |||
CASTAFIORE;Bianca;la_castafiore@moulinsart.be;Moulinsart;Chant;professeur; | |||
;Tintin;tintin@moulinsart.be;Moulinsart;Chant;etudiant; | |||
This gives a table: | |||
<font size="-1"> | |||
<table cellspacing="1" cellpadding="2" bgcolor="#000000" border="0"> | |||
<tr bgcolor="#999999"><th>nom</th><th>prenom</th><th>mel</th><th>ville</th><th>cours1</th><th>role1</th></tr> | |||
<tr bgcolor="#00CCFF"><td>HADDOCK</td><td>Archibald</td><td>a.haddock@moulinsart.be</td><td>Moulinsart</td><td>Navigation</td><td>professeur</td></tr> | |||
<tr bgcolor="#66FF66"><td>TOURNESOL</td><td>Tryphon</td><td>t.tournesol@moulinsart.be</td><td>Moulinsart</td><td>Physique</td><td>professeur</td></tr> | |||
<tr bgcolor="#00CCFF"><td>CASTAFIORE</td><td>Bianca</td><td>la_castafiore@moulinsart.be</td><td>Moulinsart</td><td>Chant</td><td>professeur</td></tr> | |||
<tr bgcolor="#66FF66"><td> </td><td>Tintin</td><td>tintin@moulinsart.be</td><td>Moulinsart</td><td>Chant</td><td>etudiant</td></tr> | |||
</table> | |||
</font> | |||
The CSV is not really suited for nested data, as in a skills repository. | |||
[[fr:Importer un référentiel]] | [[fr:Importer un référentiel]] |
Revision as of 19:45, 1 April 2010
Import a skills repository
If you have a repository backup in XML format (produced by the export function) you can restore it in your Moodle course.
Then, two situations can occur:
- This is a new skills repository for this Moodle space; it becomes available for this (local != 0) course or for all the (local == 0) courses;
- If there is an identical local version (same name, same code) – the skills repository is already existing in Moodle:
- If you choose to overwrite the existing version, it will be replaced by the imported version;
- If you choose to keep the existing version; the import process will be canceled;
Importation / exportation Formats
- XML is a textual data format representing the information as a tag hierarchies and nested data. It allows the backup and restore of skills repositories, activities and certificates.
<referentiel> <id>2</id> <name>Test</name> <domaine> <id>3</id> <code_domaine>test1</code_domaine> <description_domaine> <text>Description Test1</text> </description_domaine> <ref_referentiel>2</ref_referentiel> <competence> <id>8</id> <code_competence>Test1.1</code_competence> <description_competence> <text>Description Test1.1</text> </description_competence> <item> <id>28</id>Test1.1.1
<description_item> <text>Description Test1.1.1</text> </description_item> </item> <item> <id>30</id>Test1.1.2
<description_item> <text>Description Test1.1.2</text> </description_item> </item> </competence> </domaine> </referentiel>
- The XHTML format is an export-type format intended for Web page display.
- The CSV is a textual format of tabular data (like in a spreadsheet).
The CSV uses a separator, in general ';' between the cells of a table.
For example:
nom;prenom;mell;ville;cours1;role1;cours2;role2; HADDOCK;Archibald;a.haddock@moulinsart.be;Moulinsart;Navigation;professeur; TOURNESOL;Tryphon;t.tournesol@moulinsart.be;Moulinsart;Physique;professeur; CASTAFIORE;Bianca;la_castafiore@moulinsart.be;Moulinsart;Chant;professeur; ;Tintin;tintin@moulinsart.be;Moulinsart;Chant;etudiant;
This gives a table:
nom | prenom | mel | ville | cours1 | role1 |
---|---|---|---|---|---|
HADDOCK | Archibald | a.haddock@moulinsart.be | Moulinsart | Navigation | professeur |
TOURNESOL | Tryphon | t.tournesol@moulinsart.be | Moulinsart | Physique | professeur |
CASTAFIORE | Bianca | la_castafiore@moulinsart.be | Moulinsart | Chant | professeur |
Tintin | tintin@moulinsart.be | Moulinsart | Chant | etudiant |
The CSV is not really suited for nested data, as in a skills repository.