I've largely been borrowing the headers (and everything else) as defined in course .sty files. I've definitely been confused as to how to make the following:
It is a frame but has an (optional) gap in between where text input is inserted as well as other text inputs. Basically, the section header should look like so:

I'd like to know how to create a similar frame and how I can recreate and design similar headings of my own, mostly with respect to the dynamic frame and custom text inputs. If someone knows how to do this, I would greatly appreciate it.
Sorry for the previous troubles with confusing question title.

\sectionbut the second lot is related to footers. Nothing you show seems to be related to headers (at the top of a page). Nothing in the code you showed had anything to do with TikZ. – Peter Wilson Nov 07 '21 at 18:32