. /** * Libs, public API. * * NOTE: page type not included because there can not be any blocks in popups * * @package report * @subpackage loglive * @copyright 2011 Petr Skoda * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die; /** * This function extends the navigation with the report items * * @param navigation_node $navigation The navigation node to extend * @param stdClass $course The course to object for the report * @param stdClass $context The context of the course */ function report_loglive_extend_navigation_course($navigation, $course, $context) { global $CFG, $OUTPUT; if (has_capability('report/loglive:view', $context)) { $url = new moodle_url('/report/loglive/index.php', array('id'=>$course->id, 'inpopup'=>1)); $action = new action_link($url, get_string('pluginname', 'report_loglive'), new popup_action('click', $url)); $navigation->add('', $action, navigation_node::TYPE_SETTING, null, null, new pix_icon('i/report', '')); } }