Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 20... Línea 20...
20
      """
20
      """
21
      <div>
21
      <div>
22
        <p>This is my draft</p>
22
        <p>This is my draft</p>
23
      </div>
23
      </div>
24
      """
24
      """
-
 
25
 
-
 
26
  Scenario: Permissions can be configured to control access to HTML features
-
 
27
    Given the following "users" exist:
-
 
28
      | username | firstname | lastname | email                |
-
 
29
      | teacher1 | Teacher   | 1        | teacher1@example.com |
-
 
30
      | teacher2 | Teacher   | 2        | teacher2@example.com |
-
 
31
    And the following "courses" exist:
-
 
32
      | fullname | shortname | format |
-
 
33
      | Course 1 | C1        | topics |
-
 
34
    And the following "roles" exist:
-
 
35
      | name           | shortname | description         | archetype      |
-
 
36
      | Custom teacher | custom1   | Limited permissions | editingteacher |
-
 
37
    And the following "course enrolments" exist:
-
 
38
      | user     | course | role           |
-
 
39
      | teacher1 | C1     | editingteacher |
-
 
40
      | teacher2 | C1     | custom1        |
-
 
41
    And the following "activity" exists:
-
 
42
      | activity | assign          |
-
 
43
      | course   | C1              |
-
 
44
      | name     | Test assignment |
-
 
45
    And the following "permission overrides" exist:
-
 
46
      | capability    | permission | role    | contextlevel | reference |
-
 
47
      | tiny/html:use | Prohibit   | custom1 | Course       | C1        |
-
 
48
    # Check plugin access as a role with prohibited permissions.
-
 
49
    And I log in as "teacher2"
-
 
50
    And I am on the "Test assignment" Activity page
-
 
51
    And I navigate to "Settings" in current page administration
-
 
52
    And I set the field "Activity instructions" to "<div><p>This is my draft</p></div>"
-
 
53
    When I click on the "View > Source code" menu item for the "Activity instructions" TinyMCE editor
-
 
54
    Then "#id_activityeditor_codeMirrorContainer" "css_element" should not exist
-
 
55
    # Check plugin access as a role with allowed permissions.
-
 
56
    And I log in as "teacher1"
-
 
57
    And I am on the "Test assignment" Activity page
-
 
58
    And I navigate to "Settings" in current page administration
-
 
59
    And I set the field "Activity instructions" to "<div><p>This is my draft</p></div>"
-
 
60
    And I click on the "View > Source code" menu item for the "Activity instructions" TinyMCE editor
-
 
61
    And "#id_activityeditor_codeMirrorContainer" "css_element" should exist