getUser($request), $course)) { throw new AuthorizationFailedException(); } $news = \StudipNews::GetNewsByRange($course->id, true, true); list($offset, $limit) = $this->getOffsetAndLimit(); return $this->getPaginatedContentResponse( array_slice($news, $offset, $limit), count($news) ); } }