Not Really. The code Megan's talking about is for a custom block, the HTML block won't allow you to include PHP. It might be possible to do something with Javascript (looking at the course page's URL, pulling out the ID, and appending it to the src attribute of the embed) but it would be tricky as the HTML Editor will try to strip out the Javascript.
General developer forum
Returning just a course ID
This discussion has been locked so you can no longer reply to it.