
Problem
When a quiz is deleted it simply does a query to delete the record from the quiz_node_proerties (see below)
quiz.module
function quiz_delete($node) {
// . . . [code hidden] . . .
// Remove quiz node records from table quiz_node_properties
db_delete('quiz_node_properties') // <- This should be replaced with a entity_delete_multiple() function call.
->condition('nid', $node->nid)
->execute();
// Remove quiz node records from table quiz_node_relationship
db_delete('quiz_node_relationship')
->condition('parent_nid', $node->nid)
->execute();
// Remove quiz node records from table quiz_node_result_options
db_delete('quiz_node_result_options')
->condition('nid', $node->nid)
->execute();
}
As a result, any entity_delete hooks that are implemented don't get called for quiz entities.
Proposed resolution
I've attached a patch which replaces the db query with an entity_delete_multiple function call.
Comment | File | Size | Author |
---|---|---|---|
#1 | quiz-delete-invoke-entity-delete.2542264.patch | 1.08 KB | partdigital |
Comments
Comment #1
partdigital CreditAttribution: partdigital commentedComment #2
djdevinThanks!