Here is how you can add to content :
please try adding this given code in your wplms-customizer.php file in wplms customizer plugin :
this code will append your user id based dynamic content to the unit content .
add_filter( 'bp_course_api_get_user_course_status_item',function($return, $request ){
$body = json_decode($request->get_body(),true);
if(!empty($body['token']) && is_numeric($request['course'])){
$user = apply_filters('vibebp_api_get_user_from_token','',$body['token']);
$user_id = $user->id;
}
if(!empty($user_id)){
//do your thing here and add the content to :
ob_start();
echo 'your dynamic content';
$cont = ob_get_clean();
$return['content'] .= $cont;//here the content is appending in api call return
}
return $return;
},10,2);