If you open Developer Tools in your browser and go to the Network tab do you see the Content-Disposition header when you click Download:
It's this header that tells the browser to download the file instead of displaying it.
Could the Moodle site be behind some caching service which is affecting the HTTP headers? If so, try turning off this cache.