Feature: Add setting to display course short name in header, resolves #1010 #1011
+19
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request implements a new theme setting that allows administrators to choose whether course headers display the full course name (default behavior) or the course short name.
Background & Use Case
This feature addresses scenarios where course data comes from external systems that may populate the "short name" field with content that's more appropriate for header display than the full course name. While the field is called "short name," external systems sometimes use it for display-friendly course identifiers that may actually be more suitable for headers than the official full course name.
Changes Made
Added new setting useshortnameinheader under the Course tab in theme configuration
Uses Yes/No dropdown with "No" as default to maintain backward compatibility
Setting is logically placed in the "Course header" section alongside related course header options
Modified the full_header() method to check the theme setting
When enabled and on a course page (excluding site home), the page heading is set to the formatted course short name
Preserves all existing functionality and header features
Uses proper context formatting for security and consistency
Added useshortnameinheader and useshortnameinheader_desc strings
Strings follow the theme's existing naming conventions and are descriptive for administrators