Vibe themes course module plugin. There is mistake. variable is
$course_id
and see what is used here.
'primary_link'=>get_permalink($course),
file includes/bp-course-activity.php line no. 261
function course_subscribed($course_id,$user_id,$group_id = null){
if(empty($group_id))
$group_id = '';
bp_course_record_activity(array(
'action' => sprintf(__('Student subscribed for course %s','vibe'),get_the_title($course_id)),
'content' => sprintf(__('Student %s subscribed for course %s','vibe'),bp_core_get_userlink( $user_id ),get_the_title($course_id)),
'type' => 'subscribe_course',
'item_id' => $course_id,
'primary_link'=>get_permalink($course),
'secondary_item_id'=>$user_id
));
}