Skip to content

Commit

Permalink
MDL-20636 Fix type respones -> response. Thanks Colin. #415
Browse files Browse the repository at this point in the history
  • Loading branch information
timhunt committed Apr 7, 2011
1 parent 3758786 commit b3ae545
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions question/type/essay/edit_essay_form.php
Expand Up @@ -40,11 +40,11 @@ protected function definition_inner($mform) {
$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',
Expand Down
2 changes: 1 addition & 1 deletion question/type/essay/lang/en/qtype_essay.php
Expand Up @@ -38,4 +38,4 @@
$string['graderinfo'] = 'Information for graders';
$string['nlines'] = '{$a} lines';
$string['responsefieldlines'] = 'Input box size';
$string['responseformat'] = 'Respones format';
$string['responseformat'] = 'Response format';
4 changes: 2 additions & 2 deletions question/type/essay/questiontype.php
Expand Up @@ -83,7 +83,7 @@ protected function initialise_question_instance(question_definition $question, $
* @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'),
Expand All @@ -95,7 +95,7 @@ public function respones_formats() {
/**
* @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);
Expand Down
10 changes: 5 additions & 5 deletions question/type/match/simpletest/testwalkthrough.php
Expand Up @@ -355,20 +355,20 @@ public function test_match_with_tricky_html_choices() {
$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() {
Expand Down

0 comments on commit b3ae545

Please sign in to comment.