iassign-integration-functions.js 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531
  1. // Função para ler parâmetros informados pelo iTarefa via URL
  2. // Apesar de não ser obrigatório, será muito útil para capturar os parâmetros
  3. function getParameterByName (name, defaultReturn = null) {
  4. var match = RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search);
  5. return match ? decodeURIComponent(match[1].replace(/\+/g, ' ')) : defaultReturn;
  6. }
  7. // Criando um object com os parâmetros informados pelo iTarefa
  8. // Observe que para cada parâmetro, é realizada a chamada do método getParameterByName, implementado acima
  9. var iLMparameters = {
  10. iLM_PARAM_ServerToGetAnswerURL: getParameterByName("iLM_PARAM_ServerToGetAnswerURL"),
  11. iLM_PARAM_SendAnswer: getParameterByName("iLM_PARAM_SendAnswer"),
  12. iLM_PARAM_AssignmentURL: getParameterByName("iLM_PARAM_AssignmentURL"),
  13. iLM_PARAM_Assignment: getParameterByName("iLM_PARAM_Assignment"),
  14. iLM_PARAM_TeacherAutoEval: getParameterByName("iLM_PARAM_TeacherAutoEval"),
  15. lang: getParameterByName("lang", "pt")
  16. };
  17. // Set the lang parameter to the localStorage for easy access
  18. // and no dependency to the global scope, avoind future 'strict mode' problems
  19. //localStorage.setItem('ivprog.lang', iLMparameters.lang);
  20. // Função chamada pelo iTarefa quando o professor finaliza a criação da atividade
  21. // ou quando o aluno finaliza a resolução do exercício
  22. // O retorno é um JSON com os dados do exercício ou da resolução
  23. // Esse retorno será armazenado no banco de dados do Moodle, pelo iTarefa
  24. function getAnswer () {
  25. // Se o parâmetro "iLM_PARAM_SendAnswer" for false,
  26. // então trata-se de resolução de atividade
  27. if (iLMparameters.iLM_PARAM_SendAnswer == 'false') {
  28. // Montar o retorno com a resposta do aluno
  29. var contentToSend = previousContent.split("\n::algorithm::")[0];
  30. contentToSend += '\n::algorithm::\n';
  31. contentToSend += JSON.stringify(window.program_obj, function(key, value) {
  32. if (key == 'dom_object') {
  33. return;
  34. }
  35. return value;
  36. });
  37. contentToSend += '\n::logs::';
  38. contentToSend += getTrackingLogs();
  39. return contentToSend;
  40. } else {
  41. // Montar o retorno com a criação da atividade do professor
  42. var ret = ' { ' + prepareTestCases()
  43. + ',\n"settings_data_types": \n' + JSON.stringify($('form[name="settings_data_types"]').serializeArray())
  44. + ',\n"settings_commands": \n' + JSON.stringify($('form[name="settings_commands"]').serializeArray())
  45. + ',\n"settings_functions": \n' + JSON.stringify($('form[name="settings_functions"]').serializeArray())
  46. + ' } ';
  47. if ($("input[name='include_algo']").is(':checked')) {
  48. ret += '\n::algorithm::\n';
  49. ret += JSON.stringify(window.program_obj, function(key, value) {
  50. if (key == 'dom_object') {
  51. return;
  52. }
  53. return value;
  54. });
  55. }
  56. return ret;
  57. }
  58. }
  59. function prepareTestCases () {
  60. var ret = ' \n "testcases" : [ '
  61. var test_cases_array = $('form[name="test_cases"]').serializeArray();
  62. for (var i = 0; i < test_cases_array.length; i = i + 2) {
  63. ret += '\n{ ';
  64. ret += '\n "input": [';
  65. var inps = test_cases_array[i].value.match(/[^\r\n]+/g);
  66. if (inps) {
  67. for (var j = 0; j < inps.length; j++) {
  68. ret += '"' + inps[j] + '"';
  69. if ((j + 1) < inps.length) {
  70. ret += ', ';
  71. }
  72. }
  73. }
  74. ret += '], \n "output": [';
  75. var outs = test_cases_array[i+1].value.match(/[^\r\n]+/g);
  76. if (outs) {
  77. for (var j = 0; j < outs.length; j++) {
  78. ret += '"' + outs[j] + '"';
  79. if ((j + 1) < outs.length) {
  80. ret += ', ';
  81. }
  82. }
  83. }
  84. ret += ']';
  85. ret += '\n}'
  86. if ((i + 2) < test_cases_array.length) {
  87. ret += ',';
  88. }
  89. }
  90. ret += '\n] ';
  91. return ret;
  92. }
  93. // Função chamada pelo iTarefa para receber a nota do aluno na atividade
  94. // O retorno é um valor entre 0.0 e 1.0
  95. function getEvaluation () {
  96. if (iLMparameters.iLM_PARAM_SendAnswer == 'false') {
  97. // A chamada do método abaixo é obrigatória!
  98. // Observe que a chamada parte do iLM para o iTarefa
  99. //parent.getEvaluationCallback(window.studentGrade);
  100. runCodeAssessment();
  101. }
  102. }
  103. //var testCases = null;
  104. var settingsDataTypes = null;
  105. var settingsCommands = null;
  106. var settingsFunctions = null;
  107. var algorithm_in_ilm = null;
  108. var previousContent = null;
  109. // Função para que o iMA leia os dados da atividade fornecidos pelo iTarefa
  110. function getiLMContent () {
  111. // O parâmetro "iLM_PARAM_Assignment" fornece o URL do endereço que deve ser
  112. // requisitado via AJAX para a captura dos dados da atividade
  113. $.get(iLMparameters.iLM_PARAM_Assignment, function (data) {
  114. //professor invocou a avaliação automática dos exercícios do bloco
  115. if (iLMparameters.iLM_PARAM_TeacherAutoEval != null) {
  116. teacherAutoEval(data);
  117. //não deve exibir nenhuma interface...
  118. return;
  119. } else if (iLMparameters.iLM_PARAM_SendAnswer == 'false') {
  120. // Aluno está trabalhando em alguma atividade:
  121. previousContent = data;
  122. prepareActivityToStudent(data);
  123. } else { // Professor está editando uma atividade:
  124. previousContent = data;
  125. prepareActivityToEdit(data);
  126. }
  127. window.block_render = false;
  128. renderAlgorithm();
  129. });
  130. }
  131. function prepareActivityToEdit (ilm_cont) {
  132. //var content = JSON.parse(ilm_cont.split('\n::algorithm::')[0]);
  133. // Ver arquivo js/util/iassignHelpers.js
  134. var content = ivprogCore.prepareActivityToStudentHelper(ilm_cont);
  135. var testCases = ivprogCore.getTestCases();
  136. settingsDataTypes = content.settingsDataTypes;
  137. settingsCommands = content.settingsCommands;
  138. settingsFunctions = content.settingsFunctions;
  139. for (var i = 0; i < testCases.length; i++) {
  140. addTestCase(testCases[i]);
  141. }
  142. if (content.algorithmInIlm != null) {
  143. algorithm_in_ilm = content.algorithmInIlm;
  144. $("input[name='include_algo']").prop('checked', true);
  145. includePreviousAlgorithm();
  146. renderAlgorithm();
  147. }
  148. }
  149. function parsePreviousAlgorithm () {
  150. window.program_obj.functions = JSON.parse(algorithm_in_ilm).functions;
  151. window.program_obj.globals = JSON.parse(algorithm_in_ilm).globals;
  152. }
  153. function includePreviousAlgorithm () {
  154. parsePreviousAlgorithm();
  155. window.watchW.watch(window.program_obj.globals, function(){
  156. if (window.insertContext) {
  157. setTimeout(function(){ renderAlgorithm(); }, 300);
  158. window.insertContext = false;
  159. } else {
  160. renderAlgorithm();
  161. }
  162. }, 1);
  163. for (var i = 0; i < window.program_obj.functions.length; i ++) {
  164. window.watchW.watch(window.program_obj.functions[i].parameters_list, function(){
  165. if (window.insertContext) {
  166. setTimeout(function(){ renderAlgorithm(); }, 300);
  167. window.insertContext = false;
  168. } else {
  169. renderAlgorithm();
  170. }
  171. }, 1);
  172. window.watchW.watch(window.program_obj.functions[i].variables_list, function(){
  173. if (window.insertContext) {
  174. setTimeout(function(){ renderAlgorithm(); }, 300);
  175. window.insertContext = false;
  176. } else {
  177. renderAlgorithm();
  178. }
  179. }, 1);
  180. if (window.program_obj.functions[i].is_main) {
  181. window.program_obj.functions[i].name = LocalizedStrings.getUI("start");
  182. }
  183. }
  184. window.watchW.watch(window.program_obj.functions, function(){
  185. if (window.insertContext) {
  186. setTimeout(function(){ renderAlgorithm(); }, 300);
  187. window.insertContext = false;
  188. } else {
  189. renderAlgorithm();
  190. }
  191. }, 1);
  192. }
  193. function prepareActivityToStudent (ilm_cont) {
  194. // Ver arquivo js/util/iassignHelpers.js
  195. var content = ivprogCore.prepareActivityToStudentHelper(ilm_cont);
  196. // Casos de testes agora são delegados ao tratamento apropriado pela função acima
  197. // var testCases = content.testcases;
  198. settingsDataTypes = content.settingsDataTypes;
  199. settingsCommands = content.settingsCommands;
  200. settingsFunctions = content.settingsFunctions;
  201. if (content.algorithmInIlm != null) {
  202. algorithm_in_ilm = content.algorithmInIlm;
  203. includePreviousAlgorithm();
  204. }
  205. $('.assessment_button').removeClass('disabled');
  206. renderAlgorithm();
  207. }
  208. // Função para organizar se para criação, visualização ou resolução de atividade
  209. function prepareEnvironment () {
  210. // Se iLM_PARAM_SendAnswer for false, então trata-se de resolução de atividade,
  211. // portanto, a "DIV" de resolução é liberada
  212. if (iLMparameters.iLM_PARAM_SendAnswer == 'false') {
  213. //$('.resolucao').css("display","block");
  214. getiLMContent();
  215. $('.div_to_body').mousemove(function(e) {
  216. trackingMatrix.push(adCoords(e, 0));
  217. });
  218. $('.div_to_body').click(function(e) {
  219. trackingMatrix.push(adCoords(e, 1));
  220. });
  221. } else if (iLMparameters.iLM_PARAM_Assignment) {
  222. // Caso não esteja em modo de resolução de atividade, a visualização no momento
  223. // é para a elaboração de atividade:
  224. //$('.elaboracao').css("display","block");
  225. // Se possuir o parâmetro iLMparameters.iLM_PARAM_Assignment, o professor
  226. // está editando uma atividade:
  227. getiLMContent();
  228. } else {
  229. renderAlgorithm();
  230. }
  231. if ((iLMparameters.iLM_PARAM_AssignmentURL == "true") && (iLMparameters.iLM_PARAM_SendAnswer == "true")) {
  232. prepareActivityCreation();
  233. }
  234. }
  235. function iassingIntegration () {
  236. // Disable by default...
  237. $('.assessment_button').addClass('disabled');
  238. if (inIframe()) {
  239. orderIcons();
  240. orderWidth();
  241. }
  242. prepareEnvironment();
  243. }
  244. // Função para preparar a interface para o professor criar atividade:
  245. function prepareActivityCreation () {
  246. $('.add_accordion').addClass('accordion');
  247. $('.default_visual_title').toggle();
  248. $('.default_visual_title').append('<span>'+LocalizedStrings.getUI('text_teacher_algorithm')+'</span>');
  249. $('.height_100').removeClass('height_100');
  250. $('.main_title').remove();
  251. $('.ui.accordion').addClass('styled');
  252. $('<div class="content_margin"></div>').insertBefore($('.add_accordion').find('.content').find('.div_to_body'));
  253. $('<div class="ui checkbox"><input type="checkbox" name="include_algo" class="include_algo" tabindex="0" class="hidden"><label>'+LocalizedStrings.getUI('text_teacher_algorithm_include')+'</label></div>').insertAfter('.content_margin');
  254. var cases_test_div = $('<div class="ui accordion styled"><div class="active title"><i class="dropdown icon"></i>'+LocalizedStrings.getUI('text_teacher_test_case')+'</div><div class="active content"></div></div>');
  255. cases_test_div.insertBefore('.accordion');
  256. var config_div = $('<div class="ui accordion styled"><div class="title"><i class="dropdown icon"></i>'+LocalizedStrings.getUI('text_teacher_config')+'</div><div class="content"></div></div>');
  257. config_div.insertAfter(cases_test_div);
  258. $('.ui.accordion').accordion();
  259. $('.ui.checkbox').checkbox();
  260. prepareTableSettings(config_div.find('.content'));
  261. prepareTableTestCases(cases_test_div.find('.content'));
  262. if (inIframe()) {
  263. $('.ui.styled.accordion').css('width', '96%');
  264. }
  265. }
  266. function prepareTableTestCases (div_el) {
  267. var table_el = '<form name="test_cases"><table class="ui blue table"><thead><tr><th width="30px">#</th><th>'+LocalizedStrings.getUI('text_teacher_test_case_input')+'</th><th>'+LocalizedStrings.getUI('text_teacher_test_case_output')+'</th><th width="80px">'+LocalizedStrings.getUI('text_teacher_test_case_actions')+'</th></tr></thead>'
  268. + '<tbody class="content_cases"></tbody></table></form>';
  269. div_el.append(table_el);
  270. div_el.append('<button class="ui teal labeled icon button button_add_case"><i class="plus icon"></i>'+LocalizedStrings.getUI('text_teacher_test_case_add')+'</button>');
  271. $('.button_add_case').on('click', function(e) {
  272. addTestCase();
  273. });
  274. }
  275. var hist = false;
  276. function addTestCase (test_case = null) {
  277. var new_row = null;
  278. if (test_case) {
  279. var text_row = '';
  280. text_row += '<tr><td class="counter"></td><td class="expandingArea"><textarea rows="'+test_case.input.length+'" name="input" class="text_area_input">';
  281. for (var i = 0; i < test_case.input.length; i ++) {
  282. text_row += test_case.input[i];
  283. if ((i + 1) < test_case.input.length) {
  284. text_row += '\n';
  285. }
  286. }
  287. text_row += '</textarea></td><td class="expandingArea"><textarea rows="'+test_case.output.length+'" name="output" class="text_area_output">';
  288. for (var i = 0; i < test_case.output.length; i ++) {
  289. text_row += test_case.output[i];
  290. if ((i + 1) < test_case.output.length) {
  291. text_row += '\n';
  292. }
  293. }
  294. text_row += '</textarea></td><td class="btn_actions"><div class="ui button_remove_case"><i class="red icon times large"></i></div></td></tr>';
  295. new_row = $(text_row);
  296. } else {
  297. new_row = $('<tr><td class="counter"></td><td class="expandingArea"><textarea rows="1" name="input" class="text_area_input"></textarea></td><td class="expandingArea"><textarea rows="1" name="output" class="text_area_output"></textarea></td><td class="btn_actions"><div class="ui button_remove_case"><i class="red icon times large"></i></div></td></tr>');
  298. }
  299. $('.content_cases').append(new_row);
  300. new_row.find('.button_remove_case').click(function(e) {
  301. new_row.remove();
  302. updateTestCaseCounter();
  303. });
  304. new_row.find('textarea').on('input', function(e) {
  305. var lines = $(this).val().split('\n').length;
  306. $(this).attr('rows', lines);
  307. });
  308. updateTestCaseCounter();
  309. $('.text_area_output').keydown(function(e) {
  310. var code = e.keyCode || e.which;
  311. if (code == 9 && $(this).closest("tr").is(":last-child")) {
  312. hist = true;
  313. addTestCase();
  314. }
  315. });
  316. if (test_case == null) {
  317. if (!hist) {
  318. $( ".content_cases tr:last" ).find('.text_area_input').focus();
  319. } else {
  320. hist = false;
  321. }
  322. }
  323. }
  324. function updateTestCaseCounter () {
  325. var i = 1;
  326. $( ".content_cases" ).find('tr').each(function() {
  327. $( this ).find('.counter').text(i);
  328. ++i;
  329. });
  330. }
  331. function prepareTableSettings (div_el) {
  332. div_el.append('<h4 class="ui header">'+LocalizedStrings.getUI('text_teacher_data_types')+'</h4>');
  333. div_el.append('<form name="settings_data_types"><div class="ui stackable five column grid">'
  334. +'<div class="column"><div class="ui checkbox"><input type="checkbox" name="integer_data_type" checked tabindex="0" class="hidden small"><label>'+LocalizedStrings.getUI('integer')+'</label></div></div>'
  335. +'<div class="column"><div class="ui checkbox"><input type="checkbox" name="real_data_type" checked tabindex="0" class="hidden small"><label>'+LocalizedStrings.getUI('real')+'</label></div></div>'
  336. +'<div class="column"><div class="ui checkbox"><input type="checkbox" name="text_data_type" checked tabindex="0" class="hidden small"><label>'+LocalizedStrings.getUI('text')+'</label></div></div>'
  337. +'<div class="column"><div class="ui checkbox"><input type="checkbox" name="boolean_data_type" checked tabindex="0" class="hidden small"><label>'+LocalizedStrings.getUI('boolean')+'</label></div></div>'
  338. +'<div class="column"><div class="ui checkbox"><input type="checkbox" name="void_data_type" checked tabindex="0" class="hidden small"><label>'+LocalizedStrings.getUI('void')+'</label></div></div>'
  339. +'</div></form>');
  340. div_el.append('<h4 class="ui header">'+LocalizedStrings.getUI('text_teacher_commands')+'</h4>');
  341. div_el.append('<form name="settings_commands"><div class="ui stackable three column grid">'
  342. +'<div class="column"><div class="ui checkbox"><input type="checkbox" name="commands_read" checked tabindex="0" class="hidden small"><label>'+LocalizedStrings.getUI('text_read_var')+'</label></div></div>'
  343. +'<div class="column"><div class="ui checkbox"><input type="checkbox" name="commands_write" checked tabindex="0" class="hidden small"><label>'+LocalizedStrings.getUI('text_write_var')+'</label></div></div>'
  344. +'<div class="column"><div class="ui checkbox"><input type="checkbox" name="commands_comment" checked tabindex="0" class="hidden small"><label>'+LocalizedStrings.getUI('text_comment')+'</label></div></div>'
  345. +'<div class="column"><div class="ui checkbox"><input type="checkbox" name="commands_attribution" checked tabindex="0" class="hidden small"><label>'+LocalizedStrings.getUI('text_attribution')+'</label></div></div>'
  346. +'<div class="column"><div class="ui checkbox"><input type="checkbox" name="commands_functioncall" checked tabindex="0" class="hidden small"><label>'+LocalizedStrings.getUI('text_functioncall')+'</label></div></div>'
  347. +'<div class="column"><div class="ui checkbox"><input type="checkbox" name="commands_iftrue" checked tabindex="0" class="hidden small"><label>'+LocalizedStrings.getUI('text_iftrue')+'</label></div></div>'
  348. +'<div class="column"><div class="ui checkbox"><input type="checkbox" name="commands_repeatNtimes" checked tabindex="0" class="hidden small"><label>'+LocalizedStrings.getUI('text_repeatNtimes')+'</label></div></div>'
  349. +'<div class="column"><div class="ui checkbox"><input type="checkbox" name="commands_while" checked tabindex="0" class="hidden small"><label>'+LocalizedStrings.getUI('text_whiletrue')+'</label></div></div>'
  350. +'<div class="column"><div class="ui checkbox"><input type="checkbox" name="commands_dowhile" checked tabindex="0" class="hidden small"><label>'+LocalizedStrings.getUI('text_dowhiletrue')+'</label></div></div>'
  351. +'<div class="column"><div class="ui checkbox"><input type="checkbox" name="commands_switch" checked tabindex="0" class="hidden small"><label>'+LocalizedStrings.getUI('text_switch')+'</label></div></div>'
  352. +'</div></form>');
  353. div_el.append('<h4 class="ui header">'+LocalizedStrings.getUI('text_teacher_functions')+'</h4>');
  354. div_el.append('<form name="settings_functions"><div class="ui stackable one column grid">'
  355. +'<div class="column"><div class="ui checkbox"><input type="checkbox" name="functions_creation" checked tabindex="0" class="hidden small"><label>'+LocalizedStrings.getUI('text_teacher_create_functions')+'</label></div></div>'
  356. +'<div class="column"><div class="ui checkbox"><input type="checkbox" name="functions_move" checked tabindex="0" class="hidden small"><label>'+LocalizedStrings.getUI('text_teacher_create_movement_functions')+'</label></div></div>'
  357. +'</div></form>');
  358. $('.ui.checkbox').checkbox();
  359. }
  360. function getTrackingLogs () {
  361. var ret = "";
  362. for (var i = 0; i < trackingMatrix.length; ++i) {
  363. ret += "\n" + trackingMatrix[i][0] + "," + trackingMatrix[i][1] + "," + trackingMatrix[i][2];
  364. if (trackingMatrix[i][3] === 1) {
  365. ret += ',' + trackingMatrix[i][3] + ',"' + trackingMatrix[i][4] + '"';
  366. }
  367. }
  368. return ret;
  369. }
  370. // Tracking mouse movements
  371. var trackingMatrix = [];
  372. function adCoords(e, code){
  373. var x = e.pageX;
  374. var y = e.pageY;
  375. if (code === 1) {
  376. return [new Date().getTime(), x, y, code, e.target.classList['value']];
  377. } else {
  378. return [x, y, code];
  379. }
  380. }
  381. // $( document ).ready(function() {
  382. // if (inIframe()) {
  383. // orderIcons();
  384. // orderWidth();
  385. // }
  386. // renderAlgorithm();
  387. // });
  388. function orderWidth() {
  389. $('.ui.raised.container.segment.div_to_body').css('width', '100%');
  390. $('.ui.one.column.container.segment.ivprog_visual_panel').css('width', '100%');
  391. }
  392. function orderIcons() {
  393. $('.ui.one.column.doubling.stackable.grid.container').css('display', 'none');
  394. $('.only_in_frame').css('display', 'block');
  395. }
  396. function inIframe () {
  397. try {
  398. return window.self !== window.top;
  399. } catch (e) {
  400. return true;
  401. }
  402. }
  403. function full_screen() {
  404. // check if user allows full screen of elements. This can be enabled or disabled in browser config. By default its enabled.
  405. //its also used to check if browser supports full screen api.
  406. if("fullscreenEnabled" in document || "webkitFullscreenEnabled" in document || "mozFullScreenEnabled" in document || "msFullscreenEnabled" in document) {
  407. if(document.fullscreenEnabled || document.webkitFullscreenEnabled || document.mozFullScreenEnabled || document.msFullscreenEnabled) {
  408. var element = document.getElementById("ui_main_div");
  409. //requestFullscreen is used to display an element in full screen mode.
  410. if("requestFullscreen" in element) {
  411. element.requestFullscreen();
  412. }
  413. else if ("webkitRequestFullscreen" in element) {
  414. element.webkitRequestFullscreen();
  415. }
  416. else if ("mozRequestFullScreen" in element) {
  417. element.mozRequestFullScreen();
  418. }
  419. else if ("msRequestFullscreen" in element) {
  420. element.msRequestFullscreen();
  421. }
  422. }
  423. } else {
  424. $('.expand_button').addClass('disabled');
  425. }
  426. }
  427. function teacherAutoEval (data) {
  428. $.get(iLMparameters.iLM_PARAM_TeacherAutoEval, function (originalData) {
  429. // Ver arquivo js/util/iassignHelpers.js
  430. var content = ivprogCore.prepareActivityToStudentHelper(data);
  431. // Casos de testes agora são delegados ao tratamento apropriado pela função acima
  432. // var testCases = content.testcases;
  433. settingsDataTypes = content.settingsDataTypes;
  434. settingsCommands = content.settingsCommands;
  435. settingsFunctions = content.settingsFunctions;
  436. if (content.algorithmInIlm != null) {
  437. algorithm_in_ilm = content.algorithmInIlm;
  438. parsePreviousAlgorithm();
  439. ivprogCore.autoEval(originalData, parent.getEvaluationCallback);
  440. }
  441. });
  442. }