Optimisation de l'interface d'annonce
- affichage d'un addGroupMultiSelect séparé si le cours contient des groupes
- affichage d'un addGroupMultiSelect séparé si le cours contient des classes
- ajout de libellé de sous sections dans la page
- déplacer la partie Tags
- ne pas afficher 'Envoyer à tous les utilisateurs des sessions' si le cours n'a pas de session
- vérification des destinataires afin que chaque destinataire ne reçoivent qu'une fois l'annonce (correction d'un bug)

OK pour moi. Pas besoin de changement de DB, si?
J'aimerais publier la 1.11.4 fin mars. Y a-t-il une chance que ce soit dedans avant ça?
Ping @baelmyhu pour une publication bientôt?
Il y a l'utilisation d'une nouvelle table dans la DB. Je passe le ticket en 2.0
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@baelmyhu update?
Hi @ywarnier,
I’m checking this task and would like to know if there is any existing code or patch related to it, possibly from @baelmyhu.
If nothing has been implemented yet, I’ll proceed based on the current description.
Thanks for confirming.
Moving this to 3.0 milestone as it requires a new table that wasn't included in alpha.
Hi @ywarnier,
I have completed the remaining improvements requested in this issue for Chamilo 3.1.
The changes have been merged into master through PR #9405.
1. Separate group recipient selection
The announcement form now provides a dedicated Groups multiselect, displayed only when the current course contains available groups.
Previously, groups and individual users were mixed in the same recipient selector.
Administrators and teachers can now select groups separately while still combining them with individual recipients.
The existing Everyone option remains exclusive, preventing conflicting recipient selections.
2. Preserve class selection
The existing class selector has been preserved and remains available when classes are associated with the course or session.
Class selection continues to populate the corresponding users, while maintaining any previously selected groups.
No changes to the existing class management system were necessary.
3. Improve form organization
The modern Vue announcement form already provides the requested subsections and a dedicated, collapsible Tags section.
These improvements were preserved rather than duplicating or rewriting functionality that was already available.
4. Show the session delivery option only when applicable
Fixed the visibility of Send to users in all sessions of this course.
Previously, this option could appear in the base course even when the course had no associated sessions.
The option is now displayed only when:
- The announcement is being created from the base course.
- The course has at least one associated session.
The backend also validates this condition, preventing invalid requests even if the frontend is bypassed.
The existing restriction against selecting all course sessions from within an individual session remains in place.
5. Prevent duplicate announcement delivery
Improved recipient deduplication across the email delivery process.
Recipients are now checked by their unique user ID to avoid repeated delivery when the same person appears through multiple recipient categories.
This includes:
- Users belonging to multiple selected groups.
- Recipients included directly and through other selections.
- Recipients also included in HR manager copies.
- The announcement sender when a personal copy is requested.
The existing recipient resolution and permission checks remain intact.
6. Technical implementation
The changes reuse the current Vue, Symfony, API Platform, and Doctrine architecture.
The implementation updates the existing announcement form, recipient resolver, form provider/processors, and email sender.
No new database tables, migrations, or legacy PHP dependencies were required.
7. Testing and validation
The following checks passed successfully:
- PHPUnit: 3 tests, 9 assertions.
- ECS: Passed.
- ESLint: Passed.
- Prettier: Passed.
- Git diff validation: Passed.
- Webpack: Successfully compiled.
- Application availability: HTTP 200.
Manual functional testing was also performed using existing data from the testing26 database.
The scenarios included:
- A course containing five groups.
- Users belonging to multiple groups simultaneously.
- Courses containing sessions.
- Courses without sessions.
- Announcement forms accessed from individual session and group contexts.
- Recipient selection and preview behavior.
The tests confirmed the expected behavior of the updated controls.
A Playwright regression scenario was also included in the PR. Its automated execution remains pending, as does an end-to-end email delivery test using a controlled mail transport.
Result
The remaining interface improvements and recipient deduplication safeguards requested in this issue are now implemented for Chamilo 3.1.
The changes preserve the existing announcement functionality while improving recipient selection, usability, and delivery safety.
Merged PR: https://github.com/chamilo/chamilo-lms/pull/9405
Thanks!