Skip to content

Commit 7ba3be9

Browse files
committed
Update to readme for version 0.03
1 parent 9d0ee91 commit 7ba3be9

File tree

5 files changed

+16
-7
lines changed

5 files changed

+16
-7
lines changed

changelog.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
2+
### Release 0.03 of the Moodle AIText question type April 2025
3+
4+
Fixed compatibility with Moodle 5.0, thanks to Philipp Memmel of Mebis-lp for the hint about Dependency Injection.
5+
6+
In question editing form changed sample answer allowing multiple sample responses. This saves multiple responses
7+
to be tested against the prompt. Make the spinner prettier for the web service call in the editing form.
8+
9+
Fix backup/restore and xml import/export
10+
11+
112
### Release 0.02 of the Moodle AIText question type Dec 2024
213

314
Merged in code from https://github.com/mebis-lp/moodle-qtype_aitext

db/upgrade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,12 @@ function xmldb_qtype_aitext_upgrade($oldversion) {
9090
$dbman->create_table($table);
9191
}
9292
// Move existing sampleanswers to sampleresponses table.
93-
$sampleanswers = $DB->get_records('qtype_aitext',null,'','id,sampleanswer');
93+
$sampleanswers = $DB->get_records('qtype_aitext', null, '', 'id,sampleanswer');
9494
foreach ($sampleanswers as $sampleanswer) {
9595
$record = ['question' => $sampleanswer->id, 'response' => $sampleanswer->sampleanswer];
9696
$DB->insert_record('qtype_aitext_sampleresponses', $record);
9797
}
98-
// At some point remove sampleanswer field from qtype_aitext table
98+
// At some point remove sampleanswer field from qtype_aitext table.
9999

100100
// Aitext savepoint reached.
101101
upgrade_plugin_savepoint(true, 2025041002, 'qtype', 'aitext');

tests/behat/edit.feature

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ Feature: Test editing an AI Text question
2525
Scenario: Edit an aitext question
2626
When I am on the "Course 1" "core_question > course question bank" page logged in as teacher
2727
And I choose "Edit question" action for "aitext-001" in the question bank
28-
And I pause
2928
And I set the following fields to these values:
3029
| Question name | |
3130
And I press "id_submitbutton"

tests/question_test.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,13 @@ protected function setUp(): void {
7272
}
7373
}
7474

75-
public function test_upgrade() : void{
75+
public function test_upgrade(): void {
7676
$this->resetAfterTest(true);
7777
global $DB;
7878
$aitext = ['questionid' => 1, 'sampleanswer' => 'sampleanswer'];
7979
$DB->insert_record('qtype_aitext', $aitext);
80-
xdebug_break();
8180

82-
$sampleanswers = $DB->get_records('qtype_aitext',null,'','id,sampleanswer');
81+
$sampleanswers = $DB->get_records('qtype_aitext', null, '', 'id,sampleanswer');
8382
foreach ($sampleanswers as $sampleanswer) {
8483
$record = ['question' => $sampleanswer->id, 'response' => $sampleanswer->sampleanswer];
8584
$DB->insert_record('qtype_aitext_sampleresponses', $record);

version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@
2727
$plugin->component = 'qtype_aitext';
2828
$plugin->version = 2025041002;
2929
$plugin->requires = 2020110900;
30-
$plugin->release = '0.02';
30+
$plugin->release = '0.03';
3131
$plugin->maturity = MATURITY_BETA;

0 commit comments

Comments
 (0)