Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-29563 course Throwing an exception instead of a message

  • Loading branch information...
commit da2104aa0e06fe07eb7374eecf5f00835bedac7e 1 parent e2bf940
@dmonllao dmonllao authored
Showing with 2 additions and 7 deletions.
  1. +2 −7 course/modduplicate.php
View
9 course/modduplicate.php
@@ -61,13 +61,8 @@
$a->modname = format_string($cm->name);
if (!plugin_supports('mod', $cm->modname, FEATURE_BACKUP_MOODLE2)) {
- echo $output->header();
- echo $output->notification(get_string('duplicatenosupport', 'core', $a));
- echo $output->continue_button(
- new moodle_url('/course/view.php#section-' . $cm->sectionnum, array('id' => $course->id))
- );
- echo $output->footer();
- die;
+ $url = new moodle_url('/course/view.php#section-' . $cm->sectionnum, array('id' => $course->id));
+ print_error('duplicatenosupport', 'core', $url, $a);
}
// backup the activity
Please sign in to comment.
Something went wrong with that request. Please try again.