chamilo / chamilo-lms

Chamilo is a learning management system focused on ease of use and accessibility
https://chamilo.org
GNU General Public License v3.0
798 stars 480 forks source link

QTI import - HTTP ERROR 500 #3774

Open huba80 opened 3 years ago

huba80 commented 3 years ago

Composer require symfony / css-selector which is missing from new Chamilo 1.11.14 version. Unable to import QTI files. Chamilo throws HTTP 500 error. Issue is reported here:

https://forum.chamilo.org/viewtopic.php?f=50&t=11493

fabiowoj commented 3 years ago

The same here. Occurs even if we test to export exercise in other course in the same version, and import zip file QTI and give me the error: Fatal error: Uncaught LogicException: To filter with a CSS selector, install the CssSelector component ("composer require symfony/css-selector"). Or use filterXpath instead. in /var/www/webroot/ROOT/ead/vendor/symfony/dom-crawler/Crawler.php:1292 Stack trace: #0 /var/www/webroot/ROOT/ead/vendor/symfony/dom-crawler/Crawler.php(789): Symfony\Component\DomCrawler\Crawler->createCssSelectorConverter() #1 /var/www/webroot/ROOT/ead/main/exercise/export/exercise_import.inc.php(350): Symfony\Component\DomCrawler\Crawler->filter('*') #2 /var/www/webroot/ROOT/ead/main/exercise/export/exercise_import.inc.php(333): parseQti2('<?xml version =...') #3 /var/www/webroot/ROOT/ead/main/exercise/export/exercise_import.inc.php(129): qti_parse_file('/var/www/webroo...', '', 'qti2export_18.x...') #4 /var/www/webroot/ROOT/ead/main/exercise/qti2.php(76): import_exercise('qti2export_18.x...') #5 /var/www/webroot/ROOT/ead/main/exercise/qti2.php(87): importFile(Array) #6 {main} thrown in /var/www/webroot/ROOT/ead/vendor/symfony/dom-crawler/Crawler.php on line 1292

huba80 commented 3 years ago

The only way to avoid this problem is to try to install Chamilo 1.11.8 version. In that they "didnt forget" adding css-selector module to Symfony. 3 years have gone and 6 minor versions have come out without anybody noticing that importing feature doesn't work.

fabiowoj commented 3 years ago

up

christianbeeznest commented 3 years ago

Hello @huba80

From the Chamilo folder launch: composer update

If you face issues related to missing JS libraries, you might need to ensure that your web/assets folder is completely re-generated. Use this set of commands to do that:

rm composer.lock
rm -rf web/ vendor/
composer clear-cache
composer update

This will take several minutes in the best case scenario, but should definitely generate the missing files.