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

Fix bug in deploy mechanism (change to question tests). Test for questions...

Fix bug in deploy mechanism (change to question tests). Test for questions with no deployed variants in the bulk test.
parent aec915ce
No related branches found
No related tags found
No related merge requests found
...@@ -149,7 +149,7 @@ if (!is_null($deploy)) { ...@@ -149,7 +149,7 @@ if (!is_null($deploy)) {
$testresults = array(); $testresults = array();
$allpassed = true; $allpassed = true;
foreach ($testscases as $key => $testcase) { foreach ($testscases as $key => $testcase) {
$testresults[$key] = $testcase->test_question($quba, $question, $seed); $testresults[$key] = $testcase->test_question($questionid, $seed, $context);
if (!$testresults[$key]->passed()) { if (!$testresults[$key]->passed()) {
$nexturl->param('seed', $seed); $nexturl->param('seed', $seed);
$nexturl->param('deployfeedback', stack_string('deploymanysuccess', array('no' => $numberdeployed))); $nexturl->param('deployfeedback', stack_string('deploymanysuccess', array('no' => $numberdeployed)));
......
...@@ -428,6 +428,7 @@ $string['bulktestindexintro'] = 'Clicking on any of the links will run all the q ...@@ -428,6 +428,7 @@ $string['bulktestindexintro'] = 'Clicking on any of the links will run all the q
$string['bulktestindextitle'] = 'Run the question tests in bulk'; $string['bulktestindextitle'] = 'Run the question tests in bulk';
$string['bulktestnotests'] = 'This question does not have any tests.'; $string['bulktestnotests'] = 'This question does not have any tests.';
$string['bulktestnogeneralfeedback'] = 'This question does not have any general feedback.'; $string['bulktestnogeneralfeedback'] = 'This question does not have any general feedback.';
$string['bulktestnodeployedseeds'] = 'This question does have random variants, but has no deployed seeds.';
$string['bulktestrun'] = 'Run all the question tests for all the questions in the system (slow, admin only)'; $string['bulktestrun'] = 'Run all the question tests for all the questions in the system (slow, admin only)';
$string['bulktesttitle'] = 'Running all the question tests in {$a}'; $string['bulktesttitle'] = 'Running all the question tests in {$a}';
$string['overallresult'] = 'Overall result'; $string['overallresult'] = 'Overall result';
......
...@@ -145,6 +145,16 @@ class stack_bulk_tester { ...@@ -145,6 +145,16 @@ class stack_bulk_tester {
} }
} }
if (empty($question->deployedseeds)) {
if ($question->has_random_variants()) {
if ($outputmode == 'web') {
$questionproblems[] = html_writer::tag('li', stack_string('bulktestnodeployedseeds'));
} else {
$questionproblems[] = stack_string('bulktestnodeployedseeds');
}
}
}
$tests = question_bank::get_qtype('stack')->load_question_tests($questionid); $tests = question_bank::get_qtype('stack')->load_question_tests($questionid);
if (!$tests) { if (!$tests) {
$notests[] = $questionnamelink; $notests[] = $questionnamelink;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment