MDL-19281 fixing proper function name of course delete hook for course formats

This commit is contained in:
Petr Skoda
2010-07-15 15:27:18 +00:00
parent acde4348a1
commit 44b64a5683
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -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)
+1 -1
View File
@@ -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);