def get_next_exploration_ids_to_complete_by_user(user_id, collection_id):
 completed_exploration_ids = get_completed_exploration_ids(user_id, collection_id)
 collection = get_collection_by_id(collection_id)
 if completed_exploration_ids:
  return collection.get_next_exploration_ids(completed_exploration_ids)
 else:
  return collection.init_exploration_ids

def get_next_exploration_ids_to_complete_by_user ( user_id , collection_id ) : completed_exploration_ids = get_completed_exploration_ids ( user_id , collection_id ) collection = get_collection_by_id ( collection_id ) if completed_exploration_ids : return collection . get_next_exploration_ids ( completed_exploration_ids ) else : return collection . init_exploration_ids
returns a list of exploration ids in the specified collection that the given user has not yet attempted and has the prerequisite skills to play .