Completed
Push — develop ( d30da6...2bfc38 )
by Seth
03:06
created

course/js/index.js   A

Complexity

Total Complexity 4
Complexity/F 1.33

Size

Lines of Code 11
Function Count 3

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 0
nc 1
dl 0
loc 11
rs 10
c 0
b 0
f 0
wmc 4
mnd 1
bc 3
fnc 3
bpm 1
cpm 1.3333
noi 1

1 Function

Rating   Name   Duplication   Size   Complexity  
A graphs.turnAroundComparison 0 9 2
1
/*jslint browser */
2
/*global $,fetch,Chart */
3
var graphs = {
4
    turnAroundComparison: function (domId, course_id, department_id = false) {
5
        fetch("chart/turn-around-comparison.php?course_id=" + course_id + (department_id !== false ? "&department_id=" + department_id : ""))
6
            .then(function (response) {
7
                return response.json();
8
            }).then(function (data) {
9
                var tac = new Chart($(domId), data);
10
                console.log(tac);
0 ignored issues
show
Debugging Code introduced by
console.log looks like debug code. Are you sure you do not want to remove it?
Loading history...
11
            });
12
    }
13
};
14