|
@@ -45,7 +45,8 @@ function getAnswer () {
|
|
|
|
|
|
} else {
|
|
} else {
|
|
// Montar o retorno com a criação da atividade do professor
|
|
// Montar o retorno com a criação da atividade do professor
|
|
- var ret = ' { ' + prepareTestCases()
|
|
|
|
|
|
+ var ret = ' { ' + prepareTestCases()
|
|
|
|
+ + ',\n"settings_programming_type": \n' + JSON.stringify($('form[name="settings_programming_type"]').serializeArray())
|
|
+ ',\n"settings_data_types": \n' + JSON.stringify($('form[name="settings_data_types"]').serializeArray())
|
|
+ ',\n"settings_data_types": \n' + JSON.stringify($('form[name="settings_data_types"]').serializeArray())
|
|
+ ',\n"settings_commands": \n' + JSON.stringify($('form[name="settings_commands"]').serializeArray())
|
|
+ ',\n"settings_commands": \n' + JSON.stringify($('form[name="settings_commands"]').serializeArray())
|
|
+ ',\n"settings_functions": \n' + JSON.stringify($('form[name="settings_functions"]').serializeArray())
|
|
+ ',\n"settings_functions": \n' + JSON.stringify($('form[name="settings_functions"]').serializeArray())
|
|
@@ -114,11 +115,11 @@ function getEvaluation () {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
-//var testCases = null;
|
|
|
|
|
|
+//var testCases = null
|
|
var settingsDataTypes = null;
|
|
var settingsDataTypes = null;
|
|
var settingsCommands = null;
|
|
var settingsCommands = null;
|
|
var settingsFunctions = null;
|
|
var settingsFunctions = null;
|
|
|
|
+var settingsProgrammingTypes = null;
|
|
var algorithm_in_ilm = null;
|
|
var algorithm_in_ilm = null;
|
|
var previousContent = null;
|
|
var previousContent = null;
|
|
|
|
|
|
@@ -152,6 +153,8 @@ function prepareActivityToEdit (ilm_cont) {
|
|
// Ver arquivo js/util/iassignHelpers.js
|
|
// Ver arquivo js/util/iassignHelpers.js
|
|
var content = ivprogCore.prepareActivityToStudentHelper(ilm_cont);
|
|
var content = ivprogCore.prepareActivityToStudentHelper(ilm_cont);
|
|
var testCases = ivprogCore.getTestCases();
|
|
var testCases = ivprogCore.getTestCases();
|
|
|
|
+
|
|
|
|
+ settingsProgrammingTypes = content.settingsProgrammingType;
|
|
settingsDataTypes = content.settingsDataTypes;
|
|
settingsDataTypes = content.settingsDataTypes;
|
|
settingsCommands = content.settingsCommands;
|
|
settingsCommands = content.settingsCommands;
|
|
settingsFunctions = content.settingsFunctions;
|
|
settingsFunctions = content.settingsFunctions;
|
|
@@ -166,6 +169,8 @@ function prepareActivityToEdit (ilm_cont) {
|
|
includePreviousAlgorithm();
|
|
includePreviousAlgorithm();
|
|
renderAlgorithm();
|
|
renderAlgorithm();
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ ivprogTextualOrVisual();
|
|
}
|
|
}
|
|
|
|
|
|
function parsePreviousAlgorithm () {
|
|
function parsePreviousAlgorithm () {
|
|
@@ -224,6 +229,7 @@ function prepareActivityToStudent (ilm_cont) {
|
|
var content = ivprogCore.prepareActivityToStudentHelper(ilm_cont);
|
|
var content = ivprogCore.prepareActivityToStudentHelper(ilm_cont);
|
|
// Casos de testes agora são delegados ao tratamento apropriado pela função acima
|
|
// Casos de testes agora são delegados ao tratamento apropriado pela função acima
|
|
// var testCases = content.testcases;
|
|
// var testCases = content.testcases;
|
|
|
|
+ settingsProgrammingTypes = content.settingsProgrammingType;
|
|
settingsDataTypes = content.settingsDataTypes;
|
|
settingsDataTypes = content.settingsDataTypes;
|
|
settingsCommands = content.settingsCommands;
|
|
settingsCommands = content.settingsCommands;
|
|
settingsFunctions = content.settingsFunctions;
|
|
settingsFunctions = content.settingsFunctions;
|
|
@@ -234,6 +240,8 @@ function prepareActivityToStudent (ilm_cont) {
|
|
}
|
|
}
|
|
$('.assessment_button').removeClass('disabled');
|
|
$('.assessment_button').removeClass('disabled');
|
|
renderAlgorithm();
|
|
renderAlgorithm();
|
|
|
|
+
|
|
|
|
+ ivprogTextualOrVisual();
|
|
}
|
|
}
|
|
|
|
|
|
// Função para organizar se para criação, visualização ou resolução de atividade
|
|
// Função para organizar se para criação, visualização ou resolução de atividade
|
|
@@ -275,6 +283,23 @@ function prepareEnvironment () {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+function ivprogTextualOrVisual () {
|
|
|
|
+ if (settingsProgrammingTypes) {
|
|
|
|
+ if (settingsProgrammingTypes == "textual") {
|
|
|
|
+ $('.ivprog_visual_panel').css('display', 'none');
|
|
|
|
+ $('.ivprog_textual_panel').css('display', 'block');
|
|
|
|
+ $('.ivprog_textual_panel').removeClass('loading');
|
|
|
|
+
|
|
|
|
+ $('.visual_coding_button').removeClass('active');
|
|
|
|
+ $('.textual_coding_button').addClass('active');
|
|
|
|
+ $('.visual_coding_button').addClass('disabled');
|
|
|
|
+ }
|
|
|
|
+ if (settingsProgrammingTypes == "visual") {
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
function iassingIntegration () {
|
|
function iassingIntegration () {
|
|
|
|
|
|
// Disable by default...
|
|
// Disable by default...
|
|
@@ -406,8 +431,15 @@ function updateTestCaseCounter () {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
function prepareTableSettings (div_el) {
|
|
function prepareTableSettings (div_el) {
|
|
|
|
|
|
|
|
+ div_el.append('<h4 class="ui header">'+LocalizedStrings.getUI('text_config_programming')+'</h4>');
|
|
|
|
+ div_el.append('<form name="settings_programming_type"><div class="ui stackable five column grid">'
|
|
|
|
+ +'<div class="column"><div class="ui radio"><input type="radio" name="programming_type" id="programming_textual" value="textual" tabindex="0" class="hidden small"><label for="programming_textual">'+LocalizedStrings.getUI('text_config_programming_textual')+'</label></div></div>'
|
|
|
|
+ +'<div class="column"><div class="ui radio"><input type="radio" name="programming_type" id="programming_visual" value="visual" checked tabindex="0" class="hidden small"><label for="programming_visual">'+LocalizedStrings.getUI('text_config_programming_visual')+'</label></div></div>'
|
|
|
|
+ +'</div></form>');
|
|
|
|
+
|
|
div_el.append('<h4 class="ui header">'+LocalizedStrings.getUI('text_teacher_data_types')+'</h4>');
|
|
div_el.append('<h4 class="ui header">'+LocalizedStrings.getUI('text_teacher_data_types')+'</h4>');
|
|
div_el.append('<form name="settings_data_types"><div class="ui stackable five column grid">'
|
|
div_el.append('<form name="settings_data_types"><div class="ui stackable five column grid">'
|
|
+'<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>'
|
|
+'<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>'
|
|
@@ -526,6 +558,7 @@ function teacherAutoEval (data) {
|
|
var content = ivprogCore.prepareActivityToStudentHelper(data);
|
|
var content = ivprogCore.prepareActivityToStudentHelper(data);
|
|
// Casos de testes agora são delegados ao tratamento apropriado pela função acima
|
|
// Casos de testes agora são delegados ao tratamento apropriado pela função acima
|
|
// var testCases = content.testcases;
|
|
// var testCases = content.testcases;
|
|
|
|
+ settingsProgrammingTypes = content.settingsProgrammingType;
|
|
settingsDataTypes = content.settingsDataTypes;
|
|
settingsDataTypes = content.settingsDataTypes;
|
|
settingsCommands = content.settingsCommands;
|
|
settingsCommands = content.settingsCommands;
|
|
settingsFunctions = content.settingsFunctions;
|
|
settingsFunctions = content.settingsFunctions;
|
|
@@ -535,5 +568,7 @@ function teacherAutoEval (data) {
|
|
parsePreviousAlgorithm();
|
|
parsePreviousAlgorithm();
|
|
ivprogCore.autoEval(originalData, parent.getEvaluationCallback);
|
|
ivprogCore.autoEval(originalData, parent.getEvaluationCallback);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ ivprogTextualOrVisual();
|
|
});
|
|
});
|
|
}
|
|
}
|