Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_workshop
2
Feature: Exporting workshop submissions and assessments to a portfolio
3
  In order to archive my workshop contribution in a personal storage
4
  As a student or as a teacher
5
  I need to be able to export a workshop submission and its associated assessments
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email                 |
10
      | student1 | Sam1      | Student1 | student1@example.com  |
11
      | student2 | Sam2      | Student2 | student2@example.com  |
12
      | teacher1 | Terry1    | Teacher1 | teacher1@example.com  |
13
    And the following "courses" exist:
14
      | fullname  | shortname |
15
      | Course1   | c1        |
16
    And the following "course enrolments" exist:
17
      | user     | course | role           |
18
      | student1 | c1     | student        |
19
      | student2 | c1     | student        |
20
      | teacher1 | c1     | editingteacher |
21
    And the following "activities" exist:
22
      | activity | name         | course | idnumber  | submissiontypefile |
23
      | workshop | TestWorkshop | c1     | workshop1 | 1                  |
24
    # Admin needs to enable portfolio API and set a portfolio instance first.
25
    And I log in as "admin"
26
    And the following config values are set as admin:
27
      | enableportfolios | 1 |
28
    And I navigate to "Plugins > Portfolios > Manage portfolios" in site administration
29
    And I set portfolio instance "File download" to "Enabled and visible"
30
    And I click on "Save" "button"
31
    # Teacher sets up assessment form and changes the phase to submission.
32
    And I am on the "Course1" course page logged in as teacher1
33
    And I edit assessment form in workshop "TestWorkshop" as:
34
      | id_description__idx_0_editor | Aspect1 |
35
      | id_description__idx_1_editor | Aspect2 |
36
    And I change phase in workshop "TestWorkshop" to "Submission phase"
37
    # Student1 submits.
38
    And I am on the "TestWorkshop" "workshop activity" page logged in as student1
39
    And I add a submission in workshop "TestWorkshop" as:
40
      | Title              | Submission1  |
41
      | Submission content | Some content |
42
    # Student2 submits.
43
    And I am on the "Course1" course page logged in as student2
44
    And I add a submission in workshop "TestWorkshop" as:
45
      | Title              | Submission2  |
46
      | Submission content | Some content |
47
     # Teacher allocates reviewers and changes the phase to assessment.
48
    And I am on the "TestWorkshop" "workshop activity" page logged in as teacher1
49
    And I should see "to allocate: 2"
50
    And I should see "Workshop submissions report"
51
    And I should see "Submitted (2) / not submitted (0)"
52
    And I should see "Submission1" in the "Sam1 Student1" "table_row"
53
    And I should see "Submission2" in the "Sam2 Student2" "table_row"
54
    And I allocate submissions in workshop "TestWorkshop" as:
55
      | Participant   | Reviewer      |
56
      | Sam1 Student1 | Sam2 Student2 |
57
      | Sam2 Student2 | Sam1 Student1 |
58
    And I follow "TestWorkshop"
59
    And I should see "to allocate: 0"
60
    And I change phase in workshop "TestWorkshop" to "Assessment phase"
61
 
62
  Scenario: Students can export their own submission to a portfolio.
63
    Given I am on the "TestWorkshop" "workshop activity" page logged in as student1
64
    When I follow "Submission1"
65
    Then I should see "Submission1"
66
    And "Export this page" "button" should exist
67
    And I click on "Export this page" "button"
68
    And I should see "Available export formats"
69
    And I click on "Next" "button"
70
    And I should see "Summary of your export"
71
    And I click on "Continue" "button"
72
    And I should see "Return to where you were"
73
 
74
  Scenario: Students can export submission they have peer-assessed.
75
    Given I am on the "TestWorkshop" "workshop activity" page logged in as student1
76
    And I should see "Submission2"
77
    And I follow "Submission2"
78
    And "Export this page" "button" should exist
79
    When I click on "Export this page" "button"
80
    Then I should see "Available export formats"
81
    And I click on "Next" "button"
82
    And I should see "Summary of your export"
83
    And I click on "Continue" "button"
84
    And I should see "Return to where you were"
85
 
86
  Scenario: If the portfolio API is disabled, the portfolio export button is not displayed.
87
    Given the following config values are set as admin:
88
      | enableportfolios | 0 |
89
    When I am on the "TestWorkshop" "workshop activity" page logged in as student1
90
    And I follow "Submission1"
91
    Then I should see "Submission1"
92
    And "Export this page" "button" should not exist