Permalink
Browse files

MDL-42635 lesson: change from error to user friendly message

  • Loading branch information...
1 parent a76fb41 commit 5e3da2f722a0af008f86a55fbe598e0c2acd7ca3 @KristerV KristerV committed with marinaglancy Feb 14, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 mod/lesson/locallib.php
View
2 mod/lesson/locallib.php
@@ -2742,7 +2742,7 @@ protected function check_page_order($page1, $page2) {
public function load_all_pages(lesson $lesson) {
global $DB;
if (!($pages =$DB->get_records('lesson_pages', array('lessonid'=>$lesson->id)))) {
- print_error('cannotfindpages', 'lesson');
+ return array(); // Records returned empty.
}
foreach ($pages as $key=>$page) {
$pagetype = get_class($this->types[$page->qtype]);

0 comments on commit 5e3da2f

Please sign in to comment.