[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/mod/quiz/report/statistics/ -> statisticslib.php (summary)

Common functions for the quiz statistics report.

Author: James Pratt me@jamiep.org
Copyright: 2013 The Open University
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 128 lines (6 kb)
Included or required:0 times
Referenced: 1 time
Includes or requires: 0 files

Defines 4 functions

  quiz_statistics_attempts_sql()
  quiz_statistics_renumber_placeholders()
  quiz_statistics_qubaids_condition()
  quiz_statistics_graph_get_new_colour()

Functions
Functions that are not part of a class:

quiz_statistics_attempts_sql($quizid, $groupstudents, $whichattempts = QUIZ_GRADEAVERAGE, $includeungraded = false)   X-Ref
SQL to fetch relevant 'quiz_attempts' records.

param: int    $quizid        quiz id to get attempts for
param: array  $groupstudents empty array if not using groups or array of students in current group.
param: string $whichattempts which attempts to use, represented internally as one of the constants as used in
param: bool   $includeungraded whether to fetch ungraded attempts too
return: array FROM and WHERE sql fragments and sql params

quiz_statistics_renumber_placeholders($sql, $params, $paramprefix)   X-Ref
Re-number all the params beginning with $paramprefix in a fragment of SQL.

param: string $sql the SQL.
param: array $params the params.
param: string $paramprefix the parameter prefix.
return: array with two elements, the modified SQL, and the modified params.

quiz_statistics_qubaids_condition($quizid, $groupstudents, $whichattempts = QUIZ_GRADEAVERAGE, $includeungraded = false)   X-Ref
No description

quiz_statistics_graph_get_new_colour()   X-Ref
This helper function returns a sequence of colours each time it is called.
Used for choosing colours for graph data series.

return: string colour name.



Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1