Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-39932 mod_feedback - Mapping Feedback when Course is Deleted - th…

…x to David N. Johnson
  • Loading branch information...
commit 3db65127c3ac8d0fd8ff534311ebfd826cf999f7 1 parent ee2e56e
@grabs grabs authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 mod/feedback/mapcourse.php
View
7 mod/feedback/mapcourse.php
@@ -70,6 +70,7 @@
require_capability('mod/feedback:mapcourse', $context);
if ($coursefilter) {
+ $map = new stdClass;
$map->feedbackid = $feedback->id;
$map->courseid = $coursefilter;
// insert a map only if it does exists yet
@@ -125,6 +126,7 @@
if ($coursemap = feedback_get_courses_from_sitecourse_map($feedback->id)) {
$table = new flexible_table('coursemaps');
+ $table->baseurl = $url;
$table->define_columns( array('course'));
$table->define_headers( array(get_string('mappedcourses', 'feedback')));
@@ -132,9 +134,8 @@
$unmapurl = new moodle_url('/mod/feedback/unmapcourse.php');
foreach ($coursemap as $cmap) {
- $cmapcontext = get_context_instance(CONTEXT_COURSE, $cmap->id);
- $cmapshortname = format_string($cmap->shortname, true, array('context' => $cmapcontext));
- $coursecontext = get_context_instance(CONTEXT_COURSE, $cmap->courseid);
+ $coursecontext = context_course::instance($cmap->courseid);
+ $cmapshortname = format_string($cmap->shortname, true, array('context' => $coursecontext));
$cmapfullname = format_string($cmap->fullname, true, array('context' => $coursecontext));
$unmapurl->params(array('id'=>$id, 'cmapid'=>$cmap->id));
$anker = '<a href="'.$unmapurl->out().'">';
Please sign in to comment.
Something went wrong with that request. Please try again.