HEX
Server: LiteSpeed
System: Linux server.zepintelhosting.com 4.18.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
User: enamadmin (1026)
PHP: 8.2.30
Disabled: exec,system,passthru,shell_exec,proc_nice,proc_terminate,pfsockopen,dl,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname,leak,apache_child_terminate
Upload Files
File: /home/enamadmin/public_html/aaelearningb/mod/survey/tests/behat/survey_types.feature
@mod @mod_survey
Feature: A teacher can set three types of survey activity
  In order to use verified survey instruments
  As a teacher
  I need to set survey activities and select which survey type suits my needs

  Background:
    Given the following "users" exist:
      | username | firstname | lastname | email |
      | teacher1 | Teacher | 1 | teacher1@example.com |
    And the following "courses" exist:
      | fullname | shortname | format |
      | Course 1 | C1 | topics |
    And the following "course enrolments" exist:
      | user | course | role |
      | teacher1 | C1 | editingteacher |
    And I enable "survey" "mod" plugin
    And I log in as "teacher1"

  Scenario: Switching between the three survey types
    Given the following "activities" exist:
      | activity | name             | course | idnumber  |
      | survey   | Test survey name | C1     | survey1   |
    And I am on the "Test survey name" "survey activity editing" page
    And I set the following fields to these values:
      | Survey type | ATTLS (20 item version) |
    And I press "Save and display"
    Then I should see "Attitudes Towards Thinking and Learning"
    And I navigate to "Settings" in current page administration
    And I set the following fields to these values:
      | Survey type | Critical incidents |
    And I press "Save and display"
    And I should see "At what moment in class were you most engaged as a learner?"
    And I navigate to "Settings" in current page administration
    And I set the following fields to these values:
      | Survey type | COLLES (Preferred and Actual) |
    And I press "Save and display"
    And I should see "In this online unit..."
    And I should see "my learning focuses on issues that interest me."

  Scenario: Survey activity is created via UI
    Given I add a survey activity to course "Course 1" section "1"
    And I set the following fields to these values:
      | Name        | Test survey name        |
      | Description | Test survey description |
      | Survey type | ATTLS (20 item version) |
    When I press "Save and return to course"
    Then I should see "Test survey name"