If you’ve already got courses built on Moodle using an unsecure server and you switch to a secure server, the http will not auto-translate to https in all of your course links.  Moodle seeks out the root file path to swap out and update links when courses are restored – meaning it takes the “http://yourserver.com/file.php/###/” and swaps it when restoring courses.  But by default, if you switch to an https server, you’ll have to write a custom script to make the site properly update the file paths in all links.