aboutsummaryrefslogtreecommitdiff
path: root/resources/assets/javascripts/lib/plus.js
blob: 0d447fd413fae4e39e09c34f25f77a54edcdd73e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
const Plus = {
    setModule: function () {
        $.ajax({
            "url": STUDIP.URLHelper.getURL("dispatch.php/course/plus/trigger"),
            "data": {
                "moduleclass": $(this).data("moduleclass"),
                "key": $(this).data("key"),
                "active": $(this).is(":checked") ? 1 : 0
            },
            "dataType": "json",
            "type": "post",
            "success": function (output) {
                if (output.tabs) {
                    $(".tabs_wrapper").replaceWith(output.tabs);
                }
            }
        });
    }
};



export default Plus;