Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to avoid that students add themselves to more than one group of a grouping ("Double booking exclusion") #184

Open
abias opened this issue Jan 11, 2023 · 1 comment

Comments

@abias
Copy link

abias commented Jan 11, 2023

We have a rather sophisticated teaching planning scenario where we are asking students to add themselves to multiple groups. For usability reasons, we are working with multiple choicegroup activities. However, as the groups which can be selected in each of these multiple choicegroups activities relate to each other, we have to avoid that a student picks particular groups in separate choicegroup activities at the same time.

(Simplified) user story for teachers:

As teacher,

I have multiple groupings in my course:

  • Grouping A
  • Grouping B
  • Grouping C

I have multiple groups in my course:

  • Group A1, A2 and A3 which are part of grouping A
  • Group B1, B2 and B3 which are part of grouping B
  • Group C1, C2 and C3 which are part of grouping C

I have multiple choicegroup activities in my course:

  • Choicegroup activity X which allows the selection of groups A1, B1 and C1
  • Choicegroup activity Y which allows the selection of groups A2, B2 and C2
  • Choicegroup activity Z which allows the selection of groups A3, B3 and C3
  • All choicegroup activities are configured to allow the selection of multiple or all groups on purpose.

Now, I need to be able to avoid that a student selects a particular group in one of the choicegroup activities if he is already added to one of the other groups in the group's grouping. For example:

  • A student should be allowed to add himself to group A1 (in activity X), to group B2 (in activity Y) and to group C3 (in activity Z)
  • A student should be allowed to add himself to group A1 and B1 (in activity X) and to group C3 (in activity Z)
  • A student should not be allowed to add himself to group C3 (in activity Z) if he has already added himself to group C1 (in activity X) before.

(Simplified) user story for student:

As student,

  • I see multiple choicegroup activities in my course.
  • I was informed before (by the teacher, not by the activity GUI) that I can go to each of these activities and select my groups there
  • I was informed before (by the teacher, not by the activity GUI) that I should avoid to do double bookings.
  • As I might not really know what a double booking is or how to avoid it, I want to be sure that the activity GUI simply does not allow me to do one.

Implementation plan:

  • In the activity settings, add a new formset "Grouping limitation"

  • In this formset, a new option "Enable grouping limitation" is added. This is a singleselect element which offers the options "Yes" and "No". The default for new activities is "No"

  • As soon as the new option "Enable grouping limitation" is set to "Yes", an additional new option "Grouping selector" is shown. This is a multiselect element which offers all existing groupings as options. In this option, the teacher can select all groupings which should be considered within the grouping limitation.

  • As soon as the new option "Enable grouping limitation" is set to "Yes", another additional new option "Limitation behaviour" is shown. This is a singleselect element which offers the options "Hide group from group list", "Show group as dimmed" and "Show group with limitation notice".

  • All new options should be accompanied by proper help texts which describe the behaviour.

  • When a student opens a choicegroup activity where the "Enable grouping limitation" is activated, each group which would normally be offered as choice option is evaluated by the activity.

  • During the evaluation, the activity checks if the student is already added to another group which belongs to one of the groupings which are set in the "Grouping selector" option.

  • If the evaluation has a negative result, the group is offered as choice option as normal.

  • If the evaluation has a positive result, the group is not offered as choice option. Depending on the setting of the "Limitation behaviour" option, the group is either not presented at all or presented in a non-selectable way.

  • In the case of "Show group with limitation notice", the group name should be shown with a notice which says "You cannot select this group as you are already a member of group X". This notice should come from the language pack and can be customized there if necessary.

  • All new activity settings and usage scenarios should be covered with Behat tests, if possible.

@abias
Copy link
Author

abias commented Jan 12, 2023

While thinking about this issue further, I became aware of two edge cases which should be considered during the implementation:

Respect group enrolments which happened outside mod_choicegroup

Prerequisites:

  • Student S is not added to any groups in the course yet

Steps:

  • Login as student S
  • Go to your course
  • Go to choicegroup activity Z
  • Select group C3, but do not submit the form yet

  • Open a second browser tab
  • Login as teacher T
  • Go to your course
  • Go to the group management page
  • Add student S to group C1

  • Go back to the first browser tab where you are logged in as student
  • Submit the groupchoice form

Result which must not happen:

  • You are added to group C1

Expected result:

  • You are not added to group C1
  • All other membership changes which have been made in the form are discarded as well.
  • Instead you see an error message which informs you that you cannot be added to group C1 as you have become a member of C3 in the meantime
  • You are redirected back to the activity form where all current group membership are shown again.

Respect conflicting group enrolments which happened before the student used mod_choicegroup

Prerequisites:

  • Student S was already added manually to groups C1 and C3.
  • This is a conflict as the student would not be able to add himself to both groups at the same time.

Steps:

  • Login as student S
  • Go to your course
  • Go to choicegroup activity Z
  • Have a look at the group list in the activity

Result which must not happen:

  • You see that you are a member of group C3
  • You can freely deselect and reselect group C3 before submitting the form

Expected result:

  • You see that you are a member of group C3
  • You cannot deselect group C3 at all
  • You cannot select / deselect any other group at all
  • You cannot submit the form
  • Instead you see a notice message which informs you that there is a conflict with your current group memberships and the activity settings and that you should turn to your teacher so that he can manually fix the issue on the course's group management page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant