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

Protected Member Functions

 should_show_grades ($quiz)
 load_relevant_students ($cm, $course=null)
 validate_common_options (&$attemptsmode, &$pagesize, $course, $currentgroup)
 add_user_columns ($table, &$columns, &$headers)
 configure_user_columns ($table)
 add_time_columns (&$columns, &$headers)
 add_grade_columns ($quiz, &$columns, &$headers, $includefeedback=true)
 set_up_table_columns ($table, $columns, $headers, $reporturl, $displayoptions, $collapsible)
 delete_selected_attempts ($quiz, $cm, $attemptids, $allowed)

Protected Attributes

 $context
 $showgrades = null

Detailed Description

Base class for quiz reports that are basically a table with one row for each attempt.

Definition at line 40 of file attemptsreport.php.


Member Function Documentation

add_grade_columns ( quiz,
&$  columns,
&$  headers,
includefeedback = true 
) [protected]

Add all the grade and feedback columns, if applicable, to the $columns and $headers arrays.

Parameters:
object$quizthe quiz settings.
array$columnsthe list of columns. Added to.
array$headersthe columns headings. Added to.
bool$includefeedbackwhether to include the feedbacktext columns

Definition at line 222 of file attemptsreport.php.

Here is the call graph for this function:

Here is the caller graph for this function:

add_time_columns ( &$  columns,
&$  headers 
) [protected]

Add all the time-related columns to the $columns and $headers arrays.

Parameters:
array$columnsthe list of columns. Added to.
array$headersthe columns headings. Added to.

Definition at line 203 of file attemptsreport.php.

Here is the caller graph for this function:

add_user_columns ( table,
&$  columns,
&$  headers 
) [protected]

Add all the user-related columns to the $columns and $headers arrays.

Parameters:
table_sql$tablethe table being constructed.
array$columnsthe list of columns. Added to.
array$headersthe columns headings. Added to.

Definition at line 146 of file attemptsreport.php.

Here is the call graph for this function:

Here is the caller graph for this function:

configure_user_columns ( table) [protected]

Set the display options for the user-related columns in the table.

Parameters:
table_sql$tablethe table being constructed.

Definition at line 187 of file attemptsreport.php.

Here is the caller graph for this function:

delete_selected_attempts ( quiz,
cm,
attemptids,
allowed 
) [protected]

Delete the quiz attempts

Parameters:
object$quizthe quiz settings. Attempts that don't belong to this quiz are not deleted.
object$cmthe course_module object.
array$attemptidsthe list of attempt ids to delete.
array$allowedThis list of userids that are visible in the report. Users can only delete attempts that they are allowed to see in the report. Empty means all users.

Definition at line 272 of file attemptsreport.php.

Here is the call graph for this function:

Here is the caller graph for this function:

load_relevant_students ( cm,
course = null 
) [protected]

Get information about which students to show in the report.

Parameters:
object$cmthe coures module.
object$coursethe course settings.
Returns:
an array with four elements: 0 => integer the current group id (0 for none). 1 => array ids of all the students in this course. 2 => array ids of all the students in the current group. 3 => array ids of all the students to show in the report. Will be the same as either element 1 or 2.

Definition at line 83 of file attemptsreport.php.

Here is the call graph for this function:

Here is the caller graph for this function:

set_up_table_columns ( table,
columns,
headers,
reporturl,
displayoptions,
collapsible 
) [protected]

Set up the table.

Parameters:
table_sql$tablethe table being constructed.
array$columnsthe list of columns.
array$headersthe columns headings.
moodle_url$reporturlthe URL of this report.
array$displayoptionsthe display options.
bool$collapsiblewhether to allow columns in the report to be collapsed.

Definition at line 244 of file attemptsreport.php.

Here is the call graph for this function:

Here is the caller graph for this function:

should_show_grades ( quiz) [protected]

Should the grades be displayed in this report. That depends on the quiz display options, and whether the quiz is graded.

Parameters:
object$quizthe quiz settings.
Returns:
bool

Definition at line 53 of file attemptsreport.php.

Here is the call graph for this function:

Here is the caller graph for this function:

validate_common_options ( &$  attemptsmode,
&$  pagesize,
course,
currentgroup 
) [protected]

Alters $attemptsmode and $pagesize if the current values are inappropriate.

Parameters:
int$attemptsmodewhat sort of attempts to display (may be updated)
int$pagesizenumber of records to display per page (may be updated)
object$coursethe course settings.
int$currentgroupthe currently selected group. 0 for none.

Definition at line 121 of file attemptsreport.php.

Here is the caller graph for this function:


Field Documentation

$context [protected]

Definition at line 42 of file attemptsreport.php.

$showgrades = null [protected]

Definition at line 45 of file attemptsreport.php.


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