Skip to content

Commit

Permalink
Copyright tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusgreen committed Aug 20, 2024
1 parent bea6124 commit 54c8a21
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
14 changes: 8 additions & 6 deletions question.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,16 +169,18 @@ public function grade_response(array $response): array {
$fraction = $contentobject->marks / $this->defaultmark;
$grade = [$fraction, question_state::graded_state_for_fraction($fraction)];
}
// The -aicontent data is used in question preview. Only needs to happen in preview.
$this->insert_attempt_step_data('-aiprompt', $fullaiprompt);
$this->insert_attempt_step_data('-aicontent', $contentobject->feedback);

$this->insert_attempt_step_data('-comment', $contentobject->feedback);
$this->insert_attempt_step_data('-commentformat', FORMAT_HTML);
$this->insert_feedback_and_prompt($fullaiprompt,$contentobject);

return $grade;
}
public function insert_feedback_and_prompt($fullaiprompt, $contentobject) :void {
// The -aicontent data is used in question preview. Only needs to happen in preview.
$this->insert_attempt_step_data('-aiprompt', $fullaiprompt);
$this->insert_attempt_step_data('-aicontent', $contentobject->feedback);

$this->insert_attempt_step_data('-comment', $contentobject->feedback);
$this->insert_attempt_step_data('-commentformat', FORMAT_HTML);
}
/**
* Used by prompttester in the editing form
*
Expand Down
4 changes: 2 additions & 2 deletions tests/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* Test helpers for the aitext question type.
*
* @package qtype_aitext
* @copyright 2013 The Open University
* @copyright 2024 Marcus Green
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

Expand All @@ -27,7 +27,7 @@
/**
* Test helper class for the aitext question type.
*
* @copyright 2013 The Open University
* @copyright 2024 Marcus Green
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_aitext_test_helper extends question_test_helper {
Expand Down

0 comments on commit 54c8a21

Please sign in to comment.