cancel
Showing results for 
Search instead for 
Did you mean: 
rdiana
Surveyor

SCORM package (via Camtasia 9) not converting to complete/incomplet

Jump to solution

Hello everyone,

I am trying to create video lectures with embedded interactive quizzing that student view and complete via the SCORM tool in Canvas. I have successfully created the lectures and quiz questions in Camtasia 9, exported them to SCORM packages, and uploaded them as Assignments in Canvas. 

The problem I have is that I want Canvas to grade those assignments as complete/incomplete with a possible score of 1 point. When I created the SCORM package I specified a 0% correct threshold as "passing". However, Canvas grades the assignment as "incomplete" if the test student gets 1 out of 3 questions incorrect. That is, Canvas only grades the assignment as "complete" if all quiz questions are answered correctly. (I have also set the % viewed threshold to 0% in case that was the problem.)

I found this forum post: SCORM and Storyline Scoring - Complete/Incomplete 

which as marked as assumed answered but which doesn't have any resolution. Given that I'm having the same problem in Camtasia as was previously posted about Storyline I'm guessing either SCORM or Canvas is the problem. 

One work-around suggested in the previous forum post was to use a custom grading scheme for the SCORM package assignment in which anything > 0% is scored as Pass, 4.0, 1, or A. I have tried that and regardless of the assignment-specific grading scheme Canvas treats the assignment score as .33 in the final grade (see attached screenshot). 

I need a way to grade my SCORM packages based on completion rather than accuracy. Does anyone have any ideas?

Thank you for any help you can provide!

Rachel

james.vlisidesmiraculously solved this problem with a simple fix. I marked his reply as "Correct" below and have also converted his explanation to step-by-step instructions, pasted here to make them easy to find. Thank you James!

To convert your SCORM package from percentage-based grading in Canvas to completion-based grading (using the SCORM passing threshold):

1. When you create your SCORM package don't bother to create a "zip" version because you will need to edit the files before you can zip the package.

2. Open the folder that you created as your SCORM package. For the purposes of this tutorial we will assume that your SCORM package was called "TestQuiz" Inside you will see a file that has the SAME name as the folder with a type of "JScript Script file" and an extension (possibly hidden) of ".js", e.g. TestQuiz.js

3. Open TestQuiz.js in a simple text editor (I used Notepad++ by right-clicking the file and choosing "Edit with Notepad++". It may or may not work to use Word since complex text editors sometimes add odd characters to simple text files.

4. Search for "!isNaN".

5. Insert a blank line AFTER this line and paste this code: if ( nScore >= scoreNeeded ) { nScore = 100; }

6. Save the TestQuiz.js file. [I wouldn't recommend doing "SaveAs" since you want the script to have exactly the same name, file extension, and location as the original TestQuiz.js file.

7. Zip the folder that contains your SCORM package (in this example folder: TestQuiz). I did this by right-clicking the folder and selecting "send TestQuiz to .zip"

8. Upload the zip file to Canvas and proceed. Now the SCORM result will convert to 100% if it is above the passing threshold that you set when you created the package, which means that Canvas will mark it as "complete" when the passing threshold is set.

25 Replies

 @rdiana , thanks for taking the lead on this and reporting back what you found.

I took the file  @kblack  sent me and discovered that I either needed my CSM to enable SCORM or use something like ScormCloud. The instructions in the guides say it doesn't work in test or beta instances and I didn't want to enable SCORM for our entire institution because we're obviously not using it. And some say SCORM is lacking in features and that xAPI or Caliper are the future. I think I remember Caliper being mentioned at InstCon15.

I tried following the instructions in a video I found (SCORM Support in Canvas: Sharing 101), but it didn't work for me. I've been sick since Wednesday night and haven't had time to do much of anything, so getting an answer saved me a lot of work to not get an answer.

I do not expect that you will hear an ETA, though. Canvas supports version 1.1 of the LTI standard and accepts grade passback as a decimal between 0 and 1 (0% and 100%). It is up to the LMS to decide what to do with that decimal. In Canvas, 'Complete' is only marked when 100% is achieved and 'Incomplete' is anything less than 100%. So this is why you're seeing Incomplete on everything but all questions answered correctly. With it's current LTI implementation, it's not going to be able to receive both grades and let you pick which one you want to include -- it's up to the SCORM package to send the value that you want to use as a score. That means it will be easier for Techsmith to add a checkbox for what to pass back (% viewed or % correct) than it is going to be for Canvas to do something about it. Canvas will have no way of knowing that the person watched the entire video of all the SCORM sends back is the percent of questions answered correctly.

There is something I would try before giving this up completely. Unfortunately, this is where my lack of Scormability comes in.

What I was originally hoping to do with Ken's file is modify the Javascript to return a value based on the percentage completed not the grade on the questions. This would have to be something that people would do to every SCORM package that they wanted to work this way.

I had thought that the Canvas documentation for Grade Passback Tools might be useful. It lists a Data Return Extension that says you can allow the tool provider to pass things other than just the score (0-1). However, after reading that page, I don't think that's going to help. I think what really needs to happen is to change the value returned by the SCORM package to reflect the percentage viewed rather than the percentage correct.

Hi James,

Thanks so much for looking into this!

The problem I'm having isn't a conflict between % viewed and % correct but rather whether Canvas can correctly interpret the "pass threshold" that is set in the SCORM package. Camtasia allows the user to input a minimum % correct beyond which the result should be entered as "complete" or "passed". This works great in the SCORM sandbox but Canvas ignores that "pass threshold" in favor of the precise % correct, even when the assignment is set to be graded as complete/incomplete.

I'm not sure if this same problem applies to assessing the % watched for the video or not (haven't tested it).

Thanks again,

Rachel

kblack
Community Member

Well, I was kind of curious about this myself, Rachel.  I just now ran a quick experiment in a test course and set the SCORM option slider up to require 100% viewing, but REMOVED the quizzes.  (See my earlier screen capture, above, for the Quiz slider setting.)  I also just kept the assignment at the default of 100 points rather than doing Complete/Incomplete.   I was wondering if it would show a percentage based on the % viewed, but it appears not.  I had one student who viewed the entire video and correctly got 100%.  On the other hand, I had a student who viewed about 4 minutes of a 6-minute video and received a 0%.  (And a student who simply quickly clicked through to the end likewise got 0%.)

I'm curious:  where did you get that Sandbox screen capture that shows the number of seconds a video is viewed?  The reason I'm curious is that while testing your original quizzing questions, I had that slider for the video at 100%, but Canvas seemed to ignore that altogether and concentrated solely on the quiz score in the Gradebook.  So even for a student who just clicked ahead solely to get to the quizzes and aced the two questions I had, Canvas recorded the "Complete" even though that same student saw nothing in the video--or at the very least, skipped ahead to the end.  

Arrgh!  More questions than answers.  (Tends to be the story of my life, at times.)

Hi Ken,

You can upload and test SCORM packages for free at: Scorm Cloud Testing Content with SCORM Cloud » SCORM -  

It's very helpful!

Rachel

 @rdiana , Sorry about that. I got pulled in on something I know nothing about and I'm trying to find solutions. Did I mention I've been sick?

Admitting that I'm not fully recovered, I don't see how it changes the big picture though. Canvas only interprets 1 as being 'completed'. Canvas does not know about a threshold that Camtasia may or may not have set up. The only passback is that score, so it's up to Camtasia to do something with that threshold before it gets sent back to Canvas.

I still think modifying the JavaScript so that it passes back a 1 if the threshold has been met is the way to go. I took another look at the JavaScript that Ken posted and noticed that I was in the section on percentage complete, which would be consistent with my misunderstanding of the problem, but also would explain why changing it didn't make any difference.


I will say, as a non-professional JavaScript programmer, that their code is poorly written. I'm sure they have a reason for it, but

if ( nScore >= scoreNeeded )
{
    passingStatus = 'passed';
    apiCall( 'setValue', 'cmi.success_status', passingStatus );   
}
else
{
    apiCall( 'setValue', 'cmi.success_status', passingStatus );   
}  
‍‍‍‍‍‍‍‍‍

is functionally equivalent to

if ( nScore >= scoreNeeded )
{
    passingStatus = 'passed';
}
apiCall( 'setValue', 'cmi.success_status', passingStatus );   
‍‍‍‍‍

Of course, I'm not a professional JavaScript programmer, so people probably think the same thing when they look at code I've written. I'm just saying that extra verbiage makes it harder for me to follow what they're trying to do.

But all of that is an illusion -- a red herring. The 'passed' isn't used anywhere. It's the cmi.core.score.scaled value that gets passed back to Canvas.

They've also got essentially the same code duplicated for whether the API is at least version 1 that they do if it's not version 1. It seems that the quickest solution (unverified since I can test the SCORM) is to fix the score before it gets there.

This amounts to a one-line change to the code in the userSubmitToLMS function.

if ( nScore >= scoreNeeded ) { nScore = 100; }

Here's the whole thing in context so you can tell exactly where it should go. In the following code, lines 1-5 and 8 are already there, all you should need to do is insert line 7 (and the comment in line 6 if you like).

function userSubmitToLMS( nScore , isComplete )
{         
   var scoreNeeded = scoPassingScore;
  
   if ( !isNaN( nScore ) ) {
      // Adjust the score to be 100% if mastery is shown
      if ( nScore >= scoreNeeded ) { nScore = 100; }
      if ( apiVersion >= 1 )
‍‍‍‍‍‍‍‍

What it does is say if you met the threshold, then change the score to be 100. In other words, it forgets about what the old score (based on the percentage correct) was and just call it 100. Then, that gets translated to a scaled score of 1 in a couple of lines and so Canvas thinks they score 1.

If you change the sliders in Camtasia, it will reset the JavaScript and you'll need to reapply the patch, but it should honor what the sliders say. If it doesn't, then it's the value right before the function that is not getting set properly. I think the 0 in the file Ken sent was just what he was playing with.

/******************** SCORM Related Calls ***********************************/
var scoPassingScore = 0;

You'll need to repackage the SCORM (I don't know if that's as simple as rezipping) and re-upload it.

Note that you will lose the ability to give a score based on percentage correct, so if you use this SCORM package in multiple places, one as Complete/Incomplete and another as a score, you'll have to upload two copies of it -- one with the modification and one without.

 @kblack  seems to know how to test this, so perhaps he could verify (if he can look past my previous ill-ness induced gaffes.) ??? (I don't want to throw more work on him if he's busy).

I hope this works -- I normally like to test things before writing and I definitely don't like being sick.

View solution in original post

kblack
Community Member

 @James ‌ - After all you have done for this Community with your many Canvancements, if you call yourself a "non-professional JavaScript programmer" I shudder to think of who would qualify to be a professional!  And to do this while not feeling well, no less!  (And of course this would coincide with what I believe is your mid-term break, if I recall correctly from one of your earlier posts.)

 @rdiana ‌ - My testing indicates that, not surprisingly, James' solution WORKS.  I had one student get one question right and one question wrong on a 2-question quiz in Camtasia, and one student who got BOTH questions wrong, and yet both earned a "Complete" in the Gradebook, as you wanted.   On the other hand, a student who started watching the video but did not do either quiz got an "Incomplete."  (This still makes me wonder how they reconcile this with the 100% viewing requirement that I had otherwise set, since no one bothered watching it and skipped ahead to the quiz, but we won't worry about that for now.)

James, just as an FYI, actually the var scoPassingScore = 0; in the first line of the SCORM Related Calls was not something that I input myself.  It's part of the original .js file Camtasia gave to me, so my hunch is that it is generated by that slider of 0% that I input on the program's SCORM options.  (Though for what it's worth, I spotted the odd IF/ELSE statement, as well, and lamely thought that adding passingStatus = 'passed' as part of the ELSE statement might have worked for this while testing things out last week.  Needless to say, it did not.)

Rachel, THANK YOU for the tip on the SCORM cloud testing site--I indeed was not aware of that.  If you would like the ZIP file that I generated for testing this along with the changed .js file, I can put it in a GoogleDrive for you, as I did for James last week.  I would just need your Gmail account name.  (Feel free to message me privately at kblack@dom.edu if you wanted to do this.)

Canvas has a bunch of professional programmers. To help understand, I'd listen to a fairly candid radio interview Josh Coates gave July 2015: The Bottom Line: Killing Blackboard – Josh Coates, CEO of Instructure. There's about 11.5 minutes starting about 16:17 about the importance of coding and people who think they can learning to code without going to University (starting about 19:00). At 20:38, he talks about two kinds of coders -- those who worked their butts off and became decent and then there are the talented ones. My favorite line came at 22:45 (but you need to listen to more to make sense of that). There's a good Jiffy Lube story in there too. The section ends about 27:42.

I suspected the scoPassingScore was supplied by Camtasia. Mine was more of a heads-up of things to look at if it didn't work.


There is an isComplete passed into the function as well, but that's whether or not the quizzing is complete.

There is a global variable completionStatus available. It's based off percentageComplete that updates every 2.5% of the video they watch until it reaches 1. Once that passes the minimum threshold for viewing, completionStatus gets set to 'completed'.  If you want to want to make sure that they've watched the video and met a threshold on a quiz, then this might work.

if ( completionStatus === 'completed' && nScore >= scoreNeeded ) { nScore = 100; }

Again, it's hard to tell exactly -- one block of code that sets the completionStatus to 'completed' comes after the check of what to do with the scores, so that makes it sound like it may not be marked as 'completed' at the beginning. However, it's ran every 2.5% increase before that and set there. So when wouldn't it be the same ??? If you were sitting at 74% complete and had a threshold of 75%. The next update wouldn't happen until 76.5%, so if you watched another 1.5%, the threshold would be met, but the status wouldn't get updated to 'complete'.

So, it may be safer to compare the actual rates if you want to check both requirements.

if ( percentageComplete >= minimumCompletionRequired && nScore >= scoreNeeded ) { nScore = 100; }

Please don't apologize! You've been so helpful, any thoughts you have on this topic are much appreciated.

YES!!! Wow!!!

I managed to edit the java script as you suggested and it works beautifully! I can't tell you how much I appreciate your work on this. I am so impressed with the Canvas user community and with your generosity!

I am a neophyte but have a tiny bit of programming experience so I've taken the liberty of writing detailed instructions for those who are intimidated by the idea of editing a java script that implement your wonderful suggestion. Those instructions are below.

Thank you again James!

To convert your SCORM package from percentage-based grading in Canvas to completion-based grading (using the SCORM passing threshold):

1. When you create your SCORM package don't bother to create a "zip" version because you will need to edit the files before you can zip the package.

2. Open the folder that you created as your SCORM package. For the purposes of this tutorial we will assume that your SCORM package was called "TestQuiz" Inside you will see a file that has the SAME name as the folder with a type of "JScript Script file" and an extension (possibly hidden) of ".js", e.g. TestQuiz.js

3. Open TestQuiz.js in a simple text editor (I used Notepad++ by right-clicking the file and choosing "Edit with Notepad++". It may or may not work to use Word since complex text editors sometimes add odd characters to simple text files.

4. Search for "!isNaN".

5. Insert a blank line AFTER this line and paste this code: if ( nScore >= scoreNeeded ) { nScore = 100; }

6. Save the TestQuiz.js file. [I wouldn't recommend doing "SaveAs" since you want the script to have exactly the same name, file extension, and location as the original TestQuiz.js file.

7. Zip the folder that contains your SCORM package (in this example folder: TestQuiz). I did this by right-clicking the folder and selecting "send TestQuiz to .zip"

8. Upload the zip file to Canvas and proceed. Now the SCORM result will convert to 100% if it is above the passing threshold that you set when you created the package, which means that Canvas will mark it as "complete" when the passing threshold is set.

Thank you so much James (& Ken for testing)!

Rachel

kblack
Community Member

I did the easy part with testing.    @James  Thank You   

(And I promise to not to tag you again with a programming question in the Community for at least a week!  Oh, and get well.)