This project has moved and is read-only. For the latest updates, please go here.

Deleted Users

Feb 8, 2012 at 4:59 PM

We are just about to launch an internal training portal using SLK and have just stumbled across a potential show stopper.

We had a test course assigned to 4 test user accounts ( AD accounts sync'd from AD ).

2 of the test accounts were deleted within AD , and due to another circumstance we run a Full Sync. This removed the two accounts from Sharepoint. From this point the test would never be completed as 2 users no longer existed. However when trying to access the assignment as a Trainer an error is thrown ( see error at bottom)

I suspect this is due to the two users no longer existing. If so this could be a real problem as if a course is assigned to a user who subsequently leaves before completing it , and his account is deleted as per company policy after x days , we will have a course that cannot be accessed and will remain in progress forever. Similarlry accessing course from the past that was assigned to users ( and completed at the time )who no longer exist as a user in Spoint could have the same problem ?

System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.SharePointLearningKit.SlkUser..ctor(UserItemIdentifier userId, String name, String key, SPUser user)
at Microsoft.SharePointLearningKit.SlkStore.LoadUser(SPWeb web, DataRow dataRow, String idColumn, String nameColumn, String keyColumn, Guid learnerAssignmentId)
at Microsoft.SharePointLearningKit.SlkStore.AddSlkUsers(SPWeb web, IEnumerator`1 resultEnumerator, SlkUserCollection users, String idColumn, String nameColumn, String keyColumn, String assignmentIdColumn, String errorNumberIfMissing)
at Microsoft.SharePointLearningKit.SlkStore.PopulateAssignmentProperties(IEnumerator`1 resultEnumerator, AssignmentItemIdentifier assignmentId, SlkRole slkRole)
at Microsoft.SharePointLearningKit.SlkStore.GetGradingProperties(AssignmentItemIdentifier assignmentId)
at Microsoft.SharePointLearningKit.ApplicationPages.Grading.get_AssignmentProperties()
at Microsoft.SharePointLearningKit.ApplicationPages.Grading.LoadGradingList()
at Microsoft.SharePointLearningKit.ApplicationPages.Grading.OnPreRender(EventArgs e)


Jun 21, 2012 at 4:33 PM

Anybody have any ideas on this ?

The problem has cropped up again in our live environment , and there are 4 courses no longer accessbile , all throwing this error.

Not quite sure what it is telling me......


Jun 25, 2012 at 2:03 PM

After a whole day testing on Friday , I finally managed to get to the bottom of this error. It is caused by an AD account being deleted whilst a course is assigned , and then recreated in AD with the exact same name, hence the SID in Sharepoint is actually diferent.


Exact steps to recreate this -

1) New course assinged to AD Training group containing 2 test users

2) delete 1 of the test users in AD.

3) Course is still accessble by intructor , but cannot be edited and saved ( an error is thrown , but this is expected and can be fixed by unseletcing the deleted user and then saving - we are used to this error as it is fixable)

4) User is recreated in AD

5) At this point the instructor can access the course and fully edit it.

6) Log onto sharepoint as the newly created user.

7) Course is then no longer accessible at all to instructors. Error is thrown - "An error occurred. More information may be available in the server event log." Cannot even get to screen to edit participants and course is effectively broken forever.

What I dont understand is why SLK works ok once the user is recreated in AD , UNTIL , the user logs into SharePoint . The course assigned to him is then innaccessible and there appears to be no way to ever access that course again.

Sep 17, 2012 at 6:24 PM

I was having this same issue after deleting old users from the Site Collection (All People aka people.aspx).

Since there was no "right" solution posted, here is my workaround.

I found the unique users and their ID (the ones I deleted) in the UserItem table from the SLK DB compared to the current list of users in the Site Collection. I did the compare with Excel.

Taking the found SLK ID I deleted all associated Assignments from the LearnerAssignementItem table in the SLK DB.

FROM [SharePointLearningKit].[dbo].[LearnerAssignmentItem]
WHERE LearnerId = 16 OR LearnerId = 29 …


I had to iterate through this procedure twice before I could open the Assignment as the Instructor again.

This may not be the way to go if you started recreating users.

Maybe the next release will have a solution.

Apr 23, 2013 at 11:22 AM
Does anyone know whether there has been any progress on this? This is becoming a serious problem for us because we have a large turn-over of agency staff, many of whom leave before completing all of their assignments.

There are two really irritating issues regarding this:
  • The error message is useless - why on earth can't it actually give some indication as to which user can't be found - we have over 3000 with a 10% annual turn over so expecting us manually to trawl through user lists is unrealistic
  • Why does processing have to abort - surely a warning is enough
Apr 23, 2013 at 11:40 AM
Our company has given up as it is really unusable in this state. We are currently looking at externally hosted solutions to replace it. A shame as a system integrated into Sharepoint was perfect , and it does a lot of things right. But the training manager has become so frustrated with courses that are no longer accessible
Apr 30, 2013 at 11:44 AM
Ditto. Most of our courses are now unavailable which is hugely embarrassing. We're looking at Moodle. Very disappointing.