Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

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

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.

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

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()}.

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

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

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.
return: string HTML fragment for an average score (with number of things included in the average).

submit_buttons()   X-Ref
No description

col_sumgrades($attempt)   X-Ref
No description

other_cols($colname, $attempt)   X-Ref

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

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.