Pragmatically, knowing the M4.0 code, I only think this can be solved in a custom course format and not a theme.
Themes
Display Due Date on Course Page (Adaptable)
This discussion has been locked so you can no longer reply to it.