mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 12:40:01 +01:00
Merge branch 'MDL-80613-main' of https://github.com/lameze/moodle
This commit is contained in:
commit
f5377be4d2
@ -5,8 +5,8 @@ Feature: Allow to mark course as completed without cron for activity completion
|
||||
|
||||
Background:
|
||||
Given the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
| Completion course | CC1 | 0 |
|
||||
| fullname | shortname | category | enablecompletion |
|
||||
| Completion course | CC1 | 0 | 1 |
|
||||
And the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| student1 | Student | First | student1@example.com |
|
||||
@ -25,11 +25,7 @@ Feature: Allow to mark course as completed without cron for activity completion
|
||||
And the following "blocks" exist:
|
||||
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
|
||||
| completionstatus | Course | CC1 | course-view-* | side-pre |
|
||||
And I am on the "Completion course" "course editing" page logged in as admin
|
||||
And I expand all fieldsets
|
||||
And I set the field "Enable completion tracking" to "Yes"
|
||||
And I click on "Save and display" "button"
|
||||
And I am on the "Test assignment name" "assign activity editing" page
|
||||
And I am on the "Test assignment name" "assign activity editing" page logged in as admin
|
||||
And I click on "Expand all" "link" in the "region-main" "region"
|
||||
And I set the field "Add requirements" to "1"
|
||||
And I set the field "completionusegrade" to "1"
|
||||
|
@ -6,8 +6,8 @@ Feature: Show activity completion status or activity completion configuration on
|
||||
|
||||
Background:
|
||||
Given the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
| Course 1 | C1 | 0 |
|
||||
| fullname | shortname | category | enablecompletion |
|
||||
| Course 1 | C1 | 0 | 1 |
|
||||
And the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| teacher1 | Teacher | First | teacher1@example.com |
|
||||
@ -18,12 +18,6 @@ Feature: Show activity completion status or activity completion configuration on
|
||||
| teacher1 | C1 | editingteacher |
|
||||
| teacher2 | C1 | teacher |
|
||||
| student1 | C1 | student |
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And I navigate to "Settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| Enable completion tracking | Yes |
|
||||
And I press "Save and display"
|
||||
And the following "activities" exist:
|
||||
| activity | course | idnumber | name | intro | completion | completionview | completionexpected |
|
||||
| assign | C1 | assign1 | Test assignment name | Test assignment description | 2 | 1 | 0 |
|
||||
|
@ -7,8 +7,8 @@ Feature: Allow students to manually mark an activity as complete
|
||||
@javascript
|
||||
Scenario: Mark an activity as completed
|
||||
Given the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
| Course 1 | C1 | 0 |
|
||||
| fullname | shortname | category | enablecompletion |
|
||||
| Course 1 | C1 | 0 | 1 |
|
||||
And the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| teacher1 | Teacher | First | teacher1@example.com |
|
||||
@ -18,18 +18,11 @@ Feature: Allow students to manually mark an activity as complete
|
||||
| teacher1 | C1 | editingteacher |
|
||||
| student1 | C1 | student |
|
||||
And the following "activity" exists:
|
||||
| activity | forum |
|
||||
| course | C1 |
|
||||
| name | Test forum name |
|
||||
| activity | forum |
|
||||
| course | C1 |
|
||||
| name | Test forum name |
|
||||
| completion | 1 |
|
||||
And I am on the "Course 1" course page logged in as teacher1
|
||||
And I navigate to "Settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| Enable completion tracking | Yes |
|
||||
And I press "Save and display"
|
||||
And I am on the "Test forum name" "forum activity editing" page
|
||||
And I set the following fields to these values:
|
||||
| Students must manually mark the activity as done | 1 |
|
||||
And I press "Save and return to course"
|
||||
And "Student First" user has not completed "Test forum name" activity
|
||||
And I am on the "Course 1" course page logged in as student1
|
||||
When I toggle the manual completion state of "Test forum name"
|
||||
|
@ -6,8 +6,8 @@ Feature: Restrict sections availability through completion or grade conditions
|
||||
|
||||
Background:
|
||||
Given the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
| Course 1 | C1 | 0 |
|
||||
| fullname | shortname | category | enablecompletion |
|
||||
| Course 1 | C1 | 0 | 1 |
|
||||
And the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| teacher1 | Teacher | First | teacher1@example.com |
|
||||
@ -23,15 +23,11 @@ Feature: Restrict sections availability through completion or grade conditions
|
||||
|
||||
@javascript
|
||||
Scenario: Show section greyed-out to student when completion condition is not satisfied
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And I navigate to "Settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| Enable completion tracking | Yes |
|
||||
And I press "Save and display"
|
||||
And the following "activities" exist:
|
||||
Given the following "activities" exist:
|
||||
| activity | course | section | intro | completion | idnumber |
|
||||
| label | C1 | 1 | Test label | 1 | 1 |
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
When I edit the section "2"
|
||||
And I expand all fieldsets
|
||||
And I click on "Add restriction..." "button"
|
||||
|
@ -10,8 +10,8 @@ Feature: Show/hide course sections
|
||||
| teacher1 | Teacher | 1 | teacher1@example.com |
|
||||
| student1 | Student | 1 | student1@example.com |
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | format | hiddensections |
|
||||
| Course 1 | C1 | topics | 0 |
|
||||
| fullname | shortname | format | hiddensections | enablecompletion | coursedisplay |
|
||||
| Course 1 | C1 | topics | 0 | 1 | 1 |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
@ -76,12 +76,7 @@ Feature: Show/hide course sections
|
||||
|
||||
@javascript
|
||||
Scenario: Students can not navigate to restricted sections
|
||||
Given I navigate to "Settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| Course layout | Show one section per page |
|
||||
| Enable completion tracking | Yes |
|
||||
And I press "Save and display"
|
||||
And the following "activities" exist:
|
||||
Given the following "activities" exist:
|
||||
| activity | course | section | name | completion |
|
||||
| label | C1 | 1 | Test label | 1 |
|
||||
And I edit the section "2"
|
||||
|
@ -10,21 +10,12 @@ Feature: View activity completion information in the chat activity
|
||||
| student1 | Vinnie | Student1 | student1@example.com |
|
||||
| teacher1 | Darrell | Teacher1 | teacher1@example.com |
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
| Course 1 | C1 | 0 |
|
||||
| fullname | shortname | category | enablecompletion |
|
||||
| Course 1 | C1 | 0 | 1 |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| student1 | C1 | student |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the following fields to these values:
|
||||
| Enable completion tracking | Yes |
|
||||
| Show activity completion conditions | Yes |
|
||||
And I press "Save and display"
|
||||
And I log out
|
||||
|
||||
Scenario: View automatic completion items
|
||||
Given I log in as "teacher1"
|
||||
|
@ -12,28 +12,20 @@ Feature: Completion pass grade
|
||||
| student2 | Vinnie | Student2 | student2@example.com |
|
||||
| teacher1 | Darrell | Teacher1 | teacher1@example.com |
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
| Course 1 | C1 | 0 |
|
||||
| fullname | shortname | category | enablecompletion |
|
||||
| Course 1 | C1 | 0 | 1 |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| student1 | C1 | student |
|
||||
| student2 | C1 | student |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the following fields to these values:
|
||||
| Enable completion tracking | Yes |
|
||||
| Show activity completion conditions | Yes |
|
||||
And I press "Save and display"
|
||||
And the following "activity" exists:
|
||||
| activity | data |
|
||||
| course | C1 |
|
||||
| idnumber | mh1 |
|
||||
| name | Music history |
|
||||
| section | 1 |
|
||||
And I am on the "Music history" "data activity" page
|
||||
And I am on the "Music history" "data activity" page logged in as teacher1
|
||||
And I navigate to "Settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the following fields to these values:
|
||||
|
@ -10,25 +10,18 @@ Feature: Completion pass grade view activity completion in the forum activity
|
||||
| student1 | Vinnie | Student1 | student1@example.com |
|
||||
| teacher1 | Darrell | Teacher1 | teacher1@example.com |
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
| Course 1 | C1 | 0 |
|
||||
| fullname | shortname | category | enablecompletion |
|
||||
| Course 1 | C1 | 0 | 1 |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| student1 | C1 | student |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
And I am on the "Course 1" course page logged in as teacher1
|
||||
And I navigate to "Settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the following fields to these values:
|
||||
| Enable completion tracking | Yes |
|
||||
| Show activity completion conditions | Yes |
|
||||
And I press "Save and display"
|
||||
And the following "activity" exists:
|
||||
| activity | forum |
|
||||
| course | C1 |
|
||||
| idnumber | mh1 |
|
||||
| name | Music history |
|
||||
And I am on the "Music history" "forum activity editing" page
|
||||
And I am on the "Music history" "forum activity editing" page logged in as teacher1
|
||||
And I expand all fieldsets
|
||||
And I set the following fields to these values:
|
||||
| Whole forum grading > Type | Point |
|
||||
|
@ -10,29 +10,19 @@ Feature: Pass grade completion in the glossary activity
|
||||
| student1 | Vinnie | Student1 | student1@example.com |
|
||||
| teacher1 | Darrell | Teacher1 | teacher1@example.com |
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
| Course 1 | C1 | 0 |
|
||||
| fullname | shortname | category | enablecompletion |
|
||||
| Course 1 | C1 | 0 | 1 |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| student1 | C1 | student |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the following fields to these values:
|
||||
| Enable completion tracking | Yes |
|
||||
| Show activity completion conditions | Yes |
|
||||
And I press "Save and display"
|
||||
And the following "activity" exists:
|
||||
| activity | glossary |
|
||||
| course | C1 |
|
||||
| idnumber | mh1 |
|
||||
| name | Music history |
|
||||
| section | 1 |
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Music history"
|
||||
And I navigate to "Settings" in current page administration
|
||||
When I am on the "Music history" "glossary activity editing" page logged in as teacher1
|
||||
And I expand all fieldsets
|
||||
And I set the following fields to these values:
|
||||
| Aggregate type | Average of ratings |
|
||||
|
@ -9,21 +9,14 @@ Feature: Pass grade activity completion information in the h5p activity
|
||||
| student3 | Vinnie | Student3 | student3@example.com |
|
||||
| teacher1 | Darrell | Teacher1 | teacher1@example.com |
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
| Course 1 | C1 | 0 |
|
||||
| fullname | shortname | category | enablecompletion |
|
||||
| Course 1 | C1 | 0 | 1 |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| student1 | C1 | student |
|
||||
| student2 | C1 | student |
|
||||
| student3 | C1 | student |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
And I am on the "Course 1" "Course" page logged in as "admin"
|
||||
And I navigate to "Settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the following fields to these values:
|
||||
| Enable completion tracking | Yes |
|
||||
| Show activity completion conditions | Yes |
|
||||
And I press "Save and display"
|
||||
And the following "activity" exists:
|
||||
| activity | h5pactivity |
|
||||
| course | C1 |
|
||||
@ -34,7 +27,6 @@ Feature: Pass grade activity completion information in the h5p activity
|
||||
| completionpassgrade | 1 |
|
||||
| gradepass | 25 |
|
||||
| packagefilepath | h5p/tests/fixtures/filltheblanks.h5p |
|
||||
And I log out
|
||||
|
||||
Scenario: View automatic completion items
|
||||
# Teacher view.
|
||||
|
@ -10,20 +10,12 @@ Feature: View activity completion information for the label
|
||||
| student1 | Vinnie | Student1 | student1@example.com |
|
||||
| teacher1 | Darrell | Teacher1 | teacher1@example.com |
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
| Course 1 | C1 | 0 |
|
||||
| fullname | shortname | category | enablecompletion |
|
||||
| Course 1 | C1 | 0 | 1 |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| student1 | C1 | student |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the following fields to these values:
|
||||
| Enable completion tracking | Yes |
|
||||
| Show activity completion conditions | No |
|
||||
And I press "Save and display"
|
||||
And the following "activity" exists:
|
||||
| activity | label |
|
||||
| course | C1 |
|
||||
@ -33,7 +25,7 @@ Feature: View activity completion information for the label
|
||||
|
||||
@javascript
|
||||
Scenario: The manual completion button will be shown on the course page if the Show activity completion conditions is set to No
|
||||
Given I am on "Course 1" course homepage
|
||||
Given I am on the "Course 1" course page logged in as teacher1
|
||||
# Teacher view.
|
||||
And "Test label 1" should have the "Mark as done" completion condition
|
||||
And I log out
|
||||
@ -47,7 +39,7 @@ Feature: View activity completion information for the label
|
||||
|
||||
@javascript
|
||||
Scenario: The manual completion button will be shown on the course page if the Show activity completion conditions is set to Yes
|
||||
Given I am on "Course 1" course homepage
|
||||
Given I am on the "Course 1" course page logged in as teacher1
|
||||
And I navigate to "Settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the field "Show activity completion conditions" to "Yes"
|
||||
|
@ -10,28 +10,21 @@ Feature: View activity completion information for file resources
|
||||
| student1 | Vinnie | Student1 | student1@example.com |
|
||||
| teacher1 | Darrell | Teacher1 | teacher1@example.com |
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
| Course 1 | C1 | 0 |
|
||||
| fullname | shortname | category | enablecompletion |
|
||||
| Course 1 | C1 | 0 | 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 | resource |
|
||||
And I am on the "Course 1" course page logged in as teacher1
|
||||
And I navigate to "Settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the following fields to these values:
|
||||
| Enable completion tracking | Yes |
|
||||
| Show activity completion conditions | No |
|
||||
And I press "Save and display"
|
||||
|
||||
@javascript
|
||||
Scenario Outline: The manual completion button will be shown on the course page for Open, In pop-up, New window and Force download display mode if Show activity completion conditions is set to No
|
||||
Given the following "activities" exist:
|
||||
| activity | course | name | display | showsize | showtype | showdate | completion | defaultfilename | popupwidth | popupheight | uploaded |
|
||||
| resource | C1 | Myfile | <display> | 0 | 0 | 0 | 1 | mod/resource/tests/fixtures/samplefile.txt | 620 | 450 | 1 |
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And I am on the "Course 1" course page logged in as teacher1
|
||||
# Teacher view.
|
||||
And "Myfile" should have the "Mark as done" completion condition
|
||||
# Student view.
|
||||
@ -53,8 +46,7 @@ Feature: View activity completion information for file resources
|
||||
Given the following "activities" exist:
|
||||
| activity | course | name | display | defaultfilename | uploaded |
|
||||
| resource | C1 | Myfile | 1 | mod/resource/tests/fixtures/samplefile.txt | 1 |
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And I navigate to "Settings" in current page administration
|
||||
And I am on the "Course 1" "course editing" page logged in as "teacher1"
|
||||
And I expand all fieldsets
|
||||
And I set the field "Show activity completion conditions" to "Yes"
|
||||
And I press "Save and display"
|
||||
@ -80,7 +72,7 @@ Feature: View activity completion information for file resources
|
||||
Given the following "activities" exist:
|
||||
| activity | course | name | display | defaultfilename | uploaded |
|
||||
| resource | C1 | Myfile | 1 | mod/resource/tests/fixtures/samplefile.txt | 1 |
|
||||
And I navigate to "Settings" in current page administration
|
||||
And I am on the "Course 1" "course editing" page logged in as "teacher1"
|
||||
And I expand all fieldsets
|
||||
And I set the field "Show activity completion conditions" to "Yes"
|
||||
And I press "Save and display"
|
||||
|
Loading…
x
Reference in New Issue
Block a user