Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_h5pactivity @core_h5p
2
Feature: Attempts review settings.
3
  In order to let users to review attempts
4
  As a teacher
5
  I need to have specific settings to let students access the attempts report
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email                |
10
      | student1 | Student   | 1        | student1@example.com |
11
      | student2 | Student   | 2        | student2@example.com |
12
      | teacher1 | Teacher   | 1        | teacher1@example.com |
13
      | teacher2 | Teacher   | 2        | teacher2@example.com |
14
    And the following "courses" exist:
15
      | fullname | shortname | category |
16
      | Course 1 | C1        | 0        |
17
    And the following "course enrolments" exist:
18
      | user     | course | role           |
19
      | student1 | C1     | student        |
20
      | student2 | C1     | student        |
21
      | teacher1 | C1     | editingteacher |
22
      | teacher2 | C1     | teacher        |
23
 
24
  Scenario Outline: Attempt review behaviour when accessing an H5P activity
25
    Given the following "activity" exists:
26
      | activity       | h5pactivity          |
27
      | name           | H5P package          |
28
      | intro          | Test H5P description |
29
      | course         | C1                   |
30
      | idnumber       | h5ppackage           |
31
      | enabletracking | <enabletracking>     |
32
      | reviewmode     | <reviewmode>         |
33
    And the following "mod_h5pactivity > attempts" exist:
34
      | user     | h5pactivity | attempt | interactiontype | rawscore | maxscore | duration | completion | success |
35
      | student1 | H5P package | 1       | compound        | 0        | 2        | 6        | 1          | 0       |
36
      | student1 | H5P package | 2       | compound        | 2        | 2        | 4        | 1          | 1       |
37
      | student2 | H5P package | 1       | compound        | 1        | 2        | 8        | 1          | 0       |
38
    When I am on the "H5P package" "h5pactivity activity" page logged in as <user>
39
    Then "Attempts report" "link" should <attemptsreportlink> in current page administration
40
    And I should <previewmode> "You are in preview mode."
41
    And I should <attempttracking> "Attempt tracking is not enabled for this activity."
42
    And I should <attempttrackingsettings> "You can enable it in Settings."
43
    And I should <viewattempts> "View attempts (3)"
44
 
45
    Examples:
46
      | user     | enabletracking | reviewmode | attemptsreportlink | previewmode | attempttracking | attempttrackingsettings | viewattempts |
47
      | student1 | 1              | 1          | exist              | not see     | not see         | not see                 | not see      |
48
      | student1 | 1              | 0          | not exist          | not see     | not see         | not see                 | not see      |
49
      | student1 | 0              | 1          | not exist          | not see     | not see         | not see                 | not see      |
50
      | teacher1 | 1              | 1          | exist              | see         | not see         | not see                 | see          |
51
      | teacher1 | 1              | 0          | exist              | see         | not see         | not see                 | see          |
52
      | teacher1 | 0              | 1          | not exist          | see         | see             | see                     | not see      |
53
      | teacher2 | 0              | 1          | not exist          | see         | see             | not see                 | not see      |
54
      | teacher2 | 1              | 1          | exist              | see         | not see         | not see                 | see          |
55
 
56
  Scenario: View link behaviour
57
    Given the following "activity" exists:
58
      | activity       | h5pactivity          |
59
      | name           | H5P package          |
60
      | intro          | Test H5P description |
61
      | course         | C1                   |
62
      | idnumber       | h5ppackage           |
63
      | enabletracking | 1                    |
64
      | reviewmode     | 1                    |
65
    When I am on the "H5P package" "h5pactivity activity" page logged in as teacher1
66
    # The link is displayed with the correct number of attempts (in that case 0 because there are no attempts yet).
67
    Then I should see "View attempts (0)"
68
    Then I follow "View attempts (0)"
69
    And I should not see "View user attempts"
70
    But the following "mod_h5pactivity > attempt" exists:
71
      | user            | student1    |
72
      | h5pactivity     | H5P package |
73
      | attempt         | 1           |
74
      | interactiontype | compound    |
75
      | rawscore        | 2           |
76
      | maxscore        | 2           |
77
      | duration        | 4           |
78
      | completion      | 1           |
79
      | success         | 1           |
80
    And I am on the "H5P package" "h5pactivity activity" page
81
    And I follow "View attempts (1)"
82
    And I should see "View (1)"