Has anybody has any success creating HTML strings through Python scripts and then declaring them as $variable? I tried to assign an HTML string to a variable but continue to get an error.
If its not possible I was wondering how others have gone about dynamically generating HTML in problems (or if its even possible).
I don’t think what you’re asking for is possible, but Open edX platform can be extended with content plugins called XBlocks. You can create a new XBlock plugin that uses your script and dynamically generates the HTML you want. You can read more about this here: Open edX XBlock Tutorial — Open edX XBlock Tutorial documentation
There may even be an existing plugin that can do what you’re trying to get it to do.
You’ll need direct/SSH access to the server where the site is running to install the XBlock.