- {{/export}}
+ {{/actionsselect}}
diff --git a/mod/feedback/tests/behat/behat_mod_feedback.php b/mod/feedback/tests/behat/behat_mod_feedback.php
index 17f1302e762..b1118274a80 100644
--- a/mod/feedback/tests/behat/behat_mod_feedback.php
+++ b/mod/feedback/tests/behat/behat_mod_feedback.php
@@ -50,7 +50,8 @@ class behat_mod_feedback extends behat_base {
public function i_add_question_to_the_feedback_with($questiontype, TableNode $questiondata) {
$questiontype = $this->escape($questiontype);
- $this->execute('behat_forms::i_select_from_the_singleselect', array($questiontype, 'typ'));
+ $this->execute('behat_general::i_click_on', [get_string('add_item', 'mod_feedback'), 'link']);
+ $this->execute('behat_general::i_click_on', [$questiontype, 'link']);
// Wait again, for page to reloaded.
$this->execute('behat_general::i_wait_to_be_redirected');
@@ -81,7 +82,8 @@ class behat_mod_feedback extends behat_base {
public function i_add_a_page_break_to_the_feedback() {
$questiontype = $this->escape(get_string('add_pagebreak', 'feedback'));
- $this->execute('behat_forms::i_select_from_the_singleselect', array($questiontype, 'typ'));
+ $this->execute('behat_general::i_click_on', [get_string('add_item', 'mod_feedback'), 'link']);
+ $this->execute('behat_general::i_click_on', [$questiontype, 'link']);
// Wait again, for page to reloaded.
$this->execute('behat_general::i_wait_to_be_redirected');
diff --git a/mod/feedback/tests/behat/export_import.feature b/mod/feedback/tests/behat/export_import.feature
index d417a4393b5..39bfde3e3b0 100644
--- a/mod/feedback/tests/behat/export_import.feature
+++ b/mod/feedback/tests/behat/export_import.feature
@@ -40,7 +40,7 @@ Feature: Exporting and importing feedbacks
| Label | multichoice1 |
| Multiple choice type | Multiple choice - single answer |
| Multiple choice values | option a\noption b\noption c |
- And I select "Add a page break" from the "typ" singleselect
+ And I add a page break to the feedback
And I add a "Multiple choice" question to the feedback with:
| Question | this is a multiple choice 2 |
| Label | multichoice2 |
@@ -68,7 +68,6 @@ Feature: Exporting and importing feedbacks
| Label | shorttext |
| Maximum characters accepted | 200 |
Then following "Export questions" should export feedback identical to "mod/feedback/tests/fixtures/testexport.xml"
- And I log out
@javascript @_file_upload
Scenario: Import feedback deleting old items
@@ -78,10 +77,10 @@ Feature: Exporting and importing feedbacks
| Question | Existing question |
| Label | numeric |
| Range to | 100 |
- And I select "Import questions" from the "jump" singleselect
+ And I press "Actions"
+ And I choose "Import" in the open action menu
And I upload "mod/feedback/tests/fixtures/testexport.xml" file to "File" filemanager
- And I press "Save"
- And I select "Add question" from the "jump" singleselect
+ And I press "Import"
Then I should not see "Existing question"
And I should see "this is an information question"
And I should see "label text"
@@ -101,11 +100,11 @@ Feature: Exporting and importing feedbacks
| Question | Existing question |
| Label | numeric |
| Range to | 100 |
- And I select "Import questions" from the "jump" singleselect
+ And I press "Actions"
+ And I choose "Import" in the open action menu
And I set the field "Append new items" to "1"
And I upload "mod/feedback/tests/fixtures/testexport.xml" file to "File" filemanager
- And I press "Save"
- And I select "Add question" from the "jump" singleselect
+ And I press "Import"
Then I should see "Existing question"
And "Existing question" "text" should appear before "this is an information question" "text"
And I should see "this is an information question"
diff --git a/mod/feedback/tests/behat/multichoice.feature b/mod/feedback/tests/behat/multichoice.feature
index efb30b675d9..d71d3fb3860 100644
--- a/mod/feedback/tests/behat/multichoice.feature
+++ b/mod/feedback/tests/behat/multichoice.feature
@@ -33,7 +33,7 @@ Feature: Testing multichoice questions in feedback
| Multiple choice values | option a\noption b\noption c |
And I add a "Text and media area" question to the feedback with:
| Contents | this is the first page of the feedback |
- And I select "Add a page break" from the "typ" singleselect
+ And I add a page break to the feedback
And I add a "Multiple choice" question to the feedback with:
| Question | this is a multiple choice 2 |
| Label | multichoice2 |
@@ -42,7 +42,7 @@ Feature: Testing multichoice questions in feedback
| Required | 1 |
And I add a "Text and media area" question to the feedback with:
| Contents | this is the second page of the feedback |
- And I select "Add a page break" from the "typ" singleselect
+ And I add a page break to the feedback
And I add a "Multiple choice" question to the feedback with:
| Question | this is a multiple choice 3 |
| Label | multichoice3 |
@@ -161,7 +161,6 @@ Feature: Testing multichoice questions in feedback
And I should see "1 (100.00 %)" in the "option a" "table_row"
And I should not see "%" in the "option b" "table_row"
And I should not see "%" in the "option c" "table_row"
- And I log out
@javascript
Scenario: Non-rated multiple-answers multiple choice questions in feedback
@@ -173,7 +172,7 @@ Feature: Testing multichoice questions in feedback
| Multiple choice values | option a\noption b\noption c |
And I add a "Text and media area" question to the feedback with:
| Contents | this is the first page of the feedback |
- And I select "Add a page break" from the "typ" singleselect
+ And I add a page break to the feedback
And I add a "Multiple choice" question to the feedback with:
| Question | this is a multiple choice 2 |
| Label | multichoice2 |
@@ -182,7 +181,7 @@ Feature: Testing multichoice questions in feedback
| Required | 1 |
And I add a "Text and media area" question to the feedback with:
| Contents | this is the second page of the feedback |
- And I select "Add a page break" from the "typ" singleselect
+ And I add a page break to the feedback
And I add a "Multiple choice" question to the feedback with:
| Question | this is a multiple choice 3 |
| Label | multichoice3 |
@@ -301,7 +300,6 @@ Feature: Testing multichoice questions in feedback
And I should see "1 (100.00 %)" in the "option a" "table_row"
And I should see "1 (100.00 %)" in the "option b" "table_row"
And I should not see "%" in the "option c" "table_row"
- And I log out
@javascript
Scenario: Non-rated single-answer dropdown multiple choice questions in feedback
@@ -312,7 +310,7 @@ Feature: Testing multichoice questions in feedback
| Multiple choice values | option a\noption b\noption c |
And I add a "Text and media area" question to the feedback with:
| Contents | this is the first page of the feedback |
- And I select "Add a page break" from the "typ" singleselect
+ And I add a page break to the feedback
And I add a "Multiple choice" question to the feedback with:
| Question | this is a multiple choice 2 |
| Label | multichoice2 |
@@ -321,7 +319,7 @@ Feature: Testing multichoice questions in feedback
| Required | 1 |
And I add a "Text and media area" question to the feedback with:
| Contents | this is the second page of the feedback |
- And I select "Add a page break" from the "typ" singleselect
+ And I add a page break to the feedback
And I add a "Multiple choice" question to the feedback with:
| Question | this is a multiple choice 3 |
| Label | multichoice3 |
diff --git a/mod/feedback/tests/behat/templates.feature b/mod/feedback/tests/behat/templates.feature
index e8633d9b30c..f6d0cb87918 100644
--- a/mod/feedback/tests/behat/templates.feature
+++ b/mod/feedback/tests/behat/templates.feature
@@ -38,25 +38,25 @@ Feature: Saving, using and deleting feedback templates
Scenario: Teacher can save template and re-use it in the same course only
# Go to feedback templates and make sure none exist yet
When I am on the "Learning experience course 1" "feedback activity" page logged in as teacher
- And I navigate to "Questions" in current page administration
- And I select "Use a template" from the "jump" singleselect
+ And I navigate to "Templates" in current page administration
Then I should see "No templates available yet"
And "Use a template" "field" should not exist
And "Public" "field" should not exist
- And I select "Add question" from the "jump" singleselect
# Save as a course template
- And I press "Save as new template"
+ And I navigate to "Feedback" in current page administration
+ And I click on "Edit questions" "link" in the "[role=main]" "css_element"
+ And I press "Actions"
+ And I choose "Save as new template" in the open action menu
And I should see "Save as new template" in the ".modal-title" "css_element"
And I should see "Name" in the ".modal-body" "css_element"
And I set the field "Name" to "My first template"
And I click on "Save" "button" in the ".modal-dialog" "css_element"
And I should see "Template saved"
- And I select "Use a template" from the "jump" singleselect
+ And I navigate to "Templates" in current page administration
And I should see "My first template"
# Create a feedback from this template in the same course
And I am on the "Another feedback in course 1" "feedback activity" page
- And I navigate to "Questions" in current page administration
- And I select "Use a template" from the "jump" singleselect
+ And I navigate to "Templates" in current page administration
And I follow "My first template"
And I should see "this is a multiple choice 1"
And I press "Use this template"
@@ -64,22 +64,22 @@ Feature: Saving, using and deleting feedback templates
And I should see "this is a multiple choice 1"
# Make sure this template is not available in another course
And I am on the "Learning experience course 2" "feedback activity" page
- And I navigate to "Questions" in current page administration
- And I select "Use a template" from the "jump" singleselect
+ And I navigate to "Templates" in current page administration
And I should see "No templates available yet"
- And I log out
@javascript
Scenario: Teacher can append template to existing questions or remove them
# Save feedback as a course template
When I am on the "Learning experience course 1" "feedback activity" page logged in as teacher
And I navigate to "Questions" in current page administration
- And I press "Save as new template"
+ And I press "Actions"
+ And I choose "Save as new template" in the open action menu
And I should see "Save as new template" in the ".modal-title" "css_element"
And I should see "Name" in the ".modal-body" "css_element"
And I set the field "Name" to "My first template"
And I click on "Save" "button" in the ".modal-dialog" "css_element"
- And I press "Save as new template"
+ And I press "Actions"
+ And I choose "Save as new template" in the open action menu
# Add questions to another feedback
And I am on the "Another feedback in course 1" "feedback activity" page
And I navigate to "Questions" in current page administration
@@ -89,14 +89,14 @@ Feature: Saving, using and deleting feedback templates
| Multiple choice type | Multiple choice - single answer |
| Multiple choice values | Maths\bScience\nEnglish\nOther |
# Import template appending items
- And I select "Use a template" from the "jump" singleselect
+ And I navigate to "Templates" in current page administration
And I follow "My first template"
And I press "Use this template"
And I set the field "Append new items" to "1"
And I click on "Save" "button" in the ".modal-dialog" "css_element"
Then "What is your favourite subject" "text" should appear before "this is a multiple choice 1" "text"
# Import template replacing items
- And I select "Use a template" from the "jump" singleselect
+ And I navigate to "Templates" in current page administration
And I follow "My first template"
And I press "Use this template"
And I set the field "Delete old items" to "1"
@@ -109,81 +109,78 @@ Feature: Saving, using and deleting feedback templates
Scenario: Manager can save template as public and it will be available in any course
When I am on the "Learning experience course 1" "feedback activity" page logged in as manager
And I navigate to "Questions" in current page administration
- And I press "Save as new template"
+ And I press "Actions"
+ And I choose "Save as new template" in the open action menu
And I set the field "Name" to "My first template"
And I set the field "Public" to "1"
And I click on "Save" "button" in the ".modal-dialog" "css_element"
And I log out
And I am on the "Learning experience course 2" "feedback activity" page logged in as teacher
- And I navigate to "Questions" in current page administration
- And I select "Use a template" from the "jump" singleselect
+ And I navigate to "Templates" in current page administration
And I follow "My first template"
And I should see "this is a multiple choice 1"
And I press "Use this template"
And I set the field "Delete old items" to "1"
And I click on "Save" "button" in the ".modal-dialog" "css_element"
Then I should see "this is a multiple choice 1"
- And I log out
@javascript
Scenario: Teacher can delete course templates but can not delete public templates
# Save feedback as both public and course template
When I am on the "Learning experience course 1" "feedback activity" page logged in as manager
And I navigate to "Questions" in current page administration
- And I press "Save as new template"
+ And I press "Actions"
+ And I choose "Save as new template" in the open action menu
And I set the field "Name" to "My public template"
And I set the field "Public" to "1"
And I click on "Save" "button" in the ".modal-dialog" "css_element"
- And I press "Save as new template"
+ And I press "Actions"
+ And I choose "Save as new template" in the open action menu
And I set the field "Name" to "My course template"
And I click on "Save" "button" in the ".modal-dialog" "css_element"
And I log out
# Login as teacher and try to delete templates
And I am on the "Another feedback in course 1" "feedback activity" page logged in as teacher
- And I navigate to "Questions" in current page administration
- And I select "Use a template" from the "jump" singleselect
+ And I navigate to "Templates" in current page administration
And I follow "My public template"
Then I should not see "Delete"
And I click on "Back" "link" in the ".tertiary-navigation" "css_element"
And "My course template" "text" should exist in the ".coursetemplates" "css_element"
- And I follow "My course template"
- And I click on "Delete" "link"
+ And I click on "Delete template" "link" in the "My course template" "table_row"
And I click on "Yes" "button"
And I should see "Template deleted"
And "My course template" "text" should not exist in the ".coursetemplates" "css_element"
And "No templates available yet" "text" should exist in the ".coursetemplates" "css_element"
- And I log out
@javascript
Scenario: Manager can delete both course and public templates
# Save feedback as both public and course template
When I am on the "Learning experience course 1" "feedback activity" page logged in as manager
And I navigate to "Questions" in current page administration
- And I press "Save as new template"
+ And I press "Actions"
+ And I choose "Save as new template" in the open action menu
And I set the field "Name" to "My public template"
And I set the field "Public" to "1"
And I click on "Save" "button" in the ".modal-dialog" "css_element"
- And I press "Save as new template"
+ And I press "Actions"
+ And I choose "Save as new template" in the open action menu
And I set the field "Name" to "My course template"
And I click on "Save" "button" in the ".modal-dialog" "css_element"
# Delete course template
- And I select "Use a template" from the "jump" singleselect
+ And I navigate to "Templates" in current page administration
Then "My public template" "text" should exist in the ".publictemplates" "css_element"
And "My course template" "text" should exist in the ".coursetemplates" "css_element"
- And I follow "My course template"
- And I click on "Delete" "link"
+ And I click on "Delete template" "link" in the "My course template" "table_row"
And I should see "Are you sure you want to delete this template?"
And I press "Yes"
And I should see "Template deleted"
And "My course template" "text" should not exist in the ".coursetemplates" "css_element"
And "No templates available yet" "text" should exist in the ".coursetemplates" "css_element"
And "My public template" "text" should exist in the ".publictemplates" "css_element"
- And I follow "My public template"
- And I click on "Delete" "link"
+ And I click on "Delete template" "link" in the "My public template" "table_row"
And I should see "Are you sure you want to delete this template?"
And I press "Yes"
And I should see "Template deleted"
And "My public template" "text" should not exist in the ".publictemplates" "css_element"
And "No templates available yet" "text" should exist in the ".publictemplates" "css_element"
And I should see "No templates available yet"
- And I log out
diff --git a/pix/i/file_export.svg b/pix/i/file_export.svg
new file mode 100644
index 00000000000..3887343688a
--- /dev/null
+++ b/pix/i/file_export.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/pix/i/file_import.svg b/pix/i/file_import.svg
new file mode 100644
index 00000000000..30a11995d2d
--- /dev/null
+++ b/pix/i/file_import.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/pix/i/file_plus.svg b/pix/i/file_plus.svg
new file mode 100644
index 00000000000..6b073bef0d3
--- /dev/null
+++ b/pix/i/file_plus.svg
@@ -0,0 +1 @@
+
\ No newline at end of file