function hook_audit_modify_approval_types

7.x audit.api.php hook_audit_modify_approval_types(&$approvals, $school_id = 0)
6.x audit.api.php hook_audit_modify_approval_types(&$approvals, $school_id = 0)

This hook allows the module developer to modify the approval types which will be displayed on the audit tab.

Ordinarily, basic approvals are able to be added via the Audit settings using the Admin Console. This allows us to remove, re-arrange, or add new approvals dynamically.

Notice that the $approvals array is passed by reference. There is no need to return anything.

File

modules/audit/audit.api.php, line 22
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_modify_approval_types(&$approvals, $school_id = 0) {

  // $approvals looks like:
  /*
   *  $approvals['machine_name'] = array(
   *    'title' => 'Some Title'
   *    'description' => 'Some Description',
   *  );
   *
   *  To ensure uniqueness, it is best practice for the machine name to begin with the name
   *  of the module.  Ex:  mymodule_education_coursework.
   *
   */


  $approvals ['mymodule_education_coursework'] = array(
    'title' => 'Education Coursework',
    'description' => 'The student has completed all Education coursework with a GPA of at least 2.5.',
  );


  // Do not return anything.  $approvals is passed by reference.  

}