Skip to content

Commit

Permalink
MDL-41312 groups: Remove old bulk events
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitagarwal committed Dec 28, 2017
1 parent 9993c1d commit 50587d7
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions group/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -600,14 +600,6 @@ function groups_delete_group_members($courseid, $userid=0, $unused=false) {
}
$rs->close();

// TODO MDL-41312 Remove events_trigger_legacy('groups_members_removed').
// This event is kept here for backwards compatibility, because it cannot be
// translated to a new event as it is wrong.
$eventdata = new stdClass();
$eventdata->courseid = $courseid;
$eventdata->userid = $userid;
events_trigger_legacy('groups_members_removed', $eventdata);

return true;
}

Expand Down Expand Up @@ -635,11 +627,6 @@ function groups_delete_groupings_groups($courseid, $showfeedback=false) {
// Purge the group and grouping cache for users.
cache_helper::purge_by_definition('core', 'user_group_groupings');

// TODO MDL-41312 Remove events_trigger_legacy('groups_groupings_groups_removed').
// This event is kept here for backwards compatibility, because it cannot be
// translated to a new event as it is wrong.
events_trigger_legacy('groups_groupings_groups_removed', $courseid);

// no need to show any feedback here - we delete usually first groupings and then groups

return true;
Expand All @@ -666,11 +653,6 @@ function groups_delete_groups($courseid, $showfeedback=false) {
// Purge the group and grouping cache for users.
cache_helper::purge_by_definition('core', 'user_group_groupings');

// TODO MDL-41312 Remove events_trigger_legacy('groups_groups_deleted').
// This event is kept here for backwards compatibility, because it cannot be
// translated to a new event as it is wrong.
events_trigger_legacy('groups_groups_deleted', $courseid);

if ($showfeedback) {
echo $OUTPUT->notification(get_string('deleted').' - '.get_string('groups', 'group'), 'notifysuccess');
}
Expand Down Expand Up @@ -699,11 +681,6 @@ function groups_delete_groupings($courseid, $showfeedback=false) {
// Purge the group and grouping cache for users.
cache_helper::purge_by_definition('core', 'user_group_groupings');

// TODO MDL-41312 Remove events_trigger_legacy('groups_groupings_deleted').
// This event is kept here for backwards compatibility, because it cannot be
// translated to a new event as it is wrong.
events_trigger_legacy('groups_groupings_deleted', $courseid);

if ($showfeedback) {
echo $OUTPUT->notification(get_string('deleted').' - '.get_string('groupings', 'group'), 'notifysuccess');
}
Expand Down

0 comments on commit 50587d7

Please sign in to comment.