Skip to content

Commit

Permalink
Merge branch 'MDL-66575-master' of https://github.com/snake/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Sep 1, 2019
2 parents 867dc0b + d2c09e8 commit 5638882
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions mod/assign/tests/behat/relative_dates.feature
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
@mod @mod_assign
Feature: As a teacher in course with relative dates mode enabled
Feature: Relative assignment due dates
In order for students to be able to enter the course at any time and have a fixed period in which to submit the assignment
As a teacher in course with relative dates mode enabled
I should be able to create an assignment with a due date relative to the course start date
So that students can enter the course at any time and have a fixed period in which to submit the assignment

Scenario: As a student the due date for submitting my assignment is relative to my course start date
Given the following config values are set as admin:
Expand All @@ -13,13 +14,13 @@ So that students can enter the course at any time and have a fixed period in whi
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "course enrolments" exist:
# Two students, one started 4 months ago and one this month.
# Two students, one started 4 months ago and one yesterday.
| user | course | role | timestart |
| teacher1 | C1 | editingteacher | ##first day of last month## |
| student1 | C1 | student | ##first day of -4 months## |
| student2 | C1 | student | ##first day of this month## |
| student1 | C1 | student | ##first day of -4 months## |
| student2 | C1 | student | ##yesterday## |
# One assignment, valid for 2 months.
And the following "activities" exist:
| activity | name | intro | course | idnumber | assignsubmission_onlinetext_enabled | timeopen | duedate |
Expand All @@ -40,18 +41,18 @@ So that students can enter the course at any time and have a fixed period in whi
| enablecourserelativedates | 1 |
And the following "courses" exist:
| fullname | shortname | category | groupmode | relativedatesmode | startdate |
| Course 1 | C1 | 0 | 1 | 1 | ##first day of 4 months ago## |
| Course 1 | C1 | 0 | 1 | 1 | ##first day of 4 months ago## |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "course enrolments" exist:
# Two students, one started 4 months ago and one this month.
# Two students, one started 4 months ago and one yesterday.
| user | course | role | timestart |
| teacher1 | C1 | editingteacher | ##first day of 4 months ago## |
| student1 | C1 | student | ##first day of 4 months ago## |
| student2 | C1 | student | ##first day of this month## |
| student1 | C1 | student | ##first day of 4 months ago## |
| student2 | C1 | student | ##yesterday## |
# One assignment, valid for 2 months.
And the following "activities" exist:
| activity | name | intro | course | idnumber | assignsubmission_onlinetext_enabled | timeopen | duedate |
Expand Down

0 comments on commit 5638882

Please sign in to comment.