Affects Version/s: 3.4.6, 3.5.3
Fix Version/s: None
Affected Branches:MOODLE_34_STABLE, MOODLE_35_STABLE
MDL-62491, moodle_content_writer.php loads bootstrap's CSS file from a CDN.
This is fragile for several reasons:
- It requests the URL with a plain fopen(), without using the HTTP proxy if one is configured.
- Failure of the request is not handled, so the process fails with an error if the CDN cannot be contacted.
- The code is called from within unit tests, so the tests will fail if the CDN cannot be contacted. I think its better to avoid connecting to external services in a unit test.
I propose that we have a local copy of the CSS files in the codebase, and copy the appropriate one into the export rather than downloading it from the CDN.