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

impossibilité d'importer un exercice qti2 dans chamilo 1.11.6.alpha1

Open alexiye opened this issue 8 years ago • 17 comments

Current behavior / Resultado actual / Résultat actuel

l'exercice est importé mais il est vide

Expected behavior / Resultado esperado / Résultat attendu

exercice importé

Steps to reproduce / Pasos para reproducir / Étapes pour reproduire

dans un cours aller dans exercices et importer exercices QTI2

Chamilo Version / Versión de Chamilo / Version de Chamilo

chamilo 1.11.6.alpha1

alexiye avatar Jan 04 '18 08:01 alexiye

Est-ce que vous pouvez montrer un exemple ici?

https://11.chamilo.org/ (admin/admin)

jmontoyaa avatar Jan 04 '18 08:01 jmontoyaa

https://11.chamilo.org/main/exercise/admin.php?cidReq=IMPORTEXERCICEQTI2&id_session=0&gidReq=0&gradebook=0&origin=&exerciseId=746

alexiye avatar Jan 04 '18 08:01 alexiye

qti2_export_1.zip c'est le fichier d'origine !

alexiye avatar Jan 04 '18 08:01 alexiye

Oui, mais il faut l'exercice d'origin.

jmontoyaa avatar Jan 04 '18 09:01 jmontoyaa

Le fichier qti2_export_1.zip est le fichier original que j'ai essayé de télécharger. Je ne comprends pas votre demande.

alexiye avatar Jan 04 '18 09:01 alexiye

Le fichier "qti2_export_1.zip" a été créé par chamilo?

jmontoyaa avatar Jan 04 '18 09:01 jmontoyaa

Oui, il a été créé avec chamilo. Il doit y avoir un lien avec cette erreur : https://github.com/chamilo/chamilo-lms/issues/2276 essai sur le portail : Création d'un cours puis essai d'importation et affichage suivant : Notice: Undefined property: stdClass::$save_correct_answers in /var/www/11.chamilo.org/www/src/Chamilo/CourseBundle/Component/CourseCopy/CourseRestorer.php on line 1803

Fatal error: Uncaught PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'save_correct_answers' cannot be null in /var/www/11.chamilo.org/www/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:105 Stack trace: #0 /var/www/11.chamilo.org/www/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(105): PDOStatement->execute(Array) #1 /var/www/11.chamilo.org/www/vendor/doctrine/dbal/lib/Doctrine/DBAL/Statement.php(168): Doctrine\DBAL\Driver\PDOStatement->execute(Array) #2 /var/www/11.chamilo.org/www/main/inc/lib/database.lib.php(450): Doctrine\DBAL\Statement->execute(Array) #3 /var/www/11.chamilo.org/www/src/Chamilo/CourseBundle/Component/CourseCopy/CourseRestorer.php(1824): Database::insert('c_quiz', Array) #4 /var/www/11.chamilo.org/www/src/Chamilo/CourseBundle/Component/CourseCopy/CourseRestorer.php(188): Chamilo\CourseBundle\Component\CourseCopy\CourseRestorer->restore_quizzes(0, false, '') #5 /var/www/11.chamilo.org/www/main/coursecopy/import_backup.php(101): Chamilo\CourseBun in /var/www/11.chamilo.org/www/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php on line 118

alexiye avatar Jan 04 '18 09:01 alexiye

Ce qui est curieux c'est que l'import qti2 ne fonctionne pas non plus sur chamilo 1.11.4 Par contre si j'importe un cours complet avec les exercices dans 1.11.4 cela fonctionne ( j'ai les parcours et les exercices) mais cela ne fonctionne pas dans la 1.11.6.alpha1.

alexiye avatar Jan 04 '18 09:01 alexiye

Je viens de me rendre compte que l'import qti2 ne fonctionne pas non plus dans la 1.9.10.2 avec un exercice créé dans 1.9.10.2 ! Au secours ! je vais tourner bourrique. Bon ben je vais exporter mes cours vers la 1.11.4 et puis les exporter vers la 1.11.6...

alexiye avatar Jan 04 '18 09:01 alexiye

j'ai essayé l'export d'un exercice qti2 de chamilo 1.11.4 vers 1.11.6.alpha1 et cela ne fonctionne pas non plus !

alexiye avatar Jan 04 '18 09:01 alexiye

Pour que je puisse tester il faudra:

  1. Créer un exercise dans https://11.chamilo.org/ (admin/admin)
  2. Créer l'export qti de l'exercice.
  3. Créer un autre cours et faire l'import qti.

jmontoyaa avatar Jan 04 '18 09:01 jmontoyaa

ok let's go

alexiye avatar Jan 04 '18 09:01 alexiye

voilà c'est fait :https://11.chamilo.org/courses/JECREEUNEXERCICEPOURLEXPORTQTI2/index.php?id_session=0 https://11.chamilo.org/main/exercise/admin.php?cidReq=JECREEUNCOURSPOURLIMPORTDUNEXER&id_session=0&gidReq=0&gradebook=0&origin=&exerciseId=748 fichier qti2: qti2_export_747.zip

alexiye avatar Jan 04 '18 09:01 alexiye

L'exercice ici:

https://11.chamilo.org/courses/JECREEUNEXERCICEPOURLEXPORTQTI2/index.php?id_session=0

n'est pas bien configuré. La question n'a pas d'options:

selection_002

Il faut un exercice avec des questions bien configuré, pour après faire l'export, et après l'import.

jmontoyaa avatar Jan 04 '18 11:01 jmontoyaa

L'exercice ci-dessus est celui obtenu après importation. l'exercice d'origine est dans :

https://11.chamilo.org/main/exercise/exercise.php?cidReq=JECREEUNEXERCICEPOURLEXPORTQTI2&id_session=0&gidReq=0&gradebook=0&origin= exercice original

alexiye avatar Jan 04 '18 11:01 alexiye

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 31 '20 20:07 stale[bot]

I reviewed this issue against the current Chamilo 3.1 master branch.

QTI2 import/export functionality has already been migrated to the modern Vue + Symfony/API Platform architecture.

The current implementation supports importing exercises with their questions, answers, and scores. Previous improvements, including PR #9281, also addressed issues with Matching and Fill-in-the-blanks questions.

Validation performed on Chamilo 3.1:

  • ExerciseQti2ImportServiceTest: 7 tests passed, 65 assertions.
  • LegacyQti2ImportMatchingTest: 5 tests passed, 16 assertions.
  • ExerciseQti2FillBlanksExportTest: 16 tests passed, 200 assertions.

Total: 28 tests passed, 281 assertions.

The modern importer also validates the imported content and rejects packages when no valid questions can be imported, rather than reporting a successful empty import.

Based on the current implementation and the passing automated tests, the reported functionality is covered in Chamilo 3.1 for the supported QTI2 question types.

No additional code changes were required during this review.

christianbeeznest avatar Nov 02 '26 16:11 christianbeeznest