Skip to content

Commit

Permalink
MDL-22787 Fixed remote unenrol - blame copy & paste
Browse files Browse the repository at this point in the history
  • Loading branch information
mudrd8mz committed Jul 18, 2010
1 parent f70207b commit de5b395
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions enrol/mnet/enrol.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ public function unenrol_user($username, $courseid) {

if ($DB->record_exists('user_enrolments', array('enrolid'=>$instance->id, 'userid'=>$user->id))) {
try {
$enrol->enrol_user($instance, $user->id, $instance->roleid, time());
$enrol->unenrol_user($instance, $user->id);

} catch (Exception $e) {
throw new mnet_server_exception(5020, 'couldnotunenrol', 'enrol_mnet', $e->getMessage());
Expand All @@ -275,7 +275,7 @@ public function unenrol_user($username, $courseid) {

if ($DB->record_exists('user_enrolments', array('enrolid'=>$instance->id, 'userid'=>$user->id))) {
try {
$enrol->enrol_user($instance, $user->id, $instance->roleid, time());
$enrol->unenrol_user($instance, $user->id);

} catch (Exception $e) {
throw new mnet_server_exception(5020, 'couldnotunenrol', 'enrol_mnet', $e->getMessage());
Expand Down

0 comments on commit de5b395

Please sign in to comment.