Good evening all. I am working on a special (very unusual) project that involves creating something like an 'API' for Moodle that allows some of its forum functions to be exported to other environments. For example, a user would be able to post to a moodle discussion from a mobile device. To make this possible, I bypassed all of Moodle's built-in functions and went straight for the database.
Now the project is nearly complete. The last thing left to do is allow users to create new forums remotely. The problem is, since I am using the database directly, I needed to know every table that I would have to update so that the new forum is seamlessly integrated into the site. I know that more than one table is affected by a new forum, including forum and context. Can anyone explain the context table to me? Or at least direct me to the code that adds new forums to Moodle?