Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
mod_quiz\output\renderer Class Reference
Inheritance diagram for mod_quiz\output\renderer:
plugin_renderer_base renderer_base

Public Member Functions

 __call ($method, $arguments)
 Magic method used to pass calls otherwise meant for the standard renderer to it to ensure we don't go causing unnecessary grief.
 
 access_messages ($messages)
 Print each message in an array, surrounded by <p>, </p> tags.
 
 add_action_handler (component_action $action, $id=null)
 Adds a JS action for the element with the provided id.
 
 attempt_form ($attemptobj, $page, $slots, $id, $nextpage)
 Outputs the form for making an attempt.
 
 attempt_page ($attemptobj, $page, $accessmanager, $messages, $slots, $id, $nextpage)
 Attempt Page.
 
 attempt_state ($attemptobj)
 Generate a brief textual description of the current state of an attempt.
 
 chart (\core\chart_base $chart, $title, $attrs=[])
 Outputs a chart.
 
 close_attempt_popup ($url, $message='')
 Output a page with an optional message, and JavaScript code to close the current window and redirect the parent window to a new URL.
 
 connection_warning ()
 Output the connection warning messages, which are initially hidden, and only revealed by JavaScript if necessary.
 
 countdown_timer (quiz_attempt $attemptobj, $timenow)
 Return the HTML of the quiz timer.
 
 during_attempt_tertiary_nav ($quizviewurl)
 Render the tertiary navigation for pages during the attempt.
 
 filter_review_attempt_summary (attempt_summary_information $summarydata, int $page)
 A chance to filter the information before display.
 
 finish_review_link (quiz_attempt $attemptobj)
 Returns either a link or button.
 
 get_compact_logo_url ($maxwidth=300, $maxheight=300)
 Return the site's compact logo URL, if any.
 
 get_logo_url ($maxwidth=null, $maxheight=200)
 Return the site's logo URL, if any.
 
 get_page ()
 Returns the moodle page object.
 
 graph (moodle_url $url, $title)
 Output a graph, or a message saying that GD is required.
 
 has_started ()
 Returns true is output has already started, and false if not.
 
 image_url ($imagename, $component='moodle')
 Return the moodle_url for an image.
 
 initialise_timer ($timerstartvalue, $ispreview)
 Initialise the JavaScript required to initialise the countdown timer.
 
 navigation_panel (navigation_panel_base $panel)
 Outputs the navigation block panel.
 
 no_questions_message ($canedit, $editurl)
 Generate a message saying that this quiz has no questions, with a button to go to the edit page, if the user has the right capability.
 
 no_review_message ($message)
 Displayed where there might normally be a review link, to explain why the review is not available at this time.
 
 pix_url ($imagename, $component='moodle')
 Return the direct URL for an image from the pix folder.
 
 questions (quiz_attempt $attemptobj, $reviewing, $slots, $page, $showall, display_options $displayoptions)
 Renders each question.
 
 quiz_attempt_summary_link_to_reports ($quiz, $cm, $context, $returnzero=false, $currentgroup=0)
 Returns the same as {.
 
 quiz_intro ($quiz, $cm)
 Output the quiz intro.
 
 quiz_notices ($messages)
 Returns any notices.
 
 quiz_override_summary_links (stdClass $quiz, cm_info|stdClass $cm, $currentgroup=0)
 Render a summary of the number of group and user overrides, with corresponding links.
 
 redo_question_button ($slot, $disabled)
 Render a button which allows students to redo a question in the attempt.
 
 render (renderable $widget)
 Renders the provided widget and returns the HTML to display it.
 
 render_from_template ($templatename, $context)
 Renders a template by name with the given context.
 
 restart_preview_button ($url)
 Create a preview link.
 
 review_attempt_summary (attempt_summary_information $summarydata, int $page)
 Outputs the overall summary of the attempt at the top of the review page.
 
 review_form ($page, $showall, $displayoptions, $content, $attemptobj)
 Renders the main bit of the review page.
 
 review_link ($url, $reviewinpopup, $popupoptions)
 Output either a link to the review page for an attempt, or a button to open the review in a popup window.
 
 review_next_navigation (quiz_attempt $attemptobj, $page, $lastpage, $showall=null)
 Creates the navigation links/buttons at the bottom of the review attempt page.
 
 review_page (quiz_attempt $attemptobj, $slots, $page, $showall, $lastpage, display_options $displayoptions, $summarydata)
 Builds the review page.
 
 review_question_not_allowed (quiz_attempt $attemptobj, $message)
 Renders the review question pop-up.
 
 review_question_page (quiz_attempt $attemptobj, $slot, $seq, display_options $displayoptions, $summarydata)
 Renders the review question pop-up.
 
 review_summary_table ($summarydata, $page)
 Outputs the table containing data from summary data array.
 
 should_display_main_logo ()
 
 should_display_navbar_logo ()
 Whether we should display the logo in the navbar.
 
 start_attempt_button ($buttontext, moodle_url $url, preflight_check_form $preflightcheckform=null, $popuprequired=false, $popupoptions=null)
 Generates the view attempt button.
 
 start_attempt_page (quiz_settings $quizobj, preflight_check_form $mform)
 Render the 'start attempt' page.
 
 summary_page ($attemptobj, $displayoptions)
 Create the summary page.
 
 summary_page_controls ($attemptobj)
 Creates any controls the page should have.
 
 summary_table ($attemptobj, $displayoptions)
 Generates the table of summarydata.
 
 view_information ($quiz, $cm, $context, $messages, bool $quizhasquestions=false)
 Output the page information.
 
 view_page ($course, $quiz, $cm, $context, $viewobj)
 Generates the view page.
 
 view_page_buttons (view_page $viewobj)
 Work out, and render, whatever buttons, and surrounding info, should appear at the end of the review page.
 
 view_page_guest ($course, $quiz, $cm, $context, $messages, $viewobj)
 Outputs an error message for any guests accessing the quiz.
 
 view_page_notenrolled ($course, $quiz, $cm, $context, $messages, $viewobj)
 Outputs and error message for anyone who is not enrolled on the course.
 
 view_page_tertiary_nav (view_page $viewobj)
 Render the tertiary navigation for the view page.
 
 view_result_info ($quiz, $context, $cm, $viewobj)
 Generates data pertaining to quiz results.
 
 view_table ($quiz, $context, $viewobj)
 Generates the table of data.
 
 view_table_heading ()
 Generates the table heading.
 

Static Public Member Functions

static prepare_classes ($classes)
 Given an array or space-separated list of classes, prepares and returns the HTML class attribute value.
 

Protected Member Functions

 attempt_navigation_buttons ($page, $lastpage, $navmethod='free')
 Display the prev/next buttons that go at the bottom of each page of the attempt.
 
 filter_review_summary_table ($summarydata, $page)
 Filters the summarydata array.
 
 get_mustache ()
 Return an instance of the mustache class.
 
 render_grade_out_of (grade_out_of $grade)
 Render a {.
 
 render_links_to_other_attempts (links_to_other_attempts $links)
 Renders a list of links the other attempts.
 
 render_mod_quiz_links_to_other_attempts (links_to_other_attempts $links)
 Deprecated version of render_links_to_other_attempts.
 
 render_navigation_question_button (navigation_question_button $button)
 Display a quiz navigation button.
 
 render_navigation_section_heading (navigation_section_heading $heading)
 Display a quiz navigation heading.
 
 render_quiz_nav_question_button (navigation_question_button $button)
 Deprecated version of render_navigation_question_button.
 
 render_quiz_nav_section_heading (navigation_section_heading $heading)
 Deprecated version of render_navigation_section_heading.
 

Protected Attributes

xhtml_container_stack $opencontainers
 The xhtml_container_stack to use.
 
renderer_base core_renderer $output
 A reference to the current renderer.
 
moodle_page $page
 The Moodle page the renderer has been created to assist with.
 
string $target
 The requested rendering target.
 
array $templatecache = []
 $templatecache The mustache template cache.
 

Detailed Description

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

Member Function Documentation

◆ access_messages()

mod_quiz\output\renderer::access_messages ( $messages)

Print each message in an array, surrounded by <p>, </p> tags.

Parameters
array$messagesthe array of message strings.
Return values
stringHTML to output.

◆ attempt_form()

mod_quiz\output\renderer::attempt_form ( $attemptobj,
$page,
$slots,
$id,
$nextpage )

Outputs the form for making an attempt.

Parameters
quiz_attempt$attemptobj
int$pageCurrent page number
array$slotsArray of integers relating to questions
int$idID of the attempt
int$nextpageNext page number

◆ attempt_navigation_buttons()

mod_quiz\output\renderer::attempt_navigation_buttons ( $page,
$lastpage,
$navmethod = 'free' )
protected

Display the prev/next buttons that go at the bottom of each page of the attempt.

Parameters
int$pagethe page number. Starts at 0 for the first page.
bool$lastpageis this the last page in the quiz?
string$navmethodOptional quiz attribute, 'free' (default) or 'sequential'
Return values
stringHTML fragment.

◆ attempt_page()

mod_quiz\output\renderer::attempt_page ( $attemptobj,
$page,
$accessmanager,
$messages,
$slots,
$id,
$nextpage )

Attempt Page.

Parameters
quiz_attempt$attemptobjInstance of quiz_attempt
int$pageCurrent page number
access_manager$accessmanagerInstance of access_manager
array$messagesAn array of messages
array$slotsContains an array of integers that relate to questions
int$idThe ID of an attempt
int$nextpageThe number of the next page
Return values
stringHTML to output.

◆ attempt_state()

mod_quiz\output\renderer::attempt_state ( $attemptobj)

Generate a brief textual description of the current state of an attempt.

Parameters
quiz_attempt$attemptobjthe attempt
Return values
stringthe appropriate lang string to describe the state.

◆ chart()

mod_quiz\output\renderer::chart ( \core\chart_base $chart,
$title,
$attrs = [] )

Outputs a chart.

Parameters
core\chart_base$chartThe chart.
string$titleThe title to display above the graph.
array$attrsextra container html attributes.
Return values
stringHTML of the graph.

◆ close_attempt_popup()

mod_quiz\output\renderer::close_attempt_popup ( $url,
$message = '' )

Output a page with an optional message, and JavaScript code to close the current window and redirect the parent window to a new URL.

Parameters
moodle_url$urlthe URL to redirect the parent window to.
string$messagemessage to display before closing the window. (optional)
Return values
stringHTML to output.

◆ countdown_timer()

mod_quiz\output\renderer::countdown_timer ( quiz_attempt $attemptobj,
$timenow )

Return the HTML of the quiz timer.

Parameters
quiz_attempt$attemptobjinstance of quiz_attempt
int$timenowtimestamp to use as 'now'.
Return values
stringHTML content.

◆ during_attempt_tertiary_nav()

mod_quiz\output\renderer::during_attempt_tertiary_nav ( $quizviewurl)

Render the tertiary navigation for pages during the attempt.

Parameters
string | moodle_url$quizviewurlurl of the view.php page for this quiz.
Return values
stringHTML to output.

◆ filter_review_attempt_summary()

mod_quiz\output\renderer::filter_review_attempt_summary ( attempt_summary_information $summarydata,
int $page )

A chance to filter the information before display.

Moodle core uses this to display less infomrmation on pages after the first. This is a separate method, becaus it is a useful hook where themes can overrid things.

Parameters
attempt_summary_information$summarydatathe data that will be displayed. Modify as desired.
int$pagecontains the current page number

◆ filter_review_summary_table()

mod_quiz\output\renderer::filter_review_summary_table ( $summarydata,
$page )
protected

Filters the summarydata array.

Parameters
array$summarydatacontains row data for table
int$pagethe current page number
Return values
arrayupdated version of the $summarydata array.
Deprecated
since Moodle 4.4. Replaced by filter_review_attempt_summary.

◆ finish_review_link()

mod_quiz\output\renderer::finish_review_link ( quiz_attempt $attemptobj)

Returns either a link or button.

Parameters
quiz_attempt$attemptobjinstance of quiz_attempt

◆ graph()

mod_quiz\output\renderer::graph ( moodle_url $url,
$title )

Output a graph, or a message saying that GD is required.

Parameters
moodle_url$urlthe URL of the graph.
string$titlethe title to display above the graph.
Return values
stringHTML of the graph.

◆ initialise_timer()

mod_quiz\output\renderer::initialise_timer ( $timerstartvalue,
$ispreview )

Initialise the JavaScript required to initialise the countdown timer.

Parameters
int$timerstartvaluetime remaining, in seconds.
bool$ispreviewtrue if this is a preview attempt.

◆ navigation_panel()

mod_quiz\output\renderer::navigation_panel ( navigation_panel_base $panel)

Outputs the navigation block panel.

Parameters
navigation_panel_base$panel

◆ no_questions_message()

mod_quiz\output\renderer::no_questions_message ( $canedit,
$editurl )

Generate a message saying that this quiz has no questions, with a button to go to the edit page, if the user has the right capability.

Parameters
bool$caneditcan the current user edit the quiz?
moodle_url$editurlURL of the edit quiz page.
Return values
stringHTML to output.
Deprecated
since Moodle 4.0 MDL-71915 - please do not use this function any more.

◆ no_review_message()

mod_quiz\output\renderer::no_review_message ( $message)

Displayed where there might normally be a review link, to explain why the review is not available at this time.

Parameters
string$messageoptional message explaining why the review is not possible.
Return values
stringHTML to output.

◆ questions()

mod_quiz\output\renderer::questions ( quiz_attempt $attemptobj,
$reviewing,
$slots,
$page,
$showall,
display_options $displayoptions )

Renders each question.

Parameters
quiz_attempt$attemptobjinstance of quiz_attempt
bool$reviewing
array$slotsarray of integers relating to questions
int$pagecurrent page number
bool$showallif true shows attempt on single page
display_options$displayoptionsinstance of display_options

◆ quiz_attempt_summary_link_to_reports()

mod_quiz\output\renderer::quiz_attempt_summary_link_to_reports ( $quiz,
$cm,
$context,
$returnzero = false,
$currentgroup = 0 )

Returns the same as {.

See also
quiz_num_attempt_summary()} but wrapped in a link to the quiz reports.
Parameters
stdClass$quizthe quiz object. Only $quiz->id is used at the moment.
stdClass$cmthe cm object. Only $cm->course, $cm->groupmode and $cm->groupingid fields are used at the moment.
context$contextthe quiz context.
bool$returnzeroif false (default), when no attempts have been made '' is returned instead of 'Attempts: 0'.
int$currentgroupif there is a concept of current group where this method is being called (e.g. a report) pass it in here. Default 0 which means no current group.
Return values
stringHTML fragment for the link.

◆ quiz_intro()

mod_quiz\output\renderer::quiz_intro ( $quiz,
$cm )

Output the quiz intro.

Parameters
stdClass$quizthe quiz settings.
stdClass$cmthe course_module object.
Return values
stringHTML to output.

◆ quiz_notices()

mod_quiz\output\renderer::quiz_notices ( $messages)

Returns any notices.

Parameters
array$messages

◆ quiz_override_summary_links()

mod_quiz\output\renderer::quiz_override_summary_links ( stdClass $quiz,
cm_info|stdClass $cm,
$currentgroup = 0 )

Render a summary of the number of group and user overrides, with corresponding links.

Parameters
stdClass$quizthe quiz settings.
cm_info | stdClass$cmthe cm object.
int$currentgroupcurrently selected group, if there is one.
Return values
stringHTML fragment for the link.

◆ redo_question_button()

mod_quiz\output\renderer::redo_question_button ( $slot,
$disabled )

Render a button which allows students to redo a question in the attempt.

Parameters
int$slotthe number of the slot to generate the button for.
bool$disabledif true, output the button disabled.
Return values
stringHTML fragment.

◆ render_grade_out_of()

mod_quiz\output\renderer::render_grade_out_of ( grade_out_of $grade)
protected

Render a {.

See also
grade_out_of}.

Most of the logic is in methods of the grade_out_of class. However, having this renderer method allows themes to override the default rendering.

Parameters
grade_out_of$grade
Return values
stringHTML to output.

◆ render_links_to_other_attempts()

mod_quiz\output\renderer::render_links_to_other_attempts ( links_to_other_attempts $links)
protected

Renders a list of links the other attempts.

Parameters
links_to_other_attempts$links
Return values
stringHTML fragment.

◆ render_mod_quiz_links_to_other_attempts()

mod_quiz\output\renderer::render_mod_quiz_links_to_other_attempts ( links_to_other_attempts $links)
protected

Deprecated version of render_links_to_other_attempts.

Parameters
links_to_other_attempts$links
Return values
stringHTML fragment.
Deprecated
since Moodle 4.2. Please use render_links_to_other_attempts instead.
Todo
MDL-76612 Final deprecation in Moodle 4.6

◆ render_navigation_question_button()

mod_quiz\output\renderer::render_navigation_question_button ( navigation_question_button $button)
protected

Display a quiz navigation button.

Parameters
navigation_question_button$button
Return values
stringHTML fragment.

◆ render_navigation_section_heading()

mod_quiz\output\renderer::render_navigation_section_heading ( navigation_section_heading $heading)
protected

Display a quiz navigation heading.

Parameters
navigation_section_heading$headingthe heading.
Return values
stringHTML fragment.

◆ render_quiz_nav_question_button()

mod_quiz\output\renderer::render_quiz_nav_question_button ( navigation_question_button $button)
protected

Deprecated version of render_navigation_question_button.

Parameters
navigation_question_button$button
Return values
stringHTML fragment.
Deprecated
since Moodle 4.2. Please use render_links_to_other_attempts instead.
Todo
MDL-76612 Final deprecation in Moodle 4.6

◆ render_quiz_nav_section_heading()

mod_quiz\output\renderer::render_quiz_nav_section_heading ( navigation_section_heading $heading)
protected

Deprecated version of render_navigation_section_heading.

Parameters
navigation_section_heading$headingthe heading.
Return values
stringHTML fragment.
Deprecated
since Moodle 4.2. Please use render_links_to_other_attempts instead.
Todo
MDL-76612 Final deprecation in Moodle 4.6

◆ restart_preview_button()

mod_quiz\output\renderer::restart_preview_button ( $url)

Create a preview link.

Parameters
moodle_url$urlURL to restart the attempt.

◆ review_attempt_summary()

mod_quiz\output\renderer::review_attempt_summary ( attempt_summary_information $summarydata,
int $page )

Outputs the overall summary of the attempt at the top of the review page.

Parameters
attempt_summary_information$summarydatacontains row data for table.
int$pagecontains the current page number
Return values
stringHTML to display.

◆ review_form()

mod_quiz\output\renderer::review_form ( $page,
$showall,
$displayoptions,
$content,
$attemptobj )

Renders the main bit of the review page.

Parameters
int$pagecurrent page number
bool$showallif true display attempt on one page
display_options$displayoptionsinstance of display_options
string$contentthe rendered display of each question
quiz_attempt$attemptobjinstance of quiz_attempt
Return values
stringHTML to display.

◆ review_link()

mod_quiz\output\renderer::review_link ( $url,
$reviewinpopup,
$popupoptions )

Output either a link to the review page for an attempt, or a button to open the review in a popup window.

Parameters
moodle_url$urlof the target page.
bool$reviewinpopupwhether a pop-up is required.
array$popupoptionsoptions to pass to the popup_action constructor.
Return values
stringHTML to output.

◆ review_next_navigation()

mod_quiz\output\renderer::review_next_navigation ( quiz_attempt $attemptobj,
$page,
$lastpage,
$showall = null )

Creates the navigation links/buttons at the bottom of the review attempt page.

Note, the name of this function is no longer accurate, but when the design changed, it was decided to keep the old name for backwards compatibility.

Parameters
quiz_attempt$attemptobjinstance of quiz_attempt
int$pagethe current page
bool$lastpageif true current page is the last page
bool | null$showallif true, the URL will be to review the entire attempt on one page, and $page will be ignored. If null, a sensible default will be chosen.
Return values
stringHTML fragment.

◆ review_page()

mod_quiz\output\renderer::review_page ( quiz_attempt $attemptobj,
$slots,
$page,
$showall,
$lastpage,
display_options $displayoptions,
$summarydata )

Builds the review page.

Parameters
quiz_attempt$attemptobjan instance of quiz_attempt.
array$slotsof slots to be displayed.
int$pagethe current page number
bool$showallwhether to show entire attempt on one page.
bool$lastpageif true the current page is the last page.
display_options$displayoptionsinstance of display_options.
attempt_summary_information | array$summarydatasummary information about the attempt. Passing an array is deprecated.
Return values
stringHTML to display.

◆ review_question_not_allowed()

mod_quiz\output\renderer::review_question_not_allowed ( quiz_attempt $attemptobj,
$message )

Renders the review question pop-up.

Parameters
quiz_attempt$attemptobjan instance of quiz_attempt.
string$messageWhy the review is not allowed.
Return values
stringhtml to output.

◆ review_question_page()

mod_quiz\output\renderer::review_question_page ( quiz_attempt $attemptobj,
$slot,
$seq,
display_options $displayoptions,
$summarydata )

Renders the review question pop-up.

Parameters
quiz_attempt$attemptobjan instance of quiz_attempt.
int$slotwhich question to display.
int$seqwhich step of the question attempt to show. null = latest.
display_options$displayoptionsinstance of display_options.
attempt_summary_information | array$summarydatasummary information about the attempt. Passing an array is deprecated.
Return values
stringHTML to display.

◆ review_summary_table()

mod_quiz\output\renderer::review_summary_table ( $summarydata,
$page )

Outputs the table containing data from summary data array.

Parameters
array$summarydatacontains row data for table
int$pagecontains the current page number
Return values
stringHTML to display.
Deprecated
since Moodle 4.4. Replaced by review_attempt_summary.

◆ start_attempt_button()

mod_quiz\output\renderer::start_attempt_button ( $buttontext,
moodle_url $url,
preflight_check_form $preflightcheckform = null,
$popuprequired = false,
$popupoptions = null )

Generates the view attempt button.

Parameters
string$buttontextthe label to display on the button.
moodle_url$urlThe URL to POST to in order to start the attempt.
preflight_check_form | null$preflightcheckformdeprecated.
bool$popuprequiredwhether the attempt needs to be opened in a pop-up.
array$popupoptionsthe options to use if we are opening a popup.
Return values
stringHTML fragment.

◆ start_attempt_page()

mod_quiz\output\renderer::start_attempt_page ( quiz_settings $quizobj,
preflight_check_form $mform )

Render the 'start attempt' page.

The student gets here if their interaction with the preflight check from fails in some way (e.g. they typed the wrong password).

Parameters
mod_quiz\quiz_settings$quizobj
preflight_check_form$mform
Return values
string

◆ summary_page()

mod_quiz\output\renderer::summary_page ( $attemptobj,
$displayoptions )

Create the summary page.

Parameters
quiz_attempt$attemptobj
display_options$displayoptions

◆ summary_page_controls()

mod_quiz\output\renderer::summary_page_controls ( $attemptobj)

Creates any controls the page should have.

Parameters
quiz_attempt$attemptobj

◆ summary_table()

mod_quiz\output\renderer::summary_table ( $attemptobj,
$displayoptions )

Generates the table of summarydata.

Parameters
quiz_attempt$attemptobj
display_options$displayoptions

◆ view_information()

mod_quiz\output\renderer::view_information ( $quiz,
$cm,
$context,
$messages,
bool $quizhasquestions = false )

Output the page information.

Parameters
stdClass$quizthe quiz settings.
cm_info | stdClass$cmthe course_module object.
context$contextthe quiz context.
array$messagesany access messages that should be described.
bool$quizhasquestionsdoes quiz has questions added.
Return values
stringHTML to output.

◆ view_page()

mod_quiz\output\renderer::view_page ( $course,
$quiz,
$cm,
$context,
$viewobj )

Generates the view page.

Parameters
stdClass$coursethe course settings row from the database.
stdClass$quizthe quiz settings row from the database.
stdClass$cmthe course_module settings row from the database.
context_module$contextthe quiz context.
view_page$viewobj
Return values
stringHTML to display

◆ view_page_buttons()

mod_quiz\output\renderer::view_page_buttons ( view_page $viewobj)

Work out, and render, whatever buttons, and surrounding info, should appear at the end of the review page.

Parameters
view_page$viewobjthe information required to display the view page.
Return values
stringHTML to output.

◆ view_page_guest()

mod_quiz\output\renderer::view_page_guest ( $course,
$quiz,
$cm,
$context,
$messages,
$viewobj )

Outputs an error message for any guests accessing the quiz.

Parameters
stdClass$coursethe course settings row from the database.
stdClass$quizthe quiz settings row from the database.
stdClass$cmthe course_module settings row from the database.
context_module$contextthe quiz context.
array$messagesArray containing any messages
view_page$viewobj

◆ view_page_notenrolled()

mod_quiz\output\renderer::view_page_notenrolled ( $course,
$quiz,
$cm,
$context,
$messages,
$viewobj )

Outputs and error message for anyone who is not enrolled on the course.

Parameters
stdClass$coursethe course settings row from the database.
stdClass$quizthe quiz settings row from the database.
stdClass$cmthe course_module settings row from the database.
context_module$contextthe quiz context.
array$messagesArray containing any messages
view_page$viewobj

◆ view_page_tertiary_nav()

mod_quiz\output\renderer::view_page_tertiary_nav ( view_page $viewobj)

Render the tertiary navigation for the view page.

Parameters
view_page$viewobjthe information required to display the view page.
Return values
stringHTML to output.

◆ view_result_info()

mod_quiz\output\renderer::view_result_info ( $quiz,
$context,
$cm,
$viewobj )

Generates data pertaining to quiz results.

Parameters
stdClass$quizArray containing quiz data
context_module$contextThe quiz context.
stdClass | cm_info$cmThe course module information.
view_page$viewobj
Return values
stringHTML to display.

◆ view_table()

mod_quiz\output\renderer::view_table ( $quiz,
$context,
$viewobj )

Generates the table of data.

Parameters
stdClass$quizthe quiz settings.
context_module$contextthe quiz context.
view_page$viewobj
Deprecated
Since 4.4 please use the {
See also
list_of_attempts} renderable instead.

The documentation for this class was generated from the following file: