From c72350373c0a3c2148b0100db064095b347ee867 Mon Sep 17 00:00:00 2001 From: skodak Date: Tue, 13 May 2008 22:03:40 +0000 Subject: [PATCH] MDL-14378 When deleting course category deal with everything that depends on its context --- course/lib.php | 8 ++++---- lang/en_utf8/moodle.php | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/course/lib.php b/course/lib.php index 9d690890212..5eea6498cbe 100644 --- a/course/lib.php +++ b/course/lib.php @@ -2719,7 +2719,7 @@ function category_delete_full($category, $showfeedback=true) { notify("Error deleting course $course->shortname"); return false; } - notify("Deleted course $course->shortname", 'notifysuccess'); // TODO: localize + notify(get_string('coursedeleted', '', $course->shortname), 'notifysuccess'); } } @@ -2736,7 +2736,7 @@ function category_delete_full($category, $showfeedback=true) { events_trigger('category_deleted', $category); - notify("Deleted category $category->name", 'notifysuccess'); // TODO: localize + notify(get_string('coursecategorydeleted', '', format_string($category->name)), 'notifysuccess'); return true; } @@ -2770,7 +2770,7 @@ function category_delete_move($category, $newparentid, $showfeedback=true) { notify("Error moving courses"); return false; } - notify("Moved courses from $category->name", 'notifysuccess'); // TODO: localize + notify(get_string('coursesmovedout', '', format_string($category->name)), 'notifysuccess'); } // now delete anything that may depend on course category context @@ -2786,7 +2786,7 @@ function category_delete_move($category, $newparentid, $showfeedback=true) { events_trigger('category_deleted', $category); - notify("Deleted category $category->name", 'notifysuccess'); // TODO: localize + notify(get_string('coursecategorydeleted', '', format_string($category->name)), 'notifysuccess'); return true; } diff --git a/lang/en_utf8/moodle.php b/lang/en_utf8/moodle.php index 099762843b9..59d5ce2ec04 100644 --- a/lang/en_utf8/moodle.php +++ b/lang/en_utf8/moodle.php @@ -267,8 +267,10 @@ $string['courseavailablenot'] = 'This course is not available to students'; $string['coursebackup'] = 'Course backup'; $string['coursecategories'] = 'Course categories'; $string['coursecategory'] = 'Course category'; +$string['coursecategorydeleted'] = 'Deleted course category $a'; $string['coursecreators'] = 'Course creator'; $string['coursecreatorsdescription'] = 'Course creators can create new courses and teach in them.'; +$string['coursedeleted'] = 'Deleted course $a'; $string['coursefiles'] = 'Course files'; $string['courseformatdata'] = 'Course format data'; $string['courseformats'] = 'Course formats'; @@ -296,6 +298,7 @@ $string['courserequestsuccess'] = 'Successfully saved your course request. Expec $string['courserestore'] = 'Course restore'; $string['courses'] = 'Courses'; $string['coursescategory'] = 'Courses in the same category'; +$string['coursesmovedout'] = 'Courses moved out from $a'; $string['coursespending'] = 'Courses pending approval'; $string['coursestaught'] = 'Courses I have taught'; $string['courseupdates'] = 'Course updates';