if (ref.getUserdata().equals(GLOSSARY_REPO_REF_IDENTIFYER)) {
// remove the reference from the course configuration
// TODO:RH:improvement: this should use a callback method or send a general delete
// event so that the course can take care of this rather than having it
// here hardcoded
OLATResourceImpl courseResource = ref.getSource();
//ICourse course = CourseFactory.loadCourse(courseResource);
ICourse course = CourseFactory.openCourseEditSession(courseResource.getResourceableId());
CourseConfig cc = course.getCourseEnvironment().getCourseConfig();
cc.setGlossarySoftKey(null);
CourseFactory.setCourseConfig(course.getResourceableId(), cc);
CourseFactory.closeCourseEditSession(course.getResourceableId(),true);
// remove reference from the references table