MDL-62610 mod_quiz: fix CiBoT issues

This commit is contained in:
Simey Lameze 2018-10-01 08:27:28 +08:00
parent 0ce3fef70a
commit 73aefa6bfc
3 changed files with 12 additions and 2 deletions

View file

@ -134,6 +134,9 @@ class quiz_statistics_table extends flexible_table {
parent::setup(); parent::setup();
} }
/**
* Open a div tag to wrap statistics table.
*/
public function wrap_html_start() { public function wrap_html_start() {
// Horrible Moodle 2.0 wide-content work-around. // Horrible Moodle 2.0 wide-content work-around.
if (!$this->is_downloading()) { if (!$this->is_downloading()) {
@ -142,6 +145,9 @@ class quiz_statistics_table extends flexible_table {
} }
} }
/**
* Close a statistics table div.
*/
public function wrap_html_finish() { public function wrap_html_finish() {
if (!$this->is_downloading()) { if (!$this->is_downloading()) {
echo html_writer::end_tag('div'); echo html_writer::end_tag('div');

View file

@ -702,8 +702,8 @@ class behat_mod_quiz extends behat_question_base {
* to force either which random question was chose, or which random variant * to force either which random question was chose, or which random variant
* was used, as for {@link user_has_attempted_with_responses()} above. * was used, as for {@link user_has_attempted_with_responses()} above.
* *
* @param string $quizname the name of the quiz the user will attempt.
* @param string $username the username of the user that will attempt. * @param string $username the username of the user that will attempt.
* @param string $quizname the name of the quiz the user will attempt.
* @param TableNode $attemptinfo information about the questions to add, as above. * @param TableNode $attemptinfo information about the questions to add, as above.
* @Given /^user "([^"]*)" has started an attempt at quiz "([^"]*) randomised as follows:"$/ * @Given /^user "([^"]*)" has started an attempt at quiz "([^"]*) randomised as follows:"$/
*/ */
@ -773,8 +773,8 @@ class behat_mod_quiz extends behat_question_base {
* There is no need to supply answers to all questions. If so, other questions will be * There is no need to supply answers to all questions. If so, other questions will be
* left unanswered. * left unanswered.
* *
* @param string $quizname the name of the quiz the user will attempt.
* @param string $username the username of the user that will attempt. * @param string $username the username of the user that will attempt.
* @param string $quizname the name of the quiz the user will attempt.
* @param TableNode $attemptinfo information about the questions to add, as above. * @param TableNode $attemptinfo information about the questions to add, as above.
* @throws \Behat\Mink\Exception\ExpectationException * @throws \Behat\Mink\Exception\ExpectationException
* @Given /^user "([^"]*)" has checked answers in their attempt at quiz "([^"]*)":$/ * @Given /^user "([^"]*)" has checked answers in their attempt at quiz "([^"]*)":$/

View file

@ -97,6 +97,8 @@ class core_question_calculated_question_summary_testcase extends advanced_testca
} }
/** /**
* Unit test for get_min_max_of() method.
*
* @dataProvider get_min_max_provider * @dataProvider get_min_max_provider
*/ */
public function test_get_min_max_of($subqstats, $expected) { public function test_get_min_max_of($subqstats, $expected) {
@ -148,6 +150,8 @@ class core_question_calculated_question_summary_testcase extends advanced_testca
} }
/** /**
* Unit test for get_min_max_of_sd() method.
*
* @dataProvider get_sd_min_max_provider * @dataProvider get_sd_min_max_provider
*/ */
public function test_get_min_max_of_sd($subqstats, $expected) { public function test_get_min_max_of_sd($subqstats, $expected) {