Merge branch 'MDL-53778_37' of https://github.com/stronk7/moodle into MOODLE_37_STABLE
This commit is contained in:
@@ -25,8 +25,8 @@ Feature: Set a quiz to be marked complete when the student uses all attempts all
|
||||
| questioncategory | qtype | name | questiontext |
|
||||
| Test questions | truefalse | First question | Answer the first question |
|
||||
And the following "activities" exist:
|
||||
| activity | name | course | idnumber | attempts | gradepass | completion | completionattemptsexhausted |
|
||||
| quiz | Test quiz name | C1 | quiz1 | 2 | 5.00 | 2 | 1 |
|
||||
| activity | name | course | idnumber | attempts | gradepass | completion | completionusegrade | completionpass | completionattemptsexhausted |
|
||||
| quiz | Test quiz name | C1 | quiz1 | 2 | 5.00 | 2 | 1 | 1 | 1 |
|
||||
And quiz "Test quiz name" contains the following questions:
|
||||
| question | page |
|
||||
| First question | 1 |
|
||||
|
||||
@@ -25,8 +25,8 @@ Feature: Set a quiz to be marked complete when the student passes
|
||||
| questioncategory | qtype | name | questiontext |
|
||||
| Test questions | truefalse | First question | Answer the first question |
|
||||
And the following "activities" exist:
|
||||
| activity | name | course | idnumber | attempts | gradepass | completion | completionpass |
|
||||
| quiz | Test quiz name | C1 | quiz1 | 4 | 5.00 | 2 | 1 |
|
||||
| activity | name | course | idnumber | attempts | gradepass | completion | completionusegrade | completionpass |
|
||||
| quiz | Test quiz name | C1 | quiz1 | 4 | 5.00 | 2 | 1 | 1 |
|
||||
And quiz "Test quiz name" contains the following questions:
|
||||
| question | page |
|
||||
| First question | 1 |
|
||||
|
||||
@@ -166,6 +166,7 @@ class mod_quiz_lib_testcase extends advanced_testcase {
|
||||
'questionsperpage' => 0,
|
||||
'sumgrades' => 1,
|
||||
'completion' => COMPLETION_TRACKING_AUTOMATIC,
|
||||
'completionusegrade' => 1,
|
||||
'completionpass' => 1);
|
||||
$quiz = $quizgenerator->create_instance($data);
|
||||
$cm = get_coursemodule_from_id('quiz', $quiz->cmid);
|
||||
@@ -880,14 +881,14 @@ class mod_quiz_lib_testcase extends advanced_testcase {
|
||||
$quiz1 = $this->getDataGenerator()->create_module('quiz', [
|
||||
'course' => $course->id,
|
||||
'completion' => 2,
|
||||
'completionusegrade' => 1,
|
||||
'completionattemptsexhausted' => 1,
|
||||
'completionpass' => 1
|
||||
]);
|
||||
$quiz2 = $this->getDataGenerator()->create_module('quiz', [
|
||||
'course' => $course->id,
|
||||
'completion' => 2,
|
||||
'completionattemptsexhausted' => 0,
|
||||
'completionpass' => 0
|
||||
'completionusegrade' => 0
|
||||
]);
|
||||
$cm1 = cm_info::create(get_coursemodule_from_instance('quiz', $quiz1->id));
|
||||
$cm2 = cm_info::create(get_coursemodule_from_instance('quiz', $quiz2->id));
|
||||
|
||||
Reference in New Issue
Block a user