Get SharePoint info from SLK Database

Topics: Developer Forum
Oct 2, 2013 at 7:21 PM
Hi all.. I've installed the SharePoint Learning Kit (SLK) on my site collection and everything works fine: I can create courses, I can assign people, etc.

I have many libraries (one library per company, which is handled by groups with permissions) and I use these libraries for creating and assigning courses.

The thing is that the customer wants me to develop a report that shows the courses assigned in the e-learning implementation per company... In the SLK DB, I can see the courses titles, but I cannot see what libraries they come from... It would be easy if a course belonged to only one library, but one course can be loaded to more than one library... So what can I do? Any idea? This is driving me insane :(

Thanks in advance, greetings from Perú.
Coordinator
Oct 20, 2013 at 8:22 AM
SLK stores the encoded file location in 2 places:
  1. For Non-elearning assignments (i.e. not SCORM packages) the NonELearningLocation column in the assignmentItem table.
  2. For SCORM/Class Server packages the assignmentItem table links to the ActivityPackageItem via the RootActivityId column, which then links to the PackageItem table via the Packageid column. The PackageItem table then has a location.
An example encoded package location is
25ac1434-a59c-4c78-8cf3-d343f0c79e92_a8495d0a-c816-4bd0-9109-63e0b74979d5_f152eab3-0582-4788-a2e9-914cbd4c9fb6_512_634617975610000000

This is generated in the following format {0}_{1}_{2}_{3}_{4} where
{0} = Site Collection ID = SPSite.ID
{1} = Web ID = SPWeb.ID
{2} = File ID = SPFile.UniqueId
{3} = Version ID = SPFile.UIVersion
{4} = Timestamp = SPFile.TimeLastModified

Richard
SLK Coordinator
http://blog.salamandersoft.co.uk