Skip to content

Commit

Permalink
MDL-32232 lesson: changing a page type chooser option for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaboesch committed Jun 28, 2018
1 parent f61ee4e commit 73e571a
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion mod/lesson/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ public function page_action_links(lesson_page $page, $printmove, $printaddpage=f
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);
Expand Down
8 changes: 4 additions & 4 deletions mod/lesson/tests/behat/lesson_complete_report.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion mod/lesson/tests/behat/lesson_delete_answers.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion mod/lesson/tests/behat/lesson_informations_at_end.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions mod/lesson/tests/behat/lesson_outline_report.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions mod/lesson/tests/behat/lesson_question_attempts.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions mod/lesson/tests/behat/lesson_report.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion mod/lesson/tests/behat/lesson_review.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 5 additions & 5 deletions mod/lesson/tests/behat/lesson_student_dashboard.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
20 changes: 10 additions & 10 deletions mod/lesson/tests/behat/lesson_student_resume.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion mod/lesson/tests/behat/questions_images.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 73e571a

Please sign in to comment.