[ Index ]

PHP Cross Reference of Unnamed Project

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 | teacher1@example.com |
  11        | student1 | Student | 1 | student1@example.com |
  12        | student2 | Student | 2 | student2@example.com |
  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    Scenario: Publish anonymous results
  26      Given I add a "Choice" to section "1" and I fill the form with:
  27        | Choice name | Choice 1 |
  28        | Description | Choice Description |
  29        | option[0] | Option 1 |
  30        | option[1] | Option 2 |
  31        | Publish results | Always show results to students |
  32        | Privacy of results | Publish anonymous results, do not show student names |
  33      And I log out
  34      And I log in as "student1"
  35      And I follow "Course 1"
  36      And I choose "Option 1" from "Choice 1" choice activity
  37      And I log out
  38      When I log in as "student2"
  39      And I follow "Course 1"
  40      And I follow "Choice 1"
  41      Then I should not see "Student 1"
  42      And I should not see "Users who chose this option"
  43  
  44    Scenario: Publish full results
  45      Given I add a "Choice" to section "1" and I fill the form with:
  46        | Choice name | Choice 1 |
  47        | Description | Choice Description |
  48        | option[0] | Option 1 |
  49        | option[1] | Option 2 |
  50        | Publish results | Always show results to students |
  51        | Privacy of results | Publish full results, showing names and their choices |
  52      And I log out
  53      And I log in as "student1"
  54      And I follow "Course 1"
  55      And I choose "Option 1" from "Choice 1" choice activity
  56      And I log out
  57      When I log in as "student2"
  58      And I follow "Course 1"
  59      And I follow "Choice 1"
  60      Then I should see "Student 1"
  61      And I should see "Users who chose this option"


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1