Merge branch 'MDL-81423_404' of https://github.com/timhunt/moodle into MOODLE_404_STABLE

This commit is contained in:
Huong Nguyen
2024-05-09 09:55:24 +07:00
5 changed files with 7 additions and 5 deletions
+1 -1
View File
@@ -574,9 +574,9 @@ $string['submissionslockedshort'] = 'Submission changes not allowed';
$string['submissionsclosed'] = 'Submissions closed';
$string['submissionsettings'] = 'Submission settings';
$string['submissionstatement'] = 'Submission statement';
$string['submissionstatement_help'] = 'Assignment submission confirmation statement';
$string['submissionstatementdefault'] = 'This submission is my own work, except where I have acknowledged the use of the works of other people.';
$string['submissionstatement_help'] = 'Statement that each student must accept in order to submit their work.';
$string['submissionstatementrequired'] = 'You are required to agree to this statement before you can submit.';
$string['submissionstatementteamsubmission'] = 'Group submission statement';
$string['submissionstatementteamsubmissiondefault'] = 'This submission is the work of my group, except where we have acknowledged the use of the works of other people.';
$string['submissionstatementteamsubmission_help'] = 'Statement that each student must accept in order to submit the work of their group.';
+2 -1
View File
@@ -8147,7 +8147,8 @@ class assign {
// Only show submission statement if we are editing our own submission.
if ($requiresubmissionstatement && !$draftsenabled && $userid == $USER->id) {
$mform->addElement('checkbox', 'submissionstatement', '', $submissionstatement);
$mform->addRule('submissionstatement', get_string('required'), 'required', null, 'client');
$mform->addRule('submissionstatement', get_string('submissionstatementrequired', 'mod_assign'),
'required', null, 'client');
}
$this->add_plugin_submission_elements($submission, $mform, $data, $userid);
+2 -1
View File
@@ -48,7 +48,8 @@ class mod_assign_confirm_submission_form extends moodleform {
if ($requiresubmissionstatement) {
$mform->addElement('checkbox', 'submissionstatement', '', $submissionstatement);
$mform->addRule('submissionstatement', get_string('required'), 'required', null, 'client');
$mform->addRule('submissionstatement', get_string('submissionstatementrequired', 'mod_assign'),
'required', null, 'client');
}
$mform->addElement('static', 'confirmmessage', '', get_string('confirmsubmission', 'mod_assign'));
@@ -58,7 +58,7 @@ Feature: Group assignment submissions
And I should see "This submission is the work of my group, except where we have acknowledged the use of the works of other people."
And I press "Continue"
And I should see "Confirm submission"
And I should see "- Required"
And I should see "You are required to agree to this statement before you can submit."
And I set the field "submissionstatement" to "1"
And I press "Continue"
And I should see "Submitted for grading" in the "Submission status" "table_row"
@@ -34,7 +34,7 @@ Feature: In an assignment, teacher can require submission statements
Then I should see "This submission is my own work, except where I have acknowledged the use of the works of other people."
And I press "Continue"
And I should see "Confirm submission"
And I should see "- Required"
And I should see "You are required to agree to this statement before you can submit."
And I set the field "submissionstatement" to "1"
And I press "Continue"
And I should see "Submitted for grading" in the "Submission status" "table_row"