Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_question @report @report_questioninstance
2
Feature: A Teacher can generate question instance reports
3
    In order to see question instance reports
4
    As a Teacher
5
    I need to generate them
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email                |
10
      | teacher1 | Teacher   | 1        | teacher1@example.com |
11
    And the following "courses" exist:
12
      | fullname | shortname | format |
13
      | Course 1 | C1        | weeks  |
14
    And the following "activities" exist:
15
      | activity | course | name           |
16
      | quiz     | C1     | Test quiz Q001 |
17
    And the following "questions" exist:
1441 ariadna 18
      | questioncategory           | qtype       | name |
19
      | Default for Test quiz Q001 | truefalse   | TF   |
20
      | Default for Test quiz Q001 | shortanswer | SA   |
1 efrain 21
    And quiz "Test quiz Q001" contains the following questions:
22
      | question | page | maxmark |
23
      | TF       | 1    | 5.0     |
24
      | SA       | 1    | 5.0     |
25
    And the following "course enrolments" exist:
26
      | user     | course | role           |
27
      | teacher1 | C1     | editingteacher |
28
    And the following "question categories" exist:
29
      | contextlevel    | reference      | name          |
30
      | Activity module | Test quiz Q001 | Quiz category |
31
 
32
  Scenario: Generate general and specific report
33
    Given I am on the "C1" "Course" page logged in as "admin"
34
    And I navigate to "Reports > Question instances" in site administration
1441 ariadna 35
    # Checks the dropdown list is in alphabetical order
36
    And "Matching" "option" should appear before "Select missing words" "option" in the "Question type" "select"
1 efrain 37
    When I press "Get the report"
1441 ariadna 38
    Then "Quiz: Test quiz Q001" row "Total" column of "generaltable" table should contain "2"
39
    And "Quiz: Test quiz Q001" row "Visible" column of "generaltable" table should contain "2"
40
    And "Quiz: Test quiz Q001" row "Hidden" column of "generaltable" table should contain "0"
1 efrain 41
 
42
  Scenario: Generate report displaying hidden questions
43
    Given I am on the "Test quiz Q001" "mod_quiz > question bank" page logged in as "admin"
44
    And I choose "Delete" action for "TF" in the question bank
45
    And I press "Delete"
46
    And I navigate to "Reports > Question instances" in site administration
47
    When I press "Get the report"
1441 ariadna 48
    Then "Quiz: Test quiz Q001" row "Total" column of "generaltable" table should contain "2"
49
    And "Quiz: Test quiz Q001" row "Visible" column of "generaltable" table should contain "1"
50
    And "Quiz: Test quiz Q001" row "Hidden" column of "generaltable" table should contain "1"
1 efrain 51
    And I set the field "menuqtype" to "True/False"
52
    And I press "Get the report"
1441 ariadna 53
    And "Quiz: Test quiz Q001" row "Total" column of "generaltable" table should contain "1"
54
    And "Quiz: Test quiz Q001" row "Visible" column of "generaltable" table should contain "0"
55
    And "Quiz: Test quiz Q001" row "Hidden" column of "generaltable" table should contain "1"