Symfony Exception

Exception

HTTP 403 Forbidden

NotAuthorized

Exception

Exception

in main/inc/lib/api.lib.php (line 3786)
  1.     // Create new exception rendered by template:
  2.     // src/ThemeBundle/Resources/views/Exception/error.html.twig
  3.     // if error is 404 then the template is:
  4.     // src/ThemeBundle/Resources/views/Exception/error404.html.twig
  5.     $exception = new Exception($message);
  6.     $request Container::getRequest();
  7.     $exception = \Symfony\Component\Debug\Exception\FlattenException::create($exception$responseCode);
  8.     $controller = new \Chamilo\ThemeBundle\Controller\ExceptionController(Container::getTwig(), $debug);
  9.     $response $controller->showAction($request$exception);
  10.     $response->send();
api_not_allowed(true) in main/inc/lib/api.lib.php (line 1153)
  1. function api_protect_course_script($print_headers false$allow_session_admins false$allow_drh false)
  2. {
  3.     $course_info api_get_course_info();
  4.     if (empty($course_info)) {
  5.         api_not_allowed($print_headers);
  6.         return false;
  7.     }
  8.     $is_allowed_in_course api_is_allowed_in_course();
api_protect_course_script(true) in main/course_home/course_home.php (line 162)
  1.         exit;
  2.     }
  3. }
  4. /*    Is the user allowed here? */
  5. api_protect_course_script(true);
  6. /*  STATISTICS */
  7. if (!isset($coursesAlreadyVisited[$course_code])) {
  8.     Event::accessCourse();
  9.     $coursesAlreadyVisited[$course_code] = 1;

Stack Trace

Exception

Exception:
NotAuthorized

  at main/inc/lib/api.lib.php:3786
  at api_not_allowed(true)
     (main/inc/lib/api.lib.php:1153)
  at api_protect_course_script(true)
     (main/course_home/course_home.php:162)