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

Public Member Functions

 __construct ($uniqueid, $quiz, $context, $qmsubselect, $qmfilter, $attemptsmode, $groupstudents, $students, $questions, $includecheckboxes, $reporturl, $displayoptions)
 col_checkbox ($attempt)
 col_picture ($attempt)
 col_fullname ($attempt)
 col_timestart ($attempt)
 col_timefinish ($attempt)
 col_duration ($attempt)
 col_feedbacktext ($attempt)
 get_row_class ($attempt)
 make_review_link ($data, $attempt, $slot)
 base_sql ($reportstudents)
 query_db ($pagesize, $useinitialsbar=true)
 get_sort_columns ()
 wrap_html_start ()
 wrap_html_finish ()

Data Fields

 $useridfield = 'userid'

Protected Member Functions

 icon_for_fraction ($fraction)
 load_question_latest_steps (qubaid_condition $qubaids)
 requires_latest_steps_loaded ()
 is_latest_step_column ($column)
 get_required_latest_state_fields ($slot, $alias)
 add_latest_state_join ($slot)
 get_qubaids_condition ()
 submit_buttons ()

Protected Attributes

 $reporturl
 $displayoptions
 $lateststeps = null
 $quiz
 $context
 $qmsubselect
 $qmfilter
 $attemptsmode
 $groupstudents
 $students
 $questions
 $includecheckboxes

Detailed Description

Base class for the table used by quiz_attempt_reports.

Definition at line 298 of file attemptsreport.php.


Constructor & Destructor Documentation

__construct ( uniqueid,
quiz,
context,
qmsubselect,
qmfilter,
attemptsmode,
groupstudents,
students,
questions,
includecheckboxes,
reporturl,
displayoptions 
)

Reimplemented in quiz_report_overview_table.

Definition at line 323 of file attemptsreport.php.


Member Function Documentation

add_latest_state_join ( slot) [protected]

Add the information about the latest state of the question with slot $slot to the query.

The extra information is added as a join to a 'table' with alias qa$slot, with columns that are a union of the columns of the question_attempts and question_attempts_states tables.

Parameters:
int$slotthe question to add information for.

Definition at line 622 of file attemptsreport.php.

Here is the call graph for this function:

Here is the caller graph for this function:

base_sql ( reportstudents)

Contruct all the parts of the main database query.

Parameters:
array$reportstudentslist if userids of users to include in the report.
Returns:
array with 4 elements ($fields, $from, $where, $params) that can be used to build the actual database query.

Definition at line 535 of file attemptsreport.php.

Here is the call graph for this function:

Here is the caller graph for this function:

col_checkbox ( attempt)

Definition at line 340 of file attemptsreport.php.

col_duration ( attempt)

Definition at line 387 of file attemptsreport.php.

Here is the call graph for this function:

col_feedbacktext ( attempt)

Definition at line 397 of file attemptsreport.php.

Here is the call graph for this function:

col_fullname ( row)

Fullname is treated as a special columname in tablelib and should always be treated the same as the fullname of a user. $this->useridfield if the userid field is not expected to be id then you need to override $this->useridfield to point at the correct field for the user id.

Reimplemented from flexible_table.

Definition at line 360 of file attemptsreport.php.

Here is the call graph for this function:

col_picture ( attempt)

Definition at line 348 of file attemptsreport.php.

col_timefinish ( attempt)

Definition at line 379 of file attemptsreport.php.

Here is the call graph for this function:

col_timestart ( attempt)

Definition at line 371 of file attemptsreport.php.

Here is the call graph for this function:

get_qubaids_condition ( ) [protected]

Get an appropriate qubaid_condition for loading more data about the attempts we are displaying.

Returns:
qubaid_condition

Definition at line 652 of file attemptsreport.php.

Here is the call graph for this function:

Here is the caller graph for this function:

get_required_latest_state_fields ( slot,
alias 
) [protected]

Get any fields that might be needed when sorting on date for a particular slot.

Parameters:
int$slotthe slot for the column we want.
string$aliasthe table alias for latest state information relating to that slot.

Reimplemented in quiz_report_overview_table, and quiz_report_responses_table.

Definition at line 525 of file attemptsreport.php.

Here is the caller graph for this function:

get_row_class ( row)

Get any extra classes names to add to this row in the HTML.

Parameters:
$rowarray the data for this row.
Returns:
string added to the class="" attribute of the tr.

Reimplemented from table_sql.

Definition at line 413 of file attemptsreport.php.

Get the columns to sort by, in the form required by construct_order_by().

Returns:
array column name => SORT_... constant.

Reimplemented from flexible_table.

Definition at line 692 of file attemptsreport.php.

Here is the caller graph for this function:

icon_for_fraction ( fraction) [protected]

Return an appropriate icon (green tick, red cross, etc.) for a grade.

Parameters:
float$fractiongrade on a scale 0..1.
Returns:
string html fragment.

Definition at line 464 of file attemptsreport.php.

Here is the call graph for this function:

Here is the caller graph for this function:

is_latest_step_column ( column) [protected]

Is this a column that depends on joining to the latest state information? If so, return the corresponding slot. If not, return false.

Parameters:
string$columna column name
Returns:
int false if no, else a slot.

Reimplemented in quiz_report_overview_table, and quiz_report_responses_table.

Definition at line 516 of file attemptsreport.php.

Here is the caller graph for this function:

load_question_latest_steps ( qubaid_condition qubaids) [protected]

Load information about the latest state of selected questions in selected attempts.

The results are returned as an two dimensional array $qubaid => $slot => $dataobject

Parameters:
qubaid_condition$qubaidsused to restrict which usages are included in the query. See qubaid_condition.
array$slotsA list of slots for the questions you want to konw about.
Returns:
array of records. See the SQL in this function to see the fields available.

Definition at line 490 of file attemptsreport.php.

Here is the caller graph for this function:

make_review_link ( data,
attempt,
slot 
)

Make a link to review an individual question in a popup window.

Parameters:
string$dataHTML fragment. The text to make into the link.
object$attemptdata for the row of the table being output.
int$slotthe number used to identify this question within this usage.

Definition at line 428 of file attemptsreport.php.

Here is the call graph for this function:

Here is the caller graph for this function:

query_db ( pagesize,
useinitialsbar = true 
)

Query the db. Store results in the table object for use by build_table.

Parameters:
int$pagesizesize of page for paginated displayed table.
bool$useinitialsbardo you want to use the initials bar. Bar will only be used if there is a fullname column defined for the table.

Reimplemented from table_sql.

Reimplemented in quiz_report_overview_table.

Definition at line 674 of file attemptsreport.php.

Here is the call graph for this function:

Returns:
bool should query_db() call load_question_latest_steps?

Reimplemented in quiz_report_overview_table, and quiz_report_responses_table.

Definition at line 506 of file attemptsreport.php.

Here is the caller graph for this function:

submit_buttons ( ) [protected]

Output any submit buttons required by the $this->includecheckboxes form.

Reimplemented in quiz_report_overview_table.

Definition at line 736 of file attemptsreport.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Hook that can be overridden in child classes to wrap a table in a form for example. Called only when there is data to display and not downloading.

Reimplemented from flexible_table.

Definition at line 715 of file attemptsreport.php.

Here is the call graph for this function:

Hook that can be overridden in child classes to wrap a table in a form for example. Called only when there is data to display and not downloading.

Reimplemented from flexible_table.

Definition at line 700 of file attemptsreport.php.

Here is the call graph for this function:


Field Documentation

$attemptsmode [protected]

Definition at line 317 of file attemptsreport.php.

$context [protected]

Definition at line 314 of file attemptsreport.php.

$displayoptions [protected]

Definition at line 305 of file attemptsreport.php.

$groupstudents [protected]

Definition at line 318 of file attemptsreport.php.

$includecheckboxes [protected]

Definition at line 321 of file attemptsreport.php.

$lateststeps = null [protected]

Definition at line 311 of file attemptsreport.php.

$qmfilter [protected]

Definition at line 316 of file attemptsreport.php.

$qmsubselect [protected]

Definition at line 315 of file attemptsreport.php.

$questions [protected]

Definition at line 320 of file attemptsreport.php.

$quiz [protected]

Definition at line 313 of file attemptsreport.php.

$reporturl [protected]

Definition at line 302 of file attemptsreport.php.

$students [protected]

Definition at line 319 of file attemptsreport.php.

$useridfield = 'userid'

Reimplemented from flexible_table.

Definition at line 299 of file attemptsreport.php.


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