Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 1... Línea 1...
1
@qbank @qbank_managecategories
1
@qbank @qbank_managecategories @question_categories_idnumber @javascript
2
Feature: A teacher can put questions with idnumbers in categories with idnumbers in the question bank
2
Feature: A teacher can put questions with idnumbers in categories with idnumbers in the question bank
3
  In order to organize my questions
3
  In order to organize my questions
4
  As a teacher
4
  As a teacher
5
  I create and edit categories (now with idnumbers)
5
  I create and edit categories (now with idnumbers)
Línea 12... Línea 12...
12
      | fullname | shortname | format |
12
      | fullname | shortname | format |
13
      | Course 1 | C1        | weeks  |
13
      | Course 1 | C1        | weeks  |
14
    And the following "course enrolments" exist:
14
    And the following "course enrolments" exist:
15
      | user     | course | role           |
15
      | user     | course | role           |
16
      | teacher1 | C1     | editingteacher |
16
      | teacher1 | C1     | editingteacher |
-
 
17
    And the following "activities" exist:
-
 
18
      | activity   | name    | course | idnumber |
-
 
19
      | qbank      | Qbank 1 | C1     | qbank1   |
17
    And I log in as "teacher1"
20
    And I log in as "teacher1"
18
    And I am on "Course 1" course homepage
21
    And I am on "Course 1" course homepage
Línea 19... Línea 22...
19
 
22
 
20
  Scenario: A new question category can only be created with a unique idnumber for a context
23
  Scenario: A new question category can only be created with a unique idnumber for a context
21
    # Note need to create the top category each time.
24
    # Note need to create the top category each time.
22
    When the following "question categories" exist:
25
    When the following "question categories" exist:
23
      | contextlevel | reference | questioncategory | name           | idnumber |
-
 
24
      | Course       | C1        | Top              | top            |          |
26
      | contextlevel    | reference | questioncategory | name           | idnumber |
25
      | Course       | C1        | top              | Used category  | c1used   |
27
      | Activity module | qbank1    | top              | Used category  | c1used   |
26
    And I am on the "Course 1" "core_question > course question categories" page
28
    And I am on the "Qbank 1" "core_question > question categories" page
27
    And I follow "Add category"
29
    And I press "Add category"
28
    And I set the following fields to these values:
30
    And I set the following fields to these values:
29
      | Name            | Sub used category |
31
      | Name            | New cat           |
30
      | Parent category | Used category     |
32
      | Parent category | Top for Qbank 1   |
31
      | Category info   | Created as a test |
33
      | Category info   | Created as a test |
32
      | ID number       | c1used            |
34
      | ID number       | c1used            |
33
    And I press "submitbutton"
35
    And I click on "Add category" "button" in the "Add category" "dialogue"
34
    # Standard warning.
36
    # Standard warning.
35
    Then I should see "This ID number is already in use"
37
    Then I should see "This ID number is already in use"
36
    # Correction to a unique idnumber for the context.
38
    # Correction to a unique idnumber for the context.
37
    And I set the field "ID number" to "c1unused"
39
    And I set the field "ID number" to "c1unused"
38
    And I press "submitbutton"
40
    And I click on "Add category" "button" in the "Add category" "dialogue"
39
    Then I should see "Sub used category"
41
    Then I should see "New cat"
40
    And I should see "ID number"
42
    And I should see "ID number"
41
    And I should see "c1unused"
43
    And I should see "c1unused"
-
 
44
    And I should see "(0)"
42
    And I should see "(0)"
45
    And I click on "Show descriptions" "checkbox"
Línea 43... Línea 46...
43
    And I should see "Created as a test" in the "Sub used category" "list_item"
46
    And I should see "Created as a test" in the "New cat" "list_item"
44
 
47
 
45
  Scenario: A question category can be edited and saved without changing the idnumber
48
  Scenario: A question category can be edited and saved without changing the idnumber
46
    When the following "question categories" exist:
-
 
47
      | contextlevel | reference | questioncategory | name           | idnumber |
49
    When the following "question categories" exist:
48
      | Course       | C1        | Top              | top            |          |
50
      | contextlevel    | reference | questioncategory | name           | idnumber |
49
      | Course       | C1        | top              | Used category  | c1used   |
51
      | Activity module | qbank1    | top              | Used category  | c1used   |
50
    And I am on the "Course 1" "core_question > course question categories" page
52
    And I am on the "Qbank 1" "core_question > question categories" page
-
 
53
    Then I open the action menu in "Used category" "list_item"
51
    And I click on "Edit this category" "link" in the "Used category" "list_item"
54
    And I choose "Edit settings" in the open action menu