UnknownSec Bypass
403
:
/
mnt
/
lmsestudio-instance-vol002
/
lms_5bd7106a5c0c
/
resources
/
views
/
admin
/ [
drwxr-xr-x
]
Menu
Upload
Mass depes
Mass delete
Terminal
Info server
About
name :
tasks.blade.php
@extends('layouts.admin') @section('styles') <link href="{{ asset('assets/css/plugins/select2-4.0.3/css/select2.min.css') }}" rel="stylesheet"> <style type="text/css"> .select2-container .select2-selection--single { height: 46px; } .select2-container--default .select2-selection--single { border: 1px solid #dfd7ca; } .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 42px; } .select2-container--default .select2-selection--single .select2-selection__arrow { height: 42px; } .select2-container .select2-selection--single .select2-selection__rendered { padding-left: 15px; } #div-comment .well, .well { background-color: #F5FAFC; } #div-comment ul { margin: 0px; padding: 0px; } #div-comment ul>li { list-style: none; } #div-comment ul>li.div-answers { margin-left: 70px; } #replayComment { background-color: #143044; padding: 30px; display: none; border-radius: 5px; } #replayComment b { color: #fff; } .text-muted { color: #8DBCDE; } #last-comments { padding: 30px; padding-bottom: 10px; } #last-comments h3 { margin: 0px 0px 30px 0px; } #last-comments ul { margin: 0px; padding: 0px; } #last-comments ul li { list-style: none; margin-bottom: 20px; } </style> @stop @section('content') <div class="row"> <div class="col-sm-12"> <div class="panel panel-default"> <div class="panel-body"> <div class="row"> {!! Form::model($data, ['method' => 'GET', 'url' => route('admin.task.index'), 'id' => 'frmFilter']) !!} <div class="col-sm-4"> <div class="form-group"> <label>{!! trans('admin_comment.labelFilterCourses') !!}</label> {!! Form::select('course_id', $courses, null, ['class' => 'form-control', 'id' => 'courses']) !!} </div> </div> <div class="col-sm-4"> <div class="form-group"> <label>{!! trans('admin_comment.labelFilterLessons') !!}</label> {!! Form::select('resource_id', $resources, null, ['class' => 'form-control', 'id' => 'resources']) !!} </div> </div> <div class="col-sm-4"> <div class="form-group"> <label>{!! trans('admin_task.labelFilterStudents') !!}</label> {!! Form::select('student_id', $students, null, ['class' => 'form-control', 'id' => 'students']) !!} </div> </div> {!! Form::close() !!} </div> </div> </div> </div> </div> @if(!is_null($sendedTasks)) <div class="panel panel-default"> <div class="panel-body"> <div class="table-responsive"> <table id="" class="table no-margn"> <thead> <tr> <th>{!! trans('admin_task.thDate') !!}</th> <th>{!! trans('admin_task.thName') !!}</th> <th>{!! trans('admin_task.thEmail') !!}</th> <th>{!! trans('admin_task.thUpload') !!}</th> <th>{!! trans('admin_task.thRedaction') !!}</th> <th class="text-center">{!! trans('admin_task.thStatusTask') !!}</th> <th class="text-center">{!! trans('admin_task.thSubmitEndTask') !!}</th> <th class="text-right">{!! trans('admin_master.thAction') !!}</th> </tr> </thead> <tbody> @foreach($sendedTasks as $taskSent) <tr> {{-- Mais fácil usar o helper, que já trata se a data está null ou vazia. --}} <td>{{ MyHelper::formatDate($taskSent->sended_date, true) }}</td> <td>{{ $taskSent->name }}</td> <td>{{ $taskSent->email }}</td> <td> @if(!empty($taskSent->task_upload)) <a href="/storage/resources/task_sent/{{ $taskSent->course_id . '/' . $taskSent->task_lesson_id . '/' . $taskSent->user_id . '/' . $taskSent->task_upload }}" target="_blank"> {{ $taskSent->task_upload }} </a> @else --- @endif </td> <td> @if(!empty($taskSent->redaction)) <a role="button" data-toggle="collapse" href="#redaction{{$taskSent->id}}" aria-expanded="false" aria-controls="redaction{{$taskSent->id}}"><span class="caret"></span> {!! trans('admin_task.tdClickRedaction') !!}</a> @else --- @endif </td> <td class="text-center"> @if($taskSent->status == 1) <span class="label label-danger">{!! trans('admin_task.labelPending') !!}</span> @elseif($taskSent->status == 2) <span class="label label-info">{!! trans('admin_task.labelNewAnswer') !!}</span> @elseif($taskSent->status == 3) <span class="label label-success"><a role="button" data-toggle="collapse" href="#toEvaluateTask{{$taskSent->id}}" aria-expanded="false" aria-controls="toEvaluateTask{{$taskSent->id}}" style="color: #fff;">{!! trans('admin_task.labelEvaluated') !!}</a></span> @else --- @endif </td> {{-- <td class="text-center">{{ Carbon\Carbon::createFromFormat('Y-m-d', $taskSent->end_date)->format('d/m/Y') }}</td> --}} <td class="text-center">{{ MyHelper::formatDate($taskSent->end_date) }}</td> <td class="text-right"> <div class="btn-group"> <a role="button" data-toggle="collapse" href="#toEvaluateTask{{$taskSent->id}}" aria-expanded="false" aria-controls="toEvaluateTask{{$taskSent->id}}" class="btn btn-info"> <span class="glyphicon glyphicon-edit"></span> {!! trans('admin_task.btnToEvaluate') !!} </a> {{-- Mudei, criando várias possibilidades das condições de exibição do botão limpar ou remover mídia --}} @if(empty($taskSent->end_date) && $taskSent->status <> 3) <button type="button" class="btn btn-danger clear-task" data-task-id="{{ $taskSent->id }}"> <span class="glyphicon glyphicon-trash"></span> {!! trans('admin_task.btnClean') !!} </button> @elseif(empty($taskSent->end_date) && $taskSent->status === 3 && $taskSent->task_upload) <button type="button" class="btn btn-warning remove-file" data-task-id="{{ $taskSent->id }}"> <span class="glyphicon glyphicon-trash"></span> {!! trans('admin_task.btnCleanFile') !!} </button> @elseif(!empty($taskSent->end_date) && $taskSent->status === 3 && $taskSent->task_upload) <button type="button" class="btn btn-warning remove-file" data-task-id="{{ $taskSent->id }}"> <span class="glyphicon glyphicon-trash"></span> {!! trans('admin_task.btnCleanFile') !!} </button> @elseif(!empty($taskSent->end_date) && ($taskSent->end_date > Carbon\Carbon::now()->format('Y-m-d'))) <button type="button" class="btn btn-danger clear-task" data-task-id="{{ $taskSent->id }}"> <span class="glyphicon glyphicon-trash"></span> {!! trans('admin_task.btnClean') !!} </button> @elseif(!empty($taskSent->end_date) && ($taskSent->end_date <= Carbon\Carbon::now()->format('Y-m-d')) && $taskSent->task_upload) <button type="button" class="btn btn-warning remove-file" data-task-id="{{ $taskSent->id }}"> <span class="glyphicon glyphicon-trash"></span> {!! trans('admin_task.btnCleanFile') !!} </button> @endif </div> </td> </tr> <tr class="collapse" id="toEvaluateTask{{$taskSent->id}}"> <td colspan="8"> <div class="panel panel-default" style="margin-top: 10px;"> <div class="panel-body"> {!! Form::model($taskSent, ['url' => route('admin.task.evaluate'), 'method' => 'POST', 'name' => 'form-evaluate-task-' . $taskSent->id, 'id' => 'form-evaluate-task-' . $taskSent->id]) !!} <div class="col-sm-3"> {!! Form::label('final_note', trans('admin_task.labelFinalNote')) !!}: {!! Form::number('final_note', null, ['class' => 'form-control', 'id' => 'final_note-' . $taskSent->id]) !!} @if($taskSent->max_note) <span class="help-block"><small><i class="glyphicon glyphicon-info-sign"></i> {!! trans('admin_task.helpFinalNote') !!}: <span class="label label-default">{{$taskSent->max_note}}</span> </small> </span> @endif {!! $errors->first('final_note', '<span class="text-danger">:message</span>') !!} </div> <div class="col-sm-7"> {!! Form::label('teacher_comments', trans('admin_task.labelComments')) !!}: {!! Form::text('teacher_comments', null, ['class' => 'form-control', 'id' => 'teacher_comments-' . $taskSent->id]) !!} <span class="help-block"><small><i class="glyphicon glyphicon-info-sign"></i> {!! trans('admin_task.helpTeacherComments') !!} </small> </span> {!! $errors->first('teacher_comments', '<span class="text-danger">:message</span>') !!} </div> {!! Form::hidden('id', $taskSent->id, ['id' => 'id-' . $taskSent->id]) !!} {!! Form::hidden('task_lesson_id', $taskSent->task_lesson_id, ['id' => 'task_lesson_id-' . $taskSent->task_lesson_id]) !!} <div class="col-sm-2"> <input type="button" class="btn btn-success send-evaluate" form="form-evaluate-task-{{ $taskSent->id }}" data-id="{{ $taskSent->id }}" value="{!! trans('admin_task.btnTaskSent') !!}" style="margin-top: 26px; padding: 11px 16px;"> </div> {!! Form::close() !!} </div> </div> </td> </tr> <tr class="collapse" id="redaction{{$taskSent->id}}"> <td colspan="8"> <div class="panel panel-default" style="margin-top: 10px;"> <div class="panel-body"> @if($taskSent->redaction) {!! $taskSent->redaction !!} @endif </div> </div> </td> </tr> @endforeach </tbody> </table> {!! $sendedTasks->appends(Input::except('page', '_token'))->render() !!} </div> </div> </div> @endif @stop @section('scripts') {!! HTML::script('assets/js/plugins/select2-4.0.3/js/select2.min.js') !!} <script> $('#courses').select2(); $('#resources').select2(); $('#students').select2(); $(document).on('change', '#courses', function () { $('#resources').empty(); $('#frmFilter').submit(); }); $(document).on('change', '#resources', function () { $('#students').empty(); $('#frmFilter').submit(); }); $(document).on('change', '#students', function () { $('#frmFilter').submit(); }); //Verifica valor da nota se maior que a nota máxima @if(!is_null($sendedTasks)) @foreach($sendedTasks as $taskSent) $(document).on('change', '#final_note-{{$taskSent->id}}', function () { var inputId = $('#final_note-{{$taskSent->id}}').val(); if(inputId > {{$taskSent->max_note}}) { //$(this).css({"background-color": "red"}); //$("#errorNote-{{$taskSent->id}}").show("slow"); alert("{!! trans('admin_task.helpErrorNote') !!}"); $("#form-evaluate-task-{{$taskSent->id}}").trigger("reset"); }; }); @endforeach @endif $(document).on('click', '.clear-task', function(e) { let url = "{{ route('admin.task.clear') }}"; let id = $(this).attr('data-task-id'); bootbox.dialog({ message: "{!! trans('admin_task.bootboxMessage') !!}", title: "{!! trans('admin_task.bootboxTitle') !!}", buttons: { success: { label: "{!! trans('ambiente_ticket.labelTicketYes') !!}", className: "btn-success", callback: function () { $.ajax({ url: url, method: "POST", data: {id: id}, success: function (response) { bootbox.alert("{!! trans('admin_task.bootboxAlert') !!}", function() { location.reload(); }); } }); } }, danger: { label: "{!! trans('ambiente_ticket.labelTicketNo') !!}", className: "btn-danger", callback: function () { return true; } } } }); }); $(document).on('click', '.send-evaluate', function(e) { e.preventDefault(); let url = "{{ route('admin.task.evaluate') }}" let formId = $(this).attr('form'); let taskId = $(this).attr('data-id'); let id = $('#id-' + taskId).val(); let finalNote = $('#final_note-' + taskId).val(); let teacherComments = $('#teacher_comments-' + taskId).val(); console.table('id: ' + id + ', nota: ' + finalNote + ', comentário: ' + teacherComments); //let data = new FormData(); $.ajax({ url: url, data: {id: id, final_note: finalNote, teacher_comments: teacherComments}, type: 'POST', success: function ( data ) { alert(data); location.reload(); } }); }) $(document).on('click', '.remove-file', function(e) { let url = "{{ route('admin.task.remove.media') }}"; let id = $(this).attr('data-task-id'); bootbox.dialog({ message: "{!! trans('Esta ação irá remover apenas o arquivo de mídia da lição enviada, porém, é irreversível!') !!}", title: "{!! trans('Remover arquivo de mídia') !!}", buttons: { success: { label: "{!! trans('ambiente_ticket.labelTicketYes') !!}", className: "btn-success", callback: function () { $.ajax({ url: url, method: "POST", data: {id: id}, success: function (response) { bootbox.alert("{!! trans('Arquivio de mídia removido.') !!}", function() { location.reload(); }); } }); } }, danger: { label: "{!! trans('ambiente_ticket.labelTicketNo') !!}", className: "btn-danger", callback: function () { return true; } } } }); }); </script> @stop
Copyright © 2026 - UnknownSec