MDL-42635 lesson: Fixed error message

This commit is contained in:
Krister Viirsaar 2013-11-22 13:14:28 +02:00 committed by Marina Glancy
parent f500ff4e52
commit c6ac68eead

View File

@ -2765,7 +2765,7 @@ class lesson_page_type_manager {
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]);