[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/mod/quiz/report/overview/ -> report.php (summary)

This file defines the quiz overview report class.

Copyright: 1999 onwards Martin Dougiamas and others {@link http://moodle.com}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 636 lines (26 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

quiz_overview_report:: (15 methods):
  display()
  process_actions()
  start_regrade()
  finish_regrade()
  unlock_session()
  regrade_attempt()
  regrade_attempts()
  regrade_attempts_needing_it()
  count_question_attempts_needing_regrade()
  has_regraded_questions()
  clear_regrade_table()
  update_overall_grades()
  get_bands_count_and_width()
  get_bands_labels()
  get_chart()


Class: quiz_overview_report  - X-Ref

Quiz report subclass for the overview (grades) report.

display($quiz, $cm, $course)   X-Ref
No description

process_actions($quiz, $cm, $currentgroup, $groupstudents, $allowed, $redirecturl)   X-Ref
No description

start_regrade($quiz, $cm)   X-Ref
Check necessary capabilities, and start the display of the regrade progress page.

param: object $quiz the quiz settings.
param: object $cm the cm object for the quiz.

finish_regrade($nexturl)   X-Ref
Finish displaying the regrade progress page.

param: moodle_url $nexturl where to send the user after the regrade.

unlock_session()   X-Ref
Unlock the session and allow the regrading process to run in the background.


regrade_attempt($attempt, $dryrun = false, $slots = null)   X-Ref
Regrade a particular quiz attempt. Either for real ($dryrun = false), or
as a pretend regrade to see which fractions would change. The outcome is
stored in the quiz_overview_regrades table.

Note, $attempt is not upgraded in the database. The caller needs to do that.
However, $attempt->sumgrades is updated, if this is not a dry run.

param: object $attempt the quiz attempt to regrade.
param: bool $dryrun if true, do a pretend regrade, otherwise do it for real.
param: array $slots if null, regrade all questions, otherwise, just regrade

regrade_attempts($quiz, $dryrun = false,$groupstudents = array()   X-Ref
Regrade attempts for this quiz, exactly which attempts are regraded is
controlled by the parameters.

param: object $quiz the quiz settings.
param: bool $dryrun if true, do a pretend regrade, otherwise do it for real.
param: array $groupstudents blank for all attempts, otherwise regrade attempts
param: array $attemptids blank for all attempts, otherwise only regrade

regrade_attempts_needing_it($quiz, $groupstudents)   X-Ref
Regrade those questions in those attempts that are marked as needing regrading
in the quiz_overview_regrades table.

param: object $quiz the quiz settings.
param: array $groupstudents blank for all attempts, otherwise regrade attempts

count_question_attempts_needing_regrade($quiz, $groupstudents)   X-Ref
Count the number of attempts in need of a regrade.

param: object $quiz the quiz settings.
param: array $groupstudents user ids. If this is given, only data relating

has_regraded_questions($from, $where, $params)   X-Ref
Are there any pending regrades in the table we are going to show?

param: string $from tables used by the main query.
param: string $where where clause used by the main query.
param: array $params required by the SQL.
return: bool whether there are pending regrades.

clear_regrade_table($quiz, $groupstudents)   X-Ref
Remove all information about pending/complete regrades from the database.

param: object $quiz the quiz settings.
param: array $groupstudents user ids. If this is given, only data relating

update_overall_grades($quiz)   X-Ref
Update the final grades for all attempts. This method is used following
a regrade.

param: object $quiz the quiz settings.
param: array $userids only update scores for these userids.
param: array $attemptids attemptids only update scores for these attempt ids.

get_bands_count_and_width($quiz)   X-Ref
Get the bands configuration for the quiz.

This returns the configuration for having between 11 and 20 bars in
a chart based on the maximum grade to be given on a quiz. The width of
a band is the number of grade points it encapsulates.

param: object $quiz The quiz object.
return: array Contains the number of bands, and their width.

get_bands_labels($bands, $bandwidth, $quiz)   X-Ref
Get the bands labels.

param: int $bands The number of bands.
param: int $bandwidth The band width.
param: object $quiz The quiz object.
return: string[] The labels.

get_chart($labels, $data)   X-Ref
Get a chart.

param: string[] $labels Chart labels.
param: int[] $data The data.
return: \core\chart_base



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