def _get_xmodule_instance_args(request, task_id):
 request_info = {'username': request.user.username, 'user_id': request.user.id, 'ip': request.META['REMOTE_ADDR'], 'agent': request.META.get('HTTP_USER_AGENT', '').decode('latin1'), 'host': request.META['SERVER_NAME']}
 xmodule_instance_args = {'xqueue_callback_url_prefix': get_xqueue_callback_url_prefix(request), 'request_info': request_info, 'task_id': task_id}
 return xmodule_instance_args

def _get_xmodule_instance_args ( request , task_id ) : request_info = { 'username' : request . user . username , 'user_id' : request . user . id , 'ip' : request . META [ 'REMOTE_ADDR' ] , 'agent' : request . META . get ( 'HTTP_USER_AGENT' , '' ) . decode ( 'latin1' ) , 'host' : request . META [ 'SERVER_NAME' ] } xmodule_instance_args = { 'xqueue_callback_url_prefix' : get_xqueue_callback_url_prefix ( request ) , 'request_info' : request_info , 'task_id' : task_id } return xmodule_instance_args
calculate parameters needed for instantiating xmodule instances .