function _course_block_navigation_view in Course 6
Same name and namespace in other branches
- 7.2 includes/course.block.inc \_course_block_navigation_view()
- 7 includes/course.block.inc \_course_block_navigation_view()
Course block callback: navigation view.
1 call to _course_block_navigation_view()
- course_ajaj_fulfullment_check in ./
course.module - Fulfillment check callback.
File
- includes/
course.block.inc, line 50 - course blocks @todo use context
Code
function _course_block_navigation_view() {
global $user;
$node = course_get_context();
if ($node) {
$course = course_get_course($node, $user);
$links = $course
->getNavigation();
// Strip array keys so theme_item_list() works properly.
$items = array_values($links);
// Add javascript poller to update the next step button.
drupal_add_js(drupal_get_path('module', 'course') . '/js/nav.js', 'module', 'header', FALSE, FALSE, FALSE);
return array(
'subject' => '',
'content' => theme('item_list', $items, NULL, 'ul', array(
'id' => 'course-nav',
)),
);
}
}