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
        1. Version management
      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.

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

 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.

Rights

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.

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 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:

  • Type : Pegasus COF
  • 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 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.

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.

In both cases, the synchronization code is requested again, and can be pre-filled if the training 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 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.

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

ELP list

Type

ELP

Nature

Structure

 Pegasus

Ametys 

Training
  • Graduate
  • Certified
  • Qualifying

Training (Program)

  • of a "Diploma" nature 
  • Certification
  • without nature

OrganizationalObject(OO - Course, Option, Specialty)

Route (SubProgram)

Theoretical TimeObject(OTT - Year, semester)

Container (Container - with nature year or semester)

  • The period is not entered because Pégase does not provide this information.

 PedagogicalObject(PO)

  • EU
  • EC
  • Teaching

 

Example:

Element Pedagogique(ELP, Course)

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

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)

  • 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, and an alert is issued for each of them.

 

Example:

TESTIMPORT3-PARCOURS is not an ELP, so it is not imported and generates an alert.

Grouping (GROUPING) 

  • Containing no OP

Example:

 

 Container

  • No nature or period

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.

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 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:

  • Fields required for export
  • Validity of synchronization codes
  • Consistency of the training version (if present): the version entered must be equal to (synchronization) or 1 version higher (import) than the last version present in Pégase.
  • Structure consistency (no year under a year or semester, or empty ELP lists, for example)
  • Training not modifiable in Pégase

Export

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 :

  • Missing links between elements due to incompatibility in Pegasus
  • Reference table code correspondence
  • Invalid structure (cases not tested by advance control)
  • Sharing problems
  • Problem withAPI Pegasus
  • Etc.

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

Version management

The user performs an export with a code and possibly a version at training level:

  • If no version is specified
    • If a course exists with the synchronization code, it is synchronized.
    • Otherwise, a new course is created in Pégase (version 1).
  • If a version is specified, we check whether the training exists in this version.
    • If the training with the synchronization code exists in this version, it is synchronized.
    • Otherwise a new version of the course is created in Pégase

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.

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.

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

Code 

Wording

Short text and 

 

Mutualisable = true except for ELP lists

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 (and related values)

Diploma type

Cursus

Type of diploma

Target level of study

Level of training

RNCP level

Diploma level

Mention

Mention 

Other types

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

Structure

 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

 

Back to top