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,223 @@
@mod @mod_url @core_completion
Feature: View activity completion information in the URL resource
In order to have visibility of URL completion requirements
As a student
I need to be able to view my URL completion progress
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| student1 | Vinnie | Student1 | student1@example.com |
| teacher1 | Darrell | Teacher1 | teacher1@example.com |
And the following "courses" exist:
| fullname | shortname | category | enablecompletion | showcompletionconditions |
| Course 1 | C1 | 0 | 1 | 1 |
And the following "course enrolments" exist:
| user | course | role |
| student1 | C1 | student |
| teacher1 | C1 | editingteacher |
And the following config values are set as admin:
| displayoptions | 0,1,2,3,4,5,6 | url |
Scenario: View automatic completion items in automatic display mode as teacher
Given the following "activity" exists:
| activity | url |
| course | C1 |
| idnumber | Music history |
| name | Music history |
| intro | URL description |
| externalurl | https://moodle.org/ |
| completion | 2 |
| completionview | 1 |
| display | 0 |
When I am on the "Music history" "url activity" page logged in as teacher1
Then "Music history" "link" should exist
And I should see "Click on Music history to open the resource."
And "Music history" should have the "View" completion condition
Scenario: View automatic completion items in automatic display mode as student
Given the following "activity" exists:
| activity | url |
| course | C1 |
| idnumber | Music history |
| name | Music history |
| intro | URL description |
| externalurl | https://moodle.org/ |
| completion | 2 |
| completionview | 1 |
| display | 0 |
When I am on the "Music history" "url activity" page logged in as student1
Then the "View" completion condition of "Music history" is displayed as "done"
Scenario: View automatic completion items in embed display mode as teacher
Given the following "activity" exists:
| activity | url |
| course | C1 |
| idnumber | Music history |
| name | Music history |
| intro | URL description |
| externalurl | https://moodle.org/ |
| completion | 2 |
| completionview | 1 |
| display | 1 |
When I am on the "Music history" "url activity" page logged in as teacher1
Then "Music history" should have the "View" completion condition
Scenario: View automatic completion items in embed display mode as student
Given the following "activity" exists:
| activity | url |
| course | C1 |
| idnumber | Music history |
| name | Music history |
| intro | URL description |
| externalurl | https://moodle.org/ |
| completion | 2 |
| completionview | 1 |
| display | 1 |
When I am on the "Music history" "url activity" page logged in as student1
Then the "View" completion condition of "Music history" is displayed as "done"
@javascript
Scenario: View automatic completion items in open display mode as teacher
Given the following "activity" exists:
| activity | url |
| course | C1 |
| idnumber | Music history |
| name | Music history |
| intro | URL description |
| externalurl | https://moodle.org/ |
| completion | 2 |
| completionview | 1 |
| display | 5 |
When I am on the "Music history" "url activity" page logged in as teacher1
And I am on the "Course 1" course page
Then "Music history" should have the "View" completion condition
@javascript
Scenario: View automatic completion items in open display mode as student
Given the following "activity" exists:
| activity | url |
| course | C1 |
| idnumber | Music history |
| name | Music history |
| intro | URL description |
| externalurl | https://moodle.org/ |
| completion | 2 |
| completionview | 1 |
| display | 5 |
When I am on the "Music history" "url activity" page logged in as student1
And I am on the "Course 1" course page
Then the "View" completion condition of "Music history" is displayed as "done"
Scenario: View automatic completion items in pop-up display mode as teacher
Given the following "activity" exists:
| activity | url |
| course | C1 |
| idnumber | Music history |
| name | Music history |
| intro | URL description |
| externalurl | https://moodle.org/ |
| completion | 2 |
| completionview | 1 |
| display | 6 |
| popupwidth | 620 |
| popupheight | 450 |
When I am on the "Music history" "url activity" page logged in as student1
Then "Music history" should have the "View" completion condition
Scenario: View automatic completion items in pop-up display mode as student
Given the following "activity" exists:
| activity | url |
| course | C1 |
| idnumber | Music history |
| name | Music history |
| intro | URL description |
| externalurl | https://moodle.org/ |
| completion | 2 |
| completionview | 1 |
| display | 6 |
| popupwidth | 620 |
| popupheight | 450 |
When I am on the "Music history" "url activity" page logged in as student1
Then the "View" completion condition of "Music history" is displayed as "done"
@javascript
Scenario: Use manual completion with automatic URL as teacher
Given the following "activity" exists:
| activity | url |
| course | C1 |
| idnumber | Music history |
| name | Music history |
| intro | URL description |
| externalurl | https://moodle.org/ |
| completion | 1 |
| completionview | 1 |
| display | 0 |
When I am on the "Music history" "url activity" page logged in as teacher1
Then the manual completion button for "Music history" should be disabled
@javascript
Scenario: Use manual completion with automatic URL as student
Given the following "activity" exists:
| activity | url |
| course | C1 |
| idnumber | Music history |
| name | Music history |
| intro | URL description |
| externalurl | https://moodle.org/ |
| completion | 1 |
| completionview | 1 |
| display | 0 |
When I am on the "Course 1" course page logged in as student1
Then the manual completion button of "Music history" is displayed as "Mark as done"
And I toggle the manual completion state of "Music history"
And the manual completion button of "Music history" is displayed as "Done"
@javascript
Scenario Outline: The Mark as done completion condition will be shown on the course page for Open, In pop-up and New window display mode if the Show activity completion conditions is set to No as teacher
Given the following "activity" exists:
| activity | url |
| course | C1 |
| idnumber | Music history |
| name | Music history |
| intro | URL description |
| externalurl | https://moodle.org/ |
| completion | 1 |
| completionview | 1 |
| display | <display> |
| popupwidth | 620 |
| popupheight | 450 |
When I am on the "Course 1" course page logged in as teacher1
Then "Music history" should have the "Mark as done" completion condition
Examples:
| display | description |
| 0 | Auto |
| 6 | Popup |
| 3 | New |
@javascript
Scenario Outline: The manual completion button will be shown on the course page for Open, In pop-up and New window display mode if the Show activity completion conditions is set to No as student
Given the following "activity" exists:
| activity | url |
| course | C1 |
| idnumber | Music history |
| name | Music history |
| intro | URL description |
| externalurl | https://moodle.org/ |
| completion | 1 |
| completionview | 1 |
| display | <display> |
| popupwidth | 620 |
| popupheight | 450 |
When I am on the "Course 1" course page logged in as student1
Then the manual completion button for "Music history" should exist
And the manual completion button of "Music history" is displayed as "Mark as done"
And I toggle the manual completion state of "Music history"
And the manual completion button of "Music history" is displayed as "Done"
Examples:
| display | description |
| 0 | Auto |
| 6 | Popup |
| 3 | New |
+52
View File
@@ -0,0 +1,52 @@
@mod @mod_url @javascript
Feature: Manage URL variables
In order to maintain privacy for URLs
As a teacher
I need to be able to manage URL variables safely
Background:
Given the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
Scenario: Disabling URL variables hides Role names as URL variables check box
Given the following config values are set as admin:
| allowvariables | 1 | url |
And I log in as "admin"
And I navigate to "Plugins > Activity modules > URL" in site administration
When I click on "Allow URL variables" "checkbox"
Then I should not see "Role names as URL variables"
And I click on "Allow URL variables" "checkbox"
And I should see "Role names as URL variables"
Scenario: Disable the use of URL variables
Given the following config values are set as admin:
| allowvariables | 0 | url |
When I log in as "admin"
And I am on "Course 1" course homepage with editing mode on
And I add a "URL" to section "1" using the activity chooser
Then I should not see "URL variables"
Scenario: Enable the use of URL variables without role names
Given the following config values are set as admin:
| allowvariables | 1 | url |
| rolesinparams | 0 | url |
When I log in as "admin"
And I am on "Course 1" course homepage with editing mode on
And I add a "URL" to section "1" using the activity chooser
Then I should see "URL variables"
And I expand all fieldsets
And I should see "Full site name" in the "id_variable_0" "select"
But I should not see "Roles" in the "id_variable_0" "select"
Scenario: Enable the use of URL variables with role names
Given the following config values are set as admin:
| allowvariables | 1 | url |
| rolesinparams | 1 | url |
When I log in as "admin"
And I am on "Course 1" course homepage with editing mode on
And I add a "URL" to section "1" using the activity chooser
Then I should see "URL variables"
And I expand all fieldsets
And I should see "Full site name" in the "id_variable_0" "select"
And I should see "Your word for 'Student'" in the "id_variable_0" "select"