__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
@mod @mod_feedback
Feature: Exporting and importing feedbacks
In order to quickly copy feedbacks across courses and sites
As a teacher
I need to be able to export and import feedbacks
Background:
Given the following "users" exist:
| username | firstname | lastname |
| teacher | Teacher | 1 |
And the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
| Course 2 | C2 |
And the following "course enrolments" exist:
| user | course | role |
| teacher | C1 | editingteacher |
| teacher | C1 | editingteacher |
And the following "activities" exist:
| activity | name | course | idnumber |
| feedback | Learning experience | C1 | feedback0 |
And I change window size to "large"
Scenario: Export sample feedback and compare with the fixture
When I am on the "Learning experience" "feedback activity" page logged in as teacher
And I navigate to "Questions" in current page administration
And "Export questions" "link" should not exist in the ".tertiary-navigation" "css_element"
And I add a "Information" question to the feedback with:
| Question | this is an information question |
| Label | info |
| Information type | Course |
And I add a "Text and media area" question to the feedback with:
| Contents | label text |
And I add a "Longer text answer" question to the feedback with:
| Question | this is a longer text answer |
| Label | longertext |
| Required | 1 |
And I add a "Multiple choice" question to the feedback with:
| Question | this is a multiple choice 1 |
| Label | multichoice1 |
| Multiple choice type | Multiple choice - single answer |
| Multiple choice values | option a\noption b\noption c |
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 |
| Multiple choice type | Multiple choice - multiple answers |
| Hide the "Not selected" option | Yes |
| Multiple choice values | option d\noption e\noption f |
| Dependence item | multichoice1 |
| Dependence value | option a |
And I add a "Multiple choice" question to the feedback with:
| Question | this is a multiple choice 3 |
| Label | multichoice3 |
| Multiple choice type | Multiple choice - single answer allowed (drop-down menu) |
| Multiple choice values | option g\noption h\noption i |
And I add a "Multiple choice (rated)" question to the feedback with:
| Question | this is a multiple choice rated |
| Label | multichoice4 |
| Multiple choice type | Multiple choice - single answer |
| Multiple choice values | 0/option k\n1/option l\n5/option m |
And I add a "Numeric answer" question to the feedback with:
| Question | this is a numeric answer |
| Label | numeric |
| Range to | 100 |
And I add a "Short text answer" question to the feedback with:
| Question | this is a short text answer |
| Label | shorttext |
| Maximum characters accepted | 200 |
Then following "Export questions" should export feedback identical to "mod/feedback/tests/fixtures/testexport.xml"
@javascript @_file_upload
Scenario: Import feedback deleting old items
When I am on the "Learning experience" "feedback activity" page logged in as teacher
And I navigate to "Questions" in current page administration
And I add a "Numeric answer" question to the feedback with:
| Question | Existing question |
| Label | numeric |
| Range to | 100 |
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 "Import"
Then I should not see "Existing question"
And I should see "this is an information question"
And I should see "label text"
And I should see "this is a longer text answer"
And I should see "this is a multiple choice 1"
And I should see "this is a multiple choice 2"
And I should see "this is a multiple choice 3"
And I should see "this is a multiple choice rated"
And I should see "this is a numeric answer"
And I should see "this is a short text answer"
@javascript @_file_upload
Scenario: Import feedback appending new items
When I am on the "Learning experience" "feedback activity" page logged in as teacher
And I navigate to "Questions" in current page administration
And I add a "Numeric answer" question to the feedback with:
| Question | Existing question |
| Label | numeric |
| Range to | 100 |
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 "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"
And I should see "label text"
And I should see "this is a longer text answer"
And I should see "this is a multiple choice 1"
And I should see "this is a multiple choice 2"
And I should see "this is a multiple choice 3"
And I should see "this is a multiple choice rated"
And I should see "this is a numeric answer"
And I should see "this is a short text answer"
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| anonymous.feature | File | 11.23 KB | 0777 |
|
| behat_mod_feedback.php | File | 10.35 KB | 0777 |
|
| coursemapping.feature | File | 11.22 KB | 0777 |
|
| export_import.feature | File | 6.37 KB | 0777 |
|
| feedback_activity_completion.feature | File | 3.49 KB | 0777 |
|
| feedback_no_calendar_capabilities.feature | File | 2.04 KB | 0777 |
|
| groups.feature | File | 14.58 KB | 0777 |
|
| multichoice.feature | File | 21.46 KB | 0777 |
|
| multipleattempt.feature | File | 2.45 KB | 0777 |
|
| non_anonymous.feature | File | 7.22 KB | 0777 |
|
| preview_questions.feature | File | 2.17 KB | 0777 |
|
| question_types.feature | File | 6.89 KB | 0777 |
|
| question_types_non_anon.feature | File | 7.21 KB | 0777 |
|
| questions.feature | File | 4.61 KB | 0777 |
|
| show_nonrespondents.feature | File | 2.71 KB | 0777 |
|
| templates.feature | File | 9.97 KB | 0777 |
|