You are here

function hook_course_button in Course 6

Allow modules to provide the course button.

Parameters

object $node: The course node.

See also

course_take_course_button_html()

1 invocation of hook_course_button()
course_take_course_button_html in ./course.module
Generate a button for taking the course.

File

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

Code

function hook_course_button($node) {

  // Example: change the button text, and add a custom class.
  $link = l(t('Take Me'), "node/{$node->nid}/takecourse");
  return '<div class="action-link my-custom-class">' . $link . '</div>';
}