Skip to content

Conversation

@netanelklein
Copy link

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

  1. Core Renderer Logic (core_renderer.php)
  • Added new full_header() method that checks the theme setting
  • When enabled and on a course page (excluding site home), the page heading is set to the formatted course short name using proper set_heading() method
  • Preserves all existing functionality and header features
  • Uses proper context formatting for security and consistency
  1. Settings Structure
  • Created new file: /settings/course.php with course-specific settings following the theme's existing pattern
  • Updated: settings.php to include the new course settings file
  • Added the setting under a "Course Header" section for logical organization
  • Uses theme's existing YES/NO constants for consistency
  1. Language Support
  • English (theme_academi.php): Added proper labels and descriptions
  • Arabic (theme_academi.php): Added Arabic translations (Note: Arabic strings are AI-generated, so accuracy may need verification by native speakers)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant