diff --git a/public/javascripts/homework.js b/public/javascripts/homework.js index ad3ad02fe..f1b6e1814 100644 --- a/public/javascripts/homework.js +++ b/public/javascripts/homework.js @@ -184,6 +184,14 @@ $(function(){ $("#BluePopupBox").on('click', 'a.icon_add', function(){ var html = bt('t:test-answer-list', null); $(this).parent('.mt10').after(html); + var inputs = document.getElementsByName("program[input][]"); + var outputs = document.getElementsByName("program[output][]"); + if (inputs.length == outputs.length) { + for (var i=0; i