Skip to content

Commit

Permalink
MDL-39932 mod_feedback - Mapping Feedback when Course is Deleted - th…
Browse files Browse the repository at this point in the history
…x to David N. Johnson
  • Loading branch information
grabs committed May 30, 2013
1 parent b6f8a93 commit e6e9bec
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mod/feedback/mapcourse.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,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
Expand Down Expand Up @@ -123,16 +124,16 @@

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')));

$table->setup();

$unmapurl = new moodle_url('/mod/feedback/unmapcourse.php');
foreach ($coursemap as $cmap) {
$cmapcontext = context_course::instance($cmap->id);
$cmapshortname = format_string($cmap->shortname, true, array('context' => $cmapcontext));
$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().'">';
Expand Down

0 comments on commit e6e9bec

Please sign in to comment.