changeset 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 c32b9477cebf
children 4fe7b04dc3fa fba85e745b0e
files interfaces/ape.js
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/interfaces/ape.js	Tue Apr 19 17:43:00 2016 +0200
+++ b/interfaces/ape.js	Tue Apr 19 18:09:30 2016 +0200
@@ -28,7 +28,7 @@
 	    	str = "";
 	    	if (hasBeenPlayed.length > 1) {
 		    	for (var i=0; i<hasBeenPlayed.length; i++) {
-		    		str = str + hasBeenPlayed[i];
+		    		str = str + (hasBeenPlayed[i]+1); // start from 1
 		    		if (i < hasBeenPlayed.length-2){
 		    			str += ", ";
 		    		} else if (i == hasBeenPlayed.length-2) {
@@ -37,7 +37,7 @@
 		    	}
 		    	alert('You have not played fragments ' + str + ' yet. Please listen, rate and comment all samples before submitting.');
 	       } else {
-	       		alert('You have not played fragment ' + hasBeenPlayed[0] + ' yet. Please listen, rate and comment all samples before submitting.');
+	       		alert('You have not played fragment ' + (hasBeenPlayed[0]+1) + ' yet. Please listen, rate and comment all samples before submitting.');
 	       }
 	        return false;
 	    }
@@ -68,15 +68,15 @@
 				}
 				if (interfaceTID.length == 1)
 				{
-					str += 'slider '+interfaceTID[0]+'. ';
+					str += 'slider '+(interfaceTID[0]+1)+'. '; // start from 1
 				}
 				else {
 					str += 'sliders ';
 					for (var k=0; k<interfaceTID.length-1; k++)
 					{
-						str += interfaceTID[k]+', ';
+						str += (interfaceTID[k]+1)+', '; // start from 1
 					}
-					str += interfaceTID[interfaceTID.length-1] +'. ';
+					str += (interfaceTID[interfaceTID.length-1]+1) +'. ';
 				}
 			}
 		}
@@ -105,7 +105,7 @@
 				if (strNums.length > 1) {
 					var str = "";
 			    	for (var i=0; i<strNums.length; i++) {
-			    		str = str + strNums[i];
+			    		str = str + (strNums[i]+1); // start from 1
 			    		if (i < strNums.length-2){
 			    			str += ", ";
 			    		} else if (i == strNums.length-2) {
@@ -114,7 +114,7 @@
 			    	}
 			    	alert('You have not commented on fragments ' + str + ' yet. Please listen, rate and comment all samples before submitting.');
 		       } else {
-		       		alert('You have not commented on fragment ' + strNums[0] + ' yet. Please listen, rate and comment all samples before submitting.');
+		       		alert('You have not commented on fragment ' + (strNums[0]+1) + ' yet. Please listen, rate and comment all samples before submitting.');
 		       }
 			}
 		}