Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 31... Línea 31...
31
$logreader = optional_param('logreader', '', PARAM_COMPONENT); // Reader which will be used for displaying logs.
31
$logreader = optional_param('logreader', '', PARAM_COMPONENT); // Reader which will be used for displaying logs.
Línea 32... Línea 32...
32
 
32
 
Línea 33... Línea 33...
33
$PAGE->set_url('/report/loglive/loglive_ajax.php');
33
$PAGE->set_url('/report/loglive/loglive_ajax.php');
34
 
34
 
-
 
35
// Capability checks.
-
 
36
if (!empty($id)) {
-
 
37
    $course = $DB->get_record('course', ['id' => $id], '*');
-
 
38
    if ($course) {
-
 
39
        require_login($course);
-
 
40
        $context = context_course::instance($course->id);
-
 
41
    }
-
 
42
}
35
// Capability checks.
43
 
36
if (empty($id)) {
44
if (empty($course)) {
37
    require_login();
45
    require_login();
38
    $context = context_system::instance();
-
 
39
    $PAGE->set_context($context);
-
 
40
} else {
-
 
41
    $course = get_course($id);
-
 
42
    require_login($course);
46
    $context = context_system::instance();
Línea 43... Línea 47...
43
    $context = context_course::instance($course->id);
47
    $PAGE->set_context($context);
Línea 44... Línea 48...
44
}
48
}