chamilo / chamilo-lms

Chamilo is a learning management system focused on ease of use and accessibility
https://chamilo.org
GNU General Public License v3.0
807 stars 481 forks source link

Groups : Bug with subgroups creation #3610

Open tanchon opened 4 years ago

tanchon commented 4 years ago

Hi,

There is a bug with the subgroups creation process. It occurs on my 1.11.12 platform and the bug is reproduced on 11.chamilo.org (see here)

To Reproduce Steps to reproduce the behavior:

  1. Go to groups
  2. Create some groups
  3. Create subgroups : i defined the number of groups
  4. See the screenshot : it seems there is an issue with a query

Nouvelle image

Despite this message, the groups are created : Capture1

Expected behavior No error message when i create subgroups

**Server Chamilo 1.11.12 (reproduced with 11.chamilo.org)

Additional context The created subgroups seem to be ok despite this message.

Thanks.

Tanchon

ywarnier commented 3 years ago

How do you create a subgroup? I just cannot find the option to do that and your screenshots do not help me find that option

tanchon commented 3 years ago

When you are in the Groups tool of a course and there are still some groups that had been created => you click on the green circle with a + to add a group Capture0

and you have this menu : the second part is for subgroups (it's very useful).

Capture

Thanks.

Tanchon

tanchon commented 3 years ago

Hi,

I found a way to avoid the error message, by commenting some lines into the groupmanager.lib.php file :

Capture

It doesn't completely solve the issue (because the max_student isn't defined), but it is a way to create subgroups without error message.

After the process of creation, it is possible to define max_student in the subgroups properties) : by default, the max_student is 8***** (i don't know how this value is determined). Due to that, the number of students in sub_groups cannot exceed 8 (it must be possible to adjust it).

In the short term, i think this solution is acceptable.

Thanks.

Tanchon.

***** may be, is it due to the "maximum max number of students" into a category, defined by default to 8 with the function "create_category" into the groupmanager.lib.php file (i think it should be undetermined by default... because 8 is arbitrary) ?

tanchon commented 3 years ago

I modified the value defined in the function create_category (in groupmanager.lib.php) : i changed the value from 8 to 0 (0 = no limit).

Capture

Now, the adjustement below (see the commented block from L386 => L390) works perfectly: whatever is the number of students to share between sub-groups, it's ok (if we don't modify the max value, the number of students is limited to 8, because new sub-groups are created into a new category with a max student of 8).

Tanchon

tanchon commented 3 years ago

I precise that to have the possibiliy to create subgroups you must have some groups previously created AND students enrolled in these groups.