. /** * Libs * * @package report * @subpackage log * @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com) * @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_log_extend_navigation_course($navigation, $course, $context) { global $CFG, $OUTPUT; if (has_capability('report/log:view', $context)) { $url = new moodle_url('/report/log/index.php', array('id'=>$course->id)); $navigation->add(get_string('pluginname', 'report_log'), $url, navigation_node::TYPE_SETTING, null, null, new pix_icon('i/report', '')); } } /** * Return a list of page types * @param string $pagetype current page type * @param stdClass $parentcontext Block's parent context * @param stdClass $currentcontext Current context of block * @return array */ function report_log_page_type_list($pagetype, $parentcontext, $currentcontext) { $array = array( '*' => get_string('page-x', 'pagetype'), 'course-report-*' => get_string('page-course-report-x', 'pagetype'), 'course-report-log-index' => get_string('pluginpagetype', 'report_log') ); return $array; }