Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@block @block_completion_progress @javascript
2
Feature: Using block completion progress for a quiz
3
  In order to know what quizzes are due
4
  As a student
5
  I can visit my dashboard
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email |
10
      | student1 | Student | 1 | student1@example.com |
11
      | teacher1 | Teacher | 1 | teacher1@example.com |
12
    And the following config values are set as admin:
13
      | enablecompletion | 1 |
14
      | enableavailability | 1 |
15
    And the following "courses" exist:
16
      | fullname | shortname | category | enablecompletion |
17
      | Course 1 | C1        | 0        | 1                |
18
    And the following "course enrolments" exist:
19
      | user     | course | role           |
20
      | student1 | C1     | student        |
21
      | teacher1 | C1     | editingteacher |
22
    # 2 = Show activity as complete when conditions are met.
23
    And the following "activities" exist:
24
      | activity | course | idnumber | name                    | timeclose  | enablecompletion | completionview | completion |
25
      | quiz     | C1     | Q1A      | Quiz 1A No deadline     | 0          | 1                | 1              | 2 |
26
      | quiz     | C1     | Q1B      | Quiz 1B Past deadline   | 1337       | 1                | 0              | 0 |
27
      | quiz     | C1     | Q1C      | Quiz 1C Future deadline | 9000000000 | 1                | 0              | 0 |
28
    And the following "question categories" exist:
29
      | contextlevel | reference | name           |
30
      | Course       | C1        | Test questions |
31
    And the following "questions" exist:
32
      | qtype     | name           | questiontext              | questioncategory |
33
      | truefalse | First question | Answer the first question | Test questions   |
34
    And quiz "Quiz 1A No deadline" contains the following questions:
35
      | question       | page |
36
      | First question | 1    |
37
    And quiz "Quiz 1B Past deadline" contains the following questions:
38
      | question       | page |
39
      | First question | 1    |
40
    And quiz "Quiz 1C Future deadline" contains the following questions:
41
      | question       | page |
42
      | First question | 1    |
43
    Given I log in as "teacher1"
44
    And I am on "Course 1" course homepage with editing mode on
45
    And I add the "Completion Progress" block
46
    And I configure the "Completion Progress" block
47
    And I set the following fields to these values:
48
      | Show percentage to students | Yes |
49
    And I press "Save changes"
50
    And I log out
51
 
52
  Scenario: Basic functioning of the block
53
    Given I log in as "student1"
54
    And I am on "Course 1" course homepage
55
    When I hover ".block_completion_progress .progressBarCell:first-child" "css_element"
56
    Then I should see "Progress: 0%" in the "Completion Progress" "block"
57
    And I should see "Quiz 1A No deadline" in the "Completion Progress" "block"
58
    And I should see "Not completed" in the "Completion Progress" "block"
59
 
60
  Scenario: Submit the quizzes
61
    Given I am on the "Quiz 1A No deadline" "mod_quiz > View" page logged in as "student1"
62
    And I click on "Attempt quiz" "link_or_button"
63
    And I follow "Finish attempt ..."
64
    And I press "Submit all and finish"
65
    And I am on "Course 1" course homepage
66
    When I hover ".block_completion_progress .progressBarCell:first-child" "css_element"
67
    Then I should see "Progress: 100%" in the "Completion Progress" "block"
68
    And I should see "Quiz 1A No deadline" in the "Completion Progress" "block"
69
    And I should see "Completed" in the "Completion Progress" "block"