1. Installation
    1. Prerequisites
    2. Deactivation
    3. Configuration
    4. Rights
  2. Import
    1. Deactivation
    2. Configuration
    3. Rights
    4. Use
      1. Import
      2. Unit synchronization
      3. Global synchronization
      4. Matching mechanism
      5. Behavior
        1. Management of required fields
        2. Structure
  3. Export
    1. Rights
    2. Use
      1. Export status
      2. Export
      3. Matching mechanism
      4. Behavior
        1. Common fields
        2. Training
        3. Other types
        4. Structure

Installation

Prerequisites

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.

Deactivation

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

Configuration

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.

Rights

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.

Import

If Pegasus fields are not filled in the general configuration, it will still be possible to define imports, but they will remain inactive.

Deactivation

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.

Configuration

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:

  • Type : Pegasus ODF
  • Synchronized content :
    • Type of content : Training
    • Synchronize only existing content : It's advisable to check this box, especially if you're using global synchronization and want to limit global synchronization.
  • Lifecycle :
    • Lifecycle : Training
    • Initial action : 1
    • Synchronization action : 800
    • Validation action : 4
  • Additional operations:
    • Specific processing : Conversion of Pégase data to Ametys

Rights

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.

Use

Import

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.

Unit synchronization

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.

Global synchronization

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.

Matching mechanism

The mapping of fields from Pegasus to Ametys is done in several steps from several sources:

  1. Search in the Pegasus code of the reference table
  2. Search in mapping files (conversion)
  3. Code search Ametys
  4. If there is no match, the value is not filled in and an alert log is issued. In the case of a multivalued field, it may be partially filled in.

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".

Behavior

Management of required fields

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

Structure

 Pegasus

Ametys 

Training
  • Type of training

Training (Program)

  • Diploma

Training object 

  • Courses, options, specialties
  • Year, semester
  • UE, EC, MATIERE, ENS

 

  • Route (SubProgram)
  • Container (Container - with nature year or semester)
  • Pedagogical element (ELP, Race)

Training object (UE, EC, ...)

  • EU
  • EC
  • MATERIAL
  • Teaching, other

 

 

 

 

 

 

 

 

 

 

Example:

Pedagogical element (ELP, Race)

  • of an EU nature
  • of EC nature
  • of nature MATERIAL
  • Without nature

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)

  • Containing only OPs

 

Example:

 ELP list (CourseList)

 

 

 

Example:

Grouping (GROUPING)

  • Containing OPs and other elements

 

 

Example:

 

 ELP list (CourseList)

  • Items that are not POs are not imported

 

Example:

The P-T-1 path is not a ELP, so it is not imported.

Grouping (GROUPING) 

  • Containing no OP

Example:

 

 ELP list (CourseList) empty

  • Items that are not POs are not imported

Example:

The P-T-1 path is not a ELP, so it is not imported.

Export

Rights

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.

Use

Export status

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:

  • Fields required for export
  • Validity of synchronization codes
  • Consistency of training codes (if present): consistency of synchronization code and Pegasus code with each other and with Pegasus.
    • If a Pégase synchronization code (pegaseSyncCode) is entered (it can be entered manually via the repository or if the course has been imported from Pégase), it must correspond to an existing and modifiable course.
    • If a Pégase code has been entered
      • If a valid synchronization code was entered, check that the course code found is the same.
      • If no synchronization code was entered, check
        • No object exists for this code
        • An object exists, it's a formation and it can be modified
    • If neither code is present or valid, export is not possible.

Export

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 :

  • Missing links between elements due to incompatibility in Pegasus
  • Invalid structure
  • Sharing problems
  • Problem withAPI Pegasus
  • Etc.

It is then necessary to consult the newspapers to find out the exact cause.

Matching mechanism

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.

Behavior

Below you'll find a list of export behaviors from Ametys to Pégase: field mapping and structure.

Common fields

 Ametys

Pegasus 

Pegasus synchronization code

Identifier 

Wording

Short and long labels

 

Shared = false unless shared in Pégase

Training

 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 

Other types

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

Structure

 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...)

 

Back to top