Skip to content

Commit 4f92144

Browse files
committed
iDevice Mapa: Añadido modo de evaluación basaso en el orde de selección de los puntos del mapa
1 parent 72de413 commit 4f92144

File tree

3 files changed

+141
-28
lines changed

3 files changed

+141
-28
lines changed

exe/webui/scripts/idevices/mapa-activity/edition/mapa-activity.js

Lines changed: 52 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ var $exeDevice = {
8383
"msgPlaySeveralTimes": _("You can do this activity as many times as you want"),
8484
"msgClose": _("Close"),
8585
"msgPoints": _("points"),
86+
"msgPointsA": _("Points"),
8687
"msgQuestions": _("Questions"),
8788
"msgAudio": _("Audio"),
8889
"msgAccept": _("Accept"),
@@ -114,10 +115,11 @@ var $exeDevice = {
114115
"msgNumQuestions": _("Number of questions"),
115116
"msgHome": _("Home"),
116117
"msgReturn": _("Return"),
118+
"msgCheck": _("Check"),
117119
"msgUncompletedActivity": _("Actividad no realizada"),
118120
"msgSuccessfulActivity": _("Actividad superada. Puntuación: %s"),
119121
"msgUnsuccessfulActivity": _("Actividad no superada. Puntuación: %s"),
120-
"msgTypeGame": _('Map')
122+
"msgTypeGame": _('Map'),
121123
},
122124
init: function () {
123125
this.ci18n.msgTryAgain = this.ci18n.msgTryAgain.replace("%", "%");
@@ -162,6 +164,7 @@ var $exeDevice = {
162164
msgs.msgEOneSlide = _("There must be at least one slide in the presentation.");
163165
msgs.msgWriteLink = _("Please type or paste a valid URL.");
164166
msgs.msgIDLenght = _('El identificador del informe debe tener al menos 5 caracteres');;
167+
msgs.msgSolutionOrder=_("Indica, separándolos por comas, el orden correcto en el que se deben pulsar los puntos")
165168
},
166169
createForm: function () {
167170
var path = $exeDevice.iDevicePath,
@@ -188,8 +191,13 @@ var $exeDevice = {
188191
<label for="mapaEEvaluationTX">' + _("Test") + '</label>\
189192
<input class="MQE-TypeEvaluation" id="mapaEEvaluationTest" type="radio" name="mpevaluation" value="4" />\
190193
<label for="mapaEEvaluationTest">' + _("Questionnaire") + '</label>\
194+
<input class="MQE-TypeEvaluation" id="mapaEEvaluationOrder" type="radio" name="mpevaluation" value="5" />\
195+
<label for="mapaEEvaluationOrder">' + _("Order") + '</label>\
196+
</p>\
197+
<p class="MQE-EHide" id="mapaSolutionOrderDiv">\
198+
<label for="mapaSolutionOrder">' + _("Solution") + ':</label><input type="text" id="mapaSolutionOrder" />\
191199
</p>\
192-
<p class="MQE-EHide" id="mapaNumOptionsData">\
200+
<p class="MQE-EHide" id="mapaNumOptionsData">\
193201
<label for="mapaNumOptions">' + _("Options Number") + ':</label><input type="number" name="mapaNumOptions" id="mapaNumOptions" value="0" min="0" max="100" />\
194202
</p>\
195203
<p class="MQE-EHide" id="mapaSolutionData">\
@@ -213,6 +221,9 @@ var $exeDevice = {
213221
<p id="mapaEAutoShowDiv">\
214222
<label for="mapaEAutoShow"><input type="checkbox" id="mapaEAutoShow">' + _("Show when the mouse is over the icon or active area") + '. </label>\
215223
</p>\
224+
<p id="mapaEAutoAudioDiv" class="MQE-EHide">\
225+
<label for="mapaEAutoAudio"><input type="checkbox" id="mapaEAutoAudio" checked>' + _("Reproducir el sonido al pasar el ratón sobre los puntos.") + '. </label>\
226+
</p>\
216227
<p>\
217228
<strong class="GameModeLabel"><a href="#mapaEEvaluationHelp" id="mapaEEvaluationHelpLnk" class="GameModeHelpLink" title="' + _("Help") + '"><img src="' + path + 'quextIEHelp.gif" width="16" height="16" alt="' + _("Help") + '"/></a></strong>\
218229
<label for="mapaEEvaluation"><input type="checkbox" id="mapaEEvaluation"> ' + _("Informe de progreso") + '. </label> \
@@ -1552,12 +1563,13 @@ var $exeDevice = {
15521563
percentajeShowQ = parseInt(clear($('#mapaPercentajeShowQ').val())),
15531564
percentajeQuestions = parseInt(clear($('#mapaPercentajeQuestions').val())),
15541565
autoShow = $('#mapaEAutoShow').is(':checked') || false,
1566+
autoAudio = $('#mapaEAutoAudio').is(':checked') || false,
15551567
points = $exeDevice.activeMap.pts,
15561568
optionsNumber = parseInt(clear($('#mapaNumOptions').val())),
15571569
evaluationF = $('#mapaEEvaluation').is(':checked'),
15581570
evaluationIDF = $('#mapaEEvaluationID').val(),
1559-
id = $exeDevice.id ? $exeDevice.id : $exeDevice.generarID();
1560-
1571+
id = $exeDevice.id ? $exeDevice.id : $exeDevice.generarID(),
1572+
order = $('#mapaSolutionOrder').val();
15611573
if (points.length == 0) {
15621574
eXe.app.alert($exeDevice.msgs.msgEOnePoint);
15631575
return false;
@@ -1570,6 +1582,10 @@ var $exeDevice = {
15701582
eXe.app.alert($exeDevice.msgs.msgIDLenght);
15711583
return false;
15721584
}
1585+
if(evaluation == 5 && order && order.length ==0){
1586+
$exeDevice.showMessage($exeDevice.msgs.msgSolutionOrder);
1587+
return false;
1588+
}
15731589
for (var i = 0; i < points.length; i++) {
15741590
var mpoint = points[i];
15751591

@@ -1646,10 +1662,12 @@ var $exeDevice = {
16461662
'percentajeShowQ': percentajeShowQ,
16471663
'percentajeQuestions': percentajeQuestions,
16481664
'autoShow': autoShow,
1665+
'autoAudio': autoAudio,
16491666
'optionsNumber': optionsNumber,
16501667
'evaluationF':evaluationF,
16511668
'evaluationIDF':evaluationIDF,
1652-
'id': id
1669+
'id': id,
1670+
'order':order
16531671
}
16541672
return data;
16551673
},
@@ -2203,7 +2221,7 @@ var $exeDevice = {
22032221
$('#gameQEIdeviceForm').on('click', 'input.MQE-TypeEvaluation', function (e) {
22042222
var type = parseInt($(this).val());
22052223
$('#mapaSolutionData').show();
2206-
$('#mapaNumOptionsData').hide();
2224+
22072225

22082226
if (type == 4) {
22092227
$('#mapaFQuestions').show();
@@ -2218,12 +2236,19 @@ var $exeDevice = {
22182236
$('label[for=mapaEShowSolution]').hide();
22192237
$('#mapaETimeShowSolution').prop("disabled", false);
22202238
}
2239+
$('#mapaSolutionOrderDiv').hide();
2240+
if (type == 5) {
2241+
$('#mapaSolutionOrderDiv').show();
2242+
$("#mapaSolutionData").hide();
2243+
}
2244+
$('#mapaEAutoAudioDiv').hide();
22212245
$('#mapaEAutoShowDiv').hide();
22222246
if (type == 1) {
22232247
$('#mapaNumOptionsData').show();
22242248
}
22252249
if (type == 0 || type == 4) {
22262250
$('#mapaEAutoShowDiv').show();
2251+
$('#mapaEAutoAudioDiv').show();
22272252
}
22282253
if (type == 1 || type == 2 || type == 3) {
22292254
$('#mapaDataIdentifica').show();
@@ -3388,6 +3413,9 @@ var $exeDevice = {
33883413
updateFieldGame: function (game) {
33893414
$exeDevice.activeMap.active = 0;
33903415
$exeDevice.qActive = 0;
3416+
game.order = typeof game.order == "undefined" ? '' : game.order;
3417+
game.autoAudio = typeof game.autoAudio == "undefined" ? true : game.autoAudio;
3418+
game.autoShow = typeof game.autoShow == "undefined" ? false : game.autoShow;
33913419
game.optionsNumber = typeof game.optionsNumber == "undefined" ? 0 : game.optionsNumber;
33923420
game.evaluationF = typeof game.evaluationF != "undefined" ? game.evaluationF : false;
33933421
game.evaluationIDF = typeof game.evaluationIDF != "undefined" ? game.evaluationIDF : '';
@@ -3400,7 +3428,8 @@ var $exeDevice = {
34003428
$('#mapaAuthorImageMap').val(game.authorImage);
34013429
$('#mapaAltImageMap').val(game.altImage);
34023430
$('#mapaEShowSolution').prop('checked', game.showSolution);
3403-
$('#mapaEAutoShow').prop('checked', game.autoShow || false);
3431+
$('#mapaEAutoShow').prop('checked', game.autoShow);
3432+
$('#mapaEAutoAudio').prop('checked', game.autoAudio);
34043433
$('#mapaETimeShowSolution').prop('disabled', !game.showSolution);
34053434
$('#mapaETimeShowSolution').val(game.timeShowSolution);
34063435
$('#mapaPercentajeIdentify').val(game.percentajeIdentify || 100);
@@ -3417,19 +3446,15 @@ var $exeDevice = {
34173446
$('#mapaEvaluationData').hide();
34183447
$('#mapaSolutionData').show();
34193448
$('#mapaNumOptionsData').hide();
3420-
if (game.evaluation == 4) {
3421-
$('#mapaFQuestions').show();
3422-
$('#mapaEvaluationData').show();
3423-
$('#mapaEShowSolution').show();
3424-
$('label[for=mapaEShowSolution]').show();
3425-
$('#mapaETimeShowSolution').prop("disabled", !game.showSolution);
3426-
}
3449+
$('#mapaSolutionOrder').val(game.order);
3450+
$('#mapaEAutoAudioDiv').hide();
34273451
$('#mapaEAutoShowDiv').hide();
34283452
if (game.evaluation == 1) {
34293453
$('#mapaNumOptionsData').show();
34303454
}
34313455
if (game.evaluation == 4 || game.evaluation == 0) {
34323456
$('#mapaEAutoShowDiv').show();
3457+
$('#mapaEAutoAudioDiv').show();
34333458
}
34343459
$('#mapaEvaluationIdentify').hide();
34353460
if (game.evaluation == 2 || game.evaluation == 3) {
@@ -3451,6 +3476,19 @@ var $exeDevice = {
34513476
if (game.evaluation == 0) {
34523477
$('#mapaSolutionData').hide();
34533478
}
3479+
if (game.evaluation == 4) {
3480+
$('#mapaFQuestions').show();
3481+
$('#mapaEvaluationData').show();
3482+
$('#mapaEShowSolution').show();
3483+
$('label[for=mapaEShowSolution]').show();
3484+
$('#mapaETimeShowSolution').prop("disabled", !game.showSolution);
3485+
}
3486+
$('#mapaSolutionOrderDiv').hide();
3487+
if (game.evaluation == 5) {
3488+
$('#mapaSolutionOrderDiv').show();
3489+
$("#mapaSolutionData").hide();
3490+
}
3491+
34543492
$exeDevice.updateQuestionsNumber();
34553493
},
34563494

exe/webui/scripts/idevices/mapa-activity/export/mapa-activity.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
max-width: 1100px;
1919
height: auto;
2020
background-color: transparent;
21+
margin:auto;
2122
}
2223

2324
.MQP-MainContainer * {

0 commit comments

Comments
 (0)