Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Classes | Functions | Variables
locallib.php File Reference

Local library file for Lesson. More...

Classes

class  lesson
 
class  lesson_add_page_form_base
 Abstract class that page type's MUST inherit from. More...
 
class  lesson_base
 Abstract class to provide a core functions to the all lesson classes. More...
 
class  lesson_page
 
class  lesson_page_answer
 
class  lesson_page_type_manager
 A management class for page types. More...
 

Functions

 lesson_add_fake_blocks ($page, $cm, $lesson, $timer=null)
 
 lesson_add_header_buttons ($cm, $context, $extraeditbuttons=false, $lessonpageid=null)
 Adds header buttons to the page for the lesson. More...
 
 lesson_clock_block_contents ($cmid, $lesson, $timer, $page)
 If a timed lesson and not a teacher, then return a block_contents containing the clock. More...
 
 lesson_display_teacher_warning ($lesson)
 Any other lesson functions go here. More...
 
 lesson_displayleftif ($lesson)
 Determines if a user can view the left menu. More...
 
object lesson_get_media_html ($lesson, $context)
 This is a function used to detect media types and generate html code. More...
 
 lesson_get_overview_report_table_and_data (lesson $lesson, $currentgroup)
 Return the overview report table and data. More...
 
 lesson_get_user_deadline ($courseid)
 Return user's deadline for all lessons in a course, hereby taking into account group and user overrides. More...
 
 lesson_get_user_detailed_report_data (lesson $lesson, $userid, $attempt)
 Return information about one user attempt (including answers) More...
 
 lesson_grade ($lesson, $ntries, $userid=0)
 Calculates a user's grade for a lesson. More...
 
 lesson_mediafile_block_contents ($cmid, $lesson)
 If there is a media file associated with this lesson, return a block_contents that displays it. More...
 
 lesson_menu_block_contents ($cmid, $lesson)
 If left menu is turned on, then this will print the menu in a block. More...
 
 lesson_process_group_deleted_in_course ($courseid, $groupid=null)
 Logic to happen when a/some group(s) has/have been deleted in a course. More...
 
 lesson_random_question_jump ($lesson, $pageid)
 Handles the random jump between a branch table and end of branch or end of lesson (LESSON_RANDOMPAGE). More...
 
 lesson_unseen_branch_jump ($lesson, $userid)
 Handles the unseen branch table jump. More...
 
 lesson_unseen_question_jump ($lesson, $user, $pageid)
 Interprets the LESSON_UNSEENBRANCHPAGE jump. More...
 

Variables

const LESSON_ANSWER_HTML "HTML"
 Answer format is HTML.
 
const LESSON_CLUSTERJUMP -80
 Cluster Jump.
 
const LESSON_EOL -9
 End of Lesson.
 
const LESSON_MAX_EVENT_LENGTH "432000"
 LESSON_MAX_EVENT_LENGTH = 432000 ; 5 days maximum.
 
const LESSON_NEXTPAGE -1
 Jump to Next Page.
 
const LESSON_OTHER_ANSWERS "@#wronganswer#@"
 Placeholder answer for all other answers.
 
const LESSON_PREVIOUSPAGE -40
 Jump to Previous Page.
 
const LESSON_RANDOMBRANCH -70
 Jump to a random Branch.
 
const LESSON_RANDOMPAGE -60
 Jump to a random page within a branch and end of branch or end of lesson.
 
const LESSON_THISPAGE 0
 Include the files that are required by this module. More...
 
const LESSON_UNANSWEREDPAGE 2
 Next page -> any page not answered correctly.
 
const LESSON_UNDEFINED -99
 Undefined.
 
const LESSON_UNSEENBRANCHPAGE -50
 Jump to an unseen page within a branch and end of branch or end of lesson.
 
const LESSON_UNSEENPAGE 1
 Next page -> any page not seen before.
 

Detailed Description

Local library file for Lesson.

These are non-standard functions that are used only by Lesson.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or late