public function test_import_essay() { $xml = $this->make_test_xml(); $importer = new qformat_blackboard_six(); $importer->set_filetype(2); $questions = $importer->readquestions($xml); $q = $questions[5]; $expectedq = new stdClass(); $expectedq->qtype = 'essay'; $expectedq->name = 'How are you?'; $expectedq->questiontext = 'How are you?'; $expectedq->questiontextformat = FORMAT_HTML; $expectedq->generalfeedback = ''; $expectedq->generalfeedbackformat = FORMAT_HTML; $expectedq->defaultmark = 1; $expectedq->length = 1; $expectedq->responseformat = 'editor'; $expectedq->responsefieldlines = 15; $expectedq->attachments = 0; $expectedq->graderinfo = array( 'text' => 'Blackboard answer for essay questions will be imported as informations for graders.', 'format' => FORMAT_HTML, ); $this->assert(new question_check_specified_fields_expectation($expectedq), $q); }
public function test_import_category() { $xml = $this->make_test_xml(); $importer = new qformat_blackboard_six(); $questions = $importer->readquestions($xml); $q = $questions[0]; $expectedq = new stdClass(); $expectedq->qtype = 'category'; $expectedq->category = 'exam 3 2008-9'; $this->assert(new question_check_specified_fields_expectation($expectedq), $q); }