The "Edit PJs" action appears in the ribbon if you haven't updated your workflow, taking the template ODF or ODF-Web as your model.
Action 12 must be excluded from buttons with the identifier org.ametys.odf.course.workflow.WorkflowSteps, org.ametys.odf.program.workflow.WorkflowSteps, org.ametys.odf.subprogram.workflow.WorkflowSteps in the workflow-actions tag if it is in exclude mode.
Republish CDM-fr training courses on portals or shared folders
This migration is only necessary if you want to add a republish button CDM-fr from training courses to portals or shared folders, or if you want to replace a republish button you had defined at project level with what is proposed at kernel level.
This option is automatically disabled if the configuration does not send CDM-fr to a remote server or deposit CDM-fr files in a folder.
To benefit from it, you must do the following:
In the plugin.xml file of plugin default-odf-workflow, add the following two features (The first defines the button, the second calls the ribbon that places the button in the right place):
Oops!
Copy to clipboard failed. Open the code and copy it manually.
In the I18N files of plugin default-odf-workflow (i18n/messages_*.xml), add the following keys (English and French) useful for the additional workflow action (see below):
Oops!
Copy to clipboard failed. Open the code and copy it manually.
<message key="WORKFLOW_ACTION_REPUBLISH">Republier</message>
<message key="WORKFLOW_ACTION_REPUBLISH_DESCRIPTION">Force la republication du contenu sur le portail distant.</message>
<message key="WORKFLOW_ACTION_REPUBLISH_ACTION_DESCRIPTION"><strong>{user}</strong> a republié le contenu sur le portail.</message>
<message key="WORKFLOW_ACTION_REPUBLISH">Republier</message>
<message key="WORKFLOW_ACTION_REPUBLISH_DESCRIPTION">Force la republication du contenu sur le portail distant.</message>
<message key="WORKFLOW_ACTION_REPUBLISH_ACTION_DESCRIPTION"><strong>{user}</strong> a republié le contenu sur le portail.</message>
<message key="WORKFLOW_ACTION_REPUBLISH">Republier</message>
<message key="WORKFLOW_ACTION_REPUBLISH_DESCRIPTION">Force la republication du contenu sur le portail distant.</message>
<message key="WORKFLOW_ACTION_REPUBLISH_ACTION_DESCRIPTION"><strong>{user}</strong> a republié le contenu sur le portail.</message>
Oops!
Copy to clipboard failed. Open the code and copy it manually.
<message key="WORKFLOW_ACTION_REPUBLISH">Republish</message>
<message key="WORKFLOW_ACTION_REPUBLISH_DESCRIPTION">Republish the selected content(s) on portal.</message>
<message key="WORKFLOW_ACTION_REPUBLISH_ACTION_DESCRIPTION"><strong>{user}</strong> has republished the content.</message>
<message key="WORKFLOW_ACTION_REPUBLISH">Republish</message>
<message key="WORKFLOW_ACTION_REPUBLISH_DESCRIPTION">Republish the selected content(s) on portal.</message>
<message key="WORKFLOW_ACTION_REPUBLISH_ACTION_DESCRIPTION"><strong>{user}</strong> has republished the content.</message>
<message key="WORKFLOW_ACTION_REPUBLISH">Republish</message>
<message key="WORKFLOW_ACTION_REPUBLISH_DESCRIPTION">Republish the selected content(s) on portal.</message>
<message key="WORKFLOW_ACTION_REPUBLISH_ACTION_DESCRIPTION"><strong>{user}</strong> has republished the content.</message>
Finally, in the training workflow named program.xml or workflow-program.xml in WEB-INF/param[/workflows], it is necessary to add the republishing action 9001 in the validated state 3 :
Oops!
Copy to clipboard failed. Open the code and copy it manually.
As the totalDurationOf* data has completely disappeared, all references to it must be migrated. This means, for example, that if you have overloaded the ELP content type (race), you must delete the references to the totalDurationOf* data and replace them with a reference to the courseParts metadata.
Data
Data migration is performed automatically via an initialization class.
It can be deactivated once the data has been migrated, using the odf-web/init.course-part feature, but is not essential. Rebuild indexes and live after the first M3 boot.
Workflow
There's a new worfklow, the teaching hours workflow (or CoursePart), in the file workflows/course-part.xml. You also need to add its label to the application.xml :
Oops!
Copy to clipboard failed. Open the code and copy it manually.
The ELP workflow (workflows/course.xml) has been updated to add, after the validation of a content type ELP, the validation of the teaching hours attached to it. You must therefore add to workflows/course.xml, after each call to the org.ametys.odf.workflow.ValidateODFContentFunction, the call to the org.ametys.odf.workflow.MoveLiveTagOnCoursePartFunction :
Oops!
Copy to clipboard failed. Open the code and copy it manually.
For CDM-fr imports not Ametys or prior to Ametys v4.2 (ODF 4.1), if in the CDM-fr synchronization, you have overloaded the templates named course-totalDurationOf*, they must be modified so that they import CoursePart in the following form:
Oops!
Copy to clipboard failed. Open the code and copy it manually.
To import Ametys v4.2 (ODF 4.1), use the template named course-courseParts.
Apogée import
A query has been added to the apogee-requests file.xml :
Oops!
Copy to clipboard failed. Open the code and copy it manually.
<select id="getCourseParts" parameterType="java.util.Map" resultType="map">
<include refid="Functions.isNotBlank" />
SELECT DISTINCT
COD_TYP_HEU,
NBR_HEU_ELP
FROM ELP_CHG_TYP_HEU
WHERE upper(COD_ELP)=upper(#{apogeeSyncCode})
<if test="#fn = isNotBlank, #fn(year)">
AND (COD_ANU IS NULL OR COD_ANU = #{year})
</if>
</select>
<select id="getCourseParts" parameterType="java.util.Map" resultType="map">
<include refid="Functions.isNotBlank" />
SELECT DISTINCT
COD_TYP_HEU,
NBR_HEU_ELP
FROM ELP_CHG_TYP_HEU
WHERE upper(COD_ELP)=upper(#{apogeeSyncCode})
<if test="#fn = isNotBlank, #fn(year)">
AND (COD_ANU IS NULL OR COD_ANU = #{year})
</if>
</select>
<select id="getCourseParts" parameterType="java.util.Map" resultType="map">
<include refid="Functions.isNotBlank" />
SELECT DISTINCT
COD_TYP_HEU,
NBR_HEU_ELP
FROM ELP_CHG_TYP_HEU
WHERE upper(COD_ELP)=upper(#{apogeeSyncCode})
<if test="#fn = isNotBlank, #fn(year)">
AND (COD_ANU IS NULL OR COD_ANU = #{year})
</if>
</select>
At the same time, the query that retrieves data from a ELP with hourly volumes has been simplified. Hourly volumes are no longer stored in the same place, and can now be multiple for the same type of teaching. All references to the ELP_CHARGE_ENS table have therefore been removed from the searchCourses query.
The associated mapping in apogee-mapping.xml also :
Oops!
Copy to clipboard failed. Open the code and copy it manually.
So if you have overloaded apogee-mapping.xml and/or apogee-requests.xml, you will need to compare them with the new kernel versions.
Catalog copy
A new streamlined workflow action has been created for catalog copying (and translation) to reduce copying time. Action 210 must be added to step 1 of the program, subprogram, container, courselist, course and course-part workflows:
Oops!
Copy to clipboard failed. Open the code and copy it manually.
Cette action est une interne qui doit être exclue des menus de workflows. Pour cela dans le plugin.xml de votre plugin default-odf-workflow, ajoutez <action>210</action> dans la section <workflow-actions mode="exclude"> pour la déclaration des menus suivants :
org.ametys.odf.course.workflow.WorkflowSteps
org.ametys.odf.program.workflow.WorkflowSteps
org.ametys.odf.subprogram.workflow.WorkflowSteps
org.ametys.odf.container.workflow.WorkflowSteps
org.ametys.odf.courselist.workflow.WorkflowSteps
If in doubt, refer to plugin default-odf-workflow for templates ODF and ODF web.
Hierarchical reference table categories with multilingual titles
Reference table category titles are now multilingual.
Run the following script to migrate existing categories:
Oops!
Copy to clipboard failed. Open the code and copy it manually.
var count = 0;
function _titleMigration(content)
{
var titleProp = content.getNode().getProperty("ametys:title");
var title = titleProp.getString();
titleProp.remove();
content.getMetadataHolder().setMetadata("title", title, new java.util.Locale("fr"));
count++;
}
jcrXPathQuery("//element(*, ametys:content)[(@ametys-internal:contentType = 'odf-enumeration.CodeErasmusCategory' or @ametys-internal:contentType = 'odf-enumeration.CodeFapCategory' or @ametys-internal:contentType = 'odf-enumeration.EnseignementNatureCategory') and @ametys:title]")
.forEach(function (content)
{
migrateContent(
content,
[_titleMigration],
true /* old versions incompatible */,
null /* no tag */,
false /* not verbose */
);
}
);
print(count + " reference table entries have been migrated");
var count = 0;
function _titleMigration(content)
{
var titleProp = content.getNode().getProperty("ametys:title");
var title = titleProp.getString();
titleProp.remove();
content.getMetadataHolder().setMetadata("title", title, new java.util.Locale("fr"));
count++;
}
jcrXPathQuery("//element(*, ametys:content)[(@ametys-internal:contentType = 'odf-enumeration.CodeErasmusCategory' or @ametys-internal:contentType = 'odf-enumeration.CodeFapCategory' or @ametys-internal:contentType = 'odf-enumeration.EnseignementNatureCategory') and @ametys:title]")
.forEach(function (content)
{
migrateContent(
content,
[_titleMigration],
true /* old versions incompatible */,
null /* no tag */,
false /* not verbose */
);
}
);
print(count + " reference table entries have been migrated");
var count = 0;
function _titleMigration(content)
{
var titleProp = content.getNode().getProperty("ametys:title");
var title = titleProp.getString();
titleProp.remove();
content.getMetadataHolder().setMetadata("title", title, new java.util.Locale("fr"));
count++;
}
jcrXPathQuery("//element(*, ametys:content)[(@ametys-internal:contentType = 'odf-enumeration.CodeErasmusCategory' or @ametys-internal:contentType = 'odf-enumeration.CodeFapCategory' or @ametys-internal:contentType = 'odf-enumeration.EnseignementNatureCategory') and @ametys:title]")
.forEach(function (content)
{
migrateContent(
content,
[_titleMigration],
true /* old versions incompatible */,
null /* no tag */,
false /* not verbose */
);
}
);
print(count + " reference table entries have been migrated");
If you have activated CDM-fr export to disk when validating courses (in the configuration parameters), the export folder is no longer configurable.
The CDM-fr files are now stored in the $AMETYS_HOME/data/odf/cdmfr folder.
You can move your existing files from the old export directory to this new folder.
Please note that if you have a third-party application that uses this folder, you'll need to modify it.
Modification of urls for training pages and courses
Previously, URLs for virtual pages were made up of the course title, followed by the content name (unique in Ametys). For example: catalogue/master-XB/droit-economie-gestion-DEG/master-droit-program-fruai07517h489j10u.html
They are now based on the course title, followed by the course code (just like the ELPs) For example: catalogue/master-XB/droit-economie-gestion-DEG/master-droit-h489j10u.html
Your old URL will be automatically redirected to the new URL.
Consequently, the hyphen "-" is forbidden in the code for courses and itineraries. To ensure that the code is correct for these elements, go to script , which will modify them if necessary.