Commit a477c0da authored by Petr Skoda's avatar Petr Skoda
Browse files

Merge branch 'MDL-25980-mnet_remote_enrolment' of git://github.com/mudrd8mz/moodle

parents 3827ee94 538dcf89
......@@ -69,7 +69,7 @@ if (!empty($course->summary)) {
$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 @@ if ($usecache) {
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 @@ class mnetservice_enrol {
// 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);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment