first commit

This commit is contained in:
CHIEFSOFT\ameye
2024-09-30 18:11:26 -04:00
commit e592ca6823
27270 changed files with 5002257 additions and 0 deletions
@@ -0,0 +1,28 @@
@block @block_private_files @_file_upload @javascript
Feature: The private files block allows users to store files privately in moodle on activity page
In order to store a private file in moodle
As a teacher
I can upload the file to my private files area using the private files block in an activity
Scenario: Upload a file to the private files block in an activity
Given the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "activities" exist:
| activity | course | idnumber | name | intro |
| page | C1 | page1 | Test page name | Test page description |
And the following "blocks" exist:
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
| private_files | Activity module | page1 | mod-page-* | side-pre |
And I am on the "Test page name" "page activity" page logged in as teacher1
And I should see "No files available" in the "Private files" "block"
When I follow "Manage private files..."
And I upload "blocks/private_files/tests/fixtures/testfile.txt" file to "Files" filemanager
And I press "Save changes"
Then I should see "testfile.txt" in the "Private files" "block"
@@ -0,0 +1,26 @@
@block @block_private_files @_file_upload @javascript
Feature: The private files block allows users to store files privately in moodle on course page
In order to store a private file in moodle
As a teacher
I can upload the file to my private files area using the private files block in a course
Scenario: Upload a file to the private files block from a course
Given the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "blocks" exist:
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
| private_files | Course | C1 | course-view-* | side-pre |
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I should see "No files available" in the "Private files" "block"
When I follow "Manage private files..."
And I upload "blocks/private_files/tests/fixtures/testfile.txt" file to "Files" filemanager
And I press "Save changes"
Then I should see "testfile.txt" in the "Private files" "block"
@@ -0,0 +1,20 @@
@block @block_private_files @_file_upload @javascript
Feature: The private files block allows users to store files privately in moodle on dashboard
In order to store a private file in moodle
As a user
I can upload the file to my private files area using the private files block on the dashboard
Scenario: Upload a file to the private files block from the dashboard
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "blocks" exist:
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
| private_files | System | 1 | my-index | side-post |
And I log in as "teacher1"
And "Private files" "block" should exist
And I should see "No files available" in the "Private files" "block"
When I follow "Manage private files..."
And I upload "blocks/private_files/tests/fixtures/testfile.txt" file to "Files" filemanager
And I press "Save changes"
Then I should see "testfile.txt" in the "Private files" "block"
@@ -0,0 +1,32 @@
@block @block_private_files @_file_upload
Feature: The private files block allows users to store files privately in moodle on front page.
In order to store a private file in moodle
As a teacher
I can upload the file to my private files area using the private files block from the front page
Background:
Given the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "blocks" exist:
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
| private_files | System | 1 | site-index | side-pre |
Scenario: Try to view the private files block as a guest
Given I log in as "guest"
When I am on site homepage
Then "Private files" "block" should not exist
@javascript
Scenario: Upload a file to the private files block from the frontpage
Given I log in as "teacher1"
And I am on site homepage
And "Private files" "block" should exist
And I should see "No files available" in the "Private files" "block"
When I follow "Manage private files..."
And I upload "blocks/private_files/tests/fixtures/testfile.txt" file to "Files" filemanager
And I press "Save changes"
Then I should see "testfile.txt" in the "Private files" "block"
+1
View File
@@ -0,0 +1 @@
This is a test file