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

The given key was not present in the dictionary - when editing assignment

Apr 24, 2012 at 12:43 PM

We are seeing the following error when trying to edit a currently running assignment ( attempting to add or remove a user, although the problem manifests itself when clicking edit , and then clicking OK without actually making any changes )

An error occurred. More information may be available in the server event log.

Event log shows -

SharePoint Learning Kit Error
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.ThrowHelper.ThrowKeyNotFoundException()
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Microsoft.SharePointLearningKit.SlkMemberships.get_Item(Int64 key)
at Microsoft.SharePointLearningKit.ApplicationPages.AssignmentPropertiesPage.SetMembersList(SlkUserCollection slkUserCollection, CustomCheckBoxList customChkBoxList)
at Microsoft.SharePointLearningKit.ApplicationPages.AssignmentPropertiesPage.CreateAssignmentPropertiesObject()
at Microsoft.SharePointLearningKit.ApplicationPages.AssignmentPropertiesPage.SubmitAssignment(Object sender, EventArgs e)

Has anybody seen this or can give us even the feintest idea where to start looking ?

Apr 25, 2012 at 11:29 AM

Got to the bottom of this. Problem was being caused by users deleted from AD that had had a course assigned to them. Once the users were all identified editing and unselecting them from the assignees of the particular course resolved the problem.

Currently looking into ways internally to mitigate this as SLK does not appear to error handle this scenarion in any way currently. 

Dec 9, 2014 at 12:33 PM
Can you post a bit more in details how you fix this issue please???
Dec 19, 2014 at 12:42 PM
What version are you using. This should be resolved in 1.7.1 & 1.8, if not earlier.

SLK Coordinator