Permalink
Browse files

updated lesson_delete_instance to delete records from timer, branch, …

…and high_scores tables
  • Loading branch information...
1 parent e6e3416 commit 011cfc95eda37c160dfbdcdf01dc39e8b1080700 michaelpenne committed Mar 10, 2005
Showing with 11 additions and 2 deletions.
  1. +11 −2 mod/lesson/lib.php
View
@@ -166,8 +166,17 @@ function lesson_delete_instance($id) {
if (! delete_records("lesson_grades", "lessonid", "$lesson->id")) {
$result = false;
}
-
- return $result;
+ if (! delete_records("lesson_timer", "lessonid", "$lesson->id")) {
+ $result = false;
+ }
+ if (! delete_records("lesson_branch", "lessonid", "$lesson->id")) {
+ $result = false;
+ }
+ if (! delete_records("lesson_high_scores", "lessonid", "$lesson->id")) {
+ $result = false;
+ }
+
+ return $result;
}
/*******************************************************************/

0 comments on commit 011cfc9

Please sign in to comment.