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 e352a326046ff1710fd27f9fb910003570bf2181 1 parent f3d81a0
David Monllaó dmonllao authored
Showing with 2 additions and 7 deletions.
  1. +2 −7 course/modduplicate.php
9 course/modduplicate.php
View
@@ -60,13 +60,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.