You are here

function course_take_course_button_html in Course 6

Generate a button for taking the course.

1 call to course_take_course_button_html()
course_render_button in ./course.module
Check the permissions of showing the take course button, and return the HTML.

File

./course.module, line 977
course.module Core functionality for Courses.

Code

function course_take_course_button_html(&$node) {

  // Allow modules to provide the course button.
  $course_button = module_invoke_all('course_button', $node);
  if (isset($course_button[0])) {
    return $course_button[0];
  }
  else {
    $link = l(t('Take Course'), "node/{$node->nid}/takecourse");
    return '<div class="action-link">' . $link . '</div>';
  }
}