Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 22... Línea 22...
22
 * @package    report_loglive
22
 * @package    report_loglive
23
 * @copyright  2011 Petr Skoda
23
 * @copyright  2011 Petr Skoda
24
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
24
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
25
 */
25
 */
Línea -... Línea 26...
-
 
26
 
-
 
27
use core\report_helper;
26
 
28
 
Línea 27... Línea 29...
27
defined('MOODLE_INTERNAL') || die;
29
defined('MOODLE_INTERNAL') || die;
28
 
30
 
29
/**
31
/**
Línea 34... Línea 36...
34
 * @param navigation_node $navigation The navigation node to extend
36
 * @param navigation_node $navigation The navigation node to extend
35
 * @param stdClass        $course     The course to object for the report
37
 * @param stdClass        $course     The course to object for the report
36
 * @param context         $context    The context of the course
38
 * @param context         $context    The context of the course
37
 */
39
 */
38
function report_loglive_extend_navigation_course($navigation, $course, $context) {
40
function report_loglive_extend_navigation_course($navigation, $course, $context) {
-
 
41
    if (
39
    if (has_capability('report/loglive:view', $context)) {
42
        has_capability('report/log:view', $context)
-
 
43
        && report_helper::has_valid_group($context)
-
 
44
    ) {
40
        $url = new moodle_url('/report/loglive/index.php', array('id' => $course->id));
45
        $url = new moodle_url('/report/loglive/index.php', array('id' => $course->id));
41
        $navigation->add(get_string('pluginname', 'report_loglive'), $url, navigation_node::TYPE_SETTING, null, null,
46
        $navigation->add(get_string('pluginname', 'report_loglive'), $url, navigation_node::TYPE_SETTING, null, null,
42
                new pix_icon('i/report', ''));
47
                new pix_icon('i/report', ''));
43
    }
48
    }
44
}
49
}