19 declare(strict_types=1);
29 $qr = new \ilQuestionResult(
32 $title =
'a question title',
33 $question_score = 7.6,
35 $usr_solution =
'usr did this',
36 $best_solution =
'he had better done that',
37 $feedback =
'give it another try',
38 $worked_through =
true,
41 $recapitulation =
'some recap',
42 $autosave =
'some autosave content',
46 $this->assertEquals(
$id, $qr->getId());
47 $this->assertEquals($type, $qr->getType());
48 $this->assertEquals($title, $qr->getTitle());
49 $this->assertEquals($question_score, $qr->getQuestionScore());
50 $this->assertEquals($usr_score, $qr->getUserScore());
51 $this->assertEquals(50, $qr->getUserScorePercent());
53 $this->assertEquals($feedback, $qr->getFeedback());
54 $this->assertTrue($qr->isWorkedThrough());
55 $this->assertTrue($qr->isAnswered());
56 $this->assertEquals($recapitulation, $qr->getContentForRecapitulation());
57 $this->assertEquals($requested_hints, $qr->getNumberOfRequestedHints());
58 $this->assertEquals(
'some autosave content', $qr->getAutosavedAnswer());
59 $this->assertEquals(765, $qr->getPosition());
testTestResultsQuestionResultsBasicProps()
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins