Moodle

Unenrolment from courses with groups

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 1.8.2
  • Fix Version/s: 1.9.1
  • Component/s: Enrolments
  • Labels:
    None
  • Environment:
    Linux, apache, Mysql, PHP 5.2.6
  • Database:
    MySQL
  • Affected Branches:
    MOODLE_18_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

Unassigments are happening in courses with groups and foruns, just for users that reply or post messages in the forum.

During a class with all users logged, in some moment refreshing the participants list some users wasn´t there but they keep still working in the forum.

When they try to login again, they were unassigned from that course, and did not access the course.

We have external database integration and in the other day they were reassigned, but the teacher have to reassign again the users to their groups, the role_unassign function delete records from groups.

At wich moments the users can be unassigned? how can we prevent it from happening. We are using 1.8.2.

The most strange fact is that the users that do not post messages on the forun remain in the course.

The users that post messages on the forum were unassigned

The teacher was hiting the refresh button continuouslly at the participants block

We customize the role_unassign function to check admin level capabilities in order to execute just for the admin person now.

Activity

Hide
Angelo Rigo added a comment -

I customize the role_unassign function in lib/accesslib.php file. Now just the admin can use this function and the enrol/database/enrol_database_sync.php script

$included_files = get_included_files();

if(has_capability($USER->id,'moodle:coursecreate') || ($included_files[0] == $CFG->dirroot.'/enrol/database/enrol_database_sync.php') ) {

} else...

It just prevent the unassign from happening, the cause is not clear, maybe the enrol date of the teacher.

Show
Angelo Rigo added a comment - I customize the role_unassign function in lib/accesslib.php file. Now just the admin can use this function and the enrol/database/enrol_database_sync.php script $included_files = get_included_files(); if(has_capability($USER->id,'moodle:coursecreate') || ($included_files[0] == $CFG->dirroot.'/enrol/database/enrol_database_sync.php') ) { } else... It just prevent the unassign from happening, the cause is not clear, maybe the enrol date of the teacher.
Hide
Petr Škoda (skodak) added a comment -

This was fixed in 1.9.x - unfortunately the required changes were too complex and it could not be backported into 1.8.x, please upgrade you installation.
thanks for the report

Show
Petr Škoda (skodak) added a comment - This was fixed in 1.9.x - unfortunately the required changes were too complex and it could not be backported into 1.8.x, please upgrade you installation. thanks for the report
Hide
Tim Hunt added a comment -

Closing, based on Petr's last comment.

Show
Tim Hunt added a comment - Closing, based on Petr's last comment.
Hide
Angelo Rigo added a comment -

Hi
How can i test or see what causes this bug in the 1.8 version.
Thank´s in advance

Show
Angelo Rigo added a comment - Hi How can i test or see what causes this bug in the 1.8 version. Thank´s in advance

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: