This commit is contained in:
Huong Nguyen 2024-05-09 09:54:48 +07:00
commit c2bb7c5ec3
No known key found for this signature in database
GPG Key ID: 40D88AB693A3E72A
5 changed files with 7 additions and 5 deletions

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.';

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);

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'));

View File

@ -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"

View File

@ -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"