Can someone explain to me the three tables in MongoDB: modulestore.structures
, modulestore.definitions
, and modulestore.active_versions
? I can link structures
with definitions
, but I do not understand what data active_versions
stores and how it relates to the other two tables. (I am trying to link content blocks with course codes.)
Hi @KTB and welcome back!
I admit I worked on this ages and ages ago and could not explain it but I’m wondering if this wiki article would help: edx-platform-wiki/Split:-the-versioning,-structure-saving-DAO.md at master · openedx-unsupported/edx-platform-wiki · GitHub
Please also see this recent thread, as it’s relevant to this part of the system: 500 errors accessing an older course in our LMS, modulestore values out of sync? - Development - Open edX discussions
That being said, this is a very low-level representation of the content data. Depending on your use case, you might be better off using the Course Blocks API or doing queries in modulestore. Our longer term goal is to get rid of MongoDB from the system and to change how we store this content on the backend.
“Thank you for your response. I have tried this method, but it only returns the list within the course block, while the API for block content is not yet available.”
@sarina Thank you. I have completed checking all the links in my LMS. The document link you provided has helped me resolve the issue I was facing.
@KTB thanks for the feedback and I’m glad you got things working