dirroot . '/'.$CFG->admin.'/xmldb/actions/' . $action . '/' . $action . '.js'; $wwwfile = $CFG->wwwroot . '/'.$CFG->admin.'/xmldb/actions/' . $action . '/' . $action . '.js'; if (file_exists($file) && is_readable($file)) { echo '' . "\n"; } else { /// Try to load the postaction javascript if exists if ($postaction) { $file = $CFG->dirroot . '/'.$CFG->admin.'/xmldb/actions/' . $postaction . '/' . $postaction . '.js'; $wwwfile = $CFG->wwwroot . '/'.$CFG->admin.'/xmldb/actions/' . $postaction . '/' . $postaction . '.js'; if (file_exists($file) && is_readable($file)) { echo '' . "\n"; } } } } /// Load standard JavaScript include($standard_javascript); ?>