JFIF x x C C " } !1AQa "q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w !1AQ aq"2B #3Rbr{
File "c315087ad08af38e0b5be3f1f0ea8733.php"
Full Path: /home/ambitio2/public_html/storage/framework/views/c315087ad08af38e0b5be3f1f0ea8733.php
File size: 2.29 KB
MIME-type: text/x-php
Charset: utf-8
<?php
$lessons = DB::table('lessons')->where('section_id', $id)->orderBy('sort')->get();
?>
<div class="row">
<div class="col-12">
<div id="lesson-list" class="list-group d-grid gap-2 border-0 mb-3">
<?php $__currentLoopData = $lessons; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $lesson): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<div class="list-group-item rounded-3 py-2 px-2 border-1 draggable-item hover-parent d-flex"id="<?php echo e($lesson->id); ?>">
<?php echo e($lesson->title); ?> <span class="ms-auto">
<i class="fi-rr-apps-sort text-muted ps-2 border-start me-2 mt-1 hover-show cursor-move"></i></span>
</div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div>
<button class="btn ol-btn-primary" onclick="sort('<?php echo e($id); ?>')"><?php echo e(get_phrase('Save Changes')); ?></button>
</div> <!-- end col -->
</div>
<script>
"use strict";
$(function() {
$("#lesson-list").sortable({
axis: "y"
});
});
function sort(id) {
var containerArray = ['lesson-list'];
var itemArray = [];
var lessons;
var quizzes;
let course_id = id;
for (var i = 0; i < containerArray.length; i++) {
$('#' + containerArray[i]).each(function() {
$(this).find('.draggable-item').each(function() {
itemArray.push(this.id);
});
});
}
var itemJSON = JSON.stringify(itemArray);
$.ajax({
url: "<?php echo e(route('instructor.lesson.sort')); ?>",
type: 'POST',
data: {
itemJSON: itemJSON,
course_id: course_id,
},
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
success: function(response) {
success("<?php echo e(get_phrase('Lesson sorted successfully.')); ?>");
window.location.reload(1);
}
});
}
</script>
<?php /**PATH C:\Users\deart\Herd\academylmslaravel\resources\views/instructor/course/lesson_sort.blade.php ENDPATH**/ ?>