To set up import and synchronization with Pégase in Ametys, the prerequisite is plugin odf-sync and version 4.8 or higher. These functions are compatible with Pégase versions 24 and higher.
Pegasus can be completely disabled (no more configuration, no more Pegasus SCC, etc.) by deactivating the odf-sync/configuration.pegase feature in the runtime file.xml
In the application's general configuration ( Administration side), go to the Training Offer category, then to the Pegasus Import/Export group.
If the Pégase Import/Export block is unchecked, then all incoming and outgoing exchange functionalities with Pégase will not be available from CMS (Import and export of training courses).
Parameter name |
Details |
URL authentication |
URL to query the CAS used to connect to PC-Scol applications including Pégase |
User/Password |
API service user credentials for Pegasus, a classic user does not have the appropriate rights to call upAPI from Pegasus. |
Plant code |
School code supplied by PC-Scol, usually equal to ETAB00 |
Space identifier |
Identifier of the Pégase workspace to which training courses will be exported. |
URL basic Pegasus ODF |
URL to connect to Pegasus ODF, we complete theURL to accessAPI in the version we want. |
Exporting with Ametys |
If this box is checked, the list of children in structures exported from Ametys will take precedence over the list in Pégase. |
A Modify Pégase fields right is available in the Training offer section.
It is used to update the Pégase code required for import, as well as the Pégase correspondence codes for reference tables.
In the import and export sections, the matching mechanism will be explained in greater detail.
This right is required to modify the correspondence field. The field can be read freely.
If Pegasus fields are not filled in the general configuration, it will still be possible to define imports, but they will remain inactive.
Import can be disabled independently of export, so that synchronizable collections are no longer available, by deactivating the odf-sync/synchro.pegase feature in the runtime file.xml.
In addition to the general configuration, you need to define a collection of synchronizable content to be able to import from Pégase.
In the CMS administration, there's a Content Synchronization tool accessible from the Administration tab, in the Configuration group, Content Synchronization button.
You need to create a collection of synchronizable content (we'll call this configuration SCC in the rest of the documentation) as follows:
In addition to the Modify Pégase fields right (explained above), course import and synchronization depend on specific rights present in the Training offer section:
Training import |
Route import |
Importing a container |
Importing a list |
Importing a teaching element |
Training synchronization |
Synchronizing a route |
Container synchronization |
Synchronizing a list |
Synchronizing a teaching element |
Without these rights, the import or synchronization buttons will not appear.
These rights need to be allocated contextually: either to the training offer in general, or to targeted training courses, or to the component offering the targeted training courses.
For global synchronization, still in the Training Offer section, you need the Pégase Global Synchronization right.
If the Validate content on creation checkbox in the SCC configurations is checked and the importing user does not have validation rights, the content will not be validated. Similarly, on synchronization, content will retain its status ("Draft" or "Validated") as far as possible (if the data is valid and the user has rights). Content will revert to draft status if synchronized by a user who does not have validation rights.
After this configuration, on the CMSside, you should find the Import training courses (Pégase) button in the Training offer tab.
A search tool for Pégase training courses opens.
This is a raw search of the Pegasus database.
When selecting an item in the search, if it has already been imported, it is no longer importable, and the arrow indicating its status is grayed out.
Alternatively, you can import a single course.
A course that can no longer be imported can still be synchronized using the Synchronize (Pegasus) button in the Training contextual tab (when a course is selected).
It is also available for courses that do not come from a Pégase import.
When a course is synchronized via this button, the Pégase identifier is requested. It can be pre-filled if the course already comes from a Pégase import.
The Pégase Global Synchronization button is available from the Training Offer tab.
It has the effect of synchronizing all the formations in Pegasus with those onAmetys.
If the Synchronize existing content only option has been checked in the SCC configuration, only training data and other content already manually imported from Pégase will be synchronized. New course content will not be imported.
Otherwise, all courses will be either imported or synchronized from Pégase.
Synchronization of all content (imported or not) is not recommended on this type of CSC, as it can be very cumbersome and time-consuming.
The mapping of fields from Pegasus to Ametys is done in several steps from several sources:
Conversion files are customizable, they can be added to the WEB-INF/param/odf/pegase/code folder, are named TABLE_REF_ID_conversion.xml where TABLE_REF_ID corresponds to the reference table identifier in lower case truncated by its prefix odf-enumeration. and are structured as follows (tag names are not important):
<balise-racine> <correspondance code="CODE_PEGASE1">CODE_AMETYS1</correspondance> <correspondance code="CODE_PEGASE2">CODE_AMETYS2</correspondance> <correspondance code="CODE_PEGASE3">CODE_AMETYS2</correspondance> </balise-racine>
Several Pégase codes can correspond to a single Ametys code, but the reverse is not true, which is why these correspondence files are only used for import and not for export.
Example correspondence files for Pegasus are available in our code base.
Exemple : pour les niveaux RNCP, la ligne "<rncpLevel code="NID001">1</rncpLevel>" est présente dans le fichier "rncplevel_conversion.xml", le code Pégase "NID001" correspond donc au code Ametys "1".
Training |
Diploma Ministerial domain(s) Component(s): Too complex correspondence from Pegasus, no unique code |
---|---|
Course |
Component(s): Correspondence too complex from Pegasus, no unique code |
Container |
Nature: Managed in combination with Pégase's mandatory and choiceRange fields Period: Not managed by Pégase |
List ofELP |
Type |
ELP |
Nature |
Pegasus |
Ametys |
---|---|
Training
|
Training (Program)
|
Training object
|
|
Training object (UE, EC, ...)
Example:
|
Pedagogical element (ELP, Race)
If the OP does not have a grouping as parent, a list ofELP by type of element (mandatory or optional) is automatically created. (If several learning objects of these types are on the same hierarchy level, a maximum of two lists will be created (one for compulsory learning elements and one for optional ones).
Example: The "test ametys 2 - List O" list has been automatically created to accommodate the "mandatory" ELPs UE-T-1, UE-T-2, UE-T-3 and M-T-1. The "test ametys 2 - List F" list has been automatically created to includeELP EC-T-1, which is an "optional" item.
|
Grouping (GROUPING)
Example:
|
ELP list (CourseList)
Example:
|
Grouping (GROUPING)
Example:
|
ELP list (CourseList)
Example: The P-T-1 path is not a ELP, so it is not imported.
|
Grouping (GROUPING)
Example:
|
ELP list (CourseList) empty
Example: The P-T-1 path is not a ELP, so it is not imported.
|
Exporting training courses to Pégase depends on a right present in the Training Offer category. The right is Export a training course to Pégase. Without this right, the export buttons will not appear.
A tool has been implemented to perform a check before exporting to Pégase. It is available in the Advanced contextual tab when selecting a course, in the Pégase Export menu under the name Pégase export status.
It allows you to analyze certain errors in advance:
ThePegasus Export button is also available in the Advanced contextual tab when a course is selected.
A check identical to the Pégase export status is carried out upstream of an export to Pégase; if the slightest anomaly is identified, the export is not triggered.
Other errors or alerts may appear when exporting to Pégase :
It is then necessary to consult the newspapers to find out the exact cause.
Some of the fields in the training offer elements exported to Pégase contain reference table entries.
The reference tables concerned (Diploma, Field, Level of study, Mention, Nature of diploma, Training fields, RNCP level, Nature (ELP)) have a Pégase Code field to transform the value by the Pégase one during export.
If the Pégase code is not entered, the Ametys code is used for export.
Below you'll find a list of export behaviors from Ametys to Pégase: field mapping and structure.
Ametys |
Pegasus |
---|---|
Pegasus synchronization code |
Identifier |
Wording |
Short and long labels |
|
Shared = false unless shared in Pégase |
Ametys |
Pegasus |
---|---|
Type of diploma |
Type of training (type according to reference tables : Graduate: 0 Certifying: 1 Qualifying: 2) |
Ministerial domain (first element) |
Training Area |
Diploma |
Diploma type |
Target level of study |
Level of training |
RNCP level |
Diploma level |
Mention |
Mention |
Items concerned |
Ametys |
Pegasus |
---|---|---|
Training, Career paths |
ECTS (code Ametys) |
ECTS |
Container, ELP |
ECTS |
ECTS |
List ofELP |
Type |
Choice range = true if choice, otherwise false |
List ofELP |
Min |
Min (if type selectable) |
List ofELP |
Max |
Max (if type selectable) |
ELP |
Nature |
Type |
Ametys |
Pegasus |
---|---|
Training (Program) |
Training Diploma, Certification or Qualification courses |
Route (SubProgram)
|
Trainingobject(Course Type)
|
Container (year or semester)
|
Object Training(Year, Semester)
|
Container of another kind (Container) |
Not exported |
ELP list(CourseList)
|
Group
|
Element Pedagogique (Race)
|
Trainingobject(type UE, MATIERE, EC...)
|