mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-59068 lesson: Revert MDL-54849
MDL-54859 made the 'wrong jump' setting useless, since clicking 'No' always sends the user to the next page.
This commit is contained in:
parent
9e7afbbc6c
commit
18f3d7667b
2 changed files with 1 additions and 44 deletions
|
@ -118,9 +118,7 @@ if (!$result->correctanswer && !$result->noanswer && !$result->isessayquestion &
|
||||||
|
|
||||||
$url = new moodle_url('/mod/lesson/view.php', array('id'=>$cm->id, 'pageid'=>$result->newpageid));
|
$url = new moodle_url('/mod/lesson/view.php', array('id'=>$cm->id, 'pageid'=>$result->newpageid));
|
||||||
if ($lesson->review && !$result->correctanswer && !$result->noanswer && !$result->isessayquestion && !$result->maxattemptsreached) {
|
if ($lesson->review && !$result->correctanswer && !$result->noanswer && !$result->isessayquestion && !$result->maxattemptsreached) {
|
||||||
// When the answer is wrong - the result->newpageid points back to the current question.
|
// Button to continue the lesson (the page to go is configured by the teacher).
|
||||||
$newpageid = $lesson->calculate_new_page_on_jump($page, $page->nextpageid);
|
|
||||||
$url = new moodle_url('/mod/lesson/view.php', array('id'=>$cm->id, 'pageid'=>$newpageid));
|
|
||||||
echo $OUTPUT->single_button($url, get_string('reviewquestioncontinue', 'lesson'));
|
echo $OUTPUT->single_button($url, get_string('reviewquestioncontinue', 'lesson'));
|
||||||
} else {
|
} else {
|
||||||
// Normal continue button
|
// Normal continue button
|
||||||
|
|
|
@ -114,47 +114,6 @@ Feature: In a lesson activity, students can not re-attempt a question more than
|
||||||
When I press "Submit"
|
When I press "Submit"
|
||||||
Then I should see "Maximum number of attempts reached - Moving to next page"
|
Then I should see "Maximum number of attempts reached - Moving to next page"
|
||||||
|
|
||||||
Scenario: Check that we can move past a question we don't want to re-attempt
|
|
||||||
Given I log in as "teacher1"
|
|
||||||
And I am on "Course 1" course homepage
|
|
||||||
And I follow "Test lesson name"
|
|
||||||
And I navigate to "Edit settings" in current page administration
|
|
||||||
And I expand all fieldsets
|
|
||||||
And I set the field "Provide option to try a question again" to "Yes"
|
|
||||||
And I set the field "Maximum number of attempts" to "3"
|
|
||||||
And I press "Save and display"
|
|
||||||
And I log out
|
|
||||||
And I log in as "student1"
|
|
||||||
And I am on "Course 1" course homepage
|
|
||||||
And I follow "Test lesson name"
|
|
||||||
And I should see "First page contents"
|
|
||||||
And I press "Next page"
|
|
||||||
And I should see "The earth is round"
|
|
||||||
And I set the following fields to these values:
|
|
||||||
| False| 1 |
|
|
||||||
And I press "Submit"
|
|
||||||
And I should see "Wrong"
|
|
||||||
When I press "No, I just want to go on to the next question"
|
|
||||||
Then I should not see "The earth is round"
|
|
||||||
And I should see "Kermit is a frog"
|
|
||||||
And I set the following fields to these values:
|
|
||||||
| False | 1 |
|
|
||||||
And I press "Submit"
|
|
||||||
And I should see "Wrong"
|
|
||||||
And I press "Yes, I'd like to try again"
|
|
||||||
And I should see "Kermit is a frog"
|
|
||||||
And I set the following fields to these values:
|
|
||||||
| False | 1 |
|
|
||||||
And I press "Submit"
|
|
||||||
And I should see "Wrong"
|
|
||||||
And I press "Yes, I'd like to try again"
|
|
||||||
And I should see "Kermit is a frog"
|
|
||||||
And I set the following fields to these values:
|
|
||||||
| False | 1 |
|
|
||||||
And I press "Submit"
|
|
||||||
And I should not see "Yes, I'd like to try again"
|
|
||||||
And I should see "Continue"
|
|
||||||
|
|
||||||
@javascript @_bug_phantomjs
|
@javascript @_bug_phantomjs
|
||||||
Scenario: Check that we can not click back on the browser at the last quiz result page and re-attempt the last question to get full marks
|
Scenario: Check that we can not click back on the browser at the last quiz result page and re-attempt the last question to get full marks
|
||||||
Given I log in as "student1"
|
Given I log in as "student1"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue