Commit b3ae5457 authored by Tim Hunt's avatar Tim Hunt
Browse files

MDL-20636 Fix type respones -> response. Thanks Colin. #415

parent 3758786f
......@@ -40,11 +40,11 @@ class qtype_essay_edit_form extends question_edit_form {
$qtype = question_bank::get_qtype('essay');
$mform->addElement('select', 'responseformat',
get_string('responseformat', 'qtype_essay'), $qtype->respones_formats());
get_string('responseformat', 'qtype_essay'), $qtype->response_formats());
$mform->setDefault('responseformat', 'editor');
$mform->addElement('select', 'responsefieldlines',
get_string('responsefieldlines', 'qtype_essay'), $qtype->respones_sizes());
get_string('responsefieldlines', 'qtype_essay'), $qtype->response_sizes());
$mform->setDefault('responsefieldlines', 15);
$mform->addElement('select', 'attachments',
......
......@@ -38,4 +38,4 @@ $string['formatplain'] = 'Plain text';
$string['graderinfo'] = 'Information for graders';
$string['nlines'] = '{$a} lines';
$string['responsefieldlines'] = 'Input box size';
$string['responseformat'] = 'Respones format';
$string['responseformat'] = 'Response format';
......@@ -83,7 +83,7 @@ class qtype_essay extends question_type {
* @return array the different response formats that the question type supports.
* internal name => human-readable name.
*/
public function respones_formats() {
public function response_formats() {
return array(
'editor' => get_string('formateditor', 'qtype_essay'),
'editorfilepicker' => get_string('formateditorfilepicker', 'qtype_essay'),
......@@ -95,7 +95,7 @@ class qtype_essay extends question_type {
/**
* @return array the choices that should be offered for the input box size.
*/
public function respones_sizes() {
public function response_sizes() {
$choices = array();
for ($lines = 5; $lines <= 40; $lines += 5) {
$choices[$lines] = get_string('nlines', 'qtype_essay', $lines);
......
......@@ -355,20 +355,20 @@ class qtype_match_walkthrough_test extends qbehaviour_walkthrough_test_base {
$this->get_does_not_contain_feedback_expectation());
$this->check_step_count(1);
$rightresponese = array('sub0' => $orderforchoice[1],
$rightresponse = array('sub0' => $orderforchoice[1],
'sub1' => $orderforchoice[2], 'sub2' => $orderforchoice[3]);
$rightresponesesummary =
$rightresponsesummary =
'(1, 2] -> 1 < x ≤ 2; [1, 2] -> 1 ≤ x ≤ 2; [1, 2) -> 1 ≤ x < 2';
$this->process_submission($rightresponese);
$this->process_submission($rightresponse);
$this->process_submission(array('-finish' => 1));
$this->assertEqual($rightresponesesummary, $m->summarise_response($rightresponese));
$this->assertEqual($rightresponsesummary, $m->summarise_response($rightresponse));
$this->displayoptions->history = 1;
$this->check_current_output(
new PatternExpectation('/' .
preg_quote(htmlspecialchars($rightresponesesummary), '/') . '/'));
preg_quote(htmlspecialchars($rightresponsesummary), '/') . '/'));
}
public function test_match_clear_wrong() {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment