def add_edited_exploration_id(user_id, exploration_id):
 user_contributions = get_user_contributions(user_id, strict=False)
 if (not user_contributions):
  create_user_contributions(user_id, [], [exploration_id])
 elif (exploration_id not in user_contributions.edited_exploration_ids):
  user_contributions.edited_exploration_ids.append(exploration_id)
  user_contributions.edited_exploration_ids.sort()
  _save_user_contributions(user_contributions)

def add_edited_exploration_id ( user_id , exploration_id ) : user_contributions = get_user_contributions ( user_id , strict = False ) if ( not user_contributions ) : create_user_contributions ( user_id , [ ] , [ exploration_id ] ) elif ( exploration_id not in user_contributions . edited_exploration_ids ) : user_contributions . edited_exploration_ids . append ( exploration_id ) user_contributions . edited_exploration_ids . sort ( ) _save_user_contributions ( user_contributions )
adds an exploration_id to a user_ids usercontributionsmodel collection of edited explorations .