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

Fixed a bug with the bulk testing involving state which blocked the change of seed.

parent 3b57e559
Branches
Tags
No related merge requests found
......@@ -170,10 +170,11 @@ if (!$question->has_random_variants()) {
// Bulk test all versions.
$bulktester = new stack_bulk_tester();
$bulktestresults = $bulktester->qtype_stack_test_question($question, $testscases, $deployedseed, true);
$qn = question_bank::load_question($questionid);
$bulktestresults = $bulktester->qtype_stack_test_question($qn, $testscases, $deployedseed, true);
// Print out question notes of all deployed versions.
$qn = question_bank::load_question($questionid);
$qn->seed = (int) $deployedseed;
$cn = $qn->get_context();
$qunote = question_engine::make_questions_usage_by_activity('qtype_stack', $cn);
......@@ -186,10 +187,14 @@ if (!$question->has_random_variants()) {
$variantdeployed = true;
}
$icon = '';
if ($bulktestresults[0]) {
$icon = $OUTPUT->pix_icon('t/check', stack_string('questiontestspass'));
}
$notestable->data[] = array(
$choice,
stack_ouput_castext($qn->get_question_summary()),
$OUTPUT->pix_icon('t/check', stack_string('questiontestspass')),
$icon,
$bulktestresults[1]
);
}
......
......@@ -154,8 +154,8 @@ class stack_bulk_tester {
}
$flag = '';
$ok = $fails == 0;
if ($ok) {
$ok = $fails === 0;
if ($ok === false) {
$class = 'pass';
} else {
$class = 'fail';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment