����JFIF��x�x����'
Server IP : 66.29.137.217 / Your IP : 3.17.73.197 Web Server : LiteSpeed System : Linux premium294.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : gltevjme ( 1095) PHP Version : 7.0.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/gltevjme/./bofirmacademy.com/public/frontend/assets/js/course/ |
Upload File : |
(function ($) { "use strict"; $(function () { var course_id = $('.course_id').val(); console.log(course_id) assignmentList(course_id) }); $(document).on('click', '.viewAssignmentList', function () { var course_id = $('.course_id').val(); assignmentList(course_id) }); function assignmentList(course_id) { var studentAssignmentListRoute = $('.studentAssignmentListRoute').val(); $.ajax({ type: "GET", url: studentAssignmentListRoute, data: { 'course_id': course_id, }, datatype: "json", success: function (response) { $('.appendAssignment').html(response); }, error: function (error) { }, }); } $(document).on('click', '.viewAssignmentDetails, .viewAssignmentResult, .viewAssignmentSubmit', function () { var course_id = $('.course_id').val(); var assignment_id = $(this).data('assignment_id'); var route = $(this).data('route'); var data = { 'course_id': course_id, 'assignment_id': assignment_id, } $.ajax({ type: "GET", url: route, data: data, datatype: "json", success: function (response) { $('.appendAssignment').html(response); }, error: function (error) { }, }); }); $(document).on('click', '.assignmentSubmitStore', function() { let formData = new FormData($('#assignment_file_form')[0]); let file = $('input[type=file]')[0].files[0]; formData.append('file', file, file.name); var route = $(this).data('route'); $.ajax({ url: route, headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')}, type: 'POST', contentType: false, processData: false, cache: false, data: formData, success: function(response) { toastr.options.positionClass = 'toast-bottom-right'; var errorMessages = response.messages; if (Array.isArray(errorMessages)) { errorMessages.forEach( message => toastr.error(message) ); return; } if (response.status == 404) { toastr.error(response.message) return; } $('.appendAssignment').html(response); toastr.success('Assignment uploaded successfully.') }, error: function(data) { // } }); }); })(jQuery)