Proyectos de Subversion Moodle

Rev

| 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 "question categories" exist:
15
      | contextlevel | reference | name           |
16
      | Course       | C1        | Test questions |
17
    And the following "activities" exist:
18
      | activity | course | name           |
19
      | quiz     | C1     | Test quiz Q001 |
20
    And the following "questions" exist:
21
      | questioncategory | qtype       | name |
22
      | Test questions   | truefalse   | TF   |
23
      | Test questions   | shortanswer | SA   |
24
    And quiz "Test quiz Q001" contains the following questions:
25
      | question | page | maxmark |
26
      | TF       | 1    | 5.0     |
27
      | SA       | 1    | 5.0     |
28
    And the following "course enrolments" exist:
29
      | user     | course | role           |
30
      | teacher1 | C1     | editingteacher |
31
    And the following "question categories" exist:
32
      | contextlevel    | reference      | name          |
33
      | Activity module | Test quiz Q001 | Quiz category |
34
 
35
  Scenario: Generate general and specific report
36
    Given I am on the "C1" "Course" page logged in as "admin"
37
    And I navigate to "Reports > Question instances" in site administration
38
    When I press "Get the report"
39
    Then "Course: Course 1" row "Total" column of "generaltable" table should contain "2"
40
    And "Course: Course 1" row "Visible" column of "generaltable" table should contain "2"
41
    And "Course: Course 1" row "Hidden" column of "generaltable" table should contain "0"
42
 
43
  Scenario: Generate report displaying hidden questions
44
    Given I am on the "Test quiz Q001" "mod_quiz > question bank" page logged in as "admin"
45
    And I choose "Delete" action for "TF" in the question bank
46
    And I press "Delete"
47
    And I navigate to "Reports > Question instances" in site administration
48
    When I press "Get the report"
49
    Then "Course: Course 1" row "Total" column of "generaltable" table should contain "2"
50
    And "Course: Course 1" row "Visible" column of "generaltable" table should contain "1"
51
    And "Course: Course 1" row "Hidden" column of "generaltable" table should contain "1"
52
    And I set the field "menuqtype" to "True/False"
53
    And I press "Get the report"
54
    And "Course: Course 1" row "Total" column of "generaltable" table should contain "1"
55
    And "Course: Course 1" row "Visible" column of "generaltable" table should contain "0"
56
    And "Course: Course 1" row "Hidden" column of "generaltable" table should contain "1"