Skip to content

Commit

Permalink
Merge branch 'MDL-25980-mnet_remote_enrolment' of git://github.com/mu…
Browse files Browse the repository at this point in the history
…drd8mz/moodle
  • Loading branch information
skodak committed Jan 17, 2011
2 parents 3827ee9 + 538dcf8 commit a477c0d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 4 additions & 1 deletion mnet/service/enrol/course.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down Expand Up @@ -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();
5 changes: 3 additions & 2 deletions mnet/service/enrol/locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit a477c0d

Please sign in to comment.