Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusgreen committed Feb 24, 2025
1 parent 80469d5 commit 6f8fdc2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion amd/build/editformhelper.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion amd/build/editformhelper.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions amd/src/editformhelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const Selectors = {
* Initialise the format chooser.
*/
export const init = (contextid) => {
return;

// Set up strings
var strings={};
Expand Down
16 changes: 8 additions & 8 deletions edit_aitext_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ protected function definition_inner($mform) {
['maxlen' => 50, 'rows' => 6, 'size' => 30]);
$mform->setType('sampleanswer', PARAM_RAW);
$mform->setDefault('sampleanswer', '');
$mform->addHelpButton('sampleanswer', 'sampleanswer', 'qtype_aitext');
$mform->addElement('static', 'sampleanswereval', '', '<a class="qtype_aitext_sampleanswerbtn btn btn-secondary"
id="id_sampleanswerbtn">'
. get_string('sampleanswerevaluate', 'qtype_aitext') . '</a>' .
'<div id="id_sampleanswereval"></div>');

// $mform->addHelpButton('sampleanswer', 'sampleanswer', 'qtype_aitext');
// // $mform->addElement('static', 'sampleanswereval', '', '<a class="qtype_aitext_sampleanswerbtn btn btn-secondary"
// // id="id_sampleanswerbtn">'
// // . get_string('sampleanswerevaluate', 'qtype_aitext') . '</a>' .
// // '<div id="id_sampleanswereval"></div>');
$mform->addElement('static', 'sampleanswereval2', '', '<div id="id_sampleanswereval2"></div>');

$mform->addElement('button', 'sampleanswerbtn2"', get_string('sampleanswerevaluate', 'qtype_aitext'));
$mform->registerNoSubmitButton('sampleanswerbtn2"');
Expand Down Expand Up @@ -139,8 +139,8 @@ protected function definition_inner($mform) {
['rows' => 10], $this->editoroptions);

// Load any JS that we need to make things happen, specifically the prompt tester.
$PAGE->requires->js_call_amd('qtype_aitext/editformhelper', 'init', [$this->context->id]);
$PAGE->requires->js_call_amd('qtype_aitext/responserun','init');
//$PAGE->requires->js_call_amd('qtype_aitext/editformhelper', 'init', [$this->context->id]);
$PAGE->requires->js_call_amd('qtype_aitext/responserun','init', [$this->context->id]);

}

Expand Down

0 comments on commit 6f8fdc2

Please sign in to comment.