Thursday, August 1, 2013

Can't Delete Enrollments When Attempts Exist



Can't Delete Enrollments When Attempts Exist

Why does one get the error "you cannot delete class because there are attempts against this class" when attempting to deleting a class?

Content attempts are a lower level of of detail, subordinate to the class catalog object. Once a learner "plays" content and a row is inserted into the "Attempts" table, the current OLM architecture prevents the catalog object from being deleted. A history will be maintained of the learning for data integrity purposes.

We can use below data Fix
select * from ota_activity_versions
where version_name like 'SkillSoft Books 24 X 7';-- course

select * from ota_events
where activity_version_id=94037;-- class

select * from OTA_OFFERINGS
where activity_version_id=94037;-- offering

select * from OTA_DELEGATE_BOOKINGS
where event_id=123019;--enrollments

select * from ota_performances
where learning_object_id=97018; -- contains test results

select * from ota_attempts
where learning_object_id=97018;

delete from ota_attempts
where learning_object_id=97018;
commit;

delete from ota_performances
where learning_object_id=97018;
commit;

2 comments:

Microsoft Dynamics said...


Valuable information and excellent design you got here! I would like to thank you for sharing your thoughts and time into the stuff you post!!
Latest jobs

Microsoft Dynamics said...

Hey very nice blog!!
Hi there,I enjoy reading through your article post, I wanted to write a little comment to support you and wish you a good continuationAll the best for all your blogging efforts.
Appreciate the recommendation! Let me try it out.
Keep working ,great job!
Microsoft dynamics training