Skip to content

Commit

Permalink
Hide the general feedback field in the question editor
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusgreen committed Mar 23, 2024
1 parent 38b4b16 commit 03c8b52
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
3 changes: 3 additions & 0 deletions edit_aitext_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,11 @@ protected function definition_inner($mform) {
$mform->setType('markscheme', PARAM_RAW);
$mform->addHelpButton('markscheme', 'markscheme', 'qtype_aitext');

$mform->addElement('html', '<div class="hidden">');
$mform->addElement('editor', 'generalfeedback', get_string('generalfeedback', 'question')
, ['rows' => 10], $this->editoroptions);
$mform->addElement('html', '</div>');

$mform->addElement('header', 'responseoptions', get_string('responseoptions', 'qtype_aitext'));
$mform->setExpanded('responseoptions');

Expand Down
9 changes: 1 addition & 8 deletions lang/en/qtype_aitext.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,8 @@

$string['aiprompt'] = 'AI Prompt';
$string['aiprompt_help'] = 'A prompt for the Large Language model. For marking include "Reply in json format with a response and marks fields"';
$string['allowattachments'] = 'Allow attachments';
$string['answerfiles'] = 'Answer files';
$string['answertext'] = 'Answer text';
$string['attachedfiles'] = 'Attachments: {$a}';
$string['attachmentsoptional'] = 'Attachments are optional';
$string['attachmentsrequired'] = 'Require attachments';
$string['cachedef_stringdata'] = 'Cachedef stringdata';
Expand All @@ -51,7 +49,6 @@
$string['graderinfo'] = 'Information for graders';
$string['get_llmmfeedback'] = 'Get LLM feedback';
$string['graderinfoheader'] = 'Grader information';
$string['maxbytes'] = 'Maximum file size';
$string['markscheme'] = 'Mark scheme';
$string['markscheme_help'] = 'Mark scheme help';
$string['maxwordlimit'] = 'Maximum word limit';
Expand All @@ -60,13 +57,9 @@
$string['minwordlimit'] = 'Minimum word limit';
$string['minwordlimit_help'] = 'If the response requires that students enter text, this is the minimum number of words that each student will be allowed to submit.';
$string['minwordlimitboundary'] = 'This question requires a response of at least {$a->limit} words and you are attempting to submit {$a->count} words. Please expand your response and try again.';
$string['mustattach'] = 'When "No online text" is selected, or responses are optional, you must allow at least one attachment.';
$string['mustrequire'] = 'When "No online text" is selected, or responses are optional, you must require at least one attachment.';
$string['mustrequirefewer'] = 'You cannot require more attachments than you allow.';
$string['nlines'] = '{$a} lines';
$string['nonexistentfiletypes'] = 'The following file types were not recognised: {$a}';
$string['pluginname'] = 'AI Text';
$string['pluginname_help'] = 'In response to a question, the respondent may upload one or more files and/or enter text online. A response template may be provided. Responses must be graded manually.';
$string['pluginname_help'] = 'In response to a question, the respondent enters text. A response template may be provided. Responses are given a preliminary grade by an AI system (e.g. ChatGPT) then can be graded manually.';
$string['pluginname_link'] = 'question/type/AI Text';
$string['pluginnameadding'] = 'Adding an AI Text question';
$string['pluginnameediting'] = 'Editing an AI Text question';
Expand Down
1 change: 0 additions & 1 deletion question.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ public function grade_response(array $response) : array {
$contentobject->feedback = preg_replace(array('/\[\[/', '/\]\]/'), '"', $contentobject->feedback);

$contentobject->feedback .= ' '.$this->llm_translate(get_config('qtype_aitext', 'disclaimer'));
xdebug_break();
// If there are no marks, write the feedback and set to needs grading .
if (is_null($contentobject->marks)) {
$grade = [0 => 0, question_state::$needsgrading];
Expand Down

0 comments on commit 03c8b52

Please sign in to comment.