You can't have blocks in the middle of a course page, if that's what you want to achieve. You can however add an iframe in the middle section of a course page and then add whatever content (even php code) that you want to display to that frame.
Look at this discussion.
To make sure only logged in people can see the external page, you can add this code.