Skip to content

Commit

Permalink
force upgrade of json prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
justinhunt committed Nov 1, 2024
1 parent 347e448 commit 7361381
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ function xmldb_qtype_aitext_upgrade($oldversion) {
$currentjsonprompt = get_config('qtype_aitext', 'jsonprompt');
$currentjsonprompt = preg_replace('/\s+/', ' ', trim($currentjsonprompt));

if ($currentjsonprompt == $originaljsonprompt) {
if ($currentjsonprompt == $originaljsonprompt || true) {
$newprompt = "Return only a JSON object which enumerates a set of 4 elements.";
$newprompt .= ' The JSON object should be in this format: {"feedback":"string","correctedtext":"string",marks":"number", "relevance": "number"}';
$newprompt .= " where marks is a single number summing all marks.";
Expand Down
4 changes: 2 additions & 2 deletions settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
'qtype_aitext/jsonprompt',
new lang_string('jsonprompt', 'qtype_aitext'),
new lang_string('jsonprompt_setting', 'qtype_aitext'),
'Return only a JSON object which enumerates a set of 3 elements.' .
' The JSON object should be in this format: {"feedback":"string","marks":"number", "relevance": "number"}' .
'Return only a JSON object which enumerates a set of 4 elements.' .
' The JSON object should be in this format: {"feedback": "string", "correctedtext": "string", "marks": "number", "relevance": "number"}' .
' where marks is a single number summing all marks.',
PARAM_RAW,
20,
Expand Down

0 comments on commit 7361381

Please sign in to comment.