/** * Format and output P values for a question. * @param array $perform_data * @param text $q_type * @return formatted value for P. */ static function display_p($perform_data, $q_type) { $html = ''; if (question_info::multi_part_question($q_type)) { foreach ($perform_data as $single_data) { $html .= question_info::p_warning(number_format($single_data['p'] / 100, 2)) . '<br />'; } } else { $html = question_info::p_warning(number_format($perform_data[1]['p'] / 100, 2)); } return $html; }