@@ -83,6 +83,7 @@ var $exeDevice = {
83
83
"msgPlaySeveralTimes" : _ ( "You can do this activity as many times as you want" ) ,
84
84
"msgClose" : _ ( "Close" ) ,
85
85
"msgPoints" : _ ( "points" ) ,
86
+ "msgPointsA" : _ ( "Points" ) ,
86
87
"msgQuestions" : _ ( "Questions" ) ,
87
88
"msgAudio" : _ ( "Audio" ) ,
88
89
"msgAccept" : _ ( "Accept" ) ,
@@ -114,10 +115,11 @@ var $exeDevice = {
114
115
"msgNumQuestions" : _ ( "Number of questions" ) ,
115
116
"msgHome" : _ ( "Home" ) ,
116
117
"msgReturn" : _ ( "Return" ) ,
118
+ "msgCheck" : _ ( "Check" ) ,
117
119
"msgUncompletedActivity" : _ ( "Actividad no realizada" ) ,
118
120
"msgSuccessfulActivity" : _ ( "Actividad superada. Puntuación: %s" ) ,
119
121
"msgUnsuccessfulActivity" : _ ( "Actividad no superada. Puntuación: %s" ) ,
120
- "msgTypeGame" : _ ( 'Map' )
122
+ "msgTypeGame" : _ ( 'Map' ) ,
121
123
} ,
122
124
init : function ( ) {
123
125
this . ci18n . msgTryAgain = this . ci18n . msgTryAgain . replace ( "%" , "%" ) ;
@@ -162,6 +164,7 @@ var $exeDevice = {
162
164
msgs . msgEOneSlide = _ ( "There must be at least one slide in the presentation." ) ;
163
165
msgs . msgWriteLink = _ ( "Please type or paste a valid URL." ) ;
164
166
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" )
165
168
} ,
166
169
createForm : function ( ) {
167
170
var path = $exeDevice . iDevicePath ,
@@ -188,8 +191,13 @@ var $exeDevice = {
188
191
<label for="mapaEEvaluationTX">' + _ ( "Test" ) + '</label>\
189
192
<input class="MQE-TypeEvaluation" id="mapaEEvaluationTest" type="radio" name="mpevaluation" value="4" />\
190
193
<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" />\
191
199
</p>\
192
- <p class="MQE-EHide" id="mapaNumOptionsData">\
200
+ <p class="MQE-EHide" id="mapaNumOptionsData">\
193
201
<label for="mapaNumOptions">' + _ ( "Options Number" ) + ':</label><input type="number" name="mapaNumOptions" id="mapaNumOptions" value="0" min="0" max="100" />\
194
202
</p>\
195
203
<p class="MQE-EHide" id="mapaSolutionData">\
@@ -213,6 +221,9 @@ var $exeDevice = {
213
221
<p id="mapaEAutoShowDiv">\
214
222
<label for="mapaEAutoShow"><input type="checkbox" id="mapaEAutoShow">' + _ ( "Show when the mouse is over the icon or active area" ) + '. </label>\
215
223
</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>\
216
227
<p>\
217
228
<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>\
218
229
<label for="mapaEEvaluation"><input type="checkbox" id="mapaEEvaluation"> ' + _ ( "Informe de progreso" ) + '. </label> \
@@ -1552,12 +1563,13 @@ var $exeDevice = {
1552
1563
percentajeShowQ = parseInt ( clear ( $ ( '#mapaPercentajeShowQ' ) . val ( ) ) ) ,
1553
1564
percentajeQuestions = parseInt ( clear ( $ ( '#mapaPercentajeQuestions' ) . val ( ) ) ) ,
1554
1565
autoShow = $ ( '#mapaEAutoShow' ) . is ( ':checked' ) || false ,
1566
+ autoAudio = $ ( '#mapaEAutoAudio' ) . is ( ':checked' ) || false ,
1555
1567
points = $exeDevice . activeMap . pts ,
1556
1568
optionsNumber = parseInt ( clear ( $ ( '#mapaNumOptions' ) . val ( ) ) ) ,
1557
1569
evaluationF = $ ( '#mapaEEvaluation' ) . is ( ':checked' ) ,
1558
1570
evaluationIDF = $ ( '#mapaEEvaluationID' ) . val ( ) ,
1559
- id = $exeDevice . id ? $exeDevice . id : $exeDevice . generarID ( ) ;
1560
-
1571
+ id = $exeDevice . id ? $exeDevice . id : $exeDevice . generarID ( ) ,
1572
+ order = $ ( '#mapaSolutionOrder' ) . val ( ) ;
1561
1573
if ( points . length == 0 ) {
1562
1574
eXe . app . alert ( $exeDevice . msgs . msgEOnePoint ) ;
1563
1575
return false ;
@@ -1570,6 +1582,10 @@ var $exeDevice = {
1570
1582
eXe . app . alert ( $exeDevice . msgs . msgIDLenght ) ;
1571
1583
return false ;
1572
1584
}
1585
+ if ( evaluation == 5 && order && order . length == 0 ) {
1586
+ $exeDevice . showMessage ( $exeDevice . msgs . msgSolutionOrder ) ;
1587
+ return false ;
1588
+ }
1573
1589
for ( var i = 0 ; i < points . length ; i ++ ) {
1574
1590
var mpoint = points [ i ] ;
1575
1591
@@ -1646,10 +1662,12 @@ var $exeDevice = {
1646
1662
'percentajeShowQ' : percentajeShowQ ,
1647
1663
'percentajeQuestions' : percentajeQuestions ,
1648
1664
'autoShow' : autoShow ,
1665
+ 'autoAudio' : autoAudio ,
1649
1666
'optionsNumber' : optionsNumber ,
1650
1667
'evaluationF' :evaluationF ,
1651
1668
'evaluationIDF' :evaluationIDF ,
1652
- 'id' : id
1669
+ 'id' : id ,
1670
+ 'order' :order
1653
1671
}
1654
1672
return data ;
1655
1673
} ,
@@ -2203,7 +2221,7 @@ var $exeDevice = {
2203
2221
$ ( '#gameQEIdeviceForm' ) . on ( 'click' , 'input.MQE-TypeEvaluation' , function ( e ) {
2204
2222
var type = parseInt ( $ ( this ) . val ( ) ) ;
2205
2223
$ ( '#mapaSolutionData' ) . show ( ) ;
2206
- $ ( '#mapaNumOptionsData' ) . hide ( ) ;
2224
+
2207
2225
2208
2226
if ( type == 4 ) {
2209
2227
$ ( '#mapaFQuestions' ) . show ( ) ;
@@ -2218,12 +2236,19 @@ var $exeDevice = {
2218
2236
$ ( 'label[for=mapaEShowSolution]' ) . hide ( ) ;
2219
2237
$ ( '#mapaETimeShowSolution' ) . prop ( "disabled" , false ) ;
2220
2238
}
2239
+ $ ( '#mapaSolutionOrderDiv' ) . hide ( ) ;
2240
+ if ( type == 5 ) {
2241
+ $ ( '#mapaSolutionOrderDiv' ) . show ( ) ;
2242
+ $ ( "#mapaSolutionData" ) . hide ( ) ;
2243
+ }
2244
+ $ ( '#mapaEAutoAudioDiv' ) . hide ( ) ;
2221
2245
$ ( '#mapaEAutoShowDiv' ) . hide ( ) ;
2222
2246
if ( type == 1 ) {
2223
2247
$ ( '#mapaNumOptionsData' ) . show ( ) ;
2224
2248
}
2225
2249
if ( type == 0 || type == 4 ) {
2226
2250
$ ( '#mapaEAutoShowDiv' ) . show ( ) ;
2251
+ $ ( '#mapaEAutoAudioDiv' ) . show ( ) ;
2227
2252
}
2228
2253
if ( type == 1 || type == 2 || type == 3 ) {
2229
2254
$ ( '#mapaDataIdentifica' ) . show ( ) ;
@@ -3388,6 +3413,9 @@ var $exeDevice = {
3388
3413
updateFieldGame : function ( game ) {
3389
3414
$exeDevice . activeMap . active = 0 ;
3390
3415
$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 ;
3391
3419
game . optionsNumber = typeof game . optionsNumber == "undefined" ? 0 : game . optionsNumber ;
3392
3420
game . evaluationF = typeof game . evaluationF != "undefined" ? game . evaluationF : false ;
3393
3421
game . evaluationIDF = typeof game . evaluationIDF != "undefined" ? game . evaluationIDF : '' ;
@@ -3400,7 +3428,8 @@ var $exeDevice = {
3400
3428
$ ( '#mapaAuthorImageMap' ) . val ( game . authorImage ) ;
3401
3429
$ ( '#mapaAltImageMap' ) . val ( game . altImage ) ;
3402
3430
$ ( '#mapaEShowSolution' ) . prop ( 'checked' , game . showSolution ) ;
3403
- $ ( '#mapaEAutoShow' ) . prop ( 'checked' , game . autoShow || false ) ;
3431
+ $ ( '#mapaEAutoShow' ) . prop ( 'checked' , game . autoShow ) ;
3432
+ $ ( '#mapaEAutoAudio' ) . prop ( 'checked' , game . autoAudio ) ;
3404
3433
$ ( '#mapaETimeShowSolution' ) . prop ( 'disabled' , ! game . showSolution ) ;
3405
3434
$ ( '#mapaETimeShowSolution' ) . val ( game . timeShowSolution ) ;
3406
3435
$ ( '#mapaPercentajeIdentify' ) . val ( game . percentajeIdentify || 100 ) ;
@@ -3417,19 +3446,15 @@ var $exeDevice = {
3417
3446
$ ( '#mapaEvaluationData' ) . hide ( ) ;
3418
3447
$ ( '#mapaSolutionData' ) . show ( ) ;
3419
3448
$ ( '#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 ( ) ;
3427
3451
$ ( '#mapaEAutoShowDiv' ) . hide ( ) ;
3428
3452
if ( game . evaluation == 1 ) {
3429
3453
$ ( '#mapaNumOptionsData' ) . show ( ) ;
3430
3454
}
3431
3455
if ( game . evaluation == 4 || game . evaluation == 0 ) {
3432
3456
$ ( '#mapaEAutoShowDiv' ) . show ( ) ;
3457
+ $ ( '#mapaEAutoAudioDiv' ) . show ( ) ;
3433
3458
}
3434
3459
$ ( '#mapaEvaluationIdentify' ) . hide ( ) ;
3435
3460
if ( game . evaluation == 2 || game . evaluation == 3 ) {
@@ -3451,6 +3476,19 @@ var $exeDevice = {
3451
3476
if ( game . evaluation == 0 ) {
3452
3477
$ ( '#mapaSolutionData' ) . hide ( ) ;
3453
3478
}
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
+
3454
3492
$exeDevice . updateQuestionsNumber ( ) ;
3455
3493
} ,
3456
3494
0 commit comments