function hook_audit_get_additional_overall_calculations

7.x audit.api.php hook_audit_get_additional_overall_calculations($student, $school_id = 0)
6.x audit.api.php hook_audit_get_additional_overall_calculations($student, $school_id = 0)

This hook allows other modules to add to the "overall" calculations table near the top of the Audit tab.

Items added here will appear ABOVE the "footnotes & messages" section.

Return value

$rtn An array that contains the additional row information. Ex: $rtn[] = array( 'title' => 'Education Courses:', 'section_1_html' => $some_html_here 'section_2_html' => $some_html_here_also 'raw_data' => $arr, // optional array of "raw data" formatted however you like, for use later in other modules. );

File

modules/audit/audit.api.php, line 63
This file contains examples of the hooks you may use (as a module developer) to extend the functionality of the audit module.

Code

function hook_audit_get_additional_overall_calculations($student, $school_id = 0) {

  $rtn = array();


  // IF student is in the Education major....
  $rtn [] = array(
    'title' => 'Education Courses:',
    'section_1_html' => '<b>This goes in section 1</b>',
    'section_2_html' => '<b>This goes in section 2</b>',
    'raw_data' => array(1, 2, 3, 4),
  );


  return $rtn;
}