Permalink
Browse files

MDL-29697 Don't return the error if it wasn't updated because origina…

…l question type had no answers
  • Loading branch information...
1 parent e9e2def commit 6e698a4563cad39f33140c4e074e83b6aece6bd9 Glenn Ansley committed Oct 7, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 mod/lesson/action/updatepage.php
View
3 mod/lesson/action/updatepage.php
@@ -71,7 +71,8 @@
}
}
}
- if (!update_record("lesson_answers", $oldanswer)) {
+ // Don't return the error if it wasn't updated because original question type had no answers
+ if (!empty($oldanswer->id) && !update_record("lesson_answers", $oldanswer)) {
error("Update page: EOB not updated");
}
} else {

0 comments on commit 6e698a4

Please sign in to comment.