mirror of
https://github.com/moodle/moodle.git
synced 2025-02-01 05:18:06 +01:00
MDL-32322 quiz reports: fix PHPdoc comments. Thanks Smurf.
This commit is contained in:
parent
c0270961a8
commit
9d58dae33b
@ -91,7 +91,8 @@ abstract class quiz_attempts_report extends quiz_default_report {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return moodle_url the base URL for this report.
|
||||
* Get the base URL for this report.
|
||||
* @return moodle_url the URL.
|
||||
*/
|
||||
protected function get_base_url() {
|
||||
return new moodle_url('/mod/quiz/report.php',
|
||||
|
@ -74,8 +74,10 @@ class mod_quiz_attempts_report_options {
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
* @param string $mode which report these options are for.
|
||||
* @param object $quiz the settings for the quiz being reported on.
|
||||
* @param object $cm the course module objects for the quiz being reported on.
|
||||
* @param object $coures the course settings for the coures this quiz is in.
|
||||
*/
|
||||
public function __construct($mode, $quiz, $cm, $course) {
|
||||
$this->mode = $mode;
|
||||
@ -87,7 +89,8 @@ class mod_quiz_attempts_report_options {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array the URL parameters required to show the report with these options.
|
||||
* Get the URL parameters required to show the report with these options.
|
||||
* @return array URL parameter name => value.
|
||||
*/
|
||||
protected function get_url_params() {
|
||||
return array(
|
||||
@ -99,7 +102,8 @@ class mod_quiz_attempts_report_options {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return moodle_url the URL to show the report with these options.
|
||||
* Get the URL to show the report with these options.
|
||||
* @return moodle_url the URL.
|
||||
*/
|
||||
public function get_url() {
|
||||
return new moodle_url('/mod/quiz/report.php', $this->get_url_params());
|
||||
|
@ -49,17 +49,48 @@ abstract class quiz_attempts_report_table extends table_sql {
|
||||
*/
|
||||
protected $lateststeps = null;
|
||||
|
||||
/** @var object the quiz settings for the quiz we are reporting on. */
|
||||
protected $quiz;
|
||||
|
||||
/** @var context the quiz context. */
|
||||
protected $context;
|
||||
|
||||
/** @var string HTML fragment to select the first/best/last attempt, if appropriate. */
|
||||
protected $qmsubselect;
|
||||
|
||||
/** @var object mod_quiz_attempts_report_options the options affecting this report. */
|
||||
protected $options;
|
||||
|
||||
/** @var bool whether to only display the first/best/last attempt for each student. */
|
||||
protected $qmfilter;
|
||||
|
||||
/** @var int which attempts/students to include in the report.. */
|
||||
protected $attemptsmode;
|
||||
|
||||
/** @var object the ids of the students in the currently selected group, if applicable. */
|
||||
protected $groupstudents;
|
||||
|
||||
/** @var object the ids of the students in the course. */
|
||||
protected $students;
|
||||
|
||||
/** @var object the questions that comprise this quiz.. */
|
||||
protected $questions;
|
||||
|
||||
/** @var bool whether to include the column with checkboxes to select each attempt. */
|
||||
protected $includecheckboxes;
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
public function __construct($uniqueid, $quiz, $context, $qmsubselect,
|
||||
mod_quiz_attempts_report_options $options, $groupstudents, $students,
|
||||
$questions, $reporturl) {
|
||||
@ -77,6 +108,11 @@ abstract class quiz_attempts_report_table extends table_sql {
|
||||
$this->options = $options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate the display of the checkbox column.
|
||||
* @param object $attempt the table row being output.
|
||||
* @return string HTML content to go inside the td.
|
||||
*/
|
||||
public function col_checkbox($attempt) {
|
||||
if ($attempt->attempt) {
|
||||
return '<input type="checkbox" name="attemptid[]" value="'.$attempt->attempt.'" />';
|
||||
@ -85,6 +121,11 @@ abstract class quiz_attempts_report_table extends table_sql {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
public function col_picture($attempt) {
|
||||
global $OUTPUT;
|
||||
$user = new stdClass();
|
||||
@ -97,6 +138,11 @@ abstract class quiz_attempts_report_table extends table_sql {
|
||||
return $OUTPUT->user_picture($user);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
public function col_fullname($attempt) {
|
||||
$html = parent::col_fullname($attempt);
|
||||
if ($this->is_downloading()) {
|
||||
@ -108,6 +154,11 @@ abstract class quiz_attempts_report_table extends table_sql {
|
||||
get_string('reviewattempt', 'quiz'), array('class' => 'reviewlink'));
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
public function col_timestart($attempt) {
|
||||
if ($attempt->attempt) {
|
||||
return userdate($attempt->timestart, $this->strtimeformat);
|
||||
@ -116,6 +167,11 @@ abstract class quiz_attempts_report_table extends table_sql {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
public function col_timefinish($attempt) {
|
||||
if ($attempt->attempt && $attempt->timefinish) {
|
||||
return userdate($attempt->timefinish, $this->strtimeformat);
|
||||
@ -124,6 +180,11 @@ abstract class quiz_attempts_report_table extends table_sql {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
public function col_duration($attempt) {
|
||||
if ($attempt->timefinish) {
|
||||
return format_time($attempt->timefinish - $attempt->timestart);
|
||||
@ -134,6 +195,11 @@ abstract class quiz_attempts_report_table extends table_sql {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate the display of the feedback column.
|
||||
* @param object $attempt the table row being output.
|
||||
* @return string HTML content to go inside the td.
|
||||
*/
|
||||
public function col_feedbacktext($attempt) {
|
||||
if (!$attempt->timefinish) {
|
||||
return '-';
|
||||
@ -224,7 +290,6 @@ abstract class quiz_attempts_report_table extends table_sql {
|
||||
*
|
||||
* @param qubaid_condition $qubaids used to restrict which usages are included
|
||||
* in the query. See {@link qubaid_condition}.
|
||||
* @param array $slots A list of slots for the questions you want to konw about.
|
||||
* @return array of records. See the SQL in this function to see the fields available.
|
||||
*/
|
||||
protected function load_question_latest_steps(qubaid_condition $qubaids) {
|
||||
@ -241,6 +306,8 @@ abstract class quiz_attempts_report_table extends table_sql {
|
||||
}
|
||||
|
||||
/**
|
||||
* Does this report require the detailed information for each question from the
|
||||
* question_attempts_steps table?
|
||||
* @return bool should {@link query_db()} call {@link load_question_latest_steps}?
|
||||
*/
|
||||
protected function requires_latest_steps_loaded() {
|
||||
|
@ -38,6 +38,17 @@ class quiz_overview_table extends quiz_attempts_report_table {
|
||||
|
||||
protected $regradedqs = array();
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param object $quiz
|
||||
* @param context $context
|
||||
* @param string $qmsubselect
|
||||
* @param quiz_overview_options $options
|
||||
* @param array $groupstudents
|
||||
* @param array $students
|
||||
* @param array $questions
|
||||
* @param moodle_url $reporturl
|
||||
*/
|
||||
public function __construct($quiz, $context, $qmsubselect,
|
||||
quiz_overview_options $options, $groupstudents, $students, $questions, $reporturl) {
|
||||
parent::__construct('mod-quiz-report-overview-report', $quiz , $context,
|
||||
|
@ -36,6 +36,17 @@ require_once($CFG->dirroot . '/mod/quiz/report/attemptsreport_table.php');
|
||||
*/
|
||||
class quiz_responses_table extends quiz_attempts_report_table {
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param object $quiz
|
||||
* @param context $context
|
||||
* @param string $qmsubselect
|
||||
* @param quiz_responses_options $options
|
||||
* @param array $groupstudents
|
||||
* @param array $students
|
||||
* @param array $questions
|
||||
* @param moodle_url $reporturl
|
||||
*/
|
||||
public function __construct($quiz, $context, $qmsubselect, quiz_responses_options $options,
|
||||
$groupstudents, $students, $questions, $reporturl) {
|
||||
parent::__construct('mod-quiz-report-responses-report', $quiz, $context,
|
||||
|
Loading…
x
Reference in New Issue
Block a user