Search Unity

[RELEASED] Scorm 1.2 / 2004 API

Discussion in 'Assets and Asset Store' started by bdovaz, Jan 20, 2016.

  1. edgeit

    edgeit

    Joined:
    Jun 8, 2019
    Posts:
    1
    I already bought this api. I already have a unity project which i want to convert to scorm. How can i integrate this api to my project and convert it to scorm?
     
  2. bdovaz

    bdovaz

    Joined:
    Dec 10, 2011
    Posts:
    1,052
  3. liquify

    liquify

    Joined:
    Dec 9, 2014
    Posts:
    187
    @N3uRo I created a SCORM package (ZIP file) with Unity and SCORM API. The SCORM package works on several web servers, but recently I have a client that mentioned about this security error message:

    SecurityError: Permission denied to access property API on cross-origin object

    I have never had that security error problem on Moodle LMS and Firefox, so I replicated the error by running the SCORM package with a simple HTML SCORM player. I noticed I don't get any error if I run the SCORM package on a web server or localhost, but the error appears if I run the SCORM package from a file:// URL.

    I managed to remove the error by changing Firefox's security.fileuri.strict_origin_policy field value to false. I advised my client to do so, but the problem persists on his end.

    Have you ever encountered this security error? What else can I do to remove the security error?
     
    Last edited: Jun 13, 2019
  4. bdovaz

    bdovaz

    Joined:
    Dec 10, 2011
    Posts:
    1,052
    That's a web browser security restriction that has nothing to do with my asset.

    You are not supposed to run content locally unless you are in development phase.

    In production environments you should always run it from a web server:

    http://kb.mozillazine.org/Security.fileuri.strict_origin_policy
     
  5. ArnoldoSilva

    ArnoldoSilva

    Joined:
    Sep 4, 2015
    Posts:
    2
    Hello! I bought this asset to integrate a project but I'm having problem with data persistence. I generate a json (few variables) and send it through the SetSuspendData and it works fine, but at the time of receiving this information in another session nothing comes from the server. can you give me some instruction on what this problem should be ?!
     
  6. bdovaz

    bdovaz

    Joined:
    Dec 10, 2011
    Posts:
    1,052
    Can you enable mode in your LMS and check for the logs? In Moodle it's here:

    https://docs.moodle.org/37/en/SCORM_FAQ#Debugging

    That way you can narrow the problem and see if it's correctly storing the data or not. I don't have any user having this problems so I don't know if you are not using the API correctly or it's a specific issue on a LMS.
     
  7. sahpreemking

    sahpreemking

    Joined:
    Aug 1, 2019
    Posts:
    2
    I just purchased your SCORM integration tool. Your documentation is difficult to follow. Do you have a video? Also, I've tried to download your examples from DropBox, but now download buttons or options are available. Likewise there was no option to download the SCORM kit to my mac, it only allowed me to import it from the asset store into Unity 5.6.3.p2 Personal. Please help.
     
    Juanda31 likes this.
  8. bdovaz

    bdovaz

    Joined:
    Dec 10, 2011
    Posts:
    1,052
    You have an example scene with a complete script along with the online documentation.

    You can post your specific questions and I will answer you with pleasure.

    My asset supports Unity editor 5.6.0+ so you should be able to import it in that version or a newer version without problems.
     
  9. sahpreemking

    sahpreemking

    Joined:
    Aug 1, 2019
    Posts:
    2
    I am getting this error after I deleted the test folder.
    Assets/IMAG_Version/Editor/BuildScript.cs(244,16): error CS0029: Cannot implicitly convert type 'UnityEditor.Build.Reporting.BuildReport' to 'string'
     
  10. bdovaz

    bdovaz

    Joined:
    Dec 10, 2011
    Posts:
    1,052
    If you see the script that it's reporting a compilation error, it's not a script of my specific asset.

    In any case, it seems that you are using an Editor API that it's not available in your Unity Editor version.
     
  11. JD_FVTC

    JD_FVTC

    Joined:
    Oct 20, 2017
    Posts:
    54
    I'm using 2018.3.6f1. Im testing your example scene. I'm getting a error on IPostprocessBuild. It needs to be replaced with IPostprocessBuildWithReport. I got it to build by doing this. However the package does not work in scorm cloud or my lms. Neither one gives me any useful error messages. [scorm] - there was an error during initialization.



    Code (CSharp):
    1.      
    2. namespace Scorm {
    3.     public class ScormPostprocessor : IPostprocessBuild, IPostprocessBuildWithReport
    4.     {
    5. .......
    6.  
    7. public void OnPostprocessBuild(BuildReport report)
    8.         {
    9.             BuildTarget target = report.summary.platform;
    10.             string path = report.summary.outputPath;
    11.             Debug.Log("target: " + target + " Path: "+path);
    12.             OnPostprocessBuild(target, path);
    13.         }
    I didn't edit this below
    Code (CSharp):
    1.  
    2.         public void OnPostprocessBuild(BuildTarget target, string path) {
    3.             if (target != BuildTarget.WebGL) return;
    4.          
    5.             string buildFolderPath = IsDirectory(path) ? path : Path.GetDirectoryName(path);
    6.  
    7.             ScormPublishSettings settings = Resources.Load<ScormPublishSettings>(ScormPublishSettings.RelativePath);
    8.  
    9.             if (!settings.Enabled) return;
    10.  
    11.             string scormFilesPath = Path.Combine(Application.dataPath, string.Format("ScormAPI/Editor/Data/{0}", settings.GetVersionFolderName()));
    12.  
    13.             string tempFolderPath = CreateTempFolder();
    14.  
    15.             string zipFilePath = !string.IsNullOrEmpty(settings.ZipFilePath) ? settings.ZipFilePath : Path.Combine(buildFolderPath, "scorm.zip");
    16.  
    17.             CreateProjectFiles(buildFolderPath, tempFolderPath);
    18.  
    19.             CreateScormFiles(scormFilesPath, tempFolderPath);
    20.  
    21.             ParseManifest(tempFolderPath, settings);
    22.  
    23.             Debug.Log("Creating scorm, please wait...");
    24.  
    25.             SaveZip(tempFolderPath, zipFilePath);
    26.  
    27.             Debug.Log(string.Format("Scorm successfully created: {0}", zipFilePath));
    28.  
    29.             DeleteTempFolder(tempFolderPath);
    30.         }
     
  12. bdovaz

    bdovaz

    Joined:
    Dec 10, 2011
    Posts:
    1,052
    First, it's a warning not an error (I will fix it in a future version):

    upload_2019-9-5_20-20-42.png

    You can change:

    Code (CSharp):
    1. public class ScormPostprocessor : IPostprocessBuild {
    To:

    Code (CSharp):
    1. public class ScormPostprocessor : IPostprocessBuildWithReport {
    And:

    Code (CSharp):
    1.  
    2. public void OnPostprocessBuild(BuildTarget target, string path) {
    3.     if (target != BuildTarget.WebGL) return;
    4.  
    To:

    Code (CSharp):
    1.  
    2. public void OnPostprocessBuild(BuildReport report) {
    3.     if (report.summary.platform != BuildTarget.WebGL) return;
    4.  
    5.     string path = report.summary.outputPath;
    6.  
    For your second problem. Do you see this logs in console?

    upload_2019-9-5_20-20-4.png

    Have you configured this resource?

    upload_2019-9-5_20-35-31.png

    Are you using the zip file generated by my editor script? It's the only one that will have the correct Scorm folder structure.

    I have tried in 2019.2.3f1 (latest one as today) and it works on Scorm Cloud without any issues.
     
    Last edited: Sep 5, 2019
  13. zenasprime

    zenasprime

    Joined:
    Mar 31, 2010
    Posts:
    166
    After importing I'm getting a ton of Namespace errors:

    Screen Shot 2019-09-20 at 5.29.18 PM.png
     
  14. bdovaz

    bdovaz

    Joined:
    Dec 10, 2011
    Posts:
    1,052
    Remove tests folder as they are not necessary.
     
  15. zenasprime

    zenasprime

    Joined:
    Mar 31, 2010
    Posts:
    166
    That worked for the Namespace errors but there doesn't seem to be a "Scrom" menu item. I've tried restarting Unity.
     
  16. bdovaz

    bdovaz

    Joined:
    Dec 10, 2011
    Posts:
    1,052
  17. zenasprime

    zenasprime

    Joined:
    Mar 31, 2010
    Posts:
    166
  18. bdovaz

    bdovaz

    Joined:
    Dec 10, 2011
    Posts:
    1,052
    In the link that you have put you will see that this asset is very outdated, is 2015 and only mentions WebPlayer, not even WebGL.

    My asset supports WebGL and is supported in any version of Unity from 5.6+ to any current version like 2019.2.x.
     
  19. GBAsurion

    GBAsurion

    Joined:
    Feb 11, 2020
    Posts:
    1
    Hello! I am having trouble getting started with this asset pack. I am not sure how to implement it. Is there a guide on how to implement it into a project? I have already read through the documentation but I think it is lacking this... or am I missing something? Thanks!
     
  20. bdovaz

    bdovaz

    Joined:
    Dec 10, 2011
    Posts:
    1,052
    You have a complete example scene, please check it first. If you have concrete questions, ask them.
     
  21. SupremeSmash

    SupremeSmash

    Joined:
    Nov 30, 2018
    Posts:
    30
    Hi, I have uploaded your example to my LMS, everything works as it should but it doesn't seem to send a completion status to the LMS - Do I need to do something?
     
  22. bdovaz

    bdovaz

    Joined:
    Dec 10, 2011
    Posts:
    1,052
    Are you able to see some debug info of the SCORM track? Almost all LMS have a way to see a log of all the LMSSetValue and LMSGetValue calls.

    We need first to see where the problem is.

    If you see these calls then my asset is working correctly and it is an issue of your LMS or a configuration issue.
     
  23. ezharenov

    ezharenov

    Joined:
    Sep 17, 2020
    Posts:
    2
    Hello! Faced such a problem. This error occurs when reconnecting to the LMS. I tested on Scorm Cloud and on my LMS, it doesn't matter.
    Any ideas on how to overcome this and connect properly?
     
    Last edited: Sep 17, 2020
  24. bdovaz

    bdovaz

    Joined:
    Dec 10, 2011
    Posts:
    1,052
    Why are you terminating connection and then trying to reconnect? It doesn't make sense. Please send me via PM a repro project.
     
  25. msabihsarfaraz

    msabihsarfaraz

    Joined:
    Sep 17, 2020
    Posts:
    1
    Hello,

    I have uploaded your example 1.2 project to my moodle LMS, but all I see are the project name and unity webgl logo, even the unity splash screen isn't loading up, any idea why?

    Screen Shot 2020-12-17 at 10.13.29 AM.png
     
  26. bdovaz

    bdovaz

    Joined:
    Dec 10, 2011
    Posts:
    1,052
    Press F12 an check for JS errors
     
  27. Paulplay17

    Paulplay17

    Joined:
    Jun 26, 2018
    Posts:
    2
    Can I use this to communicate from my APP(Android or iOS platform) to LMS, vise versa?
     
  28. bdovaz

    bdovaz

    Joined:
    Dec 10, 2011
    Posts:
    1,052
  29. ezharenov

    ezharenov

    Joined:
    Sep 17, 2020
    Posts:
    2
    Hello!
    Faced a problem that the 2004 version feed scorm-package successfully sends, but does not receive any values from the LMS (Moodle) when re-loading the feed scorm-package.
    Scorm package version 1.2 sends and receives values without problems on any LMS.
    Everything works well in Scorm Cloud, but on Moodle Cloud your package refuses to work on receiving data from LMS.
    What could be the problem? It is especially important to send and receive progress status.
    For verification, I used your examples from the first post.
    upload_2021-1-19_14-22-55.png
    Previously, I sent the values to the LMS, and when I restart it, I cannot get them, although they are.
     
    AndreaGiulianoK likes this.
  30. Paulplay17

    Paulplay17

    Joined:
    Jun 26, 2018
    Posts:
    2
  31. bdovaz

    bdovaz

    Joined:
    Dec 10, 2011
    Posts:
    1,052
    I implement the Scorm 1.2 / 2004 protocol rigorously so the fact that it works in Scorm Cloud (Responsible for the implementation of Scorm) but not in Moodle Cloud (I was unaware of its existence) must be that in Moodle they have something different implemented.
     
  32. bdovaz

    bdovaz

    Joined:
    Dec 10, 2011
    Posts:
    1,052
    Yes, of course.

    You can develop whatever you want, the only restriction is the platform that only works in WebGL since the Scorm protocol is designed for the Web.
     
  33. thaivq

    thaivq

    Joined:
    Feb 22, 2021
    Posts:
    1
    Hi,

    How can I get to this screen.


    I need to generate SCORM package.
     
  34. bdovaz

    bdovaz

    Joined:
    Dec 10, 2011
    Posts:
    1,052
    Last edited: Mar 18, 2021
  35. BWAviationLearn

    BWAviationLearn

    Joined:
    Sep 30, 2019
    Posts:
    3
    Hi, I was looking to get this asset, but I'm concerned if I can export it on WebGL while using WebXR build setting/presentation in order to play in VR while utilizing SCORM
    upload_2021-3-19_15-22-34.png
     
  36. bdovaz

    bdovaz

    Joined:
    Dec 10, 2011
    Posts:
    1,052
    I haven't used WebXR but as long as it's on WebGL, it should.
     
  37. ssaxrpaul

    ssaxrpaul

    Joined:
    Mar 18, 2021
    Posts:
    3
    I'm getting this error code. What am I missing here??
    upload_2021-3-20_15-7-11.png

    upload_2021-3-20_15-8-7.png
     
  38. bdovaz

    bdovaz

    Joined:
    Dec 10, 2011
    Posts:
    1,052
  39. ssaxrpaul

    ssaxrpaul

    Joined:
    Mar 18, 2021
    Posts:
    3
    Yes the path exists.
    upload_2021-3-20_21-36-36.png


    Edit:
    Yay finally fixed! thanks for pointing out about directory path.

    upload_2021-3-20_21-54-42.png
     
    Last edited: Mar 20, 2021
    bdovaz likes this.
  40. Matthieu_DAO

    Matthieu_DAO

    Joined:
    Mar 12, 2018
    Posts:
    3
    Hello,I have upgraded my old project which worked perfeclty fine ( Unity 2018.2.5f1 ) to Unity 2019.4.17f1 with the last realease of SCROM API, but I can't build my project ( see console screen shot below ) I don't understand what i am missing. Please someone help me !
    upload_2021-3-22_10-18-8.png
     

    Attached Files:

  41. bdovaz

    bdovaz

    Joined:
    Dec 10, 2011
    Posts:
    1,052
    Remove tests folder.
     
  42. BWAviationLearn

    BWAviationLearn

    Joined:
    Sep 30, 2019
    Posts:
    3
    Sorry, I worded my question badly,
    In the player settings, do I have to build it with scorm as the WebGL Template, because it will conflict with the WebVR/WebXR WebGL template that I am using. Thanks for your time and speedy reply.

    upload_2021-3-23_10-41-24.png
     
  43. bdovaz

    bdovaz

    Joined:
    Dec 10, 2011
    Posts:
    1,052
    Since version 2.0 of my asset doesn't come with a custom WebGL template so you can use the template you want.
     
  44. FullDraw

    FullDraw

    Joined:
    Sep 18, 2017
    Posts:
    13
    Hello - I am running into an issue when publishing a SCORM 2004 course on my client's LMS. I'm getting the following error after it loads: exception thrown: ReferenceError: getCMIValue is not defined,ReferenceError: getCMIValue is not defined.

    I understand that this is something to do with their LMS, as the course works fine on SCORM Cloud. I'm hoping to get some advice on how to approach this. Thanks in advance!
     
    Last edited: May 5, 2021
  45. bdovaz

    bdovaz

    Joined:
    Dec 10, 2011
    Posts:
    1,052
    As you said, it is a specific problem of that LMS because in my asset code there is not a single reference to a "getCMIValue" method. Also as you say, in Scorm Cloud it works correctly.

    Contact your LMS support somehow either through a forum or however you can.
     
  46. Cushmily

    Cushmily

    Joined:
    Mar 25, 2015
    Posts:
    10
    Hi, does this plugin support interaction in SCORM 1.2 ?
     
  47. bdovaz

    bdovaz

    Joined:
    Dec 10, 2011
    Posts:
    1,052
  48. Juanda31

    Juanda31

    Joined:
    May 14, 2019
    Posts:
    1
    So i have exported a couple of games, some load perfect into moodle and others stay on the loading screen.
    Will load the unity logo and the progress bar up to a point and stop.
    Can anyone tell me if there is something the games should have or a normal setting for the scene to load? sorry just learning Unity.
     

    Attached Files:

  49. bdovaz

    bdovaz

    Joined:
    Dec 10, 2011
    Posts:
    1,052
    Press F12 and check console for errors.
     
  50. psavalia

    psavalia

    Joined:
    May 19, 2021
    Posts:
    1
    I'm having the same issue as Juanda31. This is what I see in Dev Tools. Any ideas?

    upload_2021-5-26_13-25-52.png