Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
MDL-22787 Fixed remote unenrol - blame copy & paste
[moodle.git]
/
enrol
/
mnet
/
enrol.php
diff --git
a/enrol/mnet/enrol.php
b/enrol/mnet/enrol.php
index
b284baf
..
665556e
100644
(file)
--- a/
enrol/mnet/enrol.php
+++ b/
enrol/mnet/enrol.php
@@
-257,7
+257,7
@@
class enrol_mnet_mnetservice_enrol {
if ($DB->record_exists('user_enrolments', array('enrolid'=>$instance->id, 'userid'=>$user->id))) {
try {
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());
} catch (Exception $e) {
throw new mnet_server_exception(5020, 'couldnotunenrol', 'enrol_mnet', $e->getMessage());
@@
-275,7
+275,7
@@
class enrol_mnet_mnetservice_enrol {
if ($DB->record_exists('user_enrolments', array('enrolid'=>$instance->id, 'userid'=>$user->id))) {
try {
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());
} catch (Exception $e) {
throw new mnet_server_exception(5020, 'couldnotunenrol', 'enrol_mnet', $e->getMessage());