[ Index ]

PHP Cross Reference of moodle-2.8

title

Body

[close]

/mod/quiz/classes/output/ -> edit_renderer.php (summary)

Renderer outputting the quiz editing UI.

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

Defines 1 class

edit_renderer:: (35 methods):
  edit_page()
  quiz_state_warnings()
  quiz_information()
  maximum_grade_input()
  repaginate_button()
  repaginate_form()
  total_marks()
  start_section_list()
  end_section_list()
  start_section()
  end_section()
  section_left_content()
  section_right_content()
  questions_in_section()
  question_row()
  page_row()
  add_menu_actions()
  edit_menu_actions()
  add_question_form()
  question()
  question_move_icon()
  question_number()
  question_preview_icon()
  question_remove_icon()
  page_split_join_button()
  question_name()
  random_question()
  marked_out_of_field()
  question_chooser()
  question_bank_loading()
  random_question_form()
  initialise_editing_javascript()
  new_page_template()
  add_page_icon_template()
  question_bank_contents()


Class: edit_renderer  - X-Ref

Renderer outputting the quiz editing UI.

edit_page(\quiz $quizobj, structure $structure,\question_edit_contexts $contexts, \moodle_url $pageurl, array $pagevars)   X-Ref
Render the edit page

param: \quiz $quizobj object containing all the quiz settings information.
param: structure $structure object containing the structure of the quiz.
param: \question_edit_contexts $contexts the relevant question bank contexts.
param: \moodle_url $pageurl the canonical URL of this page.
param: array $pagevars the variables from {@link question_edit_setup()}.
return: string HTML to output.

quiz_state_warnings(structure $structure)   X-Ref
Render any warnings that might be required about the state of the quiz,
e.g. if it has been attempted, or if the shuffle questions option is
turned on.

param: structure $structure the quiz structure.
return: string HTML to output.

quiz_information(structure $structure)   X-Ref
Render the status bar.

param: structure $structure the quiz structure.
return: string HTML to output.

maximum_grade_input($quiz, \moodle_url $pageurl)   X-Ref
Render the form for setting a quiz' overall grade

param: \stdClass $quiz the quiz settings from the database.
param: \moodle_url $pageurl the canonical URL of this page.
return: string HTML to output.

repaginate_button(structure $structure, \moodle_url $pageurl)   X-Ref
Return the repaginate button

param: structure $structure the structure of the quiz being edited.
param: \moodle_url $pageurl the canonical URL of this page.
return: string HTML to output.

repaginate_form(structure $structure, \moodle_url $pageurl)   X-Ref
Return the repaginate form

param: structure $structure the structure of the quiz being edited.
param: \moodle_url $pageurl the canonical URL of this page.
return: string HTML to output.

total_marks($quiz)   X-Ref
Render the total marks available for the quiz.

param: \stdClass $quiz the quiz settings from the database.
return: string HTML to output.

start_section_list()   X-Ref
Generate the starting container html for the start of a list of sections

return: string HTML to output.

end_section_list()   X-Ref
Generate the closing container html for the end of a list of sections

return: string HTML to output.

start_section($section)   X-Ref
Display the start of a section, before the questions.

param: \stdClass $section The quiz_section entry from DB
return: string HTML to output.

end_section()   X-Ref
Display the end of a section, after the questions.

return: string HTML to output.

section_left_content($section)   X-Ref
Generate the content to be displayed on the left part of a section.

param: \stdClass $section The quiz_section entry from DB
return: string HTML to output.

section_right_content($section)   X-Ref
Generate the content to displayed on the right part of a section.

param: \stdClass $section The quiz_section entry from DB
return: string HTML to output.

questions_in_section(structure $structure, $section,$contexts, $pagevars, $pageurl)   X-Ref
Renders HTML to display the questions in a section of the quiz.

This function calls {@link core_course_renderer::quiz_section_question()}

param: structure $structure object containing the structure of the quiz.
param: \stdClass $section information about the section.
param: \question_edit_contexts $contexts the relevant question bank contexts.
param: array $pagevars the variables from {@link \question_edit_setup()}.
param: \moodle_url $pageurl the canonical URL of this page.
return: string HTML to output.

question_row(structure $structure, $question, $contexts, $pagevars, $pageurl)   X-Ref
Displays one question with the surrounding controls.

param: structure $structure object containing the structure of the quiz.
param: \stdClass $question data from the question and quiz_slots tables.
param: \question_edit_contexts $contexts the relevant question bank contexts.
param: array $pagevars the variables from {@link \question_edit_setup()}.
param: \moodle_url $pageurl the canonical URL of this page.
return: string HTML to output.

page_row(structure $structure, $question, $contexts, $pagevars, $pageurl)   X-Ref
Displays one question with the surrounding controls.

param: structure $structure object containing the structure of the quiz.
param: \stdClass $question data from the question and quiz_slots tables.
param: \question_edit_contexts $contexts the relevant question bank contexts.
param: array $pagevars the variables from {@link \question_edit_setup()}.
param: \moodle_url $pageurl the canonical URL of this page.
return: string HTML to output.

add_menu_actions(structure $structure, $page, \moodle_url $pageurl,\question_edit_contexts $contexts, array $pagevars)   X-Ref
Returns the add menu that is output once per page.

param: structure $structure object containing the structure of the quiz.
param: int $page the page number that this menu will add to.
param: \moodle_url $pageurl the canonical URL of this page.
param: \question_edit_contexts $contexts the relevant question bank contexts.
param: array $pagevars the variables from {@link \question_edit_setup()}.
return: string HTML to output.

edit_menu_actions(structure $structure, $page,\moodle_url $pageurl, array $pagevars)   X-Ref
Returns the list of actions to go in the add menu.

param: structure $structure object containing the structure of the quiz.
param: int $page the page number that this menu will add to.
param: \moodle_url $pageurl the canonical URL of this page.
param: array $pagevars the variables from {@link \question_edit_setup()}.
return: array the actions.

add_question_form(structure $structure, $page, \moodle_url $pageurl, array $pagevars)   X-Ref
Render the form that contains the data for adding a new question to the quiz.

param: structure $structure object containing the structure of the quiz.
param: int $page the page number that this menu will add to.
param: \moodle_url $pageurl the canonical URL of this page.
param: array $pagevars the variables from {@link \question_edit_setup()}.
return: string HTML to output.

question(structure $structure, $question, \moodle_url $pageurl)   X-Ref
Display a question.

param: structure $structure object containing the structure of the quiz.
param: \stdClass $question data from the question and quiz_slots tables.
param: \moodle_url $pageurl the canonical URL of this page.
return: string HTML to output.

question_move_icon($question)   X-Ref
Render the move icon.

param: \stdClass $question data from the question and quiz_slots tables.
return: string The markup for the move action, or an empty string if not available.

question_number($number)   X-Ref
Output the question number.

param: string $number The number, or 'i'.
return: string HTML to output.

question_preview_icon($quiz, $question, $label = null)   X-Ref
Render the preview icon.

param: \stdClass $quiz the quiz settings from the database.
param: \stdClass $question data from the question and quiz_slots tables.
param: bool $label if true, show the preview question label after the icon
return: string HTML to output.

question_remove_icon($question, $pageurl)   X-Ref
Render an icon to remove a question from the quiz.

param: object $question The module to produce a move button for.
param: \moodle_url $pageurl the canonical URL of the edit page.
return: string HTML to output.

page_split_join_button($quiz, $question, $insertpagebreak)   X-Ref
Display an icon to split or join two pages of the quiz.

param: \stdClass $quiz the quiz settings from the database.
param: \stdClass $question data from the question and quiz_slots tables.
param: bool $insertpagebreak if true, show an insert page break icon.
return: string HTML to output.

question_name(structure $structure, $question, $pageurl)   X-Ref
Renders html to display a name with the link to the question on a quiz edit page

If the user does not have permission to edi the question, it is rendered
without a link

param: structure $structure object containing the structure of the quiz.
param: \stdClass $question data from the question and quiz_slots tables.
param: \moodle_url $pageurl the canonical URL of this page.
return: string HTML to output.

random_question(structure $structure, $question, $pageurl)   X-Ref
Renders html to display a random question the link to edit the configuration
and also to see that category in the question bank.

param: structure $structure object containing the structure of the quiz.
param: \stdClass $question data from the question and quiz_slots tables.
param: \moodle_url $pageurl the canonical URL of this page.
return: string HTML to output.

marked_out_of_field($quiz, $question)   X-Ref
Display the 'marked out of' information for a question.
Along with the regrade action.

param: \stdClass $quiz the quiz settings from the database.
param: \stdClass $question data from the question and quiz_slots tables.
return: string HTML to output.

question_chooser()   X-Ref
Render the question type chooser dialogue.

return: string HTML to output.

question_bank_loading()   X-Ref
Render the contents of the question bank pop-up in its initial state,
when it just contains a loading progress indicator.

return: string HTML to output.

random_question_form(\moodle_url $thispageurl, \question_edit_contexts $contexts, array $pagevars)   X-Ref
Return random question form.

param: \moodle_url $thispageurl the canonical URL of this page.
param: \question_edit_contexts $contexts the relevant question bank contexts.
param: array $pagevars the variables from {@link \question_edit_setup()}.
return: string HTML to output.

initialise_editing_javascript($course, $quiz, structure $structure,\question_edit_contexts $contexts, array $pagevars, \moodle_url $pageurl)   X-Ref
Initialise the JavaScript for the general editing. (JavaScript for popups
is handled with the specific code for those.)

param: \stdClass $course the course settings from the database.
param: \stdClass $quiz the quiz settings from the database.
param: structure $structure object containing the structure of the quiz.
param: \question_edit_contexts $contexts the relevant question bank contexts.
param: array $pagevars the variables from {@link \question_edit_setup()}.
param: \moodle_url $pageurl the canonical URL of this page.
return: bool Always returns true

new_page_template(structure $structure,\question_edit_contexts $contexts, array $pagevars, \moodle_url $pageurl)   X-Ref
HTML for a page, with ids stripped, so it can be used as a javascript template.

param: structure $structure object containing the structure of the quiz.
param: \question_edit_contexts $contexts the relevant question bank contexts.
param: array $pagevars the variables from {@link \question_edit_setup()}.
param: \moodle_url $pageurl the canonical URL of this page.
return: string HTML for a new page.

add_page_icon_template(structure $structure, $quiz)   X-Ref
HTML for a page, with ids stripped, so it can be used as a javascript template.

param: structure $structure object containing the structure of the quiz.
param: \stdClass $quiz the quiz settings.
return: string HTML for a new icon

question_bank_contents(\mod_quiz\question\bank\custom_view $questionbank, array $pagevars)   X-Ref
Return the contents of the question bank, to be displayed in the question-bank pop-up.

param: \mod_quiz\question\bank\custom_view $questionbank the question bank view object.
param: array $pagevars the variables from {@link \question_edit_setup()}.
return: string HTML to output / send back in response to an AJAX request.



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