Mercurial > hg > webaudioevaluationtool
comparison interfaces/ape.js @ 2255:2424a77a7c56
Really fixed #22 now (for ape.js)
author | Brecht De Man <b.deman@qmul.ac.uk> |
---|---|
date | Tue, 19 Apr 2016 18:09:30 +0200 |
parents | ffe3ef69b8e6 |
children | 29e754aca00f |
comparison
equal
deleted
inserted
replaced
2254:c32b9477cebf | 2255:2424a77a7c56 |
---|---|
26 if (hasBeenPlayed.length > 0) // if a fragment has not been played yet | 26 if (hasBeenPlayed.length > 0) // if a fragment has not been played yet |
27 { | 27 { |
28 str = ""; | 28 str = ""; |
29 if (hasBeenPlayed.length > 1) { | 29 if (hasBeenPlayed.length > 1) { |
30 for (var i=0; i<hasBeenPlayed.length; i++) { | 30 for (var i=0; i<hasBeenPlayed.length; i++) { |
31 str = str + hasBeenPlayed[i]; | 31 str = str + (hasBeenPlayed[i]+1); // start from 1 |
32 if (i < hasBeenPlayed.length-2){ | 32 if (i < hasBeenPlayed.length-2){ |
33 str += ", "; | 33 str += ", "; |
34 } else if (i == hasBeenPlayed.length-2) { | 34 } else if (i == hasBeenPlayed.length-2) { |
35 str += " or "; | 35 str += " or "; |
36 } | 36 } |
37 } | 37 } |
38 alert('You have not played fragments ' + str + ' yet. Please listen, rate and comment all samples before submitting.'); | 38 alert('You have not played fragments ' + str + ' yet. Please listen, rate and comment all samples before submitting.'); |
39 } else { | 39 } else { |
40 alert('You have not played fragment ' + hasBeenPlayed[0] + ' yet. Please listen, rate and comment all samples before submitting.'); | 40 alert('You have not played fragment ' + (hasBeenPlayed[0]+1) + ' yet. Please listen, rate and comment all samples before submitting.'); |
41 } | 41 } |
42 return false; | 42 return false; |
43 } | 43 } |
44 return true; | 44 return true; |
45 }; | 45 }; |
66 } else { | 66 } else { |
67 str += 'On axis "'+interfaceName+'" you must move '; | 67 str += 'On axis "'+interfaceName+'" you must move '; |
68 } | 68 } |
69 if (interfaceTID.length == 1) | 69 if (interfaceTID.length == 1) |
70 { | 70 { |
71 str += 'slider '+interfaceTID[0]+'. '; | 71 str += 'slider '+(interfaceTID[0]+1)+'. '; // start from 1 |
72 } | 72 } |
73 else { | 73 else { |
74 str += 'sliders '; | 74 str += 'sliders '; |
75 for (var k=0; k<interfaceTID.length-1; k++) | 75 for (var k=0; k<interfaceTID.length-1; k++) |
76 { | 76 { |
77 str += interfaceTID[k]+', '; | 77 str += (interfaceTID[k]+1)+', '; // start from 1 |
78 } | 78 } |
79 str += interfaceTID[interfaceTID.length-1] +'. '; | 79 str += (interfaceTID[interfaceTID.length-1]+1) +'. '; |
80 } | 80 } |
81 } | 81 } |
82 } | 82 } |
83 if (state != true) | 83 if (state != true) |
84 { | 84 { |
103 } | 103 } |
104 if (state == false) { | 104 if (state == false) { |
105 if (strNums.length > 1) { | 105 if (strNums.length > 1) { |
106 var str = ""; | 106 var str = ""; |
107 for (var i=0; i<strNums.length; i++) { | 107 for (var i=0; i<strNums.length; i++) { |
108 str = str + strNums[i]; | 108 str = str + (strNums[i]+1); // start from 1 |
109 if (i < strNums.length-2){ | 109 if (i < strNums.length-2){ |
110 str += ", "; | 110 str += ", "; |
111 } else if (i == strNums.length-2) { | 111 } else if (i == strNums.length-2) { |
112 str += " or "; | 112 str += " or "; |
113 } | 113 } |
114 } | 114 } |
115 alert('You have not commented on fragments ' + str + ' yet. Please listen, rate and comment all samples before submitting.'); | 115 alert('You have not commented on fragments ' + str + ' yet. Please listen, rate and comment all samples before submitting.'); |
116 } else { | 116 } else { |
117 alert('You have not commented on fragment ' + strNums[0] + ' yet. Please listen, rate and comment all samples before submitting.'); | 117 alert('You have not commented on fragment ' + (strNums[0]+1) + ' yet. Please listen, rate and comment all samples before submitting.'); |
118 } | 118 } |
119 } | 119 } |
120 } | 120 } |
121 return state; | 121 return state; |
122 }; | 122 }; |