Skip to content
Snippets Groups Projects
Commit 45d3022b authored by Chris Sangwin's avatar Chris Sangwin
Browse files

Fix to issue #1212.

parent 409d9001
No related branches found
No related tags found
No related merge requests found
...@@ -61,9 +61,7 @@ if (!is_null($deploy)) { ...@@ -61,9 +61,7 @@ if (!is_null($deploy)) {
$undeploy = optional_param('undeploy', null, PARAM_INT); $undeploy = optional_param('undeploy', null, PARAM_INT);
if (!is_null($undeploy)) { if (!is_null($undeploy)) {
$question->undeploy_variant($undeploy); $question->undeploy_variant($undeploy);
// As we redirect, switch to the undeployed variant, so it easy to re-deploy if you just made a mistake.
// As we redirect, switch to the undeployed variant, so it easy to re-deploy
// if you just made a mistake.
$nexturl->param('seed', $undeploy); $nexturl->param('seed', $undeploy);
redirect($nexturl); redirect($nexturl);
} }
...@@ -83,7 +81,9 @@ $deployfromlist = optional_param('deployfromlist', null, PARAM_INT); ...@@ -83,7 +81,9 @@ $deployfromlist = optional_param('deployfromlist', null, PARAM_INT);
$deploysystematic = optional_param('deploysystematic', null, PARAM_INT); $deploysystematic = optional_param('deploysystematic', null, PARAM_INT);
$deploysystematicfrom = optional_param('deploysystematicfrom', null, PARAM_INT); $deploysystematicfrom = optional_param('deploysystematicfrom', null, PARAM_INT);
$deploysystematicto = optional_param('deploysystematicto', null, PARAM_INT); $deploysystematicto = optional_param('deploysystematicto', null, PARAM_INT);
if (!is_null($deployfromlist) || !is_null($deploysystematic) || (!is_null($deploysystematicfrom) && !is_null($deploysystematicto))) { $usefromtofeature = false;
if (!is_null($deployfromlist) || !is_null($deploysystematic) || (!is_null($deploysystematicfrom) &&
!is_null($deploysystematicto))) {
// Check data integrity. // Check data integrity.
$dataproblem = false; $dataproblem = false;
...@@ -137,7 +137,7 @@ if (!is_null($deployfromlist) || !is_null($deploysystematic) || (!is_null($deplo ...@@ -137,7 +137,7 @@ if (!is_null($deployfromlist) || !is_null($deploysystematic) || (!is_null($deplo
} }
// Undeploy all existing variants. // Undeploy all existing variants.
// If the deploy-from-to feature is used, only undeploy variants that already exist // If the deploy-from-to feature is used, only undeploy variants that already exist.
if ($question->deployedseeds) { if ($question->deployedseeds) {
if ($usefromtofeature) { if ($usefromtofeature) {
foreach ($question->deployedseeds as $seed) { foreach ($question->deployedseeds as $seed) {
......
...@@ -13,6 +13,7 @@ DONE ...@@ -13,6 +13,7 @@ DONE
2. Add in stack preamble via `%_stack_preamble_end;` in the question variables to allow some variables to be available in inputs. This fixes [issue #1207](https://github.com/maths/moodle-qtype_stack/issues/1207]) and [issue #1133](https://github.com/maths/moodle-qtype_stack/issues/1133). 2. Add in stack preamble via `%_stack_preamble_end;` in the question variables to allow some variables to be available in inputs. This fixes [issue #1207](https://github.com/maths/moodle-qtype_stack/issues/1207]) and [issue #1133](https://github.com/maths/moodle-qtype_stack/issues/1133).
3. Allow Maxima code in keyvals to terminate expressions with a `$` (as in Maxima) [issue #1019](https://github.com/maths/moodle-qtype_stack/issues/1019]). This will allow better copy/paste to and from desktop maxima. 3. Allow Maxima code in keyvals to terminate expressions with a `$` (as in Maxima) [issue #1019](https://github.com/maths/moodle-qtype_stack/issues/1019]). This will allow better copy/paste to and from desktop maxima.
4. Add in an option to fine-tune the multiplication sign used for scientific units: `multsgnstackunits`. See discussion in [issue #1080](https://github.com/maths/moodle-qtype_stack/issues/1080]). 4. Add in an option to fine-tune the multiplication sign used for scientific units: `multsgnstackunits`. See discussion in [issue #1080](https://github.com/maths/moodle-qtype_stack/issues/1080]).
5. Add in the "Deploy from n to m" deature to systematically deploy seeds.
Issues with [github milestone 4.7.0](https://github.com/maths/moodle-qtype_stack/issues?q=is%3Aissue+milestone%3A4.7.0) include Issues with [github milestone 4.7.0](https://github.com/maths/moodle-qtype_stack/issues?q=is%3Aissue+milestone%3A4.7.0) include
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment