epicodus/epicenter

View on GitHub
app/assets/javascripts/probation.js

Summary

Maintainability
B
6 hrs
Test Coverage

Showing 4 of 4 total issues

Unexpected confirm.
Open

var confirmed = confirm(prompt);
Severity: Minor
Found in app/assets/javascripts/probation.js by eslint

Unexpected confirm.
Open

var confirmed = confirm(prompt);
Severity: Minor
Found in app/assets/javascripts/probation.js by eslint

Similar blocks of code found in 2 locations. Consider refactoring.
Open

$('#student_probation_teacher').change(function() {
var prompt = this.checked ? 'Are you sure you want to put this student on Academic Warning (TEACHER)?' : 'Remove student from Academic Warning (TEACHER)?'
var confirmed = confirm(prompt);
if (confirmed) {
this.form.submit();
Severity: Major
Found in app/assets/javascripts/probation.js and 1 other location - About 3 hrs to fix
app/assets/javascripts/probation.js on lines 12..20

Similar blocks of code found in 2 locations. Consider refactoring.
Open

$('#student_probation_advisor').change(function() {
var prompt = this.checked ? 'Are you sure you want to put this student on Academic Warning (ADVISOR)?' : 'Remove student from Academic Warning (ADVISOR)?'
var confirmed = confirm(prompt);
if (confirmed) {
this.form.submit();
Severity: Major
Found in app/assets/javascripts/probation.js and 1 other location - About 3 hrs to fix
app/assets/javascripts/probation.js on lines 2..10
Category
Status