chamilo-lms icon indicating copy to clipboard operation
chamilo-lms copied to clipboard

[Grenoble] Améliorer le lien de création de groupe à partir d'une classe

Open baelmyhu opened this issue 2 years ago • 5 comments

Création de groupes à partir des classes.

Sans titre

➡ Un groupe lié à une classe voit sa population être modifiée en fonction des individus ajoutés ou supprimés dans la classe.

Dans la liste des membres d'un groupe nous avons ajouté un message indiquant que ce groupe est lié à une classe; Nous avons interdit la possibilité d'ajouter des membres à un groupe lié à une classe.

Sans titre-1

➡ Nous avons ajouté dans l'interface d'édition d'un groupe lié à une classe la possibilité de «rompre ce lien.» La population du groupe ne change pas mais ne sera plus modifié si la classe gagne ou perd des inscrits.

Sans titre

➡ Nous avons également ajouté une colonne dans la liste des groupes pour indiquer dans le cas ou un groupe est lié à une classe, le nom de cette classe

Sans titre-1

baelmyhu avatar Sep 03 '24 14:09 baelmyhu

@chamilo-uga There's an issue in your code if allow_group_categories != 'true' and you're trying to create a group linked to a class, the insertion breaks because it does create a category but the category is not visiible (so you don't see anything). I've fixed that in commit 222b8d3af0129. However, when it is enabled and there's no group category in the course yet, it creates one but then no group is created in it. Not sure of the intent here, but it will have to be reviewed in the future.

ywarnier avatar Mar 29 '26 21:03 ywarnier

Also, as an admin, when I edit the class (that I used to create a group linked to a class) and remove one user from the class, the group still has all users registered, which I think is not what you intended to do. Also if:

  • I have a class with 5 users
  • I create a group linked to this class
  • The group has 5 users
  • I go in admin mode to edit the class and add 2 users
  • The class now has 7 users
  • I return to the course and the groups tool
  • The linked group now has 2 users. Somehow, when I added the 2 users to the class, this eliminated the existing 5 users (I only get the new ones, I checked)

ywarnier avatar Mar 29 '26 21:03 ywarnier

I'm still accepting the changes in #7511 because they do not break existing features, but beware that it's not working as described above (yet).

ywarnier avatar Mar 29 '26 21:03 ywarnier

Implemented improvements for class-linked course groups. https://github.com/chamilo/chamilo-lms/pull/8430/changes/524463dc2d7d3de0878186f696a2e177d920a29d

Changes included:

  • Improved the creation form by separating manual group creation from group creation based on subscribed classes.
  • Added a clearer action to create groups from selected classes.
  • Kept the “link created groups to their source classes” option inside the class-based creation block.
  • Disabled the class-based creation action until at least one class is selected.
  • Fixed synchronization of linked groups when users are added to or removed from the source class.
  • Preserved the current members when the link with the class is broken.
  • Kept the linked class information visible in the group list.
  • Kept the existing behavior that prevents manually editing members of a group linked to a class.

Tested with:

  1. A class with existing users.
  2. Creating a linked group from that class.
  3. Adding users to the class and confirming the linked group is updated.
  4. Removing users from the class and confirming the linked group is updated.
  5. Breaking the link with the class and confirming the current group members are preserved.
  6. Updating the class again and confirming the unlinked group is no longer synchronized.

No database change was needed.

christianbeeznest avatar May 15 '26 21:05 christianbeeznest

Assumed correct now (untested by me)

ywarnier avatar Sep 01 '26 15:09 ywarnier