1 |
efrain |
1 |
@mod @mod_lesson
|
|
|
2 |
Feature: In a lesson activity, teacher can import blackboard fill in the blank question
|
|
|
3 |
As a teacher
|
|
|
4 |
I need to import a fill in the blank question made in Blackboard in a lesson
|
|
|
5 |
|
|
|
6 |
@javascript @_file_upload
|
|
|
7 |
Scenario: Import fill in the blank question in a lesson
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
11 |
| student1 | Student | 1 | student1@example.com |
|
|
|
12 |
And the following "courses" exist:
|
|
|
13 |
| fullname | shortname | category |
|
|
|
14 |
| Course 1 | C1 | 0 |
|
|
|
15 |
And the following "course enrolments" exist:
|
|
|
16 |
| user | course | role |
|
|
|
17 |
| teacher1 | C1 | editingteacher |
|
|
|
18 |
| student1 | C1 | student |
|
|
|
19 |
And the following "activity" exists:
|
|
|
20 |
| course | C1 |
|
|
|
21 |
| activity | lesson |
|
|
|
22 |
| name | Test lesson name |
|
|
|
23 |
When I am on the "Test lesson name" "lesson activity" page logged in as teacher1
|
|
|
24 |
And I follow "Import questions"
|
|
|
25 |
And I set the field "File format" to "Blackboard"
|
|
|
26 |
And I upload "mod/lesson/tests/fixtures/sample_blackboard_fib_qti.dat" file to "Upload" filemanager
|
|
|
27 |
And I press "Import"
|
|
|
28 |
Then I should see "Importing 1 questions"
|
|
|
29 |
And I should see "Name an amphibian: __________"
|
|
|
30 |
And I press "Continue"
|
|
|
31 |
And I should not see "__________"
|
|
|
32 |
And I should not see "Your answer"
|
|
|
33 |
And I set the field "id_answer" to "frog"
|
|
|
34 |
And I press "Submit"
|
|
|
35 |
And I should see "Your answer : frog"
|
|
|
36 |
And I should see "A frog is an amphibian"
|
|
|
37 |
And I press "Continue"
|
|
|
38 |
And I should see "Congratulations - end of lesson reached"
|