Skip to content

Commit 1b024b0

Browse files
Changes to use Moodle's qbank exporttoxml script instead of custom code (#192)
Coderunner had its own script to download the export of a single question. But to avoid a lot of custom code and use standard Moodle script, deleting the coderunner's exportone.php and using Moodle's instead.
1 parent 10532d8 commit 1b024b0

File tree

2 files changed

+4
-87
lines changed

2 files changed

+4
-87
lines changed

exportone.php

Lines changed: 0 additions & 86 deletions
This file was deleted.

questiontestrun.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@
7777
$qbankparams['lastchanged'] = $questionid;
7878

7979
$questionbanklink = new moodle_url('/question/edit.php', $qbankparams);
80-
$exportquestionlink = new moodle_url('/question/type/coderunner/exportone.php', $urlparams);
80+
$exporttoxmlparams = $urlparams;
81+
unset($exporttoxmlparams['questionid']);
82+
$exporttoxmlparams['id'] = $questionid;
83+
$exportquestionlink = new moodle_url('/question/bank/exporttoxml/exportone.php', $exporttoxmlparams);
8184
$exportquestionlink->param('sesskey', sesskey());
8285

8386
// Create the question usage we will use.

0 commit comments

Comments
 (0)