def record_played_exploration_in_collection_context(user_id, collection_id, exploration_id):
 progress_model = user_models.CollectionProgressModel.get_or_create(user_id, collection_id)
 if (exploration_id not in progress_model.completed_explorations):
  progress_model.completed_explorations.append(exploration_id)
  progress_model.put()

def record_played_exploration_in_collection_context ( user_id , collection_id , exploration_id ) : progress_model = user_models . CollectionProgressModel . get_or_create ( user_id , collection_id ) if ( exploration_id not in progress_model . completed_explorations ) : progress_model . completed_explorations . append ( exploration_id ) progress_model . put ( )
records a exploration by a given user in a given collection context as having been played .