Proyectos de Subversion Moodle

Rev

Rev 1233 | Rev 1303 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1233 Rev 1302
Línea 38... Línea 38...
38
    $course = get_course($PAGE->course->id);
38
    $course = get_course($PAGE->course->id);
39
    $course_context = context_course::instance($course->id);
39
    $course_context = context_course::instance($course->id);
Línea 40... Línea 40...
40
 
40
 
Línea -... Línea 41...
-
 
41
    $notifyeditingon  = empty($_GET['notifyeditingon']) ? 0 : intval($_GET['notifyeditingon'], 10);
-
 
42
 
-
 
43
    $isinvited = isguestuser($USER);
-
 
44
 
41
    $notifyeditingon  = empty($_GET['notifyeditingon']) ? 0 : intval($_GET['notifyeditingon'], 10);
45
    if (
-
 
46
        has_capability('moodle/course:manageactivities', $course_context, $USER->id) ||
-
 
47
        has_capability('moodle/course:viewhiddenactivities', $course_context, $USER->id) ||
42
 
48
        $notifyeditingon
-
 
49
    ) {
-
 
50
        $searchURL = false;
43
    if (has_capability('moodle/course:manageactivities', $course_context, $USER->id) || has_capability('moodle/course:viewhiddenactivities', $course_context, $USER->id) || $notifyeditingon) {
51
    } else if ($isinvited) {
44
        $searchURL = false;
52
        $searchURL = true; // permitir redirección al módulo visible
45
    } else {
53
    } else {
Línea 46... Línea 54...
46
        $searchURL = true;
54
        $searchURL = true;