Moodle  2.2.1
http://www.collinsharper.com
quiz_overview_report Class Reference
Inheritance diagram for quiz_overview_report:
Collaboration diagram for quiz_overview_report:

Public Member Functions

 display ($quiz, $cm, $course)

Protected Member Functions

 regrade_attempt ($attempt, $dryrun=false, $slots=null)
 regrade_attempts ($quiz, $dryrun=false, $groupstudents=array(), $attemptids=array())
 regrade_attempts_needing_it ($quiz, $groupstudents)
 count_question_attempts_needing_regrade ($quiz, $groupstudents)
 has_regraded_questions ($from, $where, $params)
 clear_regrade_table ($quiz, $groupstudents)
 update_overall_grades ($quiz)

Detailed Description

Quiz report subclass for the overview (grades) report.

Definition at line 40 of file report.php.


Member Function Documentation

clear_regrade_table ( quiz,
groupstudents 
) [protected]

Remove all information about pending/complete regrades from the database.

Parameters:
object$quizthe quiz settings.
array$groupstudentsuser ids. If this is given, only data relating to these users is cleared.

Definition at line 553 of file report.php.

Here is the caller graph for this function:

count_question_attempts_needing_regrade ( quiz,
groupstudents 
) [protected]

Count the number of attempts in need of a regrade.

Parameters:
object$quizthe quiz settings.
array$groupstudentsuser ids. If this is given, only data relating to these users is cleared.

Definition at line 510 of file report.php.

Here is the caller graph for this function:

display ( cm,
course,
quiz 
)

Override this function to displays the report.

Parameters:
$cmthe course-module for this quiz.
$coursethe coures we are in.
$quizthis quiz.

Reimplemented from quiz_default_report.

Definition at line 42 of file report.php.

Here is the call graph for this function:

has_regraded_questions ( from,
where,
params 
) [protected]

Are there any pending regrades in the table we are going to show?

Parameters:
string$fromtables used by the main query.
string$wherewhere clause used by the main query.
array$paramsrequired by the SQL.
Returns:
bool whether there are pending regrades.

Definition at line 539 of file report.php.

Here is the caller graph for this function:

regrade_attempt ( attempt,
dryrun = false,
slots = null 
) [protected]

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.

Parameters:
object$attemptthe quiz attempt to regrade.
bool$dryrunif true, do a pretend regrade, otherwise do it for real.
array$slotsif null, regrade all questions, otherwise, just regrade the quetsions with those slots.

Definition at line 375 of file report.php.

Here is the call graph for this function:

Here is the caller graph for this function:

regrade_attempts ( quiz,
dryrun = false,
groupstudents = array(),
attemptids = array() 
) [protected]

Regrade attempts for this quiz, exactly which attempts are regraded is controlled by the parameters.

Parameters:
object$quizthe quiz settings.
bool$dryrunif true, do a pretend regrade, otherwise do it for real.
array$groupstudentsblank for all attempts, otherwise regrade attempts for these users.
array$attemptidsblank for all attempts, otherwise only regrade attempts whose id is in this list.

Definition at line 421 of file report.php.

Here is the call graph for this function:

Here is the caller graph for this function:

regrade_attempts_needing_it ( quiz,
groupstudents 
) [protected]

Regrade those questions in those attempts that are marked as needing regrading in the quiz_overview_regrades table.

Parameters:
object$quizthe quiz settings.
array$groupstudentsblank for all attempts, otherwise regrade attempts for these users.

Definition at line 464 of file report.php.

Here is the call graph for this function:

Here is the caller graph for this function:

update_overall_grades ( quiz) [protected]

Update the final grades for all attempts. This method is used following a regrade.

Parameters:
object$quizthe quiz settings.
array$useridsonly update scores for these userids.
array$attemptidsattemptids only update scores for these attempt ids.

Definition at line 580 of file report.php.

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations