Permalink
Browse files

Fix for bug #3607

  • Loading branch information...
1 parent 5fe35ab commit e26aaed2a44c3efb6eeac9223ee6a00880a8b27e fiedorow committed Jun 23, 2005
Showing with 31 additions and 31 deletions.
  1. +31 −31 lib/moodlelib.php
View
@@ -2940,40 +2940,40 @@ function remove_course_contents($courseid, $showfeedback=true) {
// Delete gradebook stuff
- if (delete_records("grade_category", "course", $course->id)) {
- if ($showfeedback) {
- notify("$strdeleted grade categories");
- } else {
- $result = false;
- }
+ if (delete_records("grade_category", "courseid", $course->id)) {
+ if ($showfeedback) {
+ notify("$strdeleted grade categories");
+ }
+ } else {
+ $result = false;
}
- if (delete_records("grade_exceptions", "course", $course->id)) {
- if ($showfeedback) {
- notify("$strdeleted grade exceptions");
- } else {
- $result = false;
- }
+ if (delete_records("grade_exceptions", "courseid", $course->id)) {
+ if ($showfeedback) {
+ notify("$strdeleted grade exceptions");
+ }
+ } else {
+ $result = false;
}
- if (delete_records("grade_item", "course", $course->id)) {
- if ($showfeedback) {
- notify("$strdeleted grade items");
- } else {
- $result = false;
- }
- }
- if (delete_records("grade_letter", "course", $course->id)) {
- if ($showfeedback) {
- notify("$strdeleted grade letters");
- } else {
- $result = false;
- }
+ if (delete_records("grade_item", "courseid", $course->id)) {
+ if ($showfeedback) {
+ notify("$strdeleted grade items");
+ }
+ } else {
+ $result = false;
}
- if (delete_records("grade_preferences", "course", $course->id)) {
- if ($showfeedback) {
- notify("$strdeleted grade preferences");
- } else {
- $result = false;
- }
+ if (delete_records("grade_letter", "courseid", $course->id)) {
+ if ($showfeedback) {
+ notify("$strdeleted grade letters");
+ }
+ } else {
+ $result = false;
+ }
+ if (delete_records("grade_preferences", "courseid", $course->id)) {
+ if ($showfeedback) {
+ notify("$strdeleted grade preferences");
+ }
+ } else {
+ $result = false;
}

0 comments on commit e26aaed

Please sign in to comment.