2013-04-23 12:56:40 +08:00
|
|
|
|
@core @core_course
|
2013-01-25 16:00:14 +08:00
|
|
|
|
Feature: Add activities to courses
|
|
|
|
|
In order to provide tools for students learning
|
|
|
|
|
As a teacher
|
|
|
|
|
I need to add activites to a course
|
|
|
|
|
|
2013-03-28 18:02:30 +08:00
|
|
|
|
Background:
|
2022-04-29 15:37:05 +01:00
|
|
|
|
Given the following "courses" exist:
|
2013-01-25 16:00:14 +08:00
|
|
|
|
| fullname | shortname | format |
|
2022-04-29 15:37:05 +01:00
|
|
|
|
| Course 1 | Course 1 | topics |
|
2013-03-28 18:02:30 +08:00
|
|
|
|
|
|
|
|
|
@javascript
|
|
|
|
|
Scenario: Add an activity to a course
|
2021-03-05 12:36:48 +08:00
|
|
|
|
Given I am on the "Course 1" Course page logged in as admin
|
|
|
|
|
And I am on "Course 1" course homepage with editing mode on
|
2013-03-28 18:02:30 +08:00
|
|
|
|
When I add a "Database" to section "3" and I fill the form with:
|
2022-04-29 15:37:05 +01:00
|
|
|
|
| Name | Test name |
|
|
|
|
|
| Description | Test database description |
|
|
|
|
|
| ID number | TESTNAME |
|
|
|
|
|
| Allow comments on entries | Yes |
|
|
|
|
|
| Force language | English |
|
2013-02-05 16:49:47 +08:00
|
|
|
|
And I turn editing mode off
|
2013-01-25 16:00:14 +08:00
|
|
|
|
Then I should not see "Adding a new"
|
2016-12-05 12:23:53 +08:00
|
|
|
|
And I turn editing mode on
|
|
|
|
|
And I open "Test name" actions menu
|
|
|
|
|
And I click on "Edit settings" "link" in the "Test name" activity
|
2022-04-29 15:37:05 +01:00
|
|
|
|
And the following fields match these values:
|
|
|
|
|
| Name | Test name |
|
|
|
|
|
| ID number | TESTNAME |
|
|
|
|
|
| Allow comments on entries | Yes |
|
|
|
|
|
| Force language | English (en) |
|
2013-01-25 16:00:14 +08:00
|
|
|
|
|
|
|
|
|
@javascript
|
2015-03-17 09:28:16 +00:00
|
|
|
|
Scenario: Add an activity supplying only the name
|
2021-03-05 12:36:48 +08:00
|
|
|
|
Given I am on the "Course 1" Course page logged in as admin
|
|
|
|
|
And I am on "Course 1" course homepage with editing mode on
|
2013-03-28 18:02:30 +08:00
|
|
|
|
When I add a "Database" to section "3" and I fill the form with:
|
2013-01-25 16:00:14 +08:00
|
|
|
|
| Name | Test name |
|
2015-03-17 09:28:16 +00:00
|
|
|
|
Then I should see "Test name"
|
|
|
|
|
|
2015-04-07 17:26:24 +08:00
|
|
|
|
@javascript
|
2015-03-17 09:28:16 +00:00
|
|
|
|
Scenario: Set activity description to required then add an activity supplying only the name
|
2021-03-05 12:36:48 +08:00
|
|
|
|
Given the following config values are set as admin:
|
|
|
|
|
| requiremodintro | 1 |
|
|
|
|
|
And I am on the "Course 1" Course page logged in as admin
|
|
|
|
|
And I am on "Course 1" course homepage with editing mode on
|
2015-03-17 09:28:16 +00:00
|
|
|
|
And I add a "Database" to section "3" and I fill the form with:
|
|
|
|
|
| Name | Test name |
|
|
|
|
|
Then I should see "Required"
|