mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-20636 Fix behaviour unit tests. (all but opaque)
This commit is contained in:
parent
93cadb1ede
commit
2ac0843f4b
4 changed files with 39 additions and 39 deletions
|
@ -70,7 +70,7 @@ class qbehaviour_deferredcbm_renderer extends qbehaviour_renderer {
|
|||
}
|
||||
|
||||
$feedback = '';
|
||||
if (!$qa->get_last_behaviour_var('certainty')) {
|
||||
if (!$qa->get_last_behaviour_var('certainty') && $qa->get_last_behaviour_var('_assumedcertainty')) {
|
||||
$feedback .= html_writer::tag('p', get_string('assumingcertainty', 'qbehaviour_deferredcbm',
|
||||
question_cbm::get_string($qa->get_last_behaviour_var('_assumedcertainty'))));
|
||||
}
|
||||
|
|
|
@ -53,14 +53,14 @@ class qbehaviour_missing_test extends UnitTestCase {
|
|||
|
||||
public function test_render_missing() {
|
||||
$records = testing_db_record_builder::build_db_records(array(
|
||||
array('id', 'questionattemptid', 'questionusageid', 'slot',
|
||||
array('id', 'questionattemptid', 'contextid', 'questionusageid', 'slot',
|
||||
'behaviour', 'questionid', 'maxmark', 'minfraction', 'flagged',
|
||||
'questionsummary', 'rightanswer', 'responsesummary', 'timemodified',
|
||||
'attemptstepid', 'sequencenumber', 'state', 'fraction',
|
||||
'timecreated', 'userid', 'name', 'value'),
|
||||
array(1, 1, 1, 1, 'strangeunknown', -1, 2.0000000, 0.0000000, 0, '', '', '', 1256233790, 1, 0, 'todo', null, 1256233700, 1, '_order', '1,2,3'),
|
||||
array(2, 1, 1, 1, 'strangeunknown', -1, 2.0000000, 0.0000000, 0, '', '', '', 1256233790, 2, 1, 'complete', 0.50, 1256233705, 1, '-submit', '1'),
|
||||
array(3, 1, 1, 1, 'strangeunknown', -1, 2.0000000, 0.0000000, 0, '', '', '', 1256233790, 2, 1, 'complete', 0.50, 1256233705, 1, 'choice0', '1'),
|
||||
array(1, 1, 123, 1, 1, 'strangeunknown', -1, 2.0000000, 0.0000000, 0, '', '', '', 1256233790, 1, 0, 'todo', null, 1256233700, 1, '_order', '1,2,3'),
|
||||
array(2, 1, 123, 1, 1, 'strangeunknown', -1, 2.0000000, 0.0000000, 0, '', '', '', 1256233790, 2, 1, 'complete', 0.50, 1256233705, 1, '-submit', '1'),
|
||||
array(3, 1, 123, 1, 1, 'strangeunknown', -1, 2.0000000, 0.0000000, 0, '', '', '', 1256233790, 2, 1, 'complete', 0.50, 1256233705, 1, 'choice0', '1'),
|
||||
));
|
||||
|
||||
$question = test_question_maker::make_a_truefalse_question();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue