Skip to content

Commit

Permalink
Improve string handling in the question type base class. Merged from …
Browse files Browse the repository at this point in the history
…MOODLE_18_STABLE.
  • Loading branch information
tjhunt committed Mar 21, 2007
1 parent 1710226 commit c2f8c4b
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions question/type/questiontype.php
Expand Up @@ -55,7 +55,7 @@ function menu_name() {
if ($menu_name[0] == '[') {
// Legacy behavior, if the string was not in the proper qtype_name
// language file, look it up in the quiz one.
$menu_name = get_string($this->name(), 'quiz');
$menu_name = get_string($name, 'quiz');
}
return $menu_name;
}
Expand Down Expand Up @@ -107,11 +107,16 @@ function create_editing_form($submiturl, $question) {
* @param string $wizardnow is '' for first page.
*/
function display_question_editing_page(&$mform, $question, $wizardnow){
$name = $this->name();
$strheading = get_string('editing' . $name, 'qtype_' . $name);
if ($strheading[0] == '[') {
// Legacy behavior, if the string was not in the proper qtype_name
// language file, look it up in the quiz one.
$strheading = get_string('editing' . $name, 'quiz');
}

print_heading_with_help(get_string("editing".$question->qtype, "quiz"), $question->qtype, "quiz");

print_heading_with_help($strheading, $name, 'quiz');
$mform->display();

}

/**
Expand Down

0 comments on commit c2f8c4b

Please sign in to comment.