Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@block @block_social_activities @format_social
2
Feature: Edit activities in social activities block
3
  In order to use social activities block
4
  As a teacher
5
  I need to add and edit activities there
6
 
7
  Background:
8
    Given the following "courses" exist:
9
      | fullname | shortname | format |
10
      | Course 1 | C1        | social |
11
    And the following "users" exist:
12
      | username | firstname | lastname |
13
      | user1 | User | One |
14
      | student1 | Student | One |
15
    And the following "course enrolments" exist:
16
      | user | course | role |
17
      | user1 | C1 | editingteacher |
18
      | student1 | C1 | student |
19
 
20
  @javascript
21
  Scenario: Edit name of activity in-place in social activities block
22
    Given the following "activities" exist:
23
      | activity | course | name          |
24
      | forum    | C1     | My forum name |
25
    And I log in as "user1"
26
    And I am on "Course 1" course homepage with editing mode on
27
    When I set the field "Edit title" in the "My forum name" "block_social_activities > Activity" to "New forum name"
28
    Then I should not see "My forum name" in the "Social activities" "block"
29
    And I should see "New forum name"
30
    And I follow "New forum name"
31
    And I should not see "My forum name"
32
    And I should see "New forum name"
33
 
34
  @javascript
35
  Scenario: Activities in social activities block can be made available but not visible on a course page
36
    Given the following config values are set as admin:
37
      | allowstealth | 1 |
38
    And the following "blocks" exist:
39
      | blockname       | contextlevel | reference | pagetypepattern | defaultregion |
40
      | recent_activity | Course       | C1        | course-view-*   | side-pre      |
41
    And I log in as "user1"
42
    And I am on "Course 1" course homepage with editing mode on
43
    And I press "Add an activity or resource"
44
    And I click on "Add a new Forum" "link" in the "Add an activity or resource" "dialogue"
45
    And I set the field "Forum name" to "My forum name"
46
    And I press "Save and return to course"
47
    When I open "My forum name" actions menu in social activities block
48
    And I choose "Availability > Make available but don't show on course page" in the open action menu
49
    Then I should see "Available but not shown on course page" in the "My forum name" "core_courseformat > Activity visibility"
50
    # Make sure that "Availability" dropdown in the edit menu has three options.
51
    And I open "My forum name" actions menu in social activities block
52
    And I click on "Edit settings" "link" in the "My forum name" activity in social activities block
53
    And I expand all fieldsets
54
    And the "Availability" select box should contain "Show on course page"
55
    And the "Availability" select box should contain "Hide on course page"
56
    And the field "Availability" matches value "Make available but don't show on course page"
57
    And I press "Save and return to course"
58
    And "My forum name" activity in social activities block should be available but hidden from course page
59
    And I turn editing mode off
60
    And "My forum name" activity in social activities block should be available but hidden from course page
61
    And I log out
62
    # Student will not see the module on the course page but can access it from other reports and blocks:
63
    When I am on the "Course 1" course page logged in as student1
64
    Then I should not see "My forum name" in the "Social activities" "block"
65
    And I click on "My forum name" "link" in the "Recent activity" "block"
66
    And I should see "My forum name" in the ".breadcrumb" "css_element"