HEX
Server: Apache
System: Linux webm010.cluster103.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: iestorre (46869)
PHP: 8.0.30
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/iestorre/moodleAW/moodle15/files/tests/behat/course_files.feature
@core @core_files
Feature: Course files
  In order to add legacy files
  As a user
  I need to upload files

  @javascript
  Scenario: Add legacy files
    Given the following "courses" exists:
      | fullname | shortname | category | legacyfiles |
      | Course 1 | C1 | 0 | 2 |
    And I log in as "admin"
    And I set the following administration settings values:
      | Legacy course files in new courses | 1 |
      | Allow adding to legacy course files | 1 |
    When I follow "Home"
    And I follow "Course 1"
    Then I should see "Legacy course files"
    And I follow "Legacy course files"
    And I press "Edit legacy course files"
    And "Add..." "link" should be visible
    And "Create folder" "link" should be visible

  @javascript
  Scenario: Add legacy file disabled
    Given the following "courses" exists:
      | fullname | shortname | category | legacyfiles |
      | Course 1 | C1 | 0 | 2 |
    And I log in as "admin"
    And I set the following administration settings values:
      | Legacy course files in new courses | 1 |
      | Allow adding to legacy course files | 0 |
    When I follow "Home"
    And I follow "Course 1"
    Then I should see "Legacy course files"
    And I follow "Legacy course files"
    And I press "Edit legacy course files"
    And "Add..." "link" should not be visible
    And "Create folder" "link" should not be visible