mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 07:56:06 +02:00
Merge branch 'MDL-78564' of https://github.com/paulholden/moodle
This commit is contained in:
commit
dedbcaf074
@ -6741,7 +6741,15 @@ class assign {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($instance->requiresubmissionstatement && empty($data->submissionstatement) && $USER->id == $userid) {
|
||||
$adminconfig = $this->get_admin_config();
|
||||
|
||||
$submissionstatement = '';
|
||||
if ($instance->requiresubmissionstatement) {
|
||||
$submissionstatement = $this->get_submissionstatement($adminconfig, $instance, $this->context);
|
||||
}
|
||||
|
||||
if (!empty($submissionstatement) && $instance->requiresubmissionstatement
|
||||
&& empty($data->submissionstatement) && $USER->id == $userid) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -39,6 +39,19 @@ Feature: In an assignment, teacher can require submission statements
|
||||
And I press "Continue"
|
||||
And I should see "Submitted for grading" in the "Submission status" "table_row"
|
||||
|
||||
Scenario: Student is not required to accept assignment submission statement when non exists
|
||||
Given the following config values are set as admin:
|
||||
| config | value | plugin |
|
||||
| submissionstatement | | assign |
|
||||
And I am on the "Test assign" "assign activity" page logged in as student1
|
||||
When I press "Add submission"
|
||||
And I set the field "Online text" to "My submission text."
|
||||
And I press "Save changes"
|
||||
And I should see "Draft (not submitted)" in the "Submission status" "table_row"
|
||||
And I press "Submit assignment"
|
||||
And I press "Continue"
|
||||
Then I should see "Submitted for grading" in the "Submission status" "table_row"
|
||||
|
||||
Scenario: Student is not required to accept assignment submission statement
|
||||
Given I am on the "Test assign" "assign activity editing" page logged in as teacher1
|
||||
And I set the following fields to these values:
|
||||
|
Loading…
x
Reference in New Issue
Block a user