...
Expired courses will not be automatically unpublished. Unpublishing a course will remove the course from learners' pending and completed activities, so proceed with caution.
To unpublish a course:
Click the "EDIT" tab.
Click the "Publishing" tab.
Click the "Publishing options" vertical tab.
Uncheck "Published".