From 7fe6acac9e35179438be43228b6c52c7f55d411f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luca=20B=C3=B6sch?= Date: Thu, 14 Jun 2018 08:26:10 +0200 Subject: [PATCH] MDL-32232 lesson: changing a page type chooser option for consistency --- mod/lesson/renderer.php | 2 +- .../behat/lesson_complete_report.feature | 8 ++++---- .../tests/behat/lesson_delete_answers.feature | 2 +- .../behat/lesson_informations_at_end.feature | 2 +- .../lesson_number_of_student_attempts.feature | 2 +- .../tests/behat/lesson_outline_report.feature | 6 +++--- .../behat/lesson_question_attempts.feature | 6 +++--- mod/lesson/tests/behat/lesson_report.feature | 4 ++-- mod/lesson/tests/behat/lesson_review.feature | 2 +- .../behat/lesson_student_dashboard.feature | 10 +++++----- .../tests/behat/lesson_student_resume.feature | 20 +++++++++---------- .../tests/behat/questions_images.feature | 2 +- 12 files changed, 33 insertions(+), 33 deletions(-) diff --git a/mod/lesson/renderer.php b/mod/lesson/renderer.php index a5a03c26f87..cd40e78e26e 100644 --- a/mod/lesson/renderer.php +++ b/mod/lesson/renderer.php @@ -440,7 +440,7 @@ class mod_lesson_renderer extends plugin_renderer_base { foreach ($links as $link) { $options[$link['type']] = $link['name']; } - $options[0] = get_string('question', 'lesson'); + $options[0] = get_string('addaquestionpage', 'lesson'); $addpageurl = new moodle_url('/mod/lesson/editpage.php', array('id'=>$this->page->cm->id, 'pageid'=>$page->id, 'sesskey'=>sesskey())); $addpageselect = new single_select($addpageurl, 'qtype', $options, null, array(''=>get_string('addanewpage', 'lesson').'...'), 'addpageafter'.$page->id); diff --git a/mod/lesson/tests/behat/lesson_complete_report.feature b/mod/lesson/tests/behat/lesson_complete_report.feature index 5ac4b93e75d..8dd0cb39b0c 100644 --- a/mod/lesson/tests/behat/lesson_complete_report.feature +++ b/mod/lesson/tests/behat/lesson_complete_report.feature @@ -33,7 +33,7 @@ Feature: Teachers can review student progress on all lessons in a course by view | id_answer_editor_0 | Next page | | id_jumpto_0 | Next page | And I press "Save page" - And I select "Question" from the "qtype" singleselect + And I select "Add a question page" from the "qtype" singleselect And I set the field "Select a question type" to "True/false" And I press "Add a question page" And I set the following fields to these values: @@ -60,7 +60,7 @@ Feature: Teachers can review student progress on all lessons in a course by view | id_answer_editor_0 | Next page | | id_jumpto_0 | Next page | And I press "Save page" - And I select "Question" from the "qtype" singleselect + And I select "Add a question page" from the "qtype" singleselect And I set the field "Select a question type" to "True/false" And I press "Add a question page" And I set the following fields to these values: @@ -106,7 +106,7 @@ Feature: Teachers can review student progress on all lessons in a course by view | id_answer_editor_0 | Next page | | id_jumpto_0 | Next page | And I press "Save page" - And I select "Question" from the "qtype" singleselect + And I select "Add a question page" from the "qtype" singleselect And I set the field "Select a question type" to "True/false" And I press "Add a question page" And I set the following fields to these values: @@ -119,7 +119,7 @@ Feature: Teachers can review student progress on all lessons in a course by view | id_response_editor_1 | Wrong | | id_jumpto_1 | This page | And I press "Save page" - And I select "Question" from the "qtype" singleselect + And I select "Add a question page" from the "qtype" singleselect And I set the field "Select a question type" to "True/false" And I press "Add a question page" And I set the following fields to these values: diff --git a/mod/lesson/tests/behat/lesson_delete_answers.feature b/mod/lesson/tests/behat/lesson_delete_answers.feature index cafef681239..37e9ddf9ba4 100644 --- a/mod/lesson/tests/behat/lesson_delete_answers.feature +++ b/mod/lesson/tests/behat/lesson_delete_answers.feature @@ -32,7 +32,7 @@ branch table contents | id_answer_editor_1 | Previous page | | id_jumpto_1 | Previous page | And I press "Save page" - And I select "Question" from the "qtype" singleselect + And I select "Add a question page" from the "qtype" singleselect And I set the field "Select a question type" to "Numerical" And I press "Add a question page" And I set the following fields to these values: diff --git a/mod/lesson/tests/behat/lesson_informations_at_end.feature b/mod/lesson/tests/behat/lesson_informations_at_end.feature index 0727d307657..07a3c7d629c 100644 --- a/mod/lesson/tests/behat/lesson_informations_at_end.feature +++ b/mod/lesson/tests/behat/lesson_informations_at_end.feature @@ -28,7 +28,7 @@ Feature: In a lesson activity, if custom scoring is not enabled, student should | id_answer_editor_0 | Next page | | id_jumpto_0 | Next page | And I press "Save page" - And I select "Question" from the "qtype" singleselect + And I select "Add a question page" from the "qtype" singleselect And I set the field "Select a question type" to "Numerical" And I press "Add a question page" And I set the following fields to these values: diff --git a/mod/lesson/tests/behat/lesson_number_of_student_attempts.feature b/mod/lesson/tests/behat/lesson_number_of_student_attempts.feature index c0ec130997e..a3a732f824e 100644 --- a/mod/lesson/tests/behat/lesson_number_of_student_attempts.feature +++ b/mod/lesson/tests/behat/lesson_number_of_student_attempts.feature @@ -49,7 +49,7 @@ Feature: In Dashboard, teacher can see the number of student attempts to lessons | id_response_editor_1 | Wrong | | id_jumpto_1 | This page | And I press "Save page" - And I select "Question" from the "qtype" singleselect + And I select "Add a question page" from the "qtype" singleselect And I set the field "Select a question type" to "True/false" And I press "Add a question page" And I set the following fields to these values: diff --git a/mod/lesson/tests/behat/lesson_outline_report.feature b/mod/lesson/tests/behat/lesson_outline_report.feature index 9182b010900..c4eea60cd58 100644 --- a/mod/lesson/tests/behat/lesson_outline_report.feature +++ b/mod/lesson/tests/behat/lesson_outline_report.feature @@ -33,7 +33,7 @@ Feature: Teachers can review student progress on all lessons in a course by view | id_answer_editor_0 | Next page | | id_jumpto_0 | Next page | And I press "Save page" - And I select "Question" from the "qtype" singleselect + And I select "Add a question page" from the "qtype" singleselect And I set the field "Select a question type" to "True/false" And I press "Add a question page" And I set the following fields to these values: @@ -60,7 +60,7 @@ Feature: Teachers can review student progress on all lessons in a course by view | id_answer_editor_0 | Next page | | id_jumpto_0 | Next page | And I press "Save page" - And I select "Question" from the "qtype" singleselect + And I select "Add a question page" from the "qtype" singleselect And I set the field "Select a question type" to "True/false" And I press "Add a question page" And I set the following fields to these values: @@ -104,7 +104,7 @@ Feature: Teachers can review student progress on all lessons in a course by view | id_answer_editor_0 | Next page | | id_jumpto_0 | Next page | And I press "Save page" - And I select "Question" from the "qtype" singleselect + And I select "Add a question page" from the "qtype" singleselect And I set the field "Select a question type" to "True/false" And I press "Add a question page" And I set the following fields to these values: diff --git a/mod/lesson/tests/behat/lesson_question_attempts.feature b/mod/lesson/tests/behat/lesson_question_attempts.feature index 9abc8c0d0b3..9994f8acdc4 100644 --- a/mod/lesson/tests/behat/lesson_question_attempts.feature +++ b/mod/lesson/tests/behat/lesson_question_attempts.feature @@ -41,7 +41,7 @@ Feature: In a lesson activity, students can not re-attempt a question more than | id_answer_editor_1 | Next page | | id_jumpto_1 | Next page | And I press "Save page" - And I select "Question" from the "qtype" singleselect + And I select "Add a question page" from the "qtype" singleselect And I set the field "Select a question type" to "True/false" And I press "Add a question page" And I set the following fields to these values: @@ -63,7 +63,7 @@ Feature: In a lesson activity, students can not re-attempt a question more than | id_answer_editor_1 | Next page | | id_jumpto_1 | Next page | And I press "Save page" - And I select "Question" from the "qtype" singleselect + And I select "Add a question page" from the "qtype" singleselect And I set the field "Select a question type" to "True/false" And I press "Add a question page" And I set the following fields to these values: @@ -76,7 +76,7 @@ Feature: In a lesson activity, students can not re-attempt a question more than | id_response_editor_1 | Wrong | | id_jumpto_1 | This page | And I press "Save page" - And I select "Question" from the "qtype" singleselect + And I select "Add a question page" from the "qtype" singleselect And I set the field "Select a question type" to "True/false" And I press "Add a question page" And I set the following fields to these values: diff --git a/mod/lesson/tests/behat/lesson_report.feature b/mod/lesson/tests/behat/lesson_report.feature index 27201f1836f..c7ff38a7c95 100644 --- a/mod/lesson/tests/behat/lesson_report.feature +++ b/mod/lesson/tests/behat/lesson_report.feature @@ -34,7 +34,7 @@ Feature: In a lesson activity, teachers can review student attempts | id_answer_editor_0 | Next page | | id_jumpto_0 | Next page | And I press "Save page" - And I select "Question" from the "qtype" singleselect + And I select "Add a question page" from the "qtype" singleselect And I set the field "Select a question type" to "True/false" And I press "Add a question page" And I set the following fields to these values: @@ -47,7 +47,7 @@ Feature: In a lesson activity, teachers can review student attempts | id_response_editor_1 | Wrong | | id_jumpto_1 | This page | And I press "Save page" - And I select "Question" from the "qtype" singleselect + And I select "Add a question page" from the "qtype" singleselect And I set the field "Select a question type" to "True/false" And I press "Add a question page" And I set the following fields to these values: diff --git a/mod/lesson/tests/behat/lesson_review.feature b/mod/lesson/tests/behat/lesson_review.feature index 246fffa13f6..39e2731a449 100644 --- a/mod/lesson/tests/behat/lesson_review.feature +++ b/mod/lesson/tests/behat/lesson_review.feature @@ -42,7 +42,7 @@ Feature: In a lesson activity, students can review the answers they gave to ques | id_response_editor_1 | Incorrect answer | | id_jumpto_1 | This page | And I press "Save page" - And I select "Question" from the "qtype" singleselect + And I select "Add a question page" from the "qtype" singleselect And I set the field "Select a question type" to "True/false" And I press "Add a question page" And I set the following fields to these values: diff --git a/mod/lesson/tests/behat/lesson_student_dashboard.feature b/mod/lesson/tests/behat/lesson_student_dashboard.feature index c21555ff2a3..66ff74a8540 100644 --- a/mod/lesson/tests/behat/lesson_student_dashboard.feature +++ b/mod/lesson/tests/behat/lesson_student_dashboard.feature @@ -37,7 +37,7 @@ Feature: In Dashboard, a student can see their current status on all lessons wit | id_response_editor_1 | Wrong | | id_jumpto_1 | This page | And I press "Save page" - And I select "Question" from the "qtype" singleselect + And I select "Add a question page" from the "qtype" singleselect And I set the field "Select a question type" to "True/false" And I press "Add a question page" And I set the following fields to these values: @@ -85,7 +85,7 @@ Feature: In Dashboard, a student can see their current status on all lessons wit | id_response_editor_1 | Wrong | | id_jumpto_1 | This page | And I press "Save page" - And I select "Question" from the "qtype" singleselect + And I select "Add a question page" from the "qtype" singleselect And I set the field "Select a question type" to "True/false" And I press "Add a question page" And I set the following fields to these values: @@ -190,7 +190,7 @@ Feature: In Dashboard, a student can see their current status on all lessons wit | id_response_editor_1 | Wrong | | id_jumpto_1 | This page | And I press "Save page" - And I select "Question" from the "qtype" singleselect + And I select "Add a question page" from the "qtype" singleselect And I set the field "Select a question type" to "True/false" And I press "Add a question page" And I set the following fields to these values: @@ -256,7 +256,7 @@ Feature: In Dashboard, a student can see their current status on all lessons wit | id_response_editor_1 | Wrong | | id_jumpto_1 | This page | And I press "Save page" - And I select "Question" from the "qtype" singleselect + And I select "Add a question page" from the "qtype" singleselect And I set the field "Select a question type" to "True/false" And I press "Add a question page" And I set the following fields to these values: @@ -336,7 +336,7 @@ Feature: In Dashboard, a student can see their current status on all lessons wit | id_answer_editor_0 | True | | id_answer_editor_1 | False | And I press "Save page" - And I select "Question" from the "qtype" singleselect + And I select "Add a question page" from the "qtype" singleselect And I set the field "Select a question type" to "True/false" And I press "Add a question page" And I set the following fields to these values: diff --git a/mod/lesson/tests/behat/lesson_student_resume.feature b/mod/lesson/tests/behat/lesson_student_resume.feature index c4b2b40e20d..2a66d6c1cca 100644 --- a/mod/lesson/tests/behat/lesson_student_resume.feature +++ b/mod/lesson/tests/behat/lesson_student_resume.feature @@ -32,7 +32,7 @@ Feature: In a lesson activity a student should | id_answer_editor_0 | Next page | | id_jumpto_0 | Next page | And I press "Save page" - And I select "Question" from the "qtype" singleselect + And I select "Add a question page" from the "qtype" singleselect And I set the field "Select a question type" to "True/false" And I press "Add a question page" And I set the following fields to these values: @@ -45,7 +45,7 @@ Feature: In a lesson activity a student should | id_response_editor_1 | Wrong | | id_jumpto_1 | This page | And I press "Save page" - And I select "Question" from the "qtype" singleselect + And I select "Add a question page" from the "qtype" singleselect And I set the field "Select a question type" to "True/false" And I press "Add a question page" And I set the following fields to these values: @@ -194,7 +194,7 @@ Feature: In a lesson activity a student should | id_response_editor_1 | Wrong | | id_jumpto_1 | This page | And I press "Save page" - And I select "Question" from the "qtype" singleselect + And I select "Add a question page" from the "qtype" singleselect And I set the field "Select a question type" to "True/false" And I press "Add a question page" And I set the following fields to these values: @@ -214,7 +214,7 @@ Feature: In a lesson activity a student should | id_answer_editor_0 | Next page | | id_jumpto_0 | Next page | And I press "Save page" - And I select "Question" from the "qtype" singleselect + And I select "Add a question page" from the "qtype" singleselect And I set the field "Select a question type" to "True/false" And I press "Add a question page" And I set the following fields to these values: @@ -227,7 +227,7 @@ Feature: In a lesson activity a student should | id_response_editor_1 | Wrong | | id_jumpto_1 | This page | And I press "Save page" - And I select "Question" from the "qtype" singleselect + And I select "Add a question page" from the "qtype" singleselect And I set the field "Select a question type" to "True/false" And I press "Add a question page" And I set the following fields to these values: @@ -240,7 +240,7 @@ Feature: In a lesson activity a student should | id_response_editor_1 | Wrong | | id_jumpto_1 | This page | And I press "Save page" - And I select "Question" from the "qtype" singleselect + And I select "Add a question page" from the "qtype" singleselect And I set the field "Select a question type" to "True/false" And I press "Add a question page" And I set the following fields to these values: @@ -323,7 +323,7 @@ Feature: In a lesson activity a student should | id_response_editor_1 | Wrong | | id_jumpto_1 | This page | And I press "Save page" - And I select "Question" from the "qtype" singleselect + And I select "Add a question page" from the "qtype" singleselect And I set the field "Select a question type" to "True/false" And I press "Add a question page" And I set the following fields to these values: @@ -336,7 +336,7 @@ Feature: In a lesson activity a student should | id_response_editor_1 | Wrong | | id_jumpto_1 | This page | And I press "Save page" - And I select "Question" from the "qtype" singleselect + And I select "Add a question page" from the "qtype" singleselect And I set the field "Select a question type" to "True/false" And I press "Add a question page" And I set the following fields to these values: @@ -349,7 +349,7 @@ Feature: In a lesson activity a student should | id_response_editor_1 | Wrong | | id_jumpto_1 | This page | And I press "Save page" - And I select "Question" from the "qtype" singleselect + And I select "Add a question page" from the "qtype" singleselect And I set the field "Select a question type" to "True/false" And I press "Add a question page" And I set the following fields to these values: @@ -362,7 +362,7 @@ Feature: In a lesson activity a student should | id_response_editor_1 | Wrong | | id_jumpto_1 | This page | And I press "Save page" - And I select "Question" from the "qtype" singleselect + And I select "Add a question page" from the "qtype" singleselect And I set the field "Select a question type" to "True/false" And I press "Add a question page" And I set the following fields to these values: diff --git a/mod/lesson/tests/behat/questions_images.feature b/mod/lesson/tests/behat/questions_images.feature index 0dc725c055c..50a79a7af00 100644 --- a/mod/lesson/tests/behat/questions_images.feature +++ b/mod/lesson/tests/behat/questions_images.feature @@ -53,7 +53,7 @@ Feature: In a lesson activity, teacher can add embedded images in questions answ And I set the field "Describe this image for someone who cannot see it" to "It's the logo" And I click on "Save image" "button" And I press "Save page" - And I set the field "qtype" to "Question" + And I set the field "qtype" to "Add a question page" And I set the field "Select a question type" to "True/false" And I press "Add a question page" And I set the following fields to these values: