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