Details
-
Type:
Bug
-
Status:
Development in progress
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.8.3, 1.9, 2.0
-
Fix Version/s: None
-
Component/s: Choice
-
Labels:None
-
Affected Branches:MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE
Description
Choice should implement this function (called by the role_unassign function in accesslib if it exists) to correctly remove choices when somebody is removed from the course. Otherwise they remain as 'ghost' choices and take up spaces that other cannot use.
I've been thinking about this for a while - (there are also several tracker items that elude to this issue), and this is partly different to the expected behaviour of Moodle courses when a user is unenrolled from the course - the data stays there, but as the user is unenrolled, it is no longer displayed....
But this causes problems. - specifically with the Choices.
Since there is a role_unassign function - I presume there is also a Role_assign function we can leverage too?
perhaps a better solution would be to leverage the role_assign function, and check if the user has submitted to any choices which impose a limit, then check to see if their selected choice puts the choice over the limit, and if so, remove their currently selected choice?
any thoughts?
Dan