Ability to set HOMEPAGE_COURSE_MAX via SiteConfiguration.

Description

This patch makes it possible to set `HOMEPAGE_COURSE_MAX` via `SiteConfiguration` in the django admin. The setting controls the number of courses displayed on the homepage.

*JIRA ticket*: OSPR, TBD

*Dependencies*: None

*Sandbox URL*:

The sandbox is set up with 4 courses and `HOMEPAGE_COURSE_MAX` is set to 2 in site configurations.

*Partner information*: 3rd party-hosted open edX instance

*Merge deadline*: None

*Testing instructions*:

1. Create and publish several courses in the Studio, so that they are visible on the LMS homepage.
1. By default there is no limit to the number of courses displayed on the homepage, so you should see all of the courses you added.
1. Go to the Site Configurations section of the django admin (/admin/site_configuration/siteconfiguration/).
1. Set up your Site/Site configuration and add `"HOMEPAGE_COURSE_MAX": 2` (or any other number you want to test).
1. Observe that the LMS homepage now only lists the number of pages you set in the configuration, and it shows a "View all Courses" link, which takes you to a page that lists all courses.

*Note: the homepage is cached and you may have to wait up to three minutes for the cache to update. If you don't want to wait, you can `rm -r /tmp/mako_` and/or `sudo service memcached restart` before you see the changes. You may even have to restart edxapp (`/edx/bin/supervisor restart edxapp:`).*

*Reviewers*

  • [x] @pomegranited

  • [ ] edX reviewer[s] TBD

Done

Assignee

Unassigned

Reporter

Open Source Pull Request Bot

Contributor Name

Matjaz Gregoric

Repo

edx/edx-platform

Customer

Epic Link

None

OSCM Assignee

None

Platform Map Area (Levels 1 & 2)

None

Platform Map Area (Levels 3 & 4)

None

Blended Hour Utilization Percentage

None

edX Theme

None

edX Squad

None

Github Lines Added

None

Github Lines Deleted

None

Priority

Unset