public static function load($lessonid) {
        global $DB;

        if (!$lesson = $DB->get_record('lesson', array('id' => $lessonid))) {
            print_error('invalidcoursemodule');
        }
        return new lesson($lesson);
    }
public static function load($lessonid) {
        global $DB;

        if (!$lesson = $DB->get_record('lesson', array('id' => $lessonid))) {
            print_error('invalidcoursemodule');
        }
        return new lesson($lesson);
    }
public static function load ( $ lessonid ) { global $ DB ; if ( ! $ lesson = $ DB -> get_record ( 'lesson' , array ( 'id' => $ lessonid ) ) ) { print_error ( 'invalidcoursemodule' ) ; } return new lesson ( $ lesson ) ; }
Generates a lesson object from the database given its id
@static
@param int $lessonid
@return lesson
Generates a lesson object from the database given its id