Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-20590

enable custom css for each course theme

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Not a bug
    • 1.9
    • None
    • Themes
    • None
    • MOODLE_19_STABLE
    • Easy

    Description

      this tiny patch, enables custom CSS layouts for each course that uses the theme
      that implement this patch.

      open the header.html file of any theme and add the following line inside the <head> section

      <LINK REL=StyleSheet HREF="<?php echo "$CFG->wwwroot/file.php/$COURSE->id/custom_style.css" ?>" TYPE="text/css" MEDIA=screen>

      OR

          <?php
            if (file_exists("$CFG->dataroot/$COURSE->id/custom_style.css")) {
              echo "<link rel=stylesheet href=\"$CFG->wwwroot/file.php/$COURSE->id/custom_style.css\" type=\"text/css\" media=\"screen\">";
            }
          ?>

      now, make sure the teacher knows it has to place the CSS markup inside a file called "custom_style.css" on the
      root of the course's "files" (and folders) section.

      teachers use this (on our side of the globe) to hide sections, change font sizes, change header images (school logo)...
      and add some personal touch to their virtual class

      Attachments

        Activity

          People

            skodak Petr Skoda
            nadavkav Nadav Kavalerchik
            Rossiani Wijaya Rossiani Wijaya
            Huong Nguyen, Bas Brands, Mathew May
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: