by Peter Svec.
Oh, I didn't know about this tool. Thanks a lot Ken. I fixed some problems but few of them still remains.
Multi-answer questions data consistency. I used the script from Moodle 1.9 and generated SQL with more than 2.000 queries, but none of them returned updated record. The query is like "UPDATE mdl_question SET parent = 390362, category = 18823 WHERE id IN (390363,390364) AND parent <> 0;"
Only multianswer and random questions should be the parent of another question.There is no suggestion, only to ask in moodle forum.
Question categories should belong to a valid context. All question categories are linked to a context id, and, the context they are linked to must exist. How to fix this? The context to which the category is linked do not exist anymore.
Question categories should belong to the same context as their parent. When one question category is the parent of another, then they should both belong to the same context. I see child category id, name and contextid and parent category id, name and contextid. But I cannot just update the db record in mdl_question_categories because it creates duplicate key. Do you have any idea how to correctly update these categories?
Peter
Multi-answer questions data consistency. I used the script from Moodle 1.9 and generated SQL with more than 2.000 queries, but none of them returned updated record. The query is like "UPDATE mdl_question SET parent = 390362, category = 18823 WHERE id IN (390363,390364) AND parent <> 0;"
Only multianswer and random questions should be the parent of another question.There is no suggestion, only to ask in moodle forum.
Question categories should belong to a valid context. All question categories are linked to a context id, and, the context they are linked to must exist. How to fix this? The context to which the category is linked do not exist anymore.
Question categories should belong to the same context as their parent. When one question category is the parent of another, then they should both belong to the same context. I see child category id, name and contextid and parent category id, name and contextid. But I cannot just update the db record in mdl_question_categories because it creates duplicate key. Do you have any idea how to correctly update these categories?
Peter