简体   繁体   English

Moodle:防止SCORM包加载的Javascript错误?

[英]Moodle: Javascript errors preventing SCORM package loading?

I'm new here and having some issues on my Moodle site through which I provide online training. 我是新来的,在我的Moodle网站上有一些问题,通过它我提供在线培训。 We upload SCORM packages to the Moodle and recently have had an issue which is stopping the SCORM packages from loading or sometimes just taking a very long time to load. 我们将SCORM软件包上传到Moodle,最近出现了一个问题,即SCORM软件包无法加载,有时只需要很长时间才能加载。

We receive the SCORM error that the "SCORM player has determined that your internet connection is unreliable or has been interrupted. If you continue in the SCORM activity, your progress may not be saved. You should exit the activity now and return when you have a dependable connection". 我们收到SCORM错误,“SCORM播放器已确定您的互联网连接不可靠或已被中断。如果您继续进行SCORM活动,您的进度可能无法保存。您应立即退出活动并在有可靠的连接“。

However, we have tried this from a number of different internet points and devices, with the same problem reoccurring. 但是,我们已经从许多不同的互联网点和设备尝试了这一点,同样的问题再次发生。 We therefore contacted our hosting provider, who replied: 因此,我们联系了我们的托管服务提供商

"It appears the issue is coming from the fact that there are quite a few JavaScript errors on the site. I am pasting them below: “看来这个问题来自于网站上存在相当多的JavaScript错误。我在下面粘贴它们:

Failed to load resource: net::ERR_FAILED 无法加载资源:net :: ERR_FAILED

chrome-extension://dliochdbjfkdbacpmhlcpmleaejidimm/cast_sender.js 镀铬的扩展://dliochdbjfkdbacpmhlcpmleaejidimm/cast_sender.js

Failed to load resource: net::ERR_FAILED 无法加载资源:net :: ERR_FAILED

chrome-extension://enhhojjnijigcajfphajepfemndkmdlo/cast_sender.js 镀铬的扩展://enhhojjnijigcajfphajepfemndkmdlo/cast_sender.js

Failed to load resource: net::ERR_FAILED 无法加载资源:net :: ERR_FAILED

chrome-extension://fmfcbgogabcbclcofgocippekhfcmgfj/cast_sender.js 镀铬的扩展://fmfcbgogabcbclcofgocippekhfcmgfj/cast_sender.js

Failed to load resource: net::ERR_FAILED 无法加载资源:net :: ERR_FAILED

chrome-extension://pkedcjkdefgpdelpbcmbmeomcjbeemfm/cast_sender.js 镀铬的扩展://pkedcjkdefgpdelpbcmbmeomcjbeemfm/cast_sender.js

Failed to load resource: net::ERR_FAILED 无法加载资源:net :: ERR_FAILED

chrome-extension://fjhoaacokmgbjemoflkofnenfaiekifl/cast_sender.js 镀铬的扩展://fjhoaacokmgbjemoflkofnenfaiekifl/cast_sender.js

Failed to load resource: net::ERR_FAILED 4jquery.js:5 Uncaught 无法加载资源:net :: ERR_FAILED 4jquery.js:5未捕获

TypeError: Cannot read property 'scrollHeight' of null(anonymous function) TypeError:无法读取null的属性'scrollHeight'(匿名函数)

@ jquery.js:5x.extend.access @jquery.js:5x.extend.access

@ jquery.js:3x.fn.(anonymous function) @jquery.js:3x.fn。(匿名函数)

@ jquery.js:5e @ content-script.js:1d @jquery.js:5e @ content-script.js:1d

@ content-script.js:1(anonymous function) @ content-script.js:1(匿名函数)

@ content-script.js:1" @ content-script.js:1“

Can anyone assist and help me identify what the problem is that is causing the loading issues with my SCORM packages? 任何人都可以协助并帮助我确定导致我的SCORM软件包加载问题的问题是什么?

Kind regards 亲切的问候

Eddie 埃迪

I had the same issue with the message SCORM player has determined that your internet connection is unreliable or has been interrupted on all moodle servers, but the server is working fine and the work is saved correctly. 我有同样的问题, SCORM player has determined that your internet connection is unreliable or has been interrupted在所有moodle服务器上SCORM player has determined that your internet connection is unreliable or has been interrupted ,但服务器工作正常,工作正确保存。

My solutions are two: 我的解决方案是两个:

  1. Set a bigger timeout (by default, moodle check internet connection with a 2 seconds timeout). 设置更大的超时(默认情况下,moodle检查互联网连接,超时2秒)。 You can set this parameter in 5, 7 or 10 seconds. 您可以在5秒,7秒或10秒内设置此参数。 You can set this value on lib/yui/src/checknet/js/checknet.js (search the request to a checknet.txt file) 您可以在lib/yui/src/checknet/js/checknet.js上设置此值(将请求搜索到checknet.txt文件)

  2. Remove the checknet functionality. 删除checknet功能。 You can comment two lines on /mod/scorm/player.php . 您可以在/mod/scorm/player.php上注释两行。 The lines you need to comment are these: 您需要评论的行是这些:

      $PAGE->requires->string_for_js('networkdropped', 'mod_scorm'); $PAGE->requires->yui_module('moodle-core-checknet', 'M.core.checknet.init', array(array( 'message' => array('networkdropped', 'mod_scorm'), ))); 

This is not a solution for a server that works wrong, this is a solution for a server that works fine but the time of the AJAX response is more than 2 seconds. 这不是服务器工作错误的解决方案,这是服务器的解决方案,工作正常,但AJAX响应的时间超过2秒。

I don't believe that the first few (for cast_sender.js ) are related to the issue at hand; 我不相信前几个(对于cast_sender.js )与手头的问题有关; cast_sender.js is a local script related to Chrome's ability to use Chromecast functionality. cast_sender.js是与Chrome使用Chromecast功能相关的本地脚本。 (Edit: The Google Cast SDK uses a rather "agricultural" method to detect if you're running Chrome with the appropriate extension; it's a known issue. Google chrome cast sender error if chrome cast extension is not installed or using incognito , https://code.google.com/p/google-cast-sdk/issues/detail?id=309 ) (编辑:Google Cast SDK使用一种相当“农业”的方法来检测您是否使用相应的扩展程序运行Chrome;这是一个已知问题。 如果未安装Chrome强制转换扩展程序或使用隐身模式则Chrome镀铬转发发件人错误https: //code.google.com/p/google-cast-sdk/issues/detail?id=309

The later lines they've pasted seem to bubble up from effectively a null pointer in whatever content_script.js is. 他们粘贴的后面几行似乎从任何content_script.js有效空指针中冒出来。 Is the SCORM content locally produced? SCORM内容是否在本地生成? Do you know what software was used to create it - eg Articulate or Storyline? 你知道用什么软件来创建它 - 比如Articulate或Storyline吗? I presume that content_script.js is part of the player software? 我认为content_script.js是播放器软件的一部分?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM