}
    $curso = Curso::find($id);
    $editable = false;
    if (Session::get('tipo_usuario') == "Administrador" || RelacionUsuarioCurso::where('id_usuario', '=', Session::get('user_id'))->where('id_curso', '=', $id)->where('estado', '=', 'activo')->where('tipo_relacion', '=', 'Profesor Admin')->count() > 0) {
        $editable = true;
    }
    return View::make('Estudiante/contenido')->with('curso', $curso)->with('porcentaje', $porcentaje)->with('cantidad', $count3)->with('editable', $editable);
}))->where('id', '[0-9]+');
Route::get('ver-curso-tareas/{id}', array('as' => 'ver-curso-tareas', function ($id) {
    if (Session::get('user_id') == "") {
        return Redirect::to('index');
    }
    if (Session::get('tipo_usuario') != "Administrador" && RelacionUsuarioCurso::where('id_usuario', '=', Session::get('user_id'))->where('id_curso', '=', $id)->count() == 0) {
        return Redirect::to('index');
    }
    $count = Calificacion::where('id_usuario', '=', Session::get('user_id'))->where('id_curso', '=', $id)->count();
    $count3 = Evaluacion::where('id_curso', '=', $id)->where('semana', '>', 0)->count();
    if ($count3 > 0) {
        $porcentaje = intval($count * 100 / $count3);
    } else {
        $porcentaje = 0;
    }
    $curso = Curso::find($id);
    $editable = false;
    if (Session::get('tipo_usuario') == "Administrador" || RelacionUsuarioCurso::where('id_usuario', '=', Session::get('user_id'))->where('id_curso', '=', $id)->where('estado', '=', 'activo')->where('tipo_relacion', '=', 'Profesor Admin')->count() > 0) {
        $editable = true;
    }
    return View::make('Estudiante/tareas')->with('curso', $curso)->with('porcentaje', $porcentaje)->with('cantidad', $count3)->with('editable', $editable);
}))->where('id', '[0-9]+');
Route::get('ver-curso/{id}/clase/{id2}', array('as' => 'ver-clase', function ($id, $id2) {
    if (Session::get('user_id') == "") {
 public function getPromedioEstudiantes()
 {
     $count = Calificacion::where('id_evaluacion', '=', $this->id_evaluacion)->count();
     return round($count, 2);
 }