Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 5e3da2f722a0af008f86a55fbe598e0c2acd7ca3 1 parent a76fb41
Krister Viirsaar KristerV authored marinaglancy committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  mod/lesson/locallib.php
2  mod/lesson/locallib.php
View
@@ -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]);
Please sign in to comment.
Something went wrong with that request. Please try again.