Allow theme template block override

Description

Stanford implemented the ability to override only specific named blocks of templates from a comprehensive theme, but they never contributed it upstream.

This is the PR: https://github.com/Stanford-Online/edx-platform/pull/535

*Dependencies*: None

*Sandbox URL*: TBD - sandbox is being provisioned.

*Deployment targets*: edx.org and edge.edx.org

*Merge deadline*: None

*Testing instructions*:
1. Create a test theme:

  • make a directory `/edx/app/edxapp/themes/testtheme`

  • create a template at `/edx/app/edxapp/themes/testtheme/lms/templates/dashboard.html`, and put this content into it:
    ```
    <%inherit file="dashboard.html" />
    <%block name="pagetitle">Overridden Title!</%block>
    ${parent.body()}
    ```

2. After you restart the LMS, you should be able to see "Overriddden Title!" used as the page title on the student dashboard, if the patch is working correctly.

*Author notes and concerns*:
Note: Some templates are cached, so if you don't see the changes, you can try wiping the cache by doing `rm -rf /tmp/mako_*` and `sudo service memcached restart`.

*Reviewers*

  • [x] @mtyaka

  • [ ] edX reviewer[s] TBD

*Settings*
In lms.env.json ensure that
```yaml
COMPREHENSIVE_THEME_DIRS: ["/edx/app/edxapp/themes"]
ENABLE_COMPREHENSIVE_THEMING: true
DEFAULT_SITE_THEME: "testtheme"
```

Done

Assignee

Unassigned

Reporter

Open Source Pull Request Bot

Contributor Name

Chandrakant Gopalan

Repo

edx/edx-platform

Customer

Epic Link

None

OSCM Assignee

None

Platform Map Area (Levels 1 &amp; 2)

None

Platform Map Area (Levels 3 &amp; 4)

None

Blended Hour Utilization Percentage

None

edX Theme

None

edX Squad

None

Github Lines Added

None

Github Lines Deleted

None

Priority

Unset