Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1441 ariadna 1
@core @core_question
2
Feature: Manage question banks
3
  In order to manage shared questions
4
  As a teacher
5
  I need to create and update a question bank
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email                |
10
      | student1 | Steve1    | Student1 | student1@example.com |
11
      | teacher1 | Terry1    | Teacher1 | teacher1@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 "activities" exist:
20
      | activity | name   | course | section | intro        | showdescription |
21
      | qbank    | bank1  | C1     | 0       | Bank 1 intro | 0               |
22
      | qbank    | bank2  | C1     | 0       | Bank 2 intro | 0               |
23
 
24
  @javascript
25
  Scenario: Show description when show description checkbox ticked
26
    Given I am on the "C1" "Course" page logged in as "teacher1"
27
    When I navigate to "Question banks" in current page administration
28
    And I open the action menu in "bank2" "list_item"
29
    And I choose "Edit settings" in the open action menu
30
    And I set the field "Display description on manage question banks page" to "1"
31
    And I press "Save and return to question bank list"
32
    Then I should see "Bank 2 intro"
33
    And I should see "bank1"
34
    But I should not see "Bank 1 intro"
35
 
36
  @javascript
37
  Scenario: Update a question bank
38
    Given I am on the "C1" "Course" page logged in as "teacher1"
39
    When I navigate to "Question banks" in current page administration
40
    And I open the action menu in "bank1" "list_item"
41
    And I choose "Edit settings" in the open action menu
42
    And I set the following fields to these values:
43
    | Question bank name                                | Bank 1 updated       |
44
    | Display description on manage question banks page | 1                    |
45
    | Description                                       | Bank 1 intro updated |
46
    And I press "Save and return to question bank list"
47
    Then I should see "Bank 1 updated"
48
    And I should see "Bank 1 intro updated"
49
 
50
  @javascript
51
  Scenario: Delete a question bank
52
    Given I am on the "C1" "Course" page logged in as "teacher1"
53
    When I navigate to "Question banks" in current page administration
54
    And I open the action menu in "bank1" "list_item"
55
    And I choose "Delete" in the open action menu
56
    And I click on "Delete" "button"
57
    Then I should not see "bank1"
58
    But I should see "bank2"