Step 21 – Progress and Completion – Setting Values

The course can change any of the following elements that relate to course progress and completion tracking:

  • cmi.core.lesson_location
  • cmi.core.lesson_status
  • cmi.core.exit

In other words, it can tell the LMS where it is, whether the course is completed/passed/failed/incomplete … and how the course was exited. Nothing for me to do here – this is all handled by the LMSSetValue() API call and the associated setValue.php script on the server.

Note that the cmi.core.entry element isn’t listed here because it can’t be changed by the course. However, it could be changed by the LMS when the LMSFinish() API call is invoked. This element tells the course how it should re-start when the student next returns.

According to the SCORM specification, it should be initialized to ‘ab initio’ when a course first starts (I’ve already set that up – see my last post for more details). Then, when LMSFinish() is called, the LMS should follow a very simple rule:

  • If cmi.core.exit has already been set to ‘suspend’ when the course exits, then cmi.core.entry should be set to ‘resume’.
  • In all other cases, cmi.core.entry should be set to ” (an empty string).

This is pretty simple to implement in my finish.php code like this.

// clear existing value
mysql_query("delete from scormvars where (varName='cmi.core.entry')",$link);

// new entry value depends on exit value
$result = mysql_query("select varValue from scormvars where (varName='cmi.core.exit')",$link);
list($value) = mysql_fetch_row($result);
if ($value == 'suspend') {
	mysql_query("insert into scormvars (varName,varValue) values ('cmi.core.entry','resume')",$link);
}
else {
	mysql_query("insert into scormvars (varName,varValue) values ('cmi.core.entry','')",$link);
}

So far, so good. But there’s one critical thing missing here … the course and/or the LMS can change the value of cmi.core.lesson_status. Unfortunately, the SCORM standard’s rules for doing this are pretty complex. So – next time – I’m going to devote an entire post to this one subject.

Be Sociable, Share!
This entry was posted in Run Time Environment. Bookmark the permalink.

2 Responses to Step 21 – Progress and Completion – Setting Values

  1. Pingback: Desarrollando un LMS(con soporte de SCORM) « Jorge Dieguez Blog

  2. Pingback: Desarrollando un LMS(con soporte de SCORM)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>