[ Index ]

PHP Cross Reference of moodle-2.8

title

Body

[close]

/mod/choice/tests/behat/ -> publish_results_anonymously.feature (source)

   1  @mod @mod_choice
   2  Feature: A teacher can choose whether to publish choice activity results anonymously or showing names
   3    In order to keep students privacy or to give more info to students
   4    As a teacher
   5    I need to select whether I want other students to know who selected what option
   6  
   7    Background:
   8      Given the following "users" exist:
   9        | username | firstname | lastname | email |
  10        | teacher1 | Teacher | 1 | [email protected] |
  11        | student1 | Student | 1 | [email protected] |
  12        | student2 | Student | 2 | [email protected] |
  13      And the following "courses" exist:
  14        | fullname | shortname | category |
  15        | Course 1 | C1 | 0 |
  16      And the following "course enrolments" exist:
  17        | user | course | role |
  18        | teacher1 | C1 | editingteacher |
  19        | student1 | C1 | student |
  20        | student2 | C1 | student |
  21      And I log in as "teacher1"
  22      And I follow "Course 1"
  23      And I turn editing mode on
  24  
  25    @javascript
  26    Scenario: Publish anonymous results
  27      Given I add a "Choice" to section "1" and I fill the form with:
  28        | Choice name | Choice 1 |
  29        | Description | Choice Description |
  30        | option[0] | Option 1 |
  31        | option[1] | Option 2 |
  32        | Publish results | Always show results to students |
  33        | Privacy of results | Publish anonymous results, do not show student names |
  34      And I log out
  35      And I log in as "student1"
  36      And I follow "Course 1"
  37      And I choose "Option 1" from "Choice 1" choice activity
  38      And I log out
  39      When I log in as "student2"
  40      And I follow "Course 1"
  41      And I follow "Choice 1"
  42      Then I should not see "Student 1"
  43      And I should not see "Users who chose this option"
  44      And I hover ".results .graph img" "css_element"
  45  
  46    @javascript
  47    Scenario: Publish full results
  48      Given I add a "Choice" to section "1" and I fill the form with:
  49        | Choice name | Choice 1 |
  50        | Description | Choice Description |
  51        | option[0] | Option 1 |
  52        | option[1] | Option 2 |
  53        | Publish results | Always show results to students |
  54        | Privacy of results | Publish full results, showing names and their choices |
  55      And I log out
  56      And I log in as "student1"
  57      And I follow "Course 1"
  58      And I choose "Option 1" from "Choice 1" choice activity
  59      And I log out
  60      When I log in as "student2"
  61      And I follow "Course 1"
  62      And I follow "Choice 1"
  63      Then I should see "Student 1"
  64      And I should see "Users who chose this option"


Generated: Fri Nov 28 20:29:05 2014 Cross-referenced by PHPXref 0.7.1