get_setting_value('userinfo'); // Define each element separated $lamslesson = new backup_nested_element('lamslesson', array('id'), array( 'course', 'name', 'intro', 'introformat', 'groupid', 'grade', 'sequence_id', 'lesson_id', 'timemodified', 'completionfinished', 'displaydesign')); // Define sources $lamslesson->set_source_table('lamslesson', array('id' => backup::VAR_ACTIVITYID)); // All the rest of elements only happen if we are including user info if ($userinfo) { // there's no need to do anything here as all the userdata is in LAMS } // Return the root element (lamslesson), wrapped into standard activity structure return $this->prepare_activity_structure($lamslesson); } }