Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 310 and 401] [Versions 311 and 401] [Versions 39 and 401] [Versions 401 and 402] [Versions 401 and 403]

Defines the renderer for the quiz_grading module.

Copyright: 2018 Huong Nguyen <huongnv13@gmail.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 211 lines (8 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: quiz_grading_renderer  - X-Ref

The renderer for the quiz_grading module.

render_quiz_no_question_notification($quiz, $cm, $context)   X-Ref
Render no question notification.

param: object $quiz The quiz settings.
param: object $cm The course-module for this quiz.
param: object $context The quiz context.
return: string The HTML for the no questions message.

render_quiz_no_grade_question_notification()   X-Ref
Render no question need to grade notification.


render_display_index_heading($linktext, $listquestionurl)   X-Ref
Render index display.

param: string $linktext The text of the link.
param: moodle_url $listquestionurl Url of the page that list all questions.
return: string The HTML for the display heading.

render_questions_table($includeauto, $data, $header)   X-Ref
Render questions list table.

param: bool $includeauto True to show automatically graded questions.
param: array $data List of questions.
param: array $header List of table headers.
return: string The HTML for the question table.

render_grade_link($counts, $type, $gradestring, $gradequestionurl)   X-Ref
Render grade link for question.

param: object $counts
param: string $type Type of grade.
param: string $gradestring Lang string.
param: moodle_url $gradequestionurl Url to grade question.
return: string The HTML for the question grade link.

render_grading_interface($questioninfo, $listquestionsurl, $filterform, $paginginfo, $pagingbar, $formaction,$hiddeninputs, $gradequestioncontent)   X-Ref
Render grading page.

param: object $questioninfo Information of a question.
param: moodle_url $listquestionsurl Url of the page that list all questions.
param: quiz_grading_settings_form $filterform Question filter form.
param: object $paginginfo Pagination information.
param: object $pagingbar Pagination bar information.
param: moodle_url $formaction Form submit url.
param: array $hiddeninputs List of hidden input fields.
param: string $gradequestioncontent HTML string of question content.
return: string The HTML for the grading interface.

render_grade_question($questionusage, $slot, $displayoptions, $questionnumber, $heading)   X-Ref
Render grade question content.

param: question_usage_by_activity $questionusage The question usage that need to grade.
param: int $slot the number used to identify this question within this usage.
param: question_display_options $displayoptions the display options to use.
param: int $questionnumber the number of the question to check.
param: string $heading the question heading text.
return: string The HTML for the question display.

render_paging_bar(object $pagingbar)   X-Ref
Render paging bar.

param: object $pagingbar Pagination bar information.
return: string The HTML for the question display.