[ Index ]

PHP Cross Reference of moodle-2.8

title

Body

[close]

/mod/quiz/ -> renderer.php (summary)

Defines the renderer for the quiz module.

Copyright: 2011 The Open University
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 1254 lines (50 kb)
Included or required:0 times
Referenced: 1 time
Includes or requires: 0 files

Defines 3 classes

mod_quiz_renderer:: (41 methods):
  review_page()
  review_question_page()
  review_question_not_allowed()
  filter_review_summary_table()
  review_summary_table()
  questions()
  review_form()
  finish_review_link()
  review_next_navigation()
  countdown_timer()
  restart_preview_button()
  navigation_panel()
  render_quiz_nav_question_button()
  render_mod_quiz_links_to_other_attempts()
  start_attempt_page()
  attempt_page()
  quiz_notices()
  attempt_form()
  initialise_timer()
  close_attempt_popup()
  access_messages()
  summary_page()
  summary_table()
  summary_page_controls()
  view_page()
  view_page_buttons()
  start_attempt_button()
  no_questions_message()
  view_page_guest()
  view_page_notenrolled()
  view_information()
  quiz_intro()
  view_table_heading()
  view_table()
  attempt_state()
  view_result_info()
  review_link()
  no_review_message()
  quiz_attempt_summary_link_to_reports()
  graph()
  connection_warning()

mod_quiz_links_to_other_attempts:: (0 methods):

mod_quiz_view_object:: (0 methods):


Class: mod_quiz_renderer  - X-Ref

The renderer for the quiz module.

review_page(quiz_attempt $attemptobj, $slots, $page, $showall,$lastpage, mod_quiz_display_options $displayoptions,$summarydata)   X-Ref
Builds the review page

param: quiz_attempt $attemptobj an instance of quiz_attempt.
param: array $slots an array of intgers relating to questions.
param: int $page the current page number
param: bool $showall whether to show entire attempt on one page.
param: bool $lastpage if true the current page is the last page.
param: mod_quiz_display_options $displayoptions instance of mod_quiz_display_options.
param: array $summarydata contains all table data
return: $output containing html data.

review_question_page(quiz_attempt $attemptobj, $slot, $seq,mod_quiz_display_options $displayoptions, $summarydata)   X-Ref
Renders the review question pop-up.

param: quiz_attempt $attemptobj an instance of quiz_attempt.
param: int $slot which question to display.
param: int $seq which step of the question attempt to show. null = latest.
param: mod_quiz_display_options $displayoptions instance of mod_quiz_display_options.
param: array $summarydata contains all table data
return: $output containing html data.

review_question_not_allowed($message)   X-Ref
Renders the review question pop-up.

param: string $message Why the review is not allowed.
return: string html to output.

filter_review_summary_table($summarydata, $page)   X-Ref
Filters the summarydata array.

param: array $summarydata contains row data for table
param: int $page the current page number
return: $summarydata containing filtered row data

review_summary_table($summarydata, $page)   X-Ref
Outputs the table containing data from summary data array

param: array $summarydata contains row data for table
param: int $page contains the current page number

questions(quiz_attempt $attemptobj, $reviewing, $slots, $page, $showall,mod_quiz_display_options $displayoptions)   X-Ref
Renders each question

param: quiz_attempt $attemptobj instance of quiz_attempt
param: bool $reviewing
param: array $slots array of intgers relating to questions
param: int $page current page number
param: bool $showall if true shows attempt on single page
param: mod_quiz_display_options $displayoptions instance of mod_quiz_display_options

review_form($page, $showall, $displayoptions, $content, $attemptobj)   X-Ref
Renders the main bit of the review page.

param: array $summarydata contain row data for table
param: int $page current page number
param: mod_quiz_display_options $displayoptions instance of mod_quiz_display_options
param: $content contains each question
param: quiz_attempt $attemptobj instance of quiz_attempt
param: bool $showall if true display attempt on one page

finish_review_link(quiz_attempt $attemptobj)   X-Ref
Returns either a liink or button

param: quiz_attempt $attemptobj instance of quiz_attempt

review_next_navigation(quiz_attempt $attemptobj, $page, $lastpage)   X-Ref
Creates a next page arrow or the finishing link

param: quiz_attempt $attemptobj instance of quiz_attempt
param: int $page the current page
param: bool $lastpage if true current page is the last page

countdown_timer(quiz_attempt $attemptobj, $timenow)   X-Ref
Return the HTML of the quiz timer.

return: string HTML content.

restart_preview_button($url)   X-Ref
Create a preview link

param: $url contains a url to the given page

navigation_panel(quiz_nav_panel_base $panel)   X-Ref
Outputs the navigation block panel

param: quiz_nav_panel_base $panel instance of quiz_nav_panel_base

render_quiz_nav_question_button(quiz_nav_question_button $button)   X-Ref
Returns the quizzes navigation button

param: quiz_nav_question_button $button

render_mod_quiz_links_to_other_attempts(mod_quiz_links_to_other_attempts $links)   X-Ref
outputs the link the other attempts.

param: mod_quiz_links_to_other_attempts $links

start_attempt_page(quiz $quizobj, mod_quiz_preflight_check_form $mform)   X-Ref
No description

attempt_page($attemptobj, $page, $accessmanager, $messages, $slots, $id,$nextpage)   X-Ref
Attempt Page

param: quiz_attempt $attemptobj Instance of quiz_attempt
param: int $page Current page number
param: quiz_access_manager $accessmanager Instance of quiz_access_manager
param: array $messages An array of messages
param: array $slots Contains an array of integers that relate to questions
param: int $id The ID of an attempt
param: int $nextpage The number of the next page

quiz_notices($messages)   X-Ref
Returns any notices.

param: array $messages

attempt_form($attemptobj, $page, $slots, $id, $nextpage)   X-Ref
Ouputs the form for making an attempt

param: quiz_attempt $attemptobj
param: int $page Current page number
param: array $slots Array of integers relating to questions
param: int $id ID of the attempt
param: int $nextpage Next page number

initialise_timer($timerstartvalue, $ispreview)   X-Ref
Output the JavaScript required to initialise the countdown timer.

param: int $timerstartvalue time remaining, in seconds.

close_attempt_popup($url, $message = '')   X-Ref
Output a page with an optional message, and JavaScript code to close the
current window and redirect the parent window to a new URL.

param: moodle_url $url the URL to redirect the parent window to.
param: string $message message to display before closing the window. (optional)
return: string HTML to output.

access_messages($messages)   X-Ref
Print each message in an array, surrounded by <p>, </p> tags.

param: array $messages the array of message strings.
param: bool $return if true, return a string, instead of outputting.
return: string HTML to output.

summary_page($attemptobj, $displayoptions)   X-Ref
Create the summary page

param: quiz_attempt $attemptobj
param: mod_quiz_display_options $displayoptions

summary_table($attemptobj, $displayoptions)   X-Ref
Generates the table of summarydata

param: quiz_attempt $attemptobj
param: mod_quiz_display_options $displayoptions

summary_page_controls($attemptobj)   X-Ref
Creates any controls a the page should have.

param: quiz_attempt $attemptobj

view_page($course, $quiz, $cm, $context, $viewobj)   X-Ref
Generates the view page

param: int $course The id of the course
param: array $quiz Array conting quiz data
param: int $cm Course Module ID
param: int $context The page context ID
param: array $infomessages information about this quiz
param: mod_quiz_view_object $viewobj
param: string $buttontext text for the start/continue attempt button, if
param: array $infomessages further information about why the student cannot

view_page_buttons(mod_quiz_view_object $viewobj)   X-Ref
Work out, and render, whatever buttons, and surrounding info, should appear
at the end of the review page.

param: mod_quiz_view_object $viewobj the information required to display
return: string HTML to output.

start_attempt_button($buttontext, moodle_url $url,$startattemptwarning, $popuprequired, $popupoptions)   X-Ref
Generates the view attempt button

param: int $course The course ID
param: array $quiz Array containging quiz date
param: int $cm The Course Module ID
param: int $context The page Context ID
param: mod_quiz_view_object $viewobj
param: string $buttontext

no_questions_message($canedit, $editurl)   X-Ref
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.

param: object $quiz the quiz settings.
param: object $cm the course_module object.
param: object $context the quiz context.
return: string HTML to output.

view_page_guest($course, $quiz, $cm, $context, $messages)   X-Ref
Outputs an error message for any guests accessing the quiz

param: int $course The course ID
param: array $quiz Array contingin quiz data
param: int $cm Course Module ID
param: int $context The page contect ID
param: array $messages Array containing any messages

view_page_notenrolled($course, $quiz, $cm, $context, $messages)   X-Ref
Outputs and error message for anyone who is not enrolle don the course

param: int $course The course ID
param: array $quiz Array contingin quiz data
param: int $cm Course Module ID
param: int $context The page contect ID
param: array $messages Array containing any messages

view_information($quiz, $cm, $context, $messages)   X-Ref
Output the page information

param: object $quiz the quiz settings.
param: object $cm the course_module object.
param: object $context the quiz context.
param: array $messages any access messages that should be described.
return: string HTML to output.

quiz_intro($quiz, $cm)   X-Ref
Output the quiz intro.

param: object $quiz the quiz settings.
param: object $cm the course_module object.
return: string HTML to output.

view_table_heading()   X-Ref
Generates the table heading.


view_table($quiz, $context, $viewobj)   X-Ref
Generates the table of data

param: array $quiz Array contining quiz data
param: int $context The page context ID
param: mod_quiz_view_object $viewobj

attempt_state($attemptobj)   X-Ref
Generate a brief textual desciption of the current state of an attempt.

param: quiz_attempt $attemptobj the attempt
param: int $timenow the time to use as 'now'.
return: string the appropriate lang string to describe the state.

view_result_info($quiz, $context, $cm, $viewobj)   X-Ref
Generates data pertaining to quiz results

param: array $quiz Array containing quiz data
param: int $context The page context ID
param: int $cm The Course Module Id
param: mod_quiz_view_object $viewobj

review_link($url, $reviewinpopup, $popupoptions)   X-Ref
Output either a link to the review page for an attempt, or a button to
open the review in a popup window.

param: moodle_url $url of the target page.
param: bool $reviewinpopup whether a pop-up is required.
param: array $popupoptions options to pass to the popup_action constructor.
return: string HTML to output.

no_review_message($message)   X-Ref
Displayed where there might normally be a review link, to explain why the
review is not available at this time.

param: string $message optional message explaining why the review is not possible.
return: string HTML to output.

quiz_attempt_summary_link_to_reports($quiz, $cm, $context,$returnzero = false, $currentgroup = 0)   X-Ref
Returns the same as {@link quiz_num_attempt_summary()} but wrapped in a link
to the quiz reports.

param: object $quiz the quiz object. Only $quiz->id is used at the moment.
param: object $cm the cm object. Only $cm->course, $cm->groupmode and $cm->groupingid
param: object $context the quiz context.
param: bool $returnzero if false (default), when no attempts have been made '' is returned
param: int $currentgroup if there is a concept of current group where this method is being
return: string HTML fragment for the link.

graph(moodle_url $url, $title)   X-Ref
Output a graph, or a message saying that GD is required.

param: moodle_url $url the URL of the graph.
param: string $title the title to display above the graph.
return: string HTML fragment for the graph.

connection_warning()   X-Ref
Output the connection warning messages, which are initially hidden, and
only revealed by JavaScript if necessary.


Class: mod_quiz_links_to_other_attempts  - X-Ref

Class: mod_quiz_view_object  - X-Ref




Generated: Fri Nov 28 20:29:05 2014 Cross-referenced by PHPXref 0.7.1