]> git.mjollnir.org Git - moodle.git/commitdiff
Javascript added
authortomflannaghan <tomflannaghan>
Thu, 17 Aug 2006 09:27:51 +0000 (09:27 +0000)
committertomflannaghan <tomflannaghan>
Thu, 17 Aug 2006 09:27:51 +0000 (09:27 +0000)
mod/data/view.php

index f20975df026fdb549ee2c9d4fcae6eab26efa5e7..b4a75dfaedc9f9bba00d0d6bae72d011b260fe7f 100755 (executable)
         $USER->editing = $edit;
     }
 
-/// RSS and CSS meta
+/// RSS and CSS and JS meta
     $meta = '';
     if (!empty($CFG->enablerssfeeds) && !empty($CFG->data_enablerssfeeds) && $data->rssarticles > 0) {
         $rsspath = rss_get_url($course->id, $USER->id, 'data', $data->id);
     if ($data->csstemplate) {
         $meta .= '<link rel="stylesheet" type="text/css" href="'.$CFG->wwwroot.'/mod/data/css.php?d='.$data->id.'" /> ';
     }
+    if ($data->jstemplate) {
+        $meta .= '<script type="text/javascript" src="'.$CFG->wwwroot.'/mod/data/js.php?d='.$data->id.'"></script>';
+    }
+
     
 /// Print the page header
     $PAGE->print_header($course->shortname.': %fullname%', '', $meta);