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;