mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-27948 The question engine should use recordsets to load attempt data
This should be good for performance (memory usage). It also avoids having to construct a meaningless, unique, first column, which is a pain on MyQSL.
This commit is contained in:
parent
3552484b91
commit
35d5f1c28d
8 changed files with 155 additions and 72 deletions
|
@ -60,17 +60,17 @@ class qbehaviour_missing_test extends UnitTestCase {
|
|||
}
|
||||
|
||||
public function test_render_missing() {
|
||||
$records = testing_db_record_builder::build_db_records(array(
|
||||
array('id', 'questionattemptid', 'contextid', 'questionusageid', 'slot',
|
||||
$records = new test_recordset(array(
|
||||
array('questionattemptid', 'contextid', 'questionusageid', 'slot',
|
||||
'behaviour', 'questionid', 'variant', 'maxmark', 'minfraction', 'flagged',
|
||||
'questionsummary', 'rightanswer', 'responsesummary',
|
||||
'timemodified', 'attemptstepid', 'sequencenumber', 'state', 'fraction',
|
||||
'timecreated', 'userid', 'name', 'value'),
|
||||
array(1, 1, 123, 1, 1, 'strangeunknown', -1, 1, 2.0000000, 0.0000000, 0, '', '', '',
|
||||
array(1, 123, 1, 1, 'strangeunknown', -1, 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, 1, 2.0000000, 0.0000000, 0, '', '', '',
|
||||
array(1, 123, 1, 1, 'strangeunknown', -1, 1, 2.0000000, 0.0000000, 0, '', '', '',
|
||||
1256233790, 2, 1, 'complete', 0.50, 1256233705, 1, '-submit', '1'),
|
||||
array(3, 1, 123, 1, 1, 'strangeunknown', -1, 1, 2.0000000, 0.0000000, 0, '', '', '',
|
||||
array(1, 123, 1, 1, 'strangeunknown', -1, 1, 2.0000000, 0.0000000, 0, '', '', '',
|
||||
1256233790, 2, 1, 'complete', 0.50, 1256233705, 1, 'choice0', '1'),
|
||||
));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue