403Webshell
Server IP : 104.21.80.248  /  Your IP : 162.159.115.42
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/user/tests/behat/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /Inetpub/www/myschool/triamudom/tuprblearn/user/tests/behat/enrol_cohort_list.feature
@core @core_user
Feature: Viewing the list of cohorts to enrol in a course
  In order to ensure we only display the cohorts when applicable
  As a teacher
  I should only see the list of cohorts under some circumstances

  Background:
    Given the following "users" exist:
      | username  | firstname | lastname | email                 |
      | teacher1  | Teacher   | 1        | [email protected]  |
    And the following "courses" exist:
      | fullname | shortname |
      | Course 1 | C1        |
    And the following "course enrolments" exist:
      | user      | course | role           |
      | teacher1  | C1     | editingteacher |

  @javascript
  Scenario: Check the teacher does not see the cohorts field without the proper capabilities
    Given I log in as "admin"
    And I set the following system permissions of "Teacher" role:
      | capability           | permission |
      | moodle/cohort:manage | Prohibit |
      | moodle/cohort:view   | Prohibit |
    And I navigate to "Users > Accounts >Cohorts" in site administration
    And I follow "Add new cohort"
    And I set the following fields to these values:
      | Name        | Test cohort name        |
      | Context     | System                  |
      | Cohort ID   | 1337                    |
      | Description | Test cohort description |
    And I press "Save changes"
    And I log out
    And I log in as "teacher1"
    And I am on "Course 1" course homepage
    And I navigate to course participants
    When I press "Enrol users"
    Then I should not see "Select cohorts"
    And I should not see "Enrol selected users and cohorts"

  @javascript
  Scenario: Check we show the cohorts field if there are some present
    Given I log in as "admin"
    And I navigate to "Users > Accounts >Cohorts" in site administration
    And I follow "Add new cohort"
    And I set the following fields to these values:
      | Name        | Test cohort name        |
      | Context     | System                  |
      | Cohort ID   | 1337                    |
      | Description | Test cohort description |
    And I press "Save changes"
    And I log out
    And I log in as "teacher1"
    And I am on "Course 1" course homepage
    And I navigate to course participants
    When I press "Enrol users"
    Then I should see "Select cohorts"
    And I should see "Enrol selected users and cohorts"

  @javascript
  Scenario: Check we do not show the cohorts field if there are none present
    Given I log in as "teacher1"
    And I am on "Course 1" course homepage
    And I navigate to course participants
    When I press "Enrol users"
    Then I should not see "Select cohorts"
    And I should not see "Enrol selected users and cohorts"

Youez - 2016 - github.com/yon3zu
LinuXploit