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

enable custom css for each course theme

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Not a bug
    • Affects Version/s: 1.9
    • Fix Version/s: None
    • Component/s: Themes
    • Labels:
      None
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_19_STABLE

      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

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: