[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

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

Base class for the table used by a {@link quiz_attempts_report}.

Copyright: 2010 The Open University
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 603 lines (22 kb)
Included or required:0 times
Referenced: 2 times
Includes or requires: 0 files

Defines 29 functions

  __construct()
  col_checkbox()
  col_picture()
  col_fullname()
  col_state()
  col_timestart()
  col_timefinish()
  col_duration()
  col_feedbacktext()
  get_row_class()
  make_review_link()
  slot_state()
  is_flagged()
  slot_fraction()
  icon_for_fraction()
  load_extra_data()
  load_question_latest_steps()
  requires_extra_data()
  requires_latest_steps_loaded()
  is_latest_step_column()
  get_required_latest_state_fields()
  base_sql()
  add_latest_state_join()
  get_qubaids_condition()
  query_db()
  get_sort_columns()
  wrap_html_start()
  wrap_html_finish()
  submit_buttons()

Functions
Functions that are not part of a class:

__construct($uniqueid, $quiz, $context, $qmsubselect,mod_quiz_attempts_report_options $options, $groupstudents, $students,$questions, $reporturl)   X-Ref
Constructor

param: string $uniqueid
param: object $quiz
param: context $context
param: string $qmsubselect
param: mod_quiz_attempts_report_options $options
param: array $groupstudents
param: array $students
param: array $questions
param: moodle_url $reporturl

col_checkbox($attempt)   X-Ref
Generate the display of the checkbox column.

param: object $attempt the table row being output.
return: string HTML content to go inside the td.

col_picture($attempt)   X-Ref
Generate the display of the user's picture column.

param: object $attempt the table row being output.
return: string HTML content to go inside the td.

col_fullname($attempt)   X-Ref
Generate the display of the user's full name column.

param: object $attempt the table row being output.
return: string HTML content to go inside the td.

col_state($attempt)   X-Ref
Generate the display of the attempt state column.

param: object $attempt the table row being output.
return: string HTML content to go inside the td.

col_timestart($attempt)   X-Ref
Generate the display of the start time column.

param: object $attempt the table row being output.
return: string HTML content to go inside the td.

col_timefinish($attempt)   X-Ref
Generate the display of the finish time column.

param: object $attempt the table row being output.
return: string HTML content to go inside the td.

col_duration($attempt)   X-Ref
Generate the display of the time taken column.

param: object $attempt the table row being output.
return: string HTML content to go inside the td.

col_feedbacktext($attempt)   X-Ref
Generate the display of the feedback column.

param: object $attempt the table row being output.
return: string HTML content to go inside the td.

get_row_class($attempt)   X-Ref
No description

make_review_link($data, $attempt, $slot)   X-Ref
Make a link to review an individual question in a popup window.

param: string $data HTML fragment. The text to make into the link.
param: object $attempt data for the row of the table being output.
param: int $slot the number used to identify this question within this usage.

slot_state($attempt, $slot)   X-Ref

param: object $attempt the row data
param: int $slot
return: question_state

is_flagged($questionusageid, $slot)   X-Ref

param: int $questionusageid
param: int $slot
return: bool

slot_fraction($attempt, $slot)   X-Ref

param: object $attempt the row data
param: int $slot
return: float

icon_for_fraction($fraction)   X-Ref
Return an appropriate icon (green tick, red cross, etc.) for a grade.

param: float $fraction grade on a scale 0..1.
return: string html fragment.

load_extra_data()   X-Ref
Load any extra data after main query. At this point you can call {@link get_qubaids_condition} to get the condition that
limits the query to just the question usages shown in this report page or alternatively for all attempts if downloading a
full report.


load_question_latest_steps(qubaid_condition $qubaids = null)   X-Ref
Load information about the latest state of selected questions in selected attempts.

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

param: qubaid_condition|null $qubaids used to restrict which usages are included
return: array of records. See the SQL in this function to see the fields available.

requires_extra_data()   X-Ref
Does this report require loading any more data after the main query. After the main query then
you can use $this->get

return: bool should {@link query_db()} call {@link load_extra_data}?

requires_latest_steps_loaded()   X-Ref
Does this report require the detailed information for each question from the
question_attempts_steps table?

return: bool should {@link load_extra_data} call {@link load_question_latest_steps}?

is_latest_step_column($column)   X-Ref
Is this a column that depends on joining to the latest state information?
If so, return the corresponding slot. If not, return false.

param: string $column a column name
return: int false if no, else a slot.

get_required_latest_state_fields($slot, $alias)   X-Ref
Get any fields that might be needed when sorting on date for a particular slot.

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

base_sql($reportstudents)   X-Ref
Contruct all the parts of the main database query.

param: array $reportstudents list if userids of users to include in the report.
return: array with 4 elements ($fields, $from, $where, $params) that can be used to

add_latest_state_join($slot)   X-Ref
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.

param: int $slot the question to add information for.

get_qubaids_condition()   X-Ref
Get an appropriate qubaid_condition for loading more data about the
attempts we are displaying.

return: qubaid_condition

query_db($pagesize, $useinitialsbar = true)   X-Ref
No description

get_sort_columns()   X-Ref
No description

wrap_html_start()   X-Ref
No description

wrap_html_finish()   X-Ref
No description

submit_buttons()   X-Ref
Output any submit buttons required by the $this->includecheckboxes form.




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