KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.4.41 (Ubuntu)
System : Linux vmi1525618.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64
User : www-data ( 33)
PHP Version : 8.2.12
Disable Function : NONE
Directory :  /var/www/demo.aadityaguptaclasses.com/resources/js/parts/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //var/www/demo.aadityaguptaclasses.com/resources/js/parts/text_lesson.js
(function ($) {
    "use strict";



    $('body').on('change', '#readLessonSwitch', function (e) {
        e.preventDefault();

        const $this = $(this);
        const course_id = $this.attr('data-course-id');
        const lesson_id = $this.attr('data-lesson-id');
        const status = this.checked;

        $this.addClass('loadingbar primary').prop('disabled', true);

        const data = {
            item: 'text_lesson_id',
            item_id: lesson_id,
            status: status
        };

        $.post('/course/' + course_id + '/learningStatus', data, function (result) {
            $.toast({
                heading: '',
                text: learningToggleLangSuccess,
                bgColor: '#43d477',
                textColor: 'white',
                hideAfter: 10000,
                position: 'bottom-right',
                icon: 'success'
            });
        }).catch(err => {
            $.toast({
                heading: '',
                text: learningToggleLangError,
                bgColor: '#f63c3c',
                textColor: 'white',
                hideAfter: 10000,
                position: 'bottom-right',
                icon: 'error'
            });
        });
    })
})(jQuery);

Anon7 - 2021