Quiz result migration in D8 from D7

Created on 11 November 2020, over 3 years ago
Updated 10 February 2024, 4 months ago

I am looking to migrate quiz module data from d7 to d8. Except "node quiz results" & "node quiz result answers", I have migrated all using migration script. Is there any other way to migrate complete quiz data to d8, please suggest. Thank you!!

✨ Feature request
Status

Needs review

Version

6.0

Component

Code - Other

Created by

🇮🇳India Devendra Mishra Noida

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇳🇱Netherlands arjenk

    This now works for me, would be great if more people could use their testset to test the migration process.

  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update 12 months ago
    89 pass
  • 🇨🇦Canada bohemier

    Here is a patch with a rebase of the above MR with the current 6.x-dev

  • 🇬🇧United Kingdom somersoft

    Example JSON to use the 'plain diff' link from the issue fork to patch the quiz package in a composer.json file with the "cweagans/composer-patches" package installed.

    "patches": {
        "drupal/quiz": {
          "Quiz result migration in D8 from D7 - 3181926": "https://git.drupalcode.org/project/quiz/-/merge_requests/9.diff"
        }
    }
    
  • 🇫🇷France erwangel

    Installation with #31 and migration steps from #25 worked for me going from D7 to D10.

    However I got some errors with quiz_results_answers. I had 189 items in d7_quiz_result which were all migrated, but only 1516 items from the 1869 processed by quiz_results_answers were migrated. Perhaps the non migrated items are unfinished quizzes but there is nothing in migrate:messages that could help to debug. Also while rolling back quiz_results_answers , I got this error:

    TypeError: Drupal\quiz\Entity\QuizResultAnswer::getQuizResult(): Return value must be of type Drupal\quiz\Entity\QuizResult, null returned in Drupal\quiz\Entity\QuizResultAnswer->getQuizResult() (line 26 of /path_to_site/web/modules/contrib/quiz/src/Entity/QuizResultAnswerEntityTrait.php) #0 /path_to_site/web/modules/contrib/quiz/src/Entity/QuizResultAnswer.php(162): Drupal\quiz\Entity\QuizResultAnswer->getQuizResult()

    The other problem I got is with custom fields (I have a media_field in D7 quiz and question nodes) and usual drupal node fields like published y/n, author/date display, promoted, comments, etc or fields added by modules like metatag (essential for SEO), Any idea how to migrate these fields ? It is impossible to recreate all them as they are not accessible by "Re-use an existing field" and not available in the "Create a new field" options list. But perhaps this is not a migration problem but a limitation of the new quiz module concept. In such case, it is preferable to go the old way with quizzes and questions as nodes rather than trying to recreate a whole distinct entity.

  • Just a general comment. Is drupal quiz going to have a migration built in when updating from Drupal 7 to Drupal 8,9,10 ?

    When is Drupal quiz 6.0 series expected to get out of alpha and beta testing?

    Drupal 7 is end of life soon and it seems Drupal quiz has stalled. Is their an ETA for a production release?

Production build 0.69.0 2024