Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 1413... Línea 1413...
1413
        }
1413
        }
Línea 1414... Línea 1414...
1414
 
1414
 
1415
        // Params to be passed to the user view page.
1415
        // Params to be passed to the user view page.
Línea 1416... Línea -...
1416
        $params = ['id' => $user->id];
-
 
1417
 
-
 
1418
        // Get courseid if provided.
-
 
1419
        if (isset($options['courseid'])) {
-
 
1420
            $params['courseid'] = $options['courseid'];
-
 
1421
        }
1416
        $params = ['id' => $user->id];
1422
 
-
 
1423
        // Get courseid from context if provided.
1417
 
1424
        if ($context) {
-
 
1425
            $coursecontext = $context->get_course_context(false);
1418
        // Get courseid from context if provided.
1426
            if ($coursecontext) {
-
 
1427
                $params['courseid'] = $coursecontext->instanceid;
1419
        if ($context && $coursecontext = $context->get_course_context(false)) {
Línea 1428... Línea 1420...
1428
            }
1420
            $params['course'] = $coursecontext->instanceid;
1429
        }
1421
        }
1430
 
1422
 
1431
        // If courseid is not set or is set to site id, then return profile page, otherwise return view page.
1423
        // If courseid is not set or is set to site id, then return profile page, otherwise return view page.
1432
        if (!isset($params['courseid']) || $params['courseid'] == SITEID) {
1424
        if (!isset($params['course']) || $params['course'] == SITEID) {
1433
            return new moodle_url('/user/profile.php', $params);
1425
            return new moodle_url('/user/profile.php', $params);
1434
        } else {
1426
        } else {