Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@block @block_activity_results
2
Feature: The activity results block can have administrator set defaults
3
  In order to be customize the activity results block
4
  As an admin
5
  I need can assign some site wide defaults
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email | idnumber |
10
      | teacher1 | Teacher | 1 | teacher1@example.com | T1 |
11
      | student1 | Student | 1 | student1@example.com | S1 |
12
    And the following "courses" exist:
13
      | fullname | shortname | category |
14
      | Course 1 | C1 | 0 |
15
    And the following "course enrolments" exist:
16
      | user | course | role |
17
      | teacher1 | C1 | editingteacher |
18
      | student1 | C1 | student |
19
    And the following "activity" exists:
20
      | activity                      | assign          |
21
      | course                        | C1              |
22
      | idnumber                      | 0001            |
23
      | name                          | Test assignment |
24
      | assignsubmission_file_enabled | 0               |
25
    And I log in as "teacher1"
26
    And I am on "Course 1" course homepage with editing mode on
27
 
28
  Scenario: Assign some site-wide defaults to the block.
29
    Given the following config values are set as admin:
30
      | config_showbest    | 0 | block_activity_results |
31
      | config_showworst   | 0 | block_activity_results |
32
      | config_gradeformat | 2 | block_activity_results |
33
      | config_nameformat  | 2 | block_activity_results |
34
    And I am on "Course 1" course homepage
35
    And I add the "Activity results" block
36
    When I configure the "Activity results" block
37
    And the following fields match these values:
38
      | config_showbest    | 0 |
39
      | config_showworst   | 0 |
40
      | config_gradeformat | Fractions |
41
      | config_nameformat  | Display only ID numbers |
42
    And I press "Save changes"
43
    Then I should see "This block's configuration currently does not allow it to show any results." in the "Activity results" "block"
44
 
45
  Scenario: Assign some site-wide defaults to the block and lock them.
46
    Given the following config values are set as admin:
47
      | config_showbest         | 0 | block_activity_results |
48
      | config_showbest_locked  | 1 | block_activity_results |
49
      | config_showworst        | 0 | block_activity_results |
50
      | config_showworst_locked | 1 | block_activity_results |
51
    And the following "blocks" exist:
52
      | blockname        | contextlevel | reference | pagetypepattern | defaultregion |
53
      | activity_results | Course       | C1        | course-view-*   | side-pre      |
54
    And I am on "Course 1" course homepage
55
    When I configure the "Activity results" block
56
    And the following fields match these values:
57
      | config_showbest    | 0 |
58
      | config_showworst   | 0 |
59
    And the "config_showbest" "field" should be readonly
60
    And the "config_showworst" "field" should be readonly
61
    And I press "Save changes"
62
    Then I should see "This block's configuration currently does not allow it to show any results." in the "Activity results" "block"