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
@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 |
1441 ariadna 14
    And the following config values are set as admin:
15
      | enrol_guest | Yes |
1 efrain 16
    And the following "courses" exist:
17
      | fullname | shortname | category |
18
      | Course 1 | C1        | 0        |
1441 ariadna 19
    And I am on the "Course 1" "enrolment methods" page logged in as admin
20
    And I click on "Enable" "link" in the "Guest access" "table_row"
1 efrain 21
    And the following "course enrolments" exist:
22
      | user     | course | role           |
23
      | student1 | C1     | student        |
24
      | student2 | C1     | student        |
25
      | teacher1 | C1     | editingteacher |
26
      | teacher2 | C1     | teacher        |
27
 
28
  Scenario Outline: Attempt review behaviour when accessing an H5P activity
29
    Given the following "activity" exists:
30
      | activity       | h5pactivity          |
31
      | name           | H5P package          |
32
      | intro          | Test H5P description |
33
      | course         | C1                   |
34
      | idnumber       | h5ppackage           |
35
      | enabletracking | <enabletracking>     |
36
      | reviewmode     | <reviewmode>         |
37
    And the following "mod_h5pactivity > attempts" exist:
38
      | user     | h5pactivity | attempt | interactiontype | rawscore | maxscore | duration | completion | success |
39
      | student1 | H5P package | 1       | compound        | 0        | 2        | 6        | 1          | 0       |
40
      | student1 | H5P package | 2       | compound        | 2        | 2        | 4        | 1          | 1       |
41
      | student2 | H5P package | 1       | compound        | 1        | 2        | 8        | 1          | 0       |
42
    When I am on the "H5P package" "h5pactivity activity" page logged in as <user>
43
    Then "Attempts report" "link" should <attemptsreportlink> in current page administration
44
    And I should <previewmode> "You are in preview mode."
45
    And I should <attempttracking> "Attempt tracking is not enabled for this activity."
46
    And I should <attempttrackingsettings> "You can enable it in Settings."
47
    And I should <viewattempts> "View attempts (3)"
48
 
49
    Examples:
50
      | user     | enabletracking | reviewmode | attemptsreportlink | previewmode | attempttracking | attempttrackingsettings | viewattempts |
1441 ariadna 51
      | guest    | 1              | 1          | not exist          | not see     | not see         | not see                 | not see      |
52
      | guest    | 1              | 0          | not exist          | not see     | not see         | not see                 | not see      |
53
      | guest    | 0              | 1          | not exist          | not see     | not see         | not see                 | not see      |
1 efrain 54
      | student1 | 1              | 1          | exist              | not see     | not see         | not see                 | not see      |
55
      | student1 | 1              | 0          | not exist          | not see     | not see         | not see                 | not see      |
56
      | student1 | 0              | 1          | not exist          | not see     | not see         | not see                 | not see      |
57
      | teacher1 | 1              | 1          | exist              | see         | not see         | not see                 | see          |
58
      | teacher1 | 1              | 0          | exist              | see         | not see         | not see                 | see          |
59
      | teacher1 | 0              | 1          | not exist          | see         | see             | see                     | not see      |
60
      | teacher2 | 0              | 1          | not exist          | see         | see             | not see                 | not see      |
61
      | teacher2 | 1              | 1          | exist              | see         | not see         | not see                 | see          |
62
 
63
  Scenario: View link behaviour
64
    Given the following "activity" exists:
65
      | activity       | h5pactivity          |
66
      | name           | H5P package          |
67
      | intro          | Test H5P description |
68
      | course         | C1                   |
69
      | idnumber       | h5ppackage           |
70
      | enabletracking | 1                    |
71
      | reviewmode     | 1                    |
72
    When I am on the "H5P package" "h5pactivity activity" page logged in as teacher1
73
    # The link is displayed with the correct number of attempts (in that case 0 because there are no attempts yet).
74
    Then I should see "View attempts (0)"
75
    Then I follow "View attempts (0)"
76
    And I should not see "View user attempts"
77
    But the following "mod_h5pactivity > attempt" exists:
78
      | user            | student1    |
79
      | h5pactivity     | H5P package |
80
      | attempt         | 1           |
81
      | interactiontype | compound    |
82
      | rawscore        | 2           |
83
      | maxscore        | 2           |
84
      | duration        | 4           |
85
      | completion      | 1           |
86
      | success         | 1           |
87
    And I am on the "H5P package" "h5pactivity activity" page
88
    And I follow "View attempts (1)"
89
    And I should see "View (1)"