/** * Shows question title an description * * @param string $feedback_type * @param int $counter * @param float $score */ function return_header($feedback_type = null, $counter = null, $score = null) { $counter_label = ''; if (!empty($counter)) { $counter_label = intval($counter); } $score_label = get_lang('Wrong'); $class = 'error'; if ($score['pass'] == true) { $score_label = get_lang('Correct'); $class = 'success'; } if ($this->type == FREE_ANSWER || $this->type == ORAL_EXPRESSION) { $score['revised'] = isset($score['revised']) ? $score['revised'] : false; if ($score['revised'] == true) { $score_label = get_lang('Revised'); $class = ''; } else { $score_label = get_lang('NotRevised'); $class = 'error'; } } $question_title = $this->question; // display question category, if any $header = TestCategory::returnCategoryAndTitle($this->id); $show_media = null; if ($show_media) { $header .= $this->show_media_content(); } $header .= Display::page_subheader2($counter_label . ". " . $question_title); $header .= Display::div("<div class=\"rib rib-{$class}\"><h3>{$score_label}</h3></div> <h4>{$score['result']}</h4>", array('class' => 'ribbon')); $header .= Display::div($this->description, array('id' => 'question_description')); return $header; }