chamilo-lms icon indicating copy to clipboard operation
chamilo-lms copied to clipboard

require errors being generated when displaying SCORM package in 'embedded' mode

Open moloko opened this issue 7 years ago • 4 comments

As you'll have seen from #2062 and #2063 I've been doing some testing of the Adapt Learning Framework in Chamilo

Whilst testing, I noticed that if I set the course to launch in 'embedded' view mode (the default), it doesn't display and require.js is generating an error in the console: chamilp-require-error-firefox

We've done a bit of digging and it seems that Chamilo is injecting some

Specifically the problem seems to be originating from https://1.11.chamilo.org/main/glossary/glossary.js.php which uses jquery-ui.min.js - which has a define statement with a missing name - and because Adapt uses requirejs, the module is trying to register with Adapt's requirejs library but with no name, which isn't allowed - hence the error.

If you want to see this for yourself go to the aabbb course on 1.11.chamilo, select learning paths > Adapt Version 2.0 demonstration.

Is there a reason for injecting stuff into the course content? This seems to us to be a bit of a risky thing to do as it can cause problems exactly like this.

I also got similar problems using all other view modes except fullscreen.

moloko avatar Jul 10 '17 19:07 moloko

Yes, Chamilo injects those js and also loads the glossary js .php file ... I think we need an option in the LP in order to don't pre load those files.

jmontoyaa avatar Jul 11 '17 06:07 jmontoyaa

Let's add this option to v2.0 (scheduled for 2018).

ywarnier avatar Dec 04 '17 17:12 ywarnier

Hi, I'm trying to use scorms from Adapt Learning and can reproduce the problems @moloko had. As the release of Chamilo 2.0 didn't happen yet, is there a workaround so we can patch this on our Chamilo 1.11.8 installation and be able of using these scorms?

sinozzuke avatar Feb 01 '19 14:02 sinozzuke

Some advances in my investigations: Doing some research I have used campus.chamilo.org for uploading a SCORM test file, and it works like a charm. So, I have emailed them to know what version of chamilo are using but has not answer yet.

build.zip

sinozzuke avatar Feb 04 '19 11:02 sinozzuke

It had errors displaying the scorm in lp view as iframe, the ressources as css , js, weren't loaded, It is fixed with this PR https://github.com/chamilo/chamilo-lms/pull/4403 .

christianbeeznest avatar Sep 29 '22 13:09 christianbeeznest

PR approved but testing pending.

ywarnier avatar Jan 31 '23 12:01 ywarnier

I can not import a Scorm package in Chamilo2, when importing the file I get the following error :

PhpZip\Exception\
ZipException
in vendor/nelexa/zip/src/ZipFile.php (line 101)
ZipFile->openFile()
in public/main/lp/learnpath.class.php (line 1472)
            ])) {            return 'woogie';        }        $zipFile = new ZipFile();        $zipFile->openFile($filePath);        $zipContentArray = $zipFile->getEntries();        $package_type = '';        $manifest = '';        $aicc_match_crs = 0;        $aicc_match_au = 0;
learnpath::getPackageType()
in public/main/lp/lp_upload.php (line 57)
require_once('/var/www/testing24.beeznest.com/www/public/main/lp/lp_upload.php')
in public/main/upload/upload.scorm.php (line 11)
require('/var/www/testing24.beeznest.com/www/public/main/upload/upload.scorm.php')
in public/main/upload/upload.php (line 16)

So I can not test for the moment. Tried it here : https://testing24.beeznest.com/main/upload/index.php?cid=1&sid=0&gid=0&gradebook=0&origin=&curdirpath=/&tool=learnpath The same error occurs on 2.chamilo.org

I also tried it in Chamilo 1.11.x and the build.zip Scorm package indicated in this task works fine.

@christianbeeznest could you check the scorm package import in Chamilo 2 to be able to upload the zip file and test this issue.

NicoDucou avatar May 31 '23 13:05 NicoDucou

return 'woogie'; ?! 🤣

moloko avatar May 31 '23 14:05 moloko

Hi @NicoDucou ,

I found an error when a lp or scorm is imported, it is about default value of next_lp_id , it is fixed in this PR https://github.com/chamilo/chamilo-lms/pull/4727 . I tested in my local chamilo 2 and imported the scorm build.zip . When I try in portal testing24 I get this Error: Maximum execution time of 30 seconds exceeded.

Thanks for confirmation.

christianbeeznest avatar May 31 '23 18:05 christianbeeznest

Hi @christianbeeznest

NicoDucou avatar Jun 02 '23 13:06 NicoDucou

No queria cerrar la tarea era un error de teclado.

Por lo de la creation he acdeptado tu PR #4727 y ahora funciona pero el importe de Scorm todavia da errores.

He modificado la configuration en testing24 para el max_execution_time y ahora puedes acceder a https://testing24.beeznest.com/main/upload/index.php?cid=1&sid=0&gid=0&gradebook=0&origin=&curdirpath=/&tool=learnpath

Pero al carga un zip me da el mismo error que antes :

File does not exist.
ExceptionLogs 2Stack Trace
PhpZip\Exception\
ZipException
in vendor/nelexa/zip/src/ZipFile.php (line 101)
ZipFile->openFile()
in public/main/lp/learnpath.class.php (line 1474)
            ])) {            return 'woogie';        }        $zipFile = new ZipFile();        $zipFile->openFile($filePath);        $zipContentArray = $zipFile->getEntries();        $package_type = '';        $manifest = '';        $aicc_match_crs = 0;        $aicc_match_au = 0;
learnpath::getPackageType()
in public/main/lp/lp_upload.php (line 59)
require_once('/var/www/testing24.beeznest.com/www/public/main/lp/lp_upload.php')
in public/main/upload/upload.scorm.php (line 11)
require('/var/www/testing24.beeznest.com/www/public/main/upload/upload.scorm.php')
in public/main/upload/upload.php (line 16)

Si lo puedes revisar.

NicoDucou avatar Jun 02 '23 13:06 NicoDucou

It was a configuration issue on the server that did not allowed file bigger than 2Mo, once the configuration was adapted the import worked perfectly and the scorm build.zip worked fine. So I'm closing this issue. Good work

NicoDucou avatar Jun 07 '23 08:06 NicoDucou