Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@qbank @qbank_viewcreator
2
Feature: Question bank Modified by column
3
  In order to help keep track of the changes of the question version in the question bank
4
  As a teacher
5
  I need to know who modified the question and when the modification made in the question bank
6
 
7
  Background:
8
    Given the following "courses" exist:
9
      | fullname | shortname | category |
10
      | Course 1 | C1        | 0        |
11
    And the following "users" exist:
12
      | username | firstname | lastname | email |
13
      | teacher1 | Teacher1 | 1 | teacher1@example.com |
14
      | teacher2 | Teacher2 | 2 | teacher2@example.com |
15
    And the following "course enrolments" exist:
16
      | user | course | role |
17
      | teacher1 | C1 | editingteacher |
18
      | teacher2 | C1 | editingteacher |
19
    And the following "activities" exist:
20
      | activity   | name      | course | idnumber |
21
      | quiz       | Test quiz | C1     | quiz1    |
22
    And the following "question categories" exist:
23
      | contextlevel    | reference | name           |
24
      | Activity module | quiz1     | Test questions |
25
    And the following "questions" exist:
26
      | questioncategory | qtype     | name           | questiontext              |
27
      | Test questions   | truefalse | First question | Answer the first question |
28
 
29
  @javascript
30
  Scenario: Enable/disable modified by column from the base view
31
    Given I log in as "admin"
32
    And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
33
    And I should see "View creator"
34
    When I click on "Disable" "link" in the "View creator" "table_row"
35
    And I am on the "Test quiz" "mod_quiz > question bank" page
36
    And I set the field "Filter type" to "Category"
37
    And I set the field "Category" to "Test questions"
38
    And I press "Apply filters"
39
    Then I should not see "Modified by"
40
    And I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
41
    And I click on "Enable" "link" in the "View creator" "table_row"
42
    And I am on the "Test quiz" "mod_quiz > question bank" page
43
    And I set the field "Filter type" to "Category"
44
    And I set the field "Category" to "Test questions"
45
    And I press "Apply filters"
46
    Then I should see "Modified by"
47
 
48
  @javascript
49
  Scenario: Editing a question shows the modifier of the question
50
    And I log in as "teacher1"
51
    And I am on the "Test quiz" "mod_quiz > question bank" page
52
    And I set the field "Filter type" to "Category"
53
    And I set the field "Category" to "Test questions"
54
    And I press "Apply filters"
55
    And I should see "First question"
56
    And I choose "Edit question" action for "First question" in the question bank
57
    And I should see "Version 1"
58
    And I set the field "id_name" to "Renamed question v2"
59
    And I set the field "id_questiontext" to "edited question"
60
    And I press "id_submitbutton"
61
    And I should see "Teacher1"
62
    And I log in as "teacher2"
63
    And I am on the "Test quiz" "mod_quiz > question bank" page
64
    And I set the field "Filter type" to "Category"
65
    And I set the field "Category" to "Test questions"
66
    And I press "Apply filters"
67
    And I choose "Edit question" action for "Renamed question v2" in the question bank
68
    Then I should see "Version 2"
69
    And I set the field "id_name" to "Renamed question v3"
70
    And I set the field "id_questiontext" to "edited question v3"
71
    And I press "id_submitbutton"
72
    And I should not see "Teacher1"
73
    And I should see "Teacher2"