SCORM 1.2 LessonStatus

Topics: Developer Forum
Feb 23, 2009 at 10:55 AM

When using SCORM2004 I can use SuccessStatus, CompletionStatus, etc. straigh from the SLK api (LearnerAssignment).

But, is there a way to get the learningAssignments SCORM 1.2 LessonStatus trought the SLK api? I noticed that the result is correctly saved to the database, but I cannot find any interface to get it from the SLK api?

Best Regards,
Marko Kurjonen

Feb 26, 2009 at 8:34 PM
Hi Marko,

That's an area of SLK that I'm not yet familiar with. Could you post some code showing access for the SCORM2004 status and I'll have a look. It you haven't found it though, it's probably not there.

If you wanted to write a patch to add this functionality I'd certainly add it to the trunk.

SLK Co-ordinator
Feb 27, 2009 at 9:03 AM
Hi Richard,

I have currently handled the code by Lesson Status function which contains:

String connectionString = Slk.SlkStore.LearningStore.ConnectionString;
String query = String.Format(
"SELECT aai.LessonStatus as lsId "+
"FROM ActivityAttemptItem aai, AttemptItem ai, LessonStatus ls "+
"WHERE aai.AttemptId = ai.Id " +
"AND ai.LearnerAssignmentId = {0}", LearnerAssignmentItem.GetKey());

SqlDataAdapter da = new SqlDataAdapter(query, connectionString);
DataSet ds = new DataSet();


DataTable dt = ds.Tables[0];

int lessonStatus = 0;

foreach(DataRow dr in dt.Rows)
int t = int.Parse(dr["lsId"].ToString());

if(t > lessonStatus)
   lessonStatus = t;

return (LessonStatus)lessonStatus;

Might not be the best code but, it take cares of "if user haves multiple attempts" issue and works in my case perfectly.

Best Regards,
Marko Kurjonen

Ps. Good work!