Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 39 and 400] [Versions 400 and 402] [Versions 400 and 403]

This file defines the quiz grades table.

Copyright: 2008 Jamie Pratt
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 384 lines (15 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: quiz_overview_table  - X-Ref

This is a table subclass for displaying the quiz grades report.

__construct($quiz, $context, $qmsubselect,quiz_overview_options $options, \core\dml\sql_join $groupstudentsjoins,\core\dml\sql_join $studentsjoins, $questions, $reporturl)   X-Ref
Constructor

param: object $quiz
param: context $context
param: string $qmsubselect
param: quiz_overview_options $options
param: \core\dml\sql_join $groupstudentsjoins
param: \core\dml\sql_join $studentsjoins
param: array $questions
param: moodle_url $reporturl

build_table()   X-Ref
No description

compute_average_row($label, \core\dml\sql_join $usersjoins)   X-Ref
Calculate the average overall and question scores for a set of attempts at the quiz.

return: array of table cells that make up the average row.
param: string $label the title ot use for this row.
param: \core\dml\sql_join $usersjoins to indicate a set of users.

add_average_row($label, \core\dml\sql_join $usersjoins)   X-Ref
Add an average grade row for a set of users.

param: string $label the title ot use for this row.
param: \core\dml\sql_join $usersjoins (joins, wheres, params) for the users to average over.

format_average_grade_for_questions($gradeaverages)   X-Ref
Helper userd by {@link add_average_row()}.

return: array the (partial) row of data.
param: array $gradeaverages the raw grades.

format_average($record, $question = false)   X-Ref
Format an entry in an average row.

return: string HTML fragment for an average score (with number of things included in the average).
param: object $record with fields grade and numaveraged.
param: bool $question true if this is a question score, false if it is an overall score.

submit_buttons()   X-Ref
No description

col_sumgrades($attempt)   X-Ref
No description

other_cols($colname, $attempt)   X-Ref

return: string the contents of the cell.
param: string $colname the name of the column.
param: object $attempt the row of data - see the SQL in display() in

col_regraded($attempt)   X-Ref
No description

update_sql_after_count($fields, $from, $where, $params)   X-Ref
No description

requires_latest_steps_loaded()   X-Ref
No description

is_latest_step_column($column)   X-Ref
No description

get_required_latest_state_fields($slot, $alias)   X-Ref
No description

query_db($pagesize, $useinitialsbar = true)   X-Ref
No description

get_regraded_questions()   X-Ref
Get all the questions in all the attempts being displayed that need regrading.

return: array A two dimensional array $questionusageid => $slot => $regradeinfo.