Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_forum
2
Feature: Ensure only users with appropriate permissions can export forum discussions.
3
 
4
  Background:
5
    Given the following "users" exist:
6
      | username | firstname | lastname | email                 |
7
      | teacher1 | Teacher   | 1        | teacher1@example.com  |
8
      | student1 | Student   | 1        | student1@example.com  |
9
    And the following "courses" exist:
10
      | fullname | shortname  | category  |
11
      | Course 1 | C1         | 0         |
12
    And the following "course enrolments" exist:
13
      | user | course | role |
14
      | teacher1 | C1 | editingteacher |
15
      | student1 | C1 | student |
16
 
17
  Scenario: A teacher can export discussions to a portfolio.
18
    Given the following "activities" exist:
19
      | activity   | name                   | course | idnumber     | groupmode |
20
      | forum      | Test forum 1           | C1     | forum        | 0         |
21
    And I log in as "admin"
22
    And the following config values are set as admin:
23
      | enableportfolios | 1 |
24
    And I navigate to "Plugins > Portfolios > Manage portfolios" in site administration
25
    And I set portfolio instance "File download" to "Enabled and visible"
26
    And I click on "Save" "button"
27
    When I am on the "Test forum 1" "forum activity" page logged in as student1
28
    And I add a new discussion to "Test forum 1" forum with:
29
      | Subject | Discussion 1 |
30
      | Message | Test post message |
31
    And I reload the page
32
    And I follow "Discussion 1"
33
    Then "Export whole discussion to portfolio" "button" should not exist
34
    And I am on the "Test forum 1" "forum activity" page logged in as teacher1
35
    And I follow "Discussion 1"
36
    And "Export whole discussion to portfolio" "button" should exist
37
    And I press "Export whole discussion to portfolio"
38
    And I should see "Exporting to portfolio"