mirrored from git://git.moodle.org/moodle.git
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-76578 core_course: One section per page summary information
- Loading branch information
Amaia Anabitarte
committed
Dec 26, 2022
1 parent
37e16d4
commit 293bc2d
Showing
3 changed files
with
83 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
@core @core_course | ||
Feature: Course paged mode information | ||
In order to split the course in parts | ||
As a teacher | ||
I need to display the proper section information in a paged mode course | ||
|
||
@javascript | ||
Scenario Outline: Section summary information for teachers and students in paged courses | ||
Given the following "courses" exist: | ||
| fullname | shortname | category | format | numsections | coursedisplay | enablecompletion | | ||
| Course 1 | C1 | 0 | <courseformat> | 3 | 1 | <completion> | | ||
And the following "activities" exist: | ||
| activity | course | name | section | completion | | ||
| chat | C1 | Chat room | 1 | <completion> | | ||
| data | C1 | Database | 1 | <completion> | | ||
| forum | C1 | First forum | 2 | <completion> | | ||
| forum | C1 | Second forum | 2 | <completion> | | ||
And the following "users" exist: | ||
| username | firstname | lastname | email | | ||
| student1 | Student | First | student1@example.com | | ||
| teacher1 | Teacher | First | teacher1@example.com | | ||
And the following "course enrolments" exist: | ||
| user | course | role | | ||
| student1 | C1 | student | | ||
| teacher1 | C1 | editingteacher | | ||
When I log in as "<user>" | ||
And I am on "Course 1" course homepage | ||
Then I should see "Chat: 1" in the "#section-1" "css_element" | ||
And I should see "Database: 1" in the "#section-1" "css_element" | ||
And I should <show> "Progress:" in the "#section-1" "css_element" | ||
And I should see "Forums: 2" in the "#section-2" "css_element" | ||
And I should <show> "Progress:" in the "#section-2" "css_element" | ||
|
||
Examples: | ||
| user | courseformat | completion | show | | ||
| student1 | topics | 0 | not see | | ||
| student1 | weeks | 0 | not see | | ||
| student1 | topics | 1 | see | | ||
| student1 | weeks | 1 | see | | ||
| teacher1 | topics | 0 | not see | | ||
| teacher1 | weeks | 0 | not see | | ||
| teacher1 | topics | 1 | see | | ||
| teacher1 | weeks | 1 | see | | ||
|
||
@javascript | ||
Scenario Outline: Section summary information for guest in paged courses | ||
Given the following "courses" exist: | ||
| fullname | shortname | category | format | numsections | coursedisplay | enablecompletion | | ||
| Course 1 | C1 | 0 | <courseformat> | 3 | 1 | <completion> | | ||
And the following "activities" exist: | ||
| activity | course | name | section | completion | | ||
| chat | C1 | Chat room | 1 | <completion> | | ||
| data | C1 | Database | 1 | <completion> | | ||
| forum | C1 | First forum | 2 | <completion> | | ||
| forum | C1 | Second forum | 2 | <completion> | | ||
And I am on the "Course 1" "enrolment methods" page logged in as admin | ||
And I click on "Enable" "link" in the "Guest access" "table_row" | ||
And I log out | ||
When I log in as "guest" | ||
And I am on "Course 1" course homepage | ||
Then I should see "Chat: 1" in the "#section-1" "css_element" | ||
And I should see "Database: 1" in the "#section-1" "css_element" | ||
And I should not see "Progress:" in the "#section-1" "css_element" | ||
And I should see "Forums: 2" in the "#section-2" "css_element" | ||
And I should not see "Progress:" in the "#section-2" "css_element" | ||
|
||
Examples: | ||
| courseformat | completion | | ||
| topics | 0 | | ||
| weeks | 0 | | ||
| topics | 1 | | ||
| weeks | 1 | |