Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Currently, when you clone a Quiz node using the node_clone module (http://drupal.org/project/node_clone) it correctly clones the node, but it loses all of the associated questions. This is far from ideal because the questions are one of the primary aspects of a quiz, and thus it would be expected for the question association to be maintained when cloning a quiz.
I have attached a patch that adds support for transferring the question relationship to the cloned node when saving. In order to test this patch you will need to install the node_clone module.
Comment | File | Size | Author |
---|---|---|---|
#3 | add_node_clone_module-1857648-1.patch | 2.25 KB | t0xicCode |
Comments
Comment #1
btopro CreditAttribution: btopro commentedI can confirm that this provides node clone support for quiz module. this would be a very helpful patch when managing lots of quiz objects over time instead of rebuilding similar quizzes all the time.
Comment #2
akeemw CreditAttribution: akeemw commentedI found that I needed to have a small change in this patch for it to work.
I'm re-uploading the same patch with one change, adding a reset flag on the node_load. For some reason it would only return false for me withing the quiz_insert function.
Comment #2.0
akeemw CreditAttribution: akeemw commentedFix typo
Comment #3
t0xicCode CreditAttribution: t0xicCode at OpenConcept Consulting Inc. commentedThis should also be ported to 7.x-5.x. But in the meantime, the attached patch removes the added whitespace.
Comment #4
falcon CreditAttribution: falcon commentedWas unable to apply the patch successfully, this seems to be fixed already?
Comment #5
qsiraut CreditAttribution: qsiraut commentedHello,
When I have a quizz that uses random categorized questions, cloning does not keep the defined categories and related number of questions.
Thanks
Comment #6
t0xicCode CreditAttribution: t0xicCode at OpenConcept Consulting Inc. commentedSeems like @falcon is correct and it's already fixed.
@qsiraut, that seems like a separate issue. Would you mind creating a new issue?