Cette page ne doit être appliquée que si le script vous demande de passer la migration manuelle code.20260714.ODF-NotShared2DisableCondition
La restriction sur les ELPs non mutualisés a été transformée en disable condition.
Pour cette migration, il y a plusieurs cas de figure, tous représentés dans les PR du ODF-4064
Ajouter la condition
Dans tous les cas, si elle n'est pas présente, il faut ajouter la disable condition suivante sur le champ :
Oups !
La copie dans le presse papier a échouée. Ouvrez le code et copier-le manuellement.<condition class="org.ametys.odf.course.NotShared2DisableCondition" />
<condition class="org.ametys.odf.course.NotShared2DisableCondition" />
<condition class="org.ametys.odf.course.NotShared2DisableCondition" />
Si le champ a déjà des disable condition, vérifier ou ajouter le type "or". Exemple :
Oups !
La copie dans le presse papier a échouée. Ouvrez le code et copier-le manuellement.<disable-conditions type="or">
<condition id="../isEvaluated" operator="eq">false</condition>
<condition class="org.ametys.odf.course.NotShared2DisableCondition" />
</disable-conditions>
<disable-conditions type="or">
<condition id="../isEvaluated" operator="eq">false</condition>
<condition class="org.ametys.odf.course.NotShared2DisableCondition" />
</disable-conditions>
<disable-conditions type="or">
<condition id="../isEvaluated" operator="eq">false</condition>
<condition class="org.ametys.odf.course.NotShared2DisableCondition" />
</disable-conditions>
Modifier / supprimer la restriction
Ensuite, il faut supprimer la restriction.
RepeaterWithEducationalPathRestriction
Si la restriction existante est une RepeaterWithEducationalPathRestriction, il suffit de supprimer la ligne avec shared-program-item-only
Oups !
La copie dans le presse papier a échouée. Ouvrez le code et copier-le manuellement.<restrict-to>
<custom-restriction class="org.ametys.plugins.odfpilotage.restriction.RepeaterWithEducationalPathRestriction">
<right read-write-direction="write" id="ODF_Rights_Pilotage_MCC_Fields"/>
<shared-program-item-only>true</shared-program-item-only>
</custom-restriction>
</restrict-to>
<restrict-to>
<custom-restriction class="org.ametys.plugins.odfpilotage.restriction.RepeaterWithEducationalPathRestriction">
<right read-write-direction="write" id="ODF_Rights_Pilotage_MCC_Fields"/>
<shared-program-item-only>true</shared-program-item-only>
</custom-restriction>
</restrict-to>
<restrict-to>
<custom-restriction class="org.ametys.plugins.odfpilotage.restriction.RepeaterWithEducationalPathRestriction">
<right read-write-direction="write" id="ODF_Rights_Pilotage_MCC_Fields"/>
<shared-program-item-only>true</shared-program-item-only>
</custom-restriction>
</restrict-to>
devient
Oups !
La copie dans le presse papier a échouée. Ouvrez le code et copier-le manuellement.<restrict-to>
<custom-restriction class="org.ametys.plugins.odfpilotage.restriction.RepeaterWithEducationalPathRestriction">
<right read-write-direction="write" id="ODF_Rights_Pilotage_MCC_Fields"/>
</custom-restriction>
</restrict-to>
<restrict-to>
<custom-restriction class="org.ametys.plugins.odfpilotage.restriction.RepeaterWithEducationalPathRestriction">
<right read-write-direction="write" id="ODF_Rights_Pilotage_MCC_Fields"/>
</custom-restriction>
</restrict-to>
<restrict-to>
<custom-restriction class="org.ametys.plugins.odfpilotage.restriction.RepeaterWithEducationalPathRestriction">
<right read-write-direction="write" id="ODF_Rights_Pilotage_MCC_Fields"/>
</custom-restriction>
</restrict-to>
SharedOnlyRestriction
Si la restriction est un SharedOnlyRestriction, il faut complètement supprimer la restriction custom
Oups !
La copie dans le presse papier a échouée. Ouvrez le code et copier-le manuellement.<restrict-to>
<custom-restriction class="org.ametys.odf.restriction.SharedOnlyRestriction">
<right read-write-direction="write" id="ODF_Rights_Pilotage_MCC_Fields" />
<shared-program-item-only>true</shared-program-item-only>
</custom-restriction>
</restrict-to>
<restrict-to>
<custom-restriction class="org.ametys.odf.restriction.SharedOnlyRestriction">
<right read-write-direction="write" id="ODF_Rights_Pilotage_MCC_Fields" />
<shared-program-item-only>true</shared-program-item-only>
</custom-restriction>
</restrict-to>
<restrict-to>
<custom-restriction class="org.ametys.odf.restriction.SharedOnlyRestriction">
<right read-write-direction="write" id="ODF_Rights_Pilotage_MCC_Fields" />
<shared-program-item-only>true</shared-program-item-only>
</custom-restriction>
</restrict-to>
devient
Oups !
La copie dans le presse papier a échouée. Ouvrez le code et copier-le manuellement.<restrict-to>
<right read-write-direction="write" id="ODF_Rights_Pilotage_MCC_Fields"/>
</restrict-to>
<restrict-to>
<right read-write-direction="write" id="ODF_Rights_Pilotage_MCC_Fields"/>
</restrict-to>
<restrict-to>
<right read-write-direction="write" id="ODF_Rights_Pilotage_MCC_Fields"/>
</restrict-to>