function course_menu_alter in Course 6
Implements hook_menu_alter().
Add a default reports tab if views isn't enabled.
File
- ./
course.module, line 571 - course.module Core functionality for Courses.
Code
function course_menu_alter(&$items) {
if (!module_exists('views')) {
$default = $items['node/%course/course-reports/objects'];
$items['node/%course/course-reports'] = $default;
$items['node/%course/course-reports']['title'] = 'Course reports';
$items['node/%course/course-reports']['type'] = MENU_LOCAL_TASK;
$items['node/%course/course-reports/objects']['type'] = MENU_DEFAULT_LOCAL_TASK;
}
}