]> git.mjollnir.org Git - moodle.git/commitdiff
support for styles.php in grade reports
authorskodak <skodak>
Sat, 27 Oct 2007 22:01:39 +0000 (22:01 +0000)
committerskodak <skodak>
Sat, 27 Oct 2007 22:01:39 +0000 (22:01 +0000)
lib/weblib.php

index 18c7c76b582741700f34acadd6d80692ce606d23..cfe80b4247b583a8f9257c576ecfc67fb99c9e94 100644 (file)
@@ -2957,6 +2957,16 @@ function style_sheet_setup($lastmodified=0, $lifetime=300, $themename='', $force
             }
         }
 
+        if (!isset($THEME->gradereportsheets) || $THEME->gradereportsheets) { // Search for styles.php in grade reports
+            if ($reports = get_list_of_plugins('grade/report')) {
+                foreach ($reports as $report) {
+                    if (file_exists($CFG->dirroot.'/grade/report/'.$report.'/styles.php')) {
+                        $files[] = array($CFG->dirroot, '/grade/report/'.$report.'/styles.php');
+                    }
+                }
+            }
+        }
+
         if (!empty($THEME->langsheets)) {     // Search for styles.php within the current language
             if (file_exists($CFG->dirroot.'/lang/'.$lang.'/styles.php')) {
                 $files[] = array($CFG->dirroot, '/lang/'.$lang.'/styles.php');