Skip to content

Commit

Permalink
Merge pull request #5 from mebis-lp/MBS-9255_Make_form_fields_required
Browse files Browse the repository at this point in the history
MBS-9255: Make aiprompt and marksheme prompt required
  • Loading branch information
marcusgreen authored Jul 18, 2024
2 parents 400c56d + acc65e6 commit 1a9984b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions edit_aitext_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ protected function definition_inner($mform) {
$mform->setType('aiprompt', PARAM_RAW);
$mform->setDefault('aiprompt', get_config('qtype_aitext', 'defaultprompt'));
$mform->addHelpButton('aiprompt', 'aiprompt', 'qtype_aitext');
$mform->addRule('aiprompt', get_string('aipromptmissing', 'qtype_aitext'), 'required');

$mform->addElement('textarea', 'markscheme', get_string('markscheme', 'qtype_aitext'),
['maxlen' => 50, 'rows' => 6, 'size' => 30]);
Expand Down
1 change: 1 addition & 0 deletions lang/en/qtype_aitext.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

$string['aiprompt'] = 'AI Prompt';
$string['aiprompt_help'] = 'A prompt for the Ai Grader. This is the guideline that AI uses to give feedback on the student response.';
$string['aipromptmissing'] = 'The ai prompt is missing. Please enter a prompt on the basis of which the feedback is generated.';
$string['answerfiles'] = 'Answer files';
$string['answertext'] = 'Answer text';
$string['attachmentsoptional'] = 'Attachments are optional';
Expand Down

0 comments on commit 1a9984b

Please sign in to comment.