'Update a course structure, respecting the current bulk operation status
(no data will be written to the database if a bulk operation is active.)'

def update_structure(self, course_key, structure):

    self._clear_cache(structure['_id'])
    bulk_write_record = self._get_bulk_ops_record(course_key)
    if bulk_write_record.active:
        bulk_write_record.structures[structure['_id']] = structure
    else:
        self.db_connection.insert_structure(structure, course_key)
