Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@block @block_glossary_random @javascript @addablocklink
2
Feature: Add the glossary random block when main feature is enabled
3
    In order to add the glossary random block to my course
4
    As a teacher
5
    It should be added to courses only if the glossary module is enabled.
6
 
7
  Background:
8
    Given the following "courses" exist:
9
      | fullname | shortname | format |
10
      | Course 1 | C1        | topics |
1441 ariadna 11
    And the following "users" exist:
12
      | username | firstname | lastname | email                |
13
      | student1 | Student   | 1        | student1@example.com |
14
      | teacher1 | Teacher   | 1        | teacher1@example.com |
15
    And the following "course enrolments" exist:
16
      | user     | course | role           |
17
      | student1 | C1     | student        |
18
      | teacher1 | C1     | editingteacher |
1 efrain 19
    And I am on the "C1" "course" page logged in as "admin"
20
 
21
  Scenario: The glossary random block can be added when glossary module is enabled
22
    Given I turn editing mode on
23
    When I click on "Add a block" "link"
24
    Then I should see "Random glossary entry"
25
 
26
  Scenario: The glossary random block cannot be added when glossary module is disabled
27
    Given I navigate to "Plugins > Activity modules > Manage activities" in site administration
1441 ariadna 28
    And I toggle the "Disable Glossary" admin switch "off"
1 efrain 29
    And I am on "Course 1" course homepage with editing mode on
30
    When I click on "Add a block" "link"
31
    Then I should not see "Random glossary entry"
1441 ariadna 32
 
33
  Scenario: View alphabetical order multilang entries in the glossary block
34
    Given the following "activities" exist:
35
      | activity | name    | intro              | course | idnumber  | defaultapproval |
36
      | glossary | Animals | An animal glossary | C1     | glossary3 | 1               |
37
    And the following "mod_glossary > entries" exist:
38
      | glossary | user     | concept   | definition                                                                                          |
39
      | Animals  | student1 | Aardvark  | <span lang="en" class="multilang">Aardvark</span><span lang="de" class="multilang">Erdferkel</span> |
40
      | Animals  | student1 | Kangaroo  | <span lang="en" class="multilang">Kangaroo</span><span lang="de" class="multilang">Känguru</span>   |
41
      | Animals  | student1 | Zebra     | <span lang="en" class="multilang">Zebra</span><span lang="de" class="multilang">Zebra</span>        |
42
    And the "multilang" filter is "on"
43
    And the "multilang" filter applies to "content and headings"
44
    And I log out
45
    And I log in as "teacher1"
46
    And I am on "C1" course homepage with editing mode on
47
    And I add the "Random glossary entry..." block
48
    And I set the following fields to these values:
49
      | Title                             | ManualGlossaryblock |
50
      | Take entries from this glossary   | Animals             |
51
      | Days before a new entry is chosen | 0                   |
52
      | How a new entry is chosen         | Alphabetical order  |
53
    And I press "Save changes"
54
    And I should see "Aardvark" in the "ManualGlossaryblock" "block"
55
    And I should not see "AardvarkErdferkel" in the "ManualGlossaryblock" "block"
56
    And I reload the page
57
    And I should see "Kangaroo" in the "ManualGlossaryblock" "block"
58
    And I reload the page
59
    Then I should see "Zebra" in the "ManualGlossaryblock" "block"
60
    And I log out