Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'MDL-27927' of git://github.com/timhunt/moodle

  • Loading branch information...
commit 1533a25e51f9d43dcb1f5d20a77a88d99cd6301c 2 parents 8ffaf7b + 635971c
@samhemelryk samhemelryk authored
View
25 question/type/multianswer/edit_multianswer_form.php
@@ -141,8 +141,6 @@ protected function definition_inner($mform) {
get_string('decodeverifyquestiontext', 'qtype_multianswer'));
$mform->registerNoSubmitButton('analyzequestion');
if ($this->reload) {
- $mform->addElement('html', '<div class="ablock clearfix">');
- $mform->addElement('html', '<div class=" clearfix">');
for ($sub = 1; $sub <= $countsubquestions; $sub++) {
$this->editas[$sub] = 'unknown type';
@@ -151,15 +149,16 @@ protected function definition_inner($mform) {
} else if (optional_param('sub_'.$sub."_".'qtype', '', PARAM_RAW) != '') {
$this->editas[$sub] = optional_param('sub_'.$sub."_".'qtype', '', PARAM_RAW);
}
+
$storemess = '';
if (isset($this->savedquestiondisplay->options->questions[$sub]->qtype) &&
$this->savedquestiondisplay->options->questions[$sub]->qtype !=
$this->questiondisplay->options->questions[$sub]->qtype) {
$this->qtype_change = true;
- $storemess = "<font class=\"error\"> STORED QTYPE " .
- question_bank::get_qtype_name(
- $this->savedquestiondisplay->options->questions[$sub]->qtype).
- "</font >";
+ $storemess = ' ' . html_writer::tag('span', get_string(
+ 'storedqtype', 'qtype_multianswer', question_bank::get_qtype_name(
+ $this->savedquestiondisplay->options->questions[$sub]->qtype)),
+ array('class' => 'error'));
}
$mform->addElement('header', 'subhdr'.$sub, get_string('questionno', 'question',
@@ -167,8 +166,7 @@ protected function definition_inner($mform) {
$this->questiondisplay->options->questions[$sub]->qtype).$storemess);
$mform->addElement('static', 'sub_'.$sub."_".'questiontext',
- get_string('questiondefinition', 'qtype_multianswer'),
- array('cols' => 60, 'rows' => 3));
+ get_string('questiondefinition', 'qtype_multianswer'));
if (isset ($this->questiondisplay->options->questions[$sub]->questiontext)) {
$mform->setDefault('sub_'.$sub."_".'questiontext',
@@ -187,13 +185,12 @@ protected function definition_inner($mform) {
if ($this->questiondisplay->options->questions[$sub]->qtype == 'multichoice') {
$mform->addElement('static', 'sub_'.$sub."_".'layout',
- get_string('layout', 'qtype_multianswer'),
- array('cols' => 60, 'rows' => 1));
+ get_string('layout', 'qtype_multianswer'));
}
- foreach ($this->questiondisplay->options->questions[$sub]->answer as $key => $ans) {
+ foreach ($this->questiondisplay->options->questions[$sub]->answer as $key => $ans) {
$mform->addElement('static', 'sub_'.$sub."_".'answer['.$key.']',
- get_string('answer', 'question'), array('cols' => 60, 'rows' => 1));
+ get_string('answer', 'question'));
if ($this->questiondisplay->options->questions[$sub]->qtype == 'numerical' &&
$key == 0) {
@@ -207,9 +204,8 @@ protected function definition_inner($mform) {
$mform->addElement('static', 'sub_'.$sub."_".'feedback['.$key.']',
get_string('feedback', 'question'));
}
-
}
- $mform->addElement('html', '</div>');
+
$this->negative_diff = $countsavedsubquestions - $countsubquestions;
if (($this->negative_diff > 0) ||$this->qtype_change ||
($this->used_in_quiz && $this->negative_diff != 0)) {
@@ -226,7 +222,6 @@ protected function definition_inner($mform) {
get_string('questiontypechanged', 'qtype_multianswer')."</strong>",
get_string('questiontypechangedcomment', 'qtype_multianswer'));
}
- $mform->addElement('html', '</div>');
}
if ($this->used_in_quiz) {
if ($this->negative_diff < 0) {
View
1  question/type/multianswer/lang/en/qtype_multianswer.php
@@ -60,6 +60,7 @@
$string['questiontypechanged'] = 'Question type changed';
$string['questiontypechangedcomment'] = 'At least one question type has been changed.<br \>Did you add, delete or move a question?<br \>Look ahead.';
$string['questionusedinquiz'] = 'This question is used in {$a->nb_of_quiz} quiz(s), total attempt(s) : {$a->nb_of_attempts} ';
+$string['storedqtype'] = 'Stored question type {$a}';
$string['subqresponse'] = 'part {$a->i}: {$a->response}';
$string['unknownquestiontypeofsubquestion'] = 'Unknown question type: {$a->type} of question part # {$a->sub}';
$string['warningquestionmodified'] = '<b>WARNING</b>';
Please sign in to comment.
Something went wrong with that request. Please try again.