To set up import and synchronization with Pégase in Ametys, the prerequisite is plugin odf-sync.
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 |
URL basic COF |
URL to connect to COF, we completeURL 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 synchronization code required for import, as well as 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 Pegasus.
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 an ELP list |
Importing an ELP |
Training synchronization |
Synchronizing a route |
Container synchronization |
Synchronizing an ELP list |
ELP synchronization |
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.
In both cases, the synchronization code is requested again, and can be pre-filled if the training 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 only existing content option has been ticked in the SCC configuration, only courses already imported manually from Pégase will be synchronized.
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 |
ELP list |
Type |
ELP |
Nature |
Pegasus |
Ametys |
---|---|
Training
|
Training (Program)
|
OrganizationalObject(OO - Course, Option, Specialty) |
Route (SubProgram) |
Theoretical TimeObject(OTT - Year, semester) |
Container (Container - with nature year or semester)
|
PedagogicalObject(PO)
Example: |
Element Pedagogique(ELP, Course)
If the OP does not have a grouping as parent, an ELP list is automatically created. (If there are several POs at the same hierarchy level, a single list is created). These groupings trigger an alert.
Example: The "TESTIMPORT4-list" has been automatically created to accommodate the TESTIMPORT4-E-2 and TESTIMPORT4-E-23 ELPs. |
Grouping (GROUPING)
Example: |
ELP list (CourseList) Example: |
Grouping (GROUPING)
Example: |
ELP list (CourseList)
Example: TESTIMPORT3-PARCOURS is not an ELP, so it is not imported and generates an alert. |
Grouping (GROUPING)
Example: |
Container
Example: The "TESTIMPORT1GROUPEMENT" grouping contains no Learning Objects (ELPs), so it was imported as a container with no nature or period, and its child elements could also be 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 set up to perform pre-checks 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.
Before the application launches the export to Pégase, it performs a check identical to the Pégase export status. 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.
The user performs an export with a code and possibly a version at training level:
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.
An exception is made for the Diploma reference table, as there are two other fields dedicated to Pégase: Nature de diplôme (Pégase) and Cursus lié au diplôme (Pégase), which can be used to fill in additional fields in Pégase.
Below you'll find a list of export behaviors from Ametys to Pégase: field mapping and structure.
Ametys |
Pegasus |
---|---|
Pegasus synchronization code |
Code |
Wording |
Short text and |
|
Mutualisable = true except for ELP lists |
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 (and related values) |
Diploma type Cursus Type of diploma |
Target level of study |
Level of training |
RNCP level |
Diploma level |
Mention |
Mention |
Items concerned |
Ametys |
Pegasus |
---|---|---|
Training |
ECTS (code Ametys) |
ECTS |
Container, ELP |
ECTS |
ECTS |
ELP, Container (year or semester) |
Description |
Description |
Course |
Presentation |
Description |
Container (no year, no semester) |
|
Choice range = false |
ELP list |
Type |
Choice range = true if choice, otherwise false |
ELP list |
Min |
Min (if type selectable) |
ELP list |
Max |
Max (if type selectable) |
ELP |
Nature |
Type |
Ametys |
Pegasus |
---|---|
Training (Program) |
Training Diploma, Certification or Qualification courses |
Route (SubProgram)
|
Organizationalobject(Typical path) |
Container (year or semester)
|
Theoretical TimeObject(Year, Semester) |
Container of another kind (Container)
|
Group |
Element Pedagogique (Race) |
Educationalobject |
ELP list (CourseList)
|
Group |