diff --git a/exportone.php b/exportone.php index 304ccdbe80afac31d631a2b6b01f125a95b5363f..cf20175cbbbdf7aad7ae6ffd75b38d4831297729 100644 --- a/exportone.php +++ b/exportone.php @@ -17,6 +17,11 @@ /** * Script to download the export of a single STACK question. * + * TODO: Since MDL-63738 landed in Moodle 3.6, this has been a core Moodle + * feature, so we don't really need to keep mainaining this file. We could + * use question/exportone.php, or question/bank/exporttoxml/exportone.php, + * as it later became, instead. + * * @copyright 2015 the Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ @@ -30,8 +35,7 @@ require_once(__DIR__ . '/locallib.php'); $questionid = required_param('questionid', PARAM_INT); // Load the necessary data. -$questiondata = $DB->get_record('question', array('id' => $questionid), '*', MUST_EXIST); -get_question_options($questiondata); +$questiondata = question_bank::load_question_data($questionid); $question = question_bank::load_question($questionid); // Process any other URL parameters, and do require_login. diff --git a/tests/behat/create_preview_edit.feature b/tests/behat/create_preview_edit.feature index 392592bd87daf60ebd054b4554f798e39dd43e90..eea377d42c883ac89ee800a383722f9fe73e861c 100644 --- a/tests/behat/create_preview_edit.feature +++ b/tests/behat/create_preview_edit.feature @@ -71,7 +71,8 @@ Feature: Create, preview, test, tidy and edit STACK questions | Answer note | prt1-1-F | When I press "Create test case" Then I should see "All tests passed!" - And I should see "Test case 1 Pass" + And I should see "Test case 1" + And following "Export this question" should download between "3700" and "3800" bytes When I follow "Preview" # Use the tidy question script.