Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
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    | intro              | course | idnumber |
-
 
19
      | qbank      | Qbank 1 | Question bank 1    | C1     | qbank1   |
17
    And the following "question categories" exist:
20
    And the following "question categories" exist:
18
      | contextlevel | reference | name           |
21
      | contextlevel    | reference | name           |
19
      | Course       | C1        | Test questions |
22
      | Activity module | qbank1    | Test questions |
20
    And the following "questions" exist:
23
    And the following "questions" exist:
21
      | questioncategory | qtype | name                       | questiontext                  |
24
      | questioncategory | qtype | name                       | questiontext                  |
22
      | Test questions   | essay | Test question to be edited | Write about whatever you want |
25
      | Test questions   | essay | Test question to be edited | Write about whatever you want |
23
    And I am on the "Course 1" "core_question > course question bank" page logged in as "teacher1"
26
    And I am on the "Qbank 1" "core_question > question bank" page logged in as "teacher1"
-
 
27
    And I apply question bank filter "Category" with value "Test questions"
Línea 24... Línea 28...
24
 
28
 
25
  @javascript
29
  @javascript
26
  Scenario: Edit a previously created question
30
  Scenario: Edit a previously created question
27
    When I am on the "Test question to be edited" "core_question > edit" page logged in as "teacher1"
31
    When I am on the "Test question to be edited" "core_question > edit" page logged in as "teacher1"
Línea 63... Línea 67...
63
 
67
 
64
  Scenario: Editing a question can be cancelled
68
  Scenario: Editing a question can be cancelled
65
    When I am on the "Test question to be edited" "core_question > edit" page logged in as "teacher1"
69
    When I am on the "Test question to be edited" "core_question > edit" page logged in as "teacher1"
66
    And I set the field "Question name" to "Edited question name"
70
    And I set the field "Question name" to "Edited question name"
-
 
71
    And I press "Cancel"
67
    And I press "Cancel"
72
    And I apply question bank filter "Category" with value "Test questions"
68
    Then I should see "Test question to be edited"
73
    Then I should see "Test question to be edited"
Línea 69... Línea 74...
69
    And I should see "Admin User"
74
    And I should see "Admin User"
70
 
75
 
71
  Scenario: A question can have its idnumber removed
76
  Scenario: A question can have its idnumber removed
72
    Given the following "questions" exist:
77
    Given the following "questions" exist:
73
      | questioncategory | qtype | name                   | idnumber |
78
      | questioncategory | qtype | name                   | idnumber |
-
 
79
      | Test questions   | essay | Question with idnumber | frog     |
74
      | Test questions   | essay | Question with idnumber | frog     |
80
    When I am on the "Qbank 1" "core_question > question bank" page logged in as "teacher1"
75
    When I am on the "Course 1" "core_question > course question bank" page logged in as "teacher1"
81
    And I apply question bank filter "Category" with value "Test questions"
76
    Then I should see "frog" in the "Question with idnumber" "table_row"
82
    Then I should see "frog" in the "Question with idnumber" "table_row"
77
    When I choose "Edit question" action for "Question with idnumber" in the question bank
83
    When I choose "Edit question" action for "Question with idnumber" in the question bank
78
    And I set the field "ID number" to ""
84
    And I set the field "ID number" to ""
Línea 79... Línea 85...
79
    And I press "id_submitbutton"
85
    And I press "id_submitbutton"
80
    Then I should not see "frog" in the "Question with idnumber" "table_row"
86
    Then I should not see "frog" in the "Question with idnumber" "table_row"
81
 
87
 
82
  Scenario: If the question type is no longer installed, then most edit actions are not present
88
  Scenario: If the question type is no longer installed, then most edit actions are not present
83
    Given the following "questions" exist:
89
    Given the following "questions" exist:
-
 
90
      | questioncategory | qtype       | name            | questiontext    |
84
      | questioncategory | qtype       | name            | questiontext    |
91
      | Test questions   | missingtype | Broken question | Write something |
85
      | Test questions   | missingtype | Broken question | Write something |
92
    When I am on the "Qbank 1" "core_question > question bank" page logged in as "teacher1"
86
    When I am on the "Course 1" "core_question > course question bank" page logged in as "teacher1"
93
    And I apply question bank filter "Category" with value "Test questions"
87
    Then the "Edit question" item should not exist in the "Edit" action menu of the "Broken question" "table_row"
94
    Then the "Edit question" item should not exist in the "Edit" action menu of the "Broken question" "table_row"
88
    And the "Duplicate" item should not exist in the "Edit" action menu of the "Broken question" "table_row"
95
    And the "Duplicate" item should not exist in the "Edit" action menu of the "Broken question" "table_row"