dhodges47 / SCORM-LearningManagementSystem

Open Source SCORM Learning Management System demo
MIT License
145 stars 72 forks source link

SCORMPlayer not run #3

Closed Alibesharat closed 5 years ago

Alibesharat commented 5 years ago

When I Click Launch this course, redirect me to https://localhost:44339/SCORMPlayer?id=2 and show me a blank page ? Do I need install SCORMPlayer or do anything ?

dhodges47 commented 5 years ago

SCORMPlayer is part of the solution, so you don't need to install it. In fact, you can step through ScormPlayer.cshtml.cs in the debugger to see why it is failing.

You must have uploaded your own SCORM course. There were a couple of pre-existing courses that I removed because they were proprietary, and those won't play.

Alibesharat commented 5 years ago

There was not any break in ScormPlayer.cshtml.cs file but in output window in visualStudio show me a 404 not find path here is output logs :

Microsoft.AspNetCore.Hosting.Internal.WebHost:Information: Request starting HTTP/1.1 GET http://localhost:44339/SCORMPlayer?id=8
Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker:Information: Route matched with {page = "/SCORMPlayer", action = "", controller = "", area = ""}. Executing action /SCORMPlayer Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker:Information: Executing handler method OnGet with arguments ((null)) - ModelState is Valid Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker:Information: Executed action /SCORMPlayer in 198.3388ms Microsoft.AspNetCore.Hosting.Internal.WebHost:Information: Request starting HTTP/1.1 GET http://localhost:44339/SCORMCourses/The_Human_Eye/index.html
Microsoft.AspNetCore.Hosting.Internal.WebHost:Information: Request finished in 2.6077ms 404

but this path : http://localhost:44339/SCORMCourses/The_Human_Eye/index.html
is Exist

Alibesharat commented 5 years ago

I Download this SCORM package and upload it :

https://moodle.net/pluginfile.php/174123/mod_data/content/6380/The_Human_Eye.zip

arunphon16 commented 5 years ago

Same Problem When I Click Launch this course, redirect me to https://localhost:44339/SCORMPlayer?id=2 and show me a blank page and Error 404 not find path . I have path in project but don't browse in localhost : http://localhost:44339/SCORMCourses/The_Human_Eye/index.html

help me please.
Thank you.

dhodges47 commented 5 years ago

I have path in project but don't browse in localhost : http://localhost:44339/SCORMCourses/The_Human_Eye/index.html

So the problem with this url is "SCORMCourses". Make sure that "SCORMCourses" is the folder where the course was unzipped. This is because, in the system, the default folder is called "SCORM". This is where content is launched from. It is set in startup.cs with this code starting on line `75: // we run SCORM courses out of its own folder (NOT wwwroot) so that HtmlHandler can check for authentication before returning any SCORM content app.UseStaticFiles(new StaticFileOptions { FileProvider = new PhysicalFileProvider( Path.Combine(env.ContentRootPath, Helpers.ConfigurationHelper.CourseFolder)), RequestPath = "/SCORM" });

dhodges47 commented 5 years ago

Also: It is trying to launch this url: https://localhost:44339/SCORMPlayer?id=2 Make sure that your course was entered into the database as id=2. To do so, look in the table SCORM_Course to see the courses you have uploaded.

arunphon16 commented 5 years ago

first time i run the project it error path "SCORMCourses" didn't exist so i created folder "SCORMCourses" in ..\OpenSourceSCORMLMS then i could open the project and i could upload scorm but scorm player is not working as i posted.
so i try put scorm file in ..\OpenSourceSCORMLMS\wwwroot\SCORMCourses , and it's working now. Thank you so much.

dhodges47 commented 5 years ago

Glad to hear you worked it out. Yes, any files that are to be accessible from the internet should be in wwwroot, OR mapped in startup.cs, as I posted above.