Stanford got some feedback from our students/faculty that students
were making accidental clicks on radio-button capa questions.
They would click way to the right of the label text, but it would
still select the corresponding input, which caused some students
to make unintentional changes to their answers. This was because
labels for these inputs were display:block and width:100%
Changing these labels to float:left clear:both should fix it.
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.
This commit adds the requisite settings and startup features to
enable integration of themes into the edX platform. It does not
yet provide hooks in any of the templates, but it does cause the
main `lms/static/sass/application.scss` file to `@import` a theme's
base Sass. Template hooks will come down the road.
CHANGELOG
---------
Define a new `MITX_FEATURE`, `USE_CUSTOM_THEME`, that when enabled,
can be used in templates to determine whether or not custom theme
templates should be used instead of the defaults.
Also define a new setting, `THEME_NAME`, which will be used to
locate theme-specific files. Establish the convention that themes
will be stored outside of the `REPO_ROOT`, inside the `ENV_ROOT`,
in a directory named `themes/`. `themes/<THEME_NAME>` will store
the files for a particular theme.
Provide a function, `enable_theme`, that modifies the template and
static asset load paths appropriately to include the theme's files.
Move the main LMS Sass file to a Mako template that conditionally
`@import`s the theme's base Sass file when a theme is enabled.
Add logic to the assets Rakefile to properly preprocess any Sass/
Mako templates before compiling them.
If a course is not started, the course image and title on the dashboard link
to the course about page. Because the LMS course about pages do not exist
(i.e. 404) with the marketing site enabled, we simply do not use a link if
the course has not started.
If a user is already registered for a course but the course has not started
yet, display a grey button that says "you are registered" and goes nowhere
instead of the blue "access courseware" button, which goes to the LMS course
about page (which 404s).