From 44b64a5683ced0d36e72e98b2d38b3db68a1d3d7 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Thu, 15 Jul 2010 15:27:18 +0000 Subject: [PATCH] MDL-19281 fixing proper function name of course delete hook for course formats --- course/format/README.txt | 6 ++++++ lib/moodlelib.php | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/course/format/README.txt b/course/format/README.txt index 394dd6192f8..9bb62ab0c7e 100644 --- a/course/format/README.txt +++ b/course/format/README.txt @@ -138,3 +138,9 @@ Optional file (styles) * yourformat/styles.php If this file exists it will be included in the CSS Moodle generates. + + +Optional delete course hook +--------------------------- + +* in your yourformat/lib.php add function format_yourformat_delete_course($courseid) \ No newline at end of file diff --git a/lib/moodlelib.php b/lib/moodlelib.php index c204d193fd2..0be2d4756bc 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -4009,7 +4009,7 @@ function remove_course_contents($courseid, $showfeedback=true) { /// Clean up course formats (iterate through all formats in the even the course format was ever changed) $formats = get_plugin_list('format'); foreach ($formats as $format=>$formatdir) { - $formatdelete = $format.'_course_format_delete_course'; + $formatdelete = 'format_'.$format.'_delete_course'; $formatlib = "$formatdir/lib.php"; if (file_exists($formatlib)) { include_once($formatlib);