stronk7

Untitled

Mar 27th, 2019
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.13 KB | None | 0 0
  1. stronk7@~/git_moodle/moodle (phpunit70 *$%)$ git diff mod/quiz
  2. diff --git a/mod/quiz/tests/attempt_walkthrough_from_csv_test.php b/mod/quiz/tests/attempt_walkthrough_from_csv_test.php
  3. index 3556793f612..029dbd2ffb1 100644
  4. --- a/mod/quiz/tests/attempt_walkthrough_from_csv_test.php
  5. +++ b/mod/quiz/tests/attempt_walkthrough_from_csv_test.php
  6. @@ -338,7 +338,7 @@ class mod_quiz_attempt_walkthrough_from_csv_testcase extends advanced_testcase {
  7.                      $this->assertEquals((bool)$value, $attemptobj->is_finished());
  8.                      break;
  9.                  case 'summarks' :
  10. -                    $this->assertEquals($value, $attemptobj->get_sum_marks(), "Sum of marks of attempt {$result['quizattempt']}.");
  11. +                    $this->assertEquals((float)$value, $attemptobj->get_sum_marks(), "Sum of marks of attempt {$result['quizattempt']}.");
  12.                      break;
  13.                  case 'quizgrade' :
  14.                      // Check quiz grades.
  15. stronk7@~/git_moodle/moodle (phpunit70 *$%)$ git diff question
  16. diff --git a/question/type/multichoice/tests/helper.php b/question/type/multichoice/tests/helper.php
  17. index 27297541b5e..b665052ccb6 100644
  18. --- a/question/type/multichoice/tests/helper.php
  19. +++ b/question/type/multichoice/tests/helper.php
  20. @@ -80,7 +80,7 @@ class qtype_multichoice_test_helper extends question_test_helper {
  21.                  'id' => 13,
  22.                  'answer' => 'One',
  23.                  'answerformat' => FORMAT_PLAIN,
  24. -                'fraction' => '0.5',
  25. +                'fraction' => 0.5,
  26.                  'feedback' => 'One is odd.',
  27.                  'feedbackformat' => FORMAT_HTML,
  28.              ),
  29. @@ -88,7 +88,7 @@ class qtype_multichoice_test_helper extends question_test_helper {
  30.                  'id' => 14,
  31.                  'answer' => 'Two',
  32.                  'answerformat' => FORMAT_PLAIN,
  33. -                'fraction' => '0.0',
  34. +                'fraction' => 0.0,
  35.                  'feedback' => 'Two is even.',
  36.                  'feedbackformat' => FORMAT_HTML,
  37.              ),
  38. @@ -96,7 +96,7 @@ class qtype_multichoice_test_helper extends question_test_helper {
  39.                  'id' => 15,
  40.                  'answer' => 'Three',
  41.                  'answerformat' => FORMAT_PLAIN,
  42. -                'fraction' => '0.5',
  43. +                'fraction' => 0.5,
  44.                  'feedback' => 'Three is odd.',
  45.                  'feedbackformat' => FORMAT_HTML,
  46.              ),
  47. @@ -104,7 +104,7 @@ class qtype_multichoice_test_helper extends question_test_helper {
  48.                  'id' => 16,
  49.                  'answer' => 'Four',
  50.                  'answerformat' => FORMAT_PLAIN,
  51. -                'fraction' => '0.0',
  52. +                'fraction' => 0.0,
  53.                  'feedback' => 'Four is even.',
  54.                  'feedbackformat' => FORMAT_HTML,
  55.              ),
  56. @@ -261,7 +261,7 @@ class qtype_multichoice_test_helper extends question_test_helper {
  57.                  'id' => 13,
  58.                  'answer' => 'One',
  59.                  'answerformat' => FORMAT_PLAIN,
  60. -                'fraction' => '1',
  61. +                'fraction' => 1,
  62.                  'feedback' => 'One is the oddest.',
  63.                  'feedbackformat' => FORMAT_HTML,
  64.              ),
  65. @@ -269,7 +269,7 @@ class qtype_multichoice_test_helper extends question_test_helper {
  66.                  'id' => 14,
  67.                  'answer' => 'Two',
  68.                  'answerformat' => FORMAT_PLAIN,
  69. -                'fraction' => '0.0',
  70. +                'fraction' => 0.0,
  71.                  'feedback' => 'Two is even.',
  72.                  'feedbackformat' => FORMAT_HTML,
  73.              ),
  74. @@ -277,7 +277,7 @@ class qtype_multichoice_test_helper extends question_test_helper {
  75.                  'id' => 15,
  76.                  'answer' => 'Three',
  77.                  'answerformat' => FORMAT_PLAIN,
  78. -                'fraction' => '0',
  79. +                'fraction' => 0,
  80.                  'feedback' => 'Three is odd.',
  81.                  'feedbackformat' => FORMAT_HTML,
  82.              ),
  83. @@ -285,7 +285,7 @@ class qtype_multichoice_test_helper extends question_test_helper {
  84.                  'id' => 16,
  85.                  'answer' => 'Four',
  86.                  'answerformat' => FORMAT_PLAIN,
  87. -                'fraction' => '0.0',
  88. +                'fraction' => 0.0,
  89.                  'feedback' => 'Four is even.',
  90.                  'feedbackformat' => FORMAT_HTML,
  91.              ),
  92. diff --git a/question/type/multichoice/tests/upgradelibnewqe_test.php b/question/type/multichoice/tests/upgradelibnewqe_test.php
  93. index f6859b72c41..cd94e1a4cd4 100644
  94. --- a/question/type/multichoice/tests/upgradelibnewqe_test.php
  95. +++ b/question/type/multichoice/tests/upgradelibnewqe_test.php
  96. @@ -266,7 +266,7 @@ class qtype_multichoice_attempt_upgrader_test extends question_attempt_upgrader_
  97.                      'fraction' => 0.9,
  98.                      'timecreated' => 1278604597,
  99.                      'userid' => null,
  100. -                    'data' => array('-comment' => 'Well done!', '-mark' => '0.9', '-maxmark' => '1'),
  101. +                    'data' => array('-comment' => 'Well done!', '-mark' => '0.9', '-maxmark' => 1),
  102.                  ),
  103.              ),
  104.          );
Advertisement
Add Comment
Please, Sign In to add comment