Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moodle-qtype_stack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elc
moodle-qtype_stack
Commits
cfc936cc
Commit
cfc936cc
authored
2 years ago
by
Tim Hunt
Browse files
Options
Downloads
Patches
Plain Diff
Moodle 4.0: Fix notice in export one script. Fixes #842
parent
ecb955e0
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
exportone.php
+6
-2
6 additions, 2 deletions
exportone.php
tests/behat/create_preview_edit.feature
+2
-1
2 additions, 1 deletion
tests/behat/create_preview_edit.feature
with
8 additions
and
3 deletions
exportone.php
+
6
−
2
View file @
cfc936cc
...
@@ -17,6 +17,11 @@
...
@@ -17,6 +17,11 @@
/**
/**
* Script to download the export of a single STACK question.
* 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
* @copyright 2015 the Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
*/
...
@@ -30,8 +35,7 @@ require_once(__DIR__ . '/locallib.php');
...
@@ -30,8 +35,7 @@ require_once(__DIR__ . '/locallib.php');
$questionid
=
required_param
(
'questionid'
,
PARAM_INT
);
$questionid
=
required_param
(
'questionid'
,
PARAM_INT
);
// Load the necessary data.
// Load the necessary data.
$questiondata
=
$DB
->
get_record
(
'question'
,
array
(
'id'
=>
$questionid
),
'*'
,
MUST_EXIST
);
$questiondata
=
question_bank
::
load_question_data
(
$questionid
);
get_question_options
(
$questiondata
);
$question
=
question_bank
::
load_question
(
$questionid
);
$question
=
question_bank
::
load_question
(
$questionid
);
// Process any other URL parameters, and do require_login.
// Process any other URL parameters, and do require_login.
...
...
This diff is collapsed.
Click to expand it.
tests/behat/create_preview_edit.feature
+
2
−
1
View file @
cfc936cc
...
@@ -71,7 +71,8 @@ Feature: Create, preview, test, tidy and edit STACK questions
...
@@ -71,7 +71,8 @@ Feature: Create, preview, test, tidy and edit STACK questions
|
Answer
note
|
prt1-1-F
|
|
Answer
note
|
prt1-1-F
|
When
I press
"Create test case"
When
I press
"Create test case"
Then
I should see
"All tests passed!"
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"
When
I follow
"Preview"
# Use the tidy question script.
# Use the tidy question script.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment