Permalink
Browse files

Merge branch 'MDL-25980-mnet_remote_enrolment' of git://github.com/mu…

…drd8mz/moodle
  • Loading branch information...
2 parents 3827ee9 + 538dcf8 commit a477c0da6e1e52083ad48cc137e0685bbf754754 @skodak skodak committed Jan 17, 2011
Showing with 7 additions and 3 deletions.
  1. +4 −1 mnet/service/enrol/course.php
  2. +3 −2 mnet/service/enrol/locallib.php
@@ -69,7 +69,7 @@
$options->noclean = false;
$options->overflowdiv = true;
print_collapsible_region_start('remotecourse summary', 'remotecourse-summary', get_string('coursesummary'), false, true);
- echo format_text($course->summary, $course->summaryformat, $options, $course->id);
+ echo format_text($course->summary, $course->summaryformat, $options);
print_collapsible_region_end();
}
@@ -192,4 +192,7 @@
get_string('refetch', 'mnetservice_enrol'), 'get');
}
+echo $OUTPUT->single_button(new moodle_url('/mnet/service/enrol/host.php', array('id'=>$host->id)),
+ get_string('availablecourseson', 'mnetservice_enrol', s($host->hostname)), 'get');
+
echo $OUTPUT->footer();
@@ -334,11 +334,12 @@ public function req_course_enrolments($mnethostid, $remotecourseid) {
// prune stale enrolment records
if (empty($list)) {
- $DB->delete_records('mnetservice_enrol_enrolments', array('hostid'=>$mnethostid));
+ $DB->delete_records('mnetservice_enrol_enrolments', array('hostid'=>$mnethostid, 'remotecourseid'=>$remotecourseid));
} else {
list($isql, $params) = $DB->get_in_or_equal(array_keys($list), SQL_PARAMS_NAMED, 'param0000', false);
$params['hostid'] = $mnethostid;
- $select = "hostid = :hostid AND id $isql";
+ $params['remotecourseid'] = $remotecourseid;
+ $select = "hostid = :hostid AND remotecourseid = :remotecourseid AND id $isql";
$DB->delete_records_select('mnetservice_enrol_enrolments', $select, $params);
}

0 comments on commit a477c0d

Please sign in to comment.