Tell segment IO whenever a page is loaded. Once this works, we
can add more detailed instrumentation for events we care about.
Will be turned off in prod until the SEGMENT_IO_LMS feature flag is
set to True and a SEGMENT_IO_LMS_KEY is set.
TODO: This breaks the 1.5x and .75x speeds. I'm still looking into
why.
TODO: VideoDescriptor inherits from RawDescriptor in order to
use the from_xml and export_to_xml methods. This seems really ugly,
though; I'd rather find a better way to do this.
Developers can have private settings files by creating
lms/envs/private.py or cms/envs/private.py. They are imported
at the end of dev.py. Note that they won't be imported if you
are using one of the other dev*.py variants.
Themes do not necessarily want all of the available LMS routes, such
as `/jobs` and `/university_profiles`. This change splits up the
`lms/urls.py` file and selectively enables/disables routes based on
whether or not a theme is enabled. This is a naive solution for now;
a better solution gives themes a way to selectively overrides such
routes.
Additionally, with the `MKTG_URL_LINK_MAP` setting that hits certain
routes immediately on each page render (whenever the `marketing_link`
helper function is called), themes may crash if they don't leave
all marketing link routes present in `lms/urls.py`. This change also
provides the ability to override the `MKTG_URL_LINK_MAP` in the
settings.
Finally, modify the mitxmako marketing URL middleware to not try to
reverse disabled URLs, which are those keys in the map whose values
are `None`.
Just as is done with the main LMS application.scss file, rewrite the
course.scss file with Mako to conditionally import a theme's
variables overrides. Add the course.scss file to the list of ignored
Git files so that it doesn't keep getting committed over and over
again.
This also requires us to add a hardcoded line in the assets Rakefile
for the moment, so that the course.scss.mako file gets properly
preprocessed. Once the preprocessing is done by a Django management
command, we won't have to do this anymore.
Since the theme Sass is just a simple variables overrides (for the
moment), it must be imported right after the default variables Sass
file (if at all). At the bottom of the file, it has no effect.