Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
mod_quiz_renderer Class Reference

The renderer for the quiz module. More...

Inheritance diagram for mod_quiz_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. More...
 
 access_messages ($messages)
 Print each message in an array, surrounded by <p>, </p> tags. More...
 
 add_action_handler (component_action $action, $id=null)
 Adds a JS action for the element with the provided id. More...
 
 attempt_form ($attemptobj, $page, $slots, $id, $nextpage)
 Ouputs the form for making an attempt. More...
 
 attempt_page ($attemptobj, $page, $accessmanager, $messages, $slots, $id, $nextpage)
 Attempt Page. More...
 
 attempt_state ($attemptobj)
 Generate a brief textual desciption of the current state of an attempt. More...
 
 chart (\core\chart_base $chart, $title)
 Outputs a chart. More...
 
 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. More...
 
 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. More...
 
 finish_review_link (quiz_attempt $attemptobj)
 Returns either a liink or button. More...
 
 get_compact_logo_url ($maxwidth=300, $maxheight=300)
 Return the site's compact logo URL, if any. More...
 
 get_logo_url ($maxwidth=null, $maxheight=200)
 Return the site's logo URL, if any. More...
 
 graph (moodle_url $url, $title)
 Output a graph, or a message saying that GD is required. More...
 
 has_started ()
 Returns true is output has already started, and false if not. More...
 
 image_url ($imagename, $component='moodle')
 Return the moodle_url for an image. More...
 
 initialise_timer ($timerstartvalue, $ispreview)
 Output the JavaScript required to initialise the countdown timer. More...
 
 navigation_panel (quiz_nav_panel_base $panel)
 Outputs the navigation block panel. More...
 
 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. More...
 
 no_review_message ($message)
 Displayed where there might normally be a review link, to explain why the review is not available at this time. More...
 
 pix_url ($imagename, $component='moodle')
 Return the direct URL for an image from the pix folder. More...
 
 questions (quiz_attempt $attemptobj, $reviewing, $slots, $page, $showall, mod_quiz_display_options $displayoptions)
 Renders each question. More...
 
 quiz_attempt_summary_link_to_reports ($quiz, $cm, $context, $returnzero=false, $currentgroup=0)
 Returns the same as quiz_num_attempt_summary() but wrapped in a link to the quiz reports. More...
 
 quiz_intro ($quiz, $cm)
 Output the quiz intro. More...
 
 quiz_notices ($messages)
 Returns any notices. More...
 
 redo_question_button ($slot, $disabled)
 Render a button which allows students to redo a question in the attempt. More...
 
 render (renderable $widget)
 Renders the provided widget and returns the HTML to display it. More...
 
 render_from_template ($templatename, $context)
 Renders a template by name with the given context. More...
 
 restart_preview_button ($url)
 Create a preview link. More...
 
 review_form ($page, $showall, $displayoptions, $content, $attemptobj)
 Renders the main bit of the review page. More...
 
 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. More...
 
 review_next_navigation (quiz_attempt $attemptobj, $page, $lastpage, $showall=null)
 Creates the navigation links/buttons at the bottom of the reivew attempt page. More...
 
 review_page (quiz_attempt $attemptobj, $slots, $page, $showall, $lastpage, mod_quiz_display_options $displayoptions, $summarydata)
 Builds the review page. More...
 
 review_question_not_allowed (quiz_attempt $attemptobj, $message)
 Renders the review question pop-up. More...
 
 review_question_page (quiz_attempt $attemptobj, $slot, $seq, mod_quiz_display_options $displayoptions, $summarydata)
 Renders the review question pop-up. More...
 
 review_summary_table ($summarydata, $page)
 Outputs the table containing data from summary data array. More...
 
 should_display_main_logo ($headinglevel=1)
 Whether we should display the main logo. More...
 
 should_display_navbar_logo ()
 Whether we should display the logo in the navbar. More...
 
 start_attempt_button ($buttontext, moodle_url $url, mod_quiz_preflight_check_form $preflightcheckform=null, $popuprequired=false, $popupoptions=null)
 Generates the view attempt button. More...
 
 start_attempt_page (quiz $quizobj, mod_quiz_preflight_check_form $mform)
 
 summary_page ($attemptobj, $displayoptions)
 Create the summary page. More...
 
 summary_page_controls ($attemptobj)
 Creates any controls a the page should have. More...
 
 summary_table ($attemptobj, $displayoptions)
 Generates the table of summarydata. More...
 
 view_information ($quiz, $cm, $context, $messages)
 Output the page information. More...
 
 view_page ($course, $quiz, $cm, $context, $viewobj)
 Generates the view page. More...
 
 view_page_buttons (mod_quiz_view_object $viewobj)
 Work out, and render, whatever buttons, and surrounding info, should appear at the end of the review page. More...
 
 view_page_guest ($course, $quiz, $cm, $context, $messages)
 Outputs an error message for any guests accessing the quiz. More...
 
 view_page_notenrolled ($course, $quiz, $cm, $context, $messages)
 Outputs and error message for anyone who is not enrolle don the course. More...
 
 view_result_info ($quiz, $context, $cm, $viewobj)
 Generates data pertaining to quiz results. More...
 
 view_table ($quiz, $context, $viewobj)
 Generates the table of data. More...
 
 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. More...
 

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. More...
 
 filter_review_summary_table ($summarydata, $page)
 Filters the summarydata array. More...
 
 get_mustache ()
 Return an instance of the mustache class. More...
 
 render_mod_quiz_links_to_other_attempts (mod_quiz_links_to_other_attempts $links)
 outputs the link the other attempts. More...
 
 render_quiz_nav_question_button (quiz_nav_question_button $button)
 Display a quiz navigation button. More...
 
 render_quiz_nav_section_heading (quiz_nav_section_heading $heading)
 Display a quiz navigation heading. More...
 

Protected Attributes

xhtml_container_stack $opencontainers
 The xhtml_container_stack to use.
 
renderer_base core_renderer $output
 A reference to the current renderer. More...
 
moodle_page $page
 The Moodle page the renderer has been created to assist with.
 
string $target
 The requested rendering target.
 

Detailed Description

The renderer for the quiz module.

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

Member Function Documentation

◆ __call()

plugin_renderer_base::__call (   $method,
  $arguments 
)
inherited

Magic method used to pass calls otherwise meant for the standard renderer to it to ensure we don't go causing unnecessary grief.

Parameters
string$method
array$arguments
Return values
mixed

◆ access_messages()

mod_quiz_renderer::access_messages (   $messages)

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

Parameters
array$messagesthe array of message strings.
bool$returnif true, return a string, instead of outputting.
Return values
stringHTML to output.

◆ add_action_handler()

renderer_base::add_action_handler ( component_action  $action,
  $id = null 
)
inherited

Adds a JS action for the element with the provided id.

This method adds a JS event for the provided component action to the page and then returns the id that the event has been attached to. If no id has been provided then a new ID is generated by html_writer::random_id()

Parameters
component_action$action
string$id
Return values
stringid of element, either original submitted or random new if not supplied

◆ attempt_form()

mod_quiz_renderer::attempt_form (   $attemptobj,
  $page,
  $slots,
  $id,
  $nextpage 
)

Ouputs 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_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_renderer::attempt_page (   $attemptobj,
  $page,
  $accessmanager,
  $messages,
  $slots,
  $id,
  $nextpage 
)

Attempt Page.

Parameters
quiz_attempt$attemptobjInstance of quiz_attempt
int$pageCurrent page number
quiz_access_manager$accessmanagerInstance of quiz_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

◆ attempt_state()

mod_quiz_renderer::attempt_state (   $attemptobj)

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

Parameters
quiz_attempt$attemptobjthe attempt
int$timenowthe time to use as 'now'.
Return values
stringthe appropriate lang string to describe the state.

◆ chart()

mod_quiz_renderer::chart ( \core\chart_base  $chart,
  $title 
)

Outputs a chart.

Parameters
core\chart_base$chartThe chart.
string$titleThe title to display above the graph.
Return values
stringHTML fragment for the graph.

◆ close_attempt_popup()

mod_quiz_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_renderer::countdown_timer ( quiz_attempt  $attemptobj,
  $timenow 
)

Return the HTML of the quiz timer.

Return values
stringHTML content.

◆ filter_review_summary_table()

mod_quiz_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
$summarydatacontaining filtered row data

◆ finish_review_link()

mod_quiz_renderer::finish_review_link ( quiz_attempt  $attemptobj)

Returns either a liink or button.

Parameters
quiz_attempt$attemptobjinstance of quiz_attempt

◆ get_compact_logo_url()

renderer_base::get_compact_logo_url (   $maxwidth = 300,
  $maxheight = 300 
)
inherited

Return the site's compact logo URL, if any.

Parameters
int$maxwidthThe maximum width, or null when the maximum width does not matter.
int$maxheightThe maximum height, or null when the maximum height does not matter.
Return values
moodle_url|false

◆ get_logo_url()

renderer_base::get_logo_url (   $maxwidth = null,
  $maxheight = 200 
)
inherited

Return the site's logo URL, if any.

Parameters
int$maxwidthThe maximum width, or null when the maximum width does not matter.
int$maxheightThe maximum height, or null when the maximum height does not matter.
Return values
moodle_url|false

◆ get_mustache()

renderer_base::get_mustache ( )
protectedinherited

Return an instance of the mustache class.

Since
2.9
Return values
Mustache_Engine

◆ graph()

mod_quiz_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 fragment for the graph.

◆ has_started()

renderer_base::has_started ( )
inherited

Returns true is output has already started, and false if not.

Return values
booleantrue if the header has been printed.

◆ image_url()

renderer_base::image_url (   $imagename,
  $component = 'moodle' 
)
inherited

Return the moodle_url for an image.

The exact image location and extension is determined automatically by searching for gif|png|jpg|jpeg, please note there can not be diferent images with the different extension. The imagename is for historical reasons a relative path name, it may be changed later for core images. It is recommended to not use subdirectories in plugin and theme pix directories.

There are three types of images: 1/ theme images - stored in theme/mytheme/pix/, use component 'theme' 2/ core images - stored in /pix/, overridden via theme/mytheme/pix_core/ 3/ plugin images - stored in mod/mymodule/pix, overridden via theme/mytheme/pix_plugins/mod/mymodule/, example: image_url('comment', 'mod_glossary')

Parameters
string$imagenamethe pathname of the image
string$componentfull plugin name (aka component) or 'theme'
Return values
moodle_url

◆ initialise_timer()

mod_quiz_renderer::initialise_timer (   $timerstartvalue,
  $ispreview 
)

Output the JavaScript required to initialise the countdown timer.

Parameters
int$timerstartvaluetime remaining, in seconds.

◆ navigation_panel()

mod_quiz_renderer::navigation_panel ( quiz_nav_panel_base  $panel)

Outputs the navigation block panel.

Parameters
quiz_nav_panel_base$panelinstance of quiz_nav_panel_base

◆ no_questions_message()

mod_quiz_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
object$quizthe quiz settings.
object$cmthe course_module object.
object$contextthe quiz context.
Return values
stringHTML to output.

◆ no_review_message()

mod_quiz_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.

◆ pix_url()

renderer_base::pix_url (   $imagename,
  $component = 'moodle' 
)
inherited

Return the direct URL for an image from the pix folder.

Use this function sparingly and never for icons. For icons use pix_icon or the pix helper in a mustache template.

Deprecated:
since Moodle 3.3
Parameters
string$imagenamethe name of the icon.
string$componentspecification of one plugin like in get_string()
Return values
moodle_url

◆ prepare_classes()

static renderer_base::prepare_classes (   $classes)
staticinherited

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

Parameters
mixed$classesSpace-separated string or array of classes
Return values
stringHTML class attribute value

◆ questions()

mod_quiz_renderer::questions ( quiz_attempt  $attemptobj,
  $reviewing,
  $slots,
  $page,
  $showall,
mod_quiz_display_options  $displayoptions 
)

Renders each question.

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

◆ quiz_attempt_summary_link_to_reports()

mod_quiz_renderer::quiz_attempt_summary_link_to_reports (   $quiz,
  $cm,
  $context,
  $returnzero = false,
  $currentgroup = 0 
)

Returns the same as quiz_num_attempt_summary() but wrapped in a link to the quiz reports.

Parameters
object$quizthe quiz object. Only $quiz->id is used at the moment.
object$cmthe cm object. Only $cm->course, $cm->groupmode and $cm->groupingid fields are used at the moment.
object$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_renderer::quiz_intro (   $quiz,
  $cm 
)

Output the quiz intro.

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

◆ quiz_notices()

mod_quiz_renderer::quiz_notices (   $messages)

Returns any notices.

Parameters
array$messages

◆ redo_question_button()

mod_quiz_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()

plugin_renderer_base::render ( renderable  $widget)
inherited

Renders the provided widget and returns the HTML to display it.

Parameters
renderable$widgetinstance with renderable interface
Return values
string

Reimplemented from renderer_base.

Reimplemented in tool_policy\output\renderer.

◆ render_from_template()

renderer_base::render_from_template (   $templatename,
  $context 
)
inherited

Renders a template by name with the given context.

The provided data needs to be array/stdClass made up of only simple types. Simple types are array,stdClass,bool,int,float,string

Since
2.9
Parameters
array | stdClass$contextContext containing data for the template.
Return values
string|boolean

◆ render_mod_quiz_links_to_other_attempts()

mod_quiz_renderer::render_mod_quiz_links_to_other_attempts ( mod_quiz_links_to_other_attempts  $links)
protected

outputs the link the other attempts.

Parameters
mod_quiz_links_to_other_attempts$links

◆ render_quiz_nav_question_button()

mod_quiz_renderer::render_quiz_nav_question_button ( quiz_nav_question_button  $button)
protected

Display a quiz navigation button.

Parameters
quiz_nav_question_button$button
Return values
stringHTML fragment.

◆ render_quiz_nav_section_heading()

mod_quiz_renderer::render_quiz_nav_section_heading ( quiz_nav_section_heading  $heading)
protected

Display a quiz navigation heading.

Parameters
quiz_nav_section_heading$headingthe heading.
Return values
stringHTML fragment.

◆ restart_preview_button()

mod_quiz_renderer::restart_preview_button (   $url)

Create a preview link.

Parameters
moodle_url$urlcontains a url to the given page

◆ review_form()

mod_quiz_renderer::review_form (   $page,
  $showall,
  $displayoptions,
  $content,
  $attemptobj 
)

Renders the main bit of the review page.

Parameters
array$summarydatacontain row data for table
int$pagecurrent page number
mod_quiz_display_options$displayoptionsinstance of mod_quiz_display_options
$contentcontains each question
quiz_attempt$attemptobjinstance of quiz_attempt
bool$showallif true display attempt on one page

◆ review_link()

mod_quiz_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_renderer::review_next_navigation ( quiz_attempt  $attemptobj,
  $page,
  $lastpage,
  $showall = null 
)

Creates the navigation links/buttons at the bottom of the reivew 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_renderer::review_page ( quiz_attempt  $attemptobj,
  $slots,
  $page,
  $showall,
  $lastpage,
mod_quiz_display_options  $displayoptions,
  $summarydata 
)

Builds the review page.

Parameters
quiz_attempt$attemptobjan instance of quiz_attempt.
array$slotsan array of intgers relating to questions.
int$pagethe current page number
bool$showallwhether to show entire attempt on one page.
bool$lastpageif true the current page is the last page.
mod_quiz_display_options$displayoptionsinstance of mod_quiz_display_options.
array$summarydatacontains all table data
Return values
$outputcontaining html data.

◆ review_question_not_allowed()

mod_quiz_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_renderer::review_question_page ( quiz_attempt  $attemptobj,
  $slot,
  $seq,
mod_quiz_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.
mod_quiz_display_options$displayoptionsinstance of mod_quiz_display_options.
array$summarydatacontains all table data
Return values
$outputcontaining html data.

◆ review_summary_table()

mod_quiz_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

◆ should_display_main_logo()

renderer_base::should_display_main_logo (   $headinglevel = 1)
inherited

Whether we should display the main logo.

Parameters
int$headinglevelThe heading level we want to check against.
Return values
bool

◆ should_display_navbar_logo()

renderer_base::should_display_navbar_logo ( )
inherited

Whether we should display the logo in the navbar.

We will when there are no main logos, and we have compact logo.

Return values
bool

◆ start_attempt_button()

mod_quiz_renderer::start_attempt_button (   $buttontext,
moodle_url  $url,
mod_quiz_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.
mod_quiz_preflight_check_form$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.

◆ summary_page()

mod_quiz_renderer::summary_page (   $attemptobj,
  $displayoptions 
)

Create the summary page.

Parameters
quiz_attempt$attemptobj
mod_quiz_display_options$displayoptions

◆ summary_page_controls()

mod_quiz_renderer::summary_page_controls (   $attemptobj)

Creates any controls a the page should have.

Parameters
quiz_attempt$attemptobj

◆ summary_table()

mod_quiz_renderer::summary_table (   $attemptobj,
  $displayoptions 
)

Generates the table of summarydata.

Parameters
quiz_attempt$attemptobj
mod_quiz_display_options$displayoptions

◆ view_information()

mod_quiz_renderer::view_information (   $quiz,
  $cm,
  $context,
  $messages 
)

Output the page information.

Parameters
object$quizthe quiz settings.
object$cmthe course_module object.
object$contextthe quiz context.
array$messagesany access messages that should be described.
Return values
stringHTML to output.

◆ view_page()

mod_quiz_renderer::view_page (   $course,
  $quiz,
  $cm,
  $context,
  $viewobj 
)

Generates the view page.

Parameters
int$courseThe id of the course
array$quizArray conting quiz data
int$cmCourse Module ID
int$contextThe page context ID
array$infomessagesinformation about this quiz
mod_quiz_view_object$viewobj
string$buttontexttext for the start/continue attempt button, if it should be shown.
array$infomessagesfurther information about why the student cannot attempt this quiz now, if appicable this quiz

◆ view_page_buttons()

mod_quiz_renderer::view_page_buttons ( mod_quiz_view_object  $viewobj)

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

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

◆ view_page_guest()

mod_quiz_renderer::view_page_guest (   $course,
  $quiz,
  $cm,
  $context,
  $messages 
)

Outputs an error message for any guests accessing the quiz.

Parameters
int$courseThe course ID
array$quizArray contingin quiz data
int$cmCourse Module ID
int$contextThe page contect ID
array$messagesArray containing any messages

◆ view_page_notenrolled()

mod_quiz_renderer::view_page_notenrolled (   $course,
  $quiz,
  $cm,
  $context,
  $messages 
)

Outputs and error message for anyone who is not enrolle don the course.

Parameters
int$courseThe course ID
array$quizArray contingin quiz data
int$cmCourse Module ID
int$contextThe page contect ID
array$messagesArray containing any messages

◆ view_result_info()

mod_quiz_renderer::view_result_info (   $quiz,
  $context,
  $cm,
  $viewobj 
)

Generates data pertaining to quiz results.

Parameters
array$quizArray containing quiz data
int$contextThe page context ID
int$cmThe Course Module Id
mod_quiz_view_object$viewobj

◆ view_table()

mod_quiz_renderer::view_table (   $quiz,
  $context,
  $viewobj 
)

Generates the table of data.

Parameters
array$quizArray contining quiz data
int$contextThe page context ID
mod_quiz_view_object$viewobj

Member Data Documentation

◆ $output

renderer_base core_renderer plugin_renderer_base::$output
protectedinherited

A reference to the current renderer.

The renderer provided here will be determined by the page but will in 90% of cases by the core_renderer


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