chamilo/chamilo-lms

View on GitHub
src/CoreBundle/Resources/views/Lti/gradebook.html.twig

Summary

Maintainability
Test Coverage
{% extends '@ChamiloCore/Layout/layout_one_col.html.twig' %}

{% block content %}
    {% autoescape false %}
        {{ form }}
    {% endautoescape %}

    <script>
        $(function() {
            $("#hid_category_id").change(function () {
                $("#hid_category_id option:selected").each(function () {
                    var cat_id = $(this).val();

                    $.ajax({
                        url: "{{ _p.web_ajax }}gradebook.ajax.php?a=get_gradebook_weight",
                        data: "cat_id=" + cat_id,
                        success: function (return_value) {
                            if (return_value != 0) {
                                $("#max_weight").html(return_value);
                            }
                        }
                    });
                });
            });
        });
    </script>
{% endblock %}