Moodle

Bulk user enrolment and unenrolment

Details

  • Affected Branches:
    MOODLE_19_STABLE

Description

Two more actions were created for bulk user actions plug-in architecture: bulk user enrolment and bulk user unenrolment. Those two simplify the procedure of enroling/unenroling multiple users to/from the same list of courses with the same roles. Bulk user enrolment also gives opportunity to add the enroled users to the group with selected name in each course (if the group with selected name does not exist in the course, adding to group in this course is just skipped, user is enroled anyway), choose the role to assign from the available in the system (course default is also available and is specific to each course), and choose whether to perform hidden enrolment or not.
Actually there were issues on this topic, like MDL-10002 (this improvement resolves it) and MDL-15449 (this improvement may actually supersede it).
This improvement requires plug-in architecture (MDL-17010) to be installed.

Activity

Hide
Brian Milton added a comment -

When trying to bulk enrol students, I get the error: "Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /xxx/xxx/xxx/xxx/xxx/admin/user/actions/enroltocourses/index.php on line 121"

Any help?

Show
Brian Milton added a comment - When trying to bulk enrol students, I get the error: "Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /xxx/xxx/xxx/xxx/xxx/admin/user/actions/enroltocourses/index.php on line 121" Any help?
Hide
Brian Milton added a comment -

Forgot to add:

Using Moodle 1.9.4+ (Build:20090211) with MDL-17010 applied.

Show
Brian Milton added a comment - Forgot to add: Using Moodle 1.9.4+ (Build:20090211) with MDL-17010 applied.
Hide
Vlas Voloshin added a comment -

I've tried to reproduce this bug, but unfortunately to no avail. Still, after googling around, I found out that this problem might be caused by using ()-> operator in PHP4 (this has been fixed in PHP5). I hope, this is it, so I'm attaching a patch, that removes this operator. Apply it on your moodle directory with -p0 flag, or just change the line 121 of /admin/user/actions/enroltocourses/index.php from
$roleassign = get_default_course_role( $context )->id;
to
$defrole = get_default_course_role( $context );
$roleassign = $defrole->id;

Please notify me, whether this helps or not.

Show
Vlas Voloshin added a comment - I've tried to reproduce this bug, but unfortunately to no avail. Still, after googling around, I found out that this problem might be caused by using ()-> operator in PHP4 (this has been fixed in PHP5). I hope, this is it, so I'm attaching a patch, that removes this operator. Apply it on your moodle directory with -p0 flag, or just change the line 121 of /admin/user/actions/enroltocourses/index.php from $roleassign = get_default_course_role( $context )->id; to $defrole = get_default_course_role( $context ); $roleassign = $defrole->id; Please notify me, whether this helps or not.
Hide
Brian Milton added a comment -

Worked perfectly. Have to seriously get around to upgrading to PHP5 at some point... Thank you for the help!

Show
Brian Milton added a comment - Worked perfectly. Have to seriously get around to upgrading to PHP5 at some point... Thank you for the help!

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated: