Use with question_engine_data_mapper object - Moodle 29

Use with question_engine_data_mapper object - Moodle 29

by T W -
Number of replies: 1

Hi,

I use with question_engine_data_mapper object to get all data of question attempts, but I get error....

This is my code:

$qubaidscondition = new qubaid_list($qubaids);
$dm = new question_engine_data_mapper();
$result = $dm->load_attempts_at_question(323, $qubaidscondition); //323 = question id
and I get this error:
Fatal error: Class 'question_attempt' not found in /var/www/moodlegit/moodle/question/engine/datalib.php on line 872 
help???

Thanks!

Average of ratings: -
In reply to T W

Re: Use with question_engine_data_mapper object - Moodle 29

by T W -

I found the solution...

Need to include the question/engine lib.php file and it includes everything.

require_once($CFG->wwwroot . '/question/engine/lib.php');