SharePoint Learning Kit:How to get Assignments report for instructor

Topics: Developer Forum, User Forum
Feb 23, 2012 at 10:27 AM

 Hi All,

Could you please explain, how to get Assignments report for instructor users. 

Once instructor assigns a particular course(list item) to a list of learners, The instructor want to get a report of the particular course(i.e,  how many learners have finished the course, how many learners have kept the course in In-progress, etc) 

Does any customization needs to be done for this?

Thanks In Advance.

Coordinator
Mar 20, 2012 at 10:20 AM

There's no such reporting in SLK in the moment - it's on my to do list. At the moment you'll have to run a report from the database.

Richard

SLK Coordinator

http://blog.salamandersoft.co.uk

Mar 21, 2012 at 5:12 PM

Richard,

 

What method have you found works best for creating this report? Is there third party software used to write the query?

Thanks in advance.

Mar 22, 2012 at 11:00 AM

Richard,

We will generate a report in SSRS. How to get the learner user firstname from AD and display it on report along with the slk data information?

Thanks in advance.

Coordinator
Mar 23, 2012 at 12:14 AM

The slkuser table contains the SID of the AD user. This is the link to the AD user. Unfortunately I don't know how SSRS could use that.

Mar 23, 2012 at 12:36 AM

You could use the built in SQL function SUSER_SNAME to lookup the samAccountName of the SID.  If you are using the Key field in the UserItem table as the SID, you will need to convert it to the S-x-x-xx-xxxx format first - you can do that by using a scalar function called STRSID (google it).

eg SELECT SUSER_SNAME(dbo.STRSID(dbo.UserItem.[Key])) AS [samAccountName], dbo.UserItem.Name FROM dbo.UserItem

Here is the STRSID scalar function that I use:

CREATE FUNCTION [dbo].[STRSID]
(
@xStrSid VARCHAR(100)
) RETURNS VARBINARY(100) AS BEGIN
DECLARE @xBinSid VARBINARY(100)
SET @xBinSid = CAST(CAST(SUBSTRING(@xStrSid , 3,1) AS TINYINT) AS VARBINARY)
SET @xBinSid = @xBinSid + 0x05
SET @xBinSid = @xBinSid + CAST(CAST(SUBSTRING(@xStrSid , 5,1) AS TINYINT) AS BINARY(6))
SET @xStrSid = SUBSTRING(@xStrSid,7,LEN(@xStrSid)-6)
DECLARE @oneInt BIGINT
WHILE CHARINDEX('-',@xStrSid) > 0
BEGIN
SET @oneInt = CAST(SUBSTRING(@xStrSid,1,CHARINDEX('-',@xStrSid)-1) AS BIGINT)
SET @xBinSid = @xBinSid + CAST(REVERSE(CAST(@oneInt AS VARBINARY)) AS VARBINARY(4))
SET @xStrSid = SUBSTRING(@xStrSid,CHARINDEX('-',@xStrSid)+1,LEN(@xStrSid))
END
SET @oneInt = CAST(@xStrSid AS BIGINT)
SET @xBinSid = @xBinSid + CAST(REVERSE(CAST(@oneInt AS VARBINARY)) AS VARBINARY(4))
RETURN ( @xBinSid )
END
GO