@auth
def activities_get(req_dict):
    rogueparams = set(req_dict['params']) - set(["activityId"])
    if rogueparams:
        raise ParamError("The get activities request contained unexpected parameters: %s" % ", ".join(rogueparams))

    try:
        activity_id = req_dict['params']['activityId']
    except __HOLE__:
        err_msg = "Error -- activities - method = %s, but activityId parameter is missing" % req_dict['method']
        raise ParamError(err_msg)

    # Try to retrieve activity, if DNE then return empty else return activity info
    try:
        Activity.objects.get(activity_id=activity_id, authority__isnull=False)
    except Activity.DoesNotExist:    
        err_msg = "No activity found with ID %s" % activity_id
        raise IDNotFoundError(err_msg)

    return req_dict
dataset/ETHPy150Open adlnet/ADL_LRS/lrs/utils/req_validate.py/activities_get