This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$string = 'Billy was like the other rich kids had a nurse , bicycle and swimming pool , but he never played in the street'; | |
$string = $string.' , did not talk to poor people .'; | |
$enumcorrect = $lang->create_from_string(new qtype_poasquestion\utf8_string($string), 'qtype_correctwriting_processed_string'); | |
$enumdescription1 = array(); | |
$enumdescription1[] = array(new enum_element(8, 9), new enum_element(13, 14), new enum_element(11, 11)); | |
$enumdescription1[] = array(new enum_element(17, 22), new enum_element(24, 29)); | |
$string = 'Billy was like the other rich kids had a nurse , swimming pool and bicycle , but he never played in the street'; | |
$string = $string.' , did not talk to poor people .'; | |
$correct = $lang->create_from_string(new qtype_poasquestion\utf8_string($string), 'qtype_correctwriting_processed_string'); | |
$pair = new qtype_correctwriting_string_pair(clone $correct, clone $corrected, null); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function test_validate_without_analyzers() { | |
$language = new block_formal_langs_language_cpp_parseable_language(); | |
$question = new qtype_correctwriting_question(); | |
$question->usecase = true; | |
$question->lexicalerrorthreshold = 3000; | |
$question->lexicalerrorweight = 0.1; | |
$question->usedlanguage = $language; | |
$question->movedmistakeweight = 0.1; | |
$question->absentmistakeweight = 0.11; | |
$question->addedmistakeweight = 0.12; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$lang = new block_formal_langs_language_simple_english; | |
$string = 'Billy was like the other rich kids had a nurse, bicycle and swimming pool, but he never played in the street, | |
did not talk to poor people.'; | |
$correct = $lang->create_from_string($string, 'qtype_correctwriting_proccesedstring'); | |
$lang->scan($correct); |