title: How do I get completion_status value from SCORM cloud?
body: <p>I've been attempting some custom SCORM content using the <a href="https://github.com/pipwerks/scorm-api-wrapper" rel="nofollow noreferrer">pipwerks SCORM API wrapper</a>. In this instance, I'm using a SCORM 2004 4th ed package. </p>
  
  <p>If I launch and complete the course, the course is correctly shown as complete, and the sandboxed registration state shows the Runtime Data > cmi.completion_status: completed.</p>
  
  <p><a href="https://i.stack.imgur.com/Jsz5b.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Jsz5b.png" alt="Course info"></a></p>
  
  <p>The following is an excerpt from the debug log showing the completion_status being set and the final commit.</p>
  
  <pre><code>- [14:01:43.632] SetValue('cmi.completion_status', 'completed') returned 'true' in 0 seconds
  [14:01:43.632] CheckForSetValueError (cmi.completion_status, completed, cmi.completion_status, , )
  [14:01:43.632] Element is: completion_status
  [14:01:43.632] Call is error free.
  [14:01:43.632] StoreValue (cmi.completion_status, completed, cmi.completion_status, , )
  [14:01:43.632] Element is: completion_status
  - [14:01:43.632] Commit('') returned 'true' in 0.004 seconds
  [14:01:43.632] Checking for Commit Error
  [14:01:43.632] Call is error free.
  [14:01:43.636] CompletedByMeasure is not enabled, using the completion status recorded by the SCO-completed
  [14:01:43.636] Scaled Passing Score is not specified, using the success status recorded by the SCO-unknown
  [14:09:29.134] Close Out Session
  [14:09:29.134] Mode = normal
  [14:09:29.134] Credit = credit
  [14:09:29.134] Recorded CompletionStatus = completed
  [14:09:29.134] Recorded SuccessStatus = unknown
  [14:09:29.134] ScaledPassingScore = null
  [14:09:29.134] Score = null
  [14:09:29.134] CompletedByMeasure = false
  [14:09:29.134] Progress Measure = 1
  [14:09:29.134] Session Time: (0 hundredths)
  [14:09:29.134] Previous Time: PT0H0M0S (0 hundredths)
  [14:09:29.134] New Total Time: PT0H0M0S (0 hundredths)
  [14:09:29.135] New Tracked Total Time: PT8M13.59S
  [14:09:29.135] CompletedByMeasure is not enabled, using the completion status recorded by the SCO-completed
  [14:09:29.135] Scaled Passing Score is not specified, using the success status recorded by the SCO-unknown
  </code></pre>
  
  <p>So at this point, all looks good. However, if I launch the course a second time, the result is unknown.</p>
  
  <pre><code>- [14:19:20.067] GetValue('cmi.completion_status') returned 'unknown' in 0.003 seconds
  [14:19:20.069] Checking for GetValue Error
  [14:19:20.069] Element is: completion_status
  [14:19:20.069] Call is error free.
  [14:19:20.070] RetrieveGetValueData (cmi.completion_status, cmi.completion_status, , )
  [14:19:20.070] Element is: completion_status
  [14:19:20.070] CompletedByMeasure is not enabled, using the completion status recorded by the SCO-unknown
  </code></pre>
  
  <p>I'm also storing cmi.progress_measure which is updating the progress display correctly, and appearing in the registration state correctly. Again, when launching the course again, this data is also empty.</p>
  
  <p>For reference, I'm setting the completion status as follows;</p>
  
  <pre><code>pipwerks.SCORM.status("set", "completed");
  pipwerks.SCORM.save();
  </code></pre>
  
  <p>And the progress measure as follows (where s.progress is a decimal 0-1);</p>
  
  <pre><code>pipwerks.SCORM.data.set("cmi.progress_measure", s.progress);
  pipwerks.SCORM.save();
  </code></pre>
  
  <p>These appear to be functioning correctly looking at the debug log and registration state, but I'm unable to get these values again when I relaunch the course. </p>
  
  <p>Can anyone suggest what might be happening here?</p>
  
  <p>Many thanks,</p>
  
  <p>Baps.</p>