示例#1
0
 public function test_with_parts()
 {
     $row = new stdClass();
     $row->id = 123;
     $row->hint = 'A hint';
     $row->hintformat = FORMAT_HTML;
     $row->shownumcorrect = 1;
     $row->clearwrong = 1;
     $hint = question_hint_with_parts::load_from_record($row);
     $this->assertEquals($row->id, $hint->id);
     $this->assertEquals($row->hint, $hint->hint);
     $this->assertEquals($row->hintformat, $hint->hintformat);
     $this->assertNotEmpty($hint->shownumcorrect);
     $this->assertNotEmpty($hint->clearwrong);
 }
示例#2
0
 protected function make_hint($hint)
 {
     return question_hint_with_parts::load_from_record($hint);
 }