'Clear the record for this course'

def _clear_bulk_ops_record(self, course_key):

    if (not isinstance(course_key, (CourseLocator, LibraryLocator))):
        raise TypeError('{!r}    is    not    a    CourseLocator    or    LibraryLocator'.format(course_key))
    if (course_key.org and course_key.course and course_key.run):
        del self._active_bulk_ops.records[course_key.replace(branch=None, version_guid=None)]
    else:
        del self._active_bulk_ops.records[course_key.replace(org=None, course=None, run=None, branch=None)]
