diff --git a/mod/questionnaire/lang/en/questionnaire.php b/mod/questionnaire/lang/en/questionnaire.php index 1a7c0ec..85d3578 100644 --- a/mod/questionnaire/lang/en/questionnaire.php +++ b/mod/questionnaire/lang/en/questionnaire.php @@ -111,8 +111,8 @@ value to its default **0** value. If you set **Min.** or **Max.** to values othe respondent does not comply with your requirements. Obviously you should make any requirements clear to the respondent either in the general instructions of your Questionnaire or in the text of relevant questions.'; $string['misconfigured'] = 'Course is misconfigured'; -$string['missingquestion'] = 'You are missing required question '; -$string['missingquestions'] = 'You are missing required questions: '; +$string['missingquestion'] = 'Error, please anser question '; +$string['missingquestions'] = 'Error, please answer questions: '; $string['modulename'] = 'Questionnaire'; $string['modulenameplural'] = 'Questionnaires'; $string['move'] = 'Move this question'; @@ -151,6 +151,7 @@ $string['of'] = 'of'; $string['opendate'] = 'Use Open Date'; $string['opendate_help'] = 'You can specify a date to open the questionnaire here. Check the check box, and select the date and time you want. Users will not be able to fill out the questionnaire before that date. If this is not selected, it will be open immediately.'; +$string['option'] = 'option {$a}'; $string['optionalname'] = 'Question Name'; $string['optionalname_help'] = 'The Question Name is only used when you export responses to CSV/Excel format. If you never export to CSV, then you needn\'t worry about Question names at all. diff --git a/mod/questionnaire/questiontypes/questiontypes.class.php b/mod/questionnaire/questiontypes/questiontypes.class.php index eaec677..b7e5b82 100644 --- a/mod/questionnaire/questiontypes/questiontypes.class.php +++ b/mod/questionnaire/questiontypes/questiontypes.class.php @@ -810,38 +810,43 @@ class questionnaire_question { if ($this->type_id == QUESSECTIONTEXT) { return; } - echo ' -
';
- if ($this->required == 'y') {
- echo ' |
- '. - format_text(file_rewrite_pluginfile_urls($this->content, 'pluginfile.php', $this->context->id, - 'mod_questionnaire', 'question', $this->id), FORMAT_HTML).' - | -
- '; + echo html_writer::start_tag('fieldset', array('class' => 'qn-container')); + echo html_writer::start_tag('legend', array('class' => 'qn-legend')); + echo html_writer::start_tag('div', array('class' => 'qn-number')); + if ($this->required == 'y') { + echo html_writer::empty_tag('img', + array('class' => 'req', + 'title' => get_string('required', 'questionnaire'), + 'alt' => get_string('required', 'questionnaire'), + 'src' => $OUTPUT->pix_url('req'))); + } + echo $qnum; + echo html_writer::end_tag('div'); + echo html_writer::start_tag('div', array('class' => 'qn-question')); + if ($this->type_id == QUESNUMERIC || $this->type_id == QUESTEXT || + $this->type_id == QUESDROP) { + echo html_writer::start_tag('label', array('for' => $this->type . $this->id)); + } + if ($this->type_id == QUESESSAY) { + echo html_writer::start_tag('label', array('for' => 'edit-q' . $this->id)); + } + echo format_text(file_rewrite_pluginfile_urls($this->content, 'pluginfile.php', + $this->context->id, 'mod_questionnaire', 'question', $this->id), FORMAT_HTML); + if ($this->type_id == QUESNUMERIC || $this->type_id == QUESTEXT || + $this->type_id == QUESESSAY || $this->type_id == QUESDROP) { + echo html_writer::end_tag('label'); + } + echo html_writer::end_tag('div'); + echo html_writer::end_tag('legend'); + echo html_writer::start_tag('div', array('class' => 'qn-type')); } function questionend_survey_display() { if ($this->type_id == QUESSECTIONTEXT) { return; } - echo ' - | -