You are here

function hook_course_report_saved in Course 6

Notify modules that a course report has been saved.

Parameters

stdClass $entry: By reference. The object parameter from course_report_save(), now including the 'crid': course report record ID from drupal_write_record().

stdClass $account: The fully loaded report user.

stdClass $old: The former saved version of the user's report for a course.

See also

course_report_save()

1 invocation of hook_course_report_saved()
course_report_save in ./course.module
Inserts or updates a course report record.

File

./course.api.php, line 323
Hooks provided by Course module.

Code

function hook_course_report_saved($entry, $account, $old) {

  // Example: Do something completely unnecesary.
  if ($entry->crid == 1000000) {
    drupal_set_message(t('Congratulations %name, you have just saved the one millionth course report!', array(
      '%name' => theme('username', $account),
    )));
  }
}