Commit db4713fb authored by Anuththara18's avatar Anuththara18

Splitting the Child ID Column in the csv file

parent 20fbad9b
......@@ -166,7 +166,7 @@ public class AACompleteScreen extends AppCompatActivity {
try {
writer = new CSVWriter(new FileWriter(csv));
String[] entries = {"id","child_id","total_correct_responses","correct_responses","commission_errors","omission_errors","mean_reaction_time","total_duration"};
String[] entries = {"id","child_gender","child_age","total_correct_responses","correct_responses","commission_errors","omission_errors","mean_reaction_time","total_duration"};
writer.writeNext(entries);
List<String[]> data = new ArrayList<String[]>();
......@@ -175,7 +175,8 @@ public class AACompleteScreen extends AppCompatActivity {
Alternating gameData = dataList.get(i);
data.add(new String[]{ String.valueOf(gameData.getId()),
String.valueOf(gameData.getChildID()),
String.valueOf(String.valueOf(gameData.getChildID()).charAt(0)),
String.valueOf(String.valueOf(gameData.getChildID()).charAt(1)),
String.valueOf(gameData.getTotalCorrectResponses()),
String.valueOf(gameData.getNoOfCorrectResponses()),
String.valueOf(gameData.getNoOfCommissionErrors()),
......@@ -255,7 +256,7 @@ public class AACompleteScreen extends AppCompatActivity {
canvas.drawText("Age : " + AgeActivity.age, 150, 250, title);
String gender;
if (GenderActivity.gender == 0) {
if (GenderActivity.gender == 2) {
gender = "Male";
}
else {
......
......@@ -167,7 +167,7 @@ public class DACompleteScreen extends AppCompatActivity {
try {
writer = new CSVWriter(new FileWriter(csv));
String[] entries = {"id","child_id","total_correct_responses","correct_responses","commission_errors","omission_errors","mean_reaction_time","total_duration"};
String[] entries = {"id","child_gender","child_age","total_correct_responses","correct_responses","commission_errors","omission_errors","mean_reaction_time","total_duration"};
writer.writeNext(entries);
List<String[]> data = new ArrayList<String[]>();
......@@ -176,7 +176,8 @@ public class DACompleteScreen extends AppCompatActivity {
Divided gameData = dataList.get(i);
data.add(new String[]{ String.valueOf(gameData.getId()),
String.valueOf(gameData.getChildID()),
String.valueOf(String.valueOf(gameData.getChildID()).charAt(0)),
String.valueOf(String.valueOf(gameData.getChildID()).charAt(1)),
String.valueOf(gameData.getTotalCorrectResponses()),
String.valueOf(gameData.getNoOfCorrectResponses()),
String.valueOf(gameData.getNoOfCommissionErrors()),
......@@ -257,7 +258,7 @@ public class DACompleteScreen extends AppCompatActivity {
canvas.drawText("Age : " + AgeActivity.age, 150, 250, title);
String gender;
if (GenderActivity.gender == 0) {
if (GenderActivity.gender == 2) {
gender = "Male";
}
else {
......
......@@ -167,7 +167,7 @@ public class FACompleteScreen extends AppCompatActivity {
try {
writer = new CSVWriter(new FileWriter(csv));
String[] entries = {"id","child_id","total_correct_responses","correct_responses","commission_errors","omission_errors","mean_reaction_time","total_duration"};
String[] entries = {"id","child_gender","child_age","total_correct_responses","correct_responses","commission_errors","omission_errors","mean_reaction_time","total_duration"};
writer.writeNext(entries);
List<String[]> data = new ArrayList<String[]>();
......@@ -176,7 +176,9 @@ public class FACompleteScreen extends AppCompatActivity {
Focused gameData = dataList.get(i);
data.add(new String[]{ String.valueOf(gameData.getId()),
String.valueOf(gameData.getChildID()),
String.valueOf(String.valueOf(gameData.getChildID()).charAt(0)),
String.valueOf(String.valueOf(gameData.getChildID()).charAt(1)),
String.valueOf(gameData.getTotalCorrectResponses()),
String.valueOf(gameData.getNoOfCorrectResponses()),
String.valueOf(gameData.getNoOfCommissionErrors()),
......@@ -257,7 +259,7 @@ public class FACompleteScreen extends AppCompatActivity {
canvas.drawText("Age : " + AgeActivity.age, 150, 250, title);
String gender;
if (GenderActivity.gender == 0) {
if (GenderActivity.gender == 2) {
gender = "Male";
}
else {
......
......@@ -26,7 +26,7 @@ public class GenderActivity extends AppCompatActivity {
ImageView girl_img, boy_img;
TextView boy_txt, girl_txt, next, previous, selectGender;
public static int gender = 0;
public static int gender = 2;
int click = 1;
......@@ -86,7 +86,7 @@ public class GenderActivity extends AppCompatActivity {
girl_txt.setAlpha(0.5f);
boy_img.setImageAlpha(255);
boy_txt.setAlpha(1f);
gender = 0; // boy
gender = 2; // boy
Log.d("gender", String.valueOf(gender));
}
}
......
......@@ -166,7 +166,7 @@ public class SelectiveACompleteScreen extends AppCompatActivity {
try {
writer = new CSVWriter(new FileWriter(csv));
String[] entries = {"id","child_id","total_correct_responses","correct_responses","commission_errors","omission_errors","mean_reaction_time","total_duration"};
String[] entries = {"id","child_gender","child_age","level","total_correct_responses","correct_responses","commission_errors","omission_errors","mean_reaction_time","total_duration"};
writer.writeNext(entries);
List<String[]> data = new ArrayList<String[]>();
......@@ -175,7 +175,9 @@ public class SelectiveACompleteScreen extends AppCompatActivity {
Selective gameData = dataList.get(i);
data.add(new String[]{ String.valueOf(gameData.getId()),
String.valueOf(gameData.getChildID()),
String.valueOf(String.valueOf(gameData.getChildID()).charAt(0)),
String.valueOf(String.valueOf(gameData.getChildID()).charAt(1)),
String.valueOf(String.valueOf(gameData.getChildID()).charAt(2)),
String.valueOf(gameData.getTotalCorrectResponses()),
String.valueOf(gameData.getNoOfCorrectResponses()),
String.valueOf(gameData.getNoOfCommissionErrors()),
......@@ -222,7 +224,7 @@ public class SelectiveACompleteScreen extends AppCompatActivity {
canvas.drawText("Age : " + AgeActivity.age, 150, 250, title);
String gender;
if (GenderActivity.gender == 0) {
if (GenderActivity.gender == 2) {
gender = "Male";
}
else {
......
......@@ -168,7 +168,7 @@ public class SA1CompleteScreen extends AppCompatActivity {
try {
writer = new CSVWriter(new FileWriter(csv));
String[] entries = {"id","child_id","total_correct_responses","correct_responses","commission_errors","omission_errors","mean_reaction_time","total_duration"};
String[] entries = {"id","child_gender","child_age","total_correct_responses","correct_responses","commission_errors","omission_errors","mean_reaction_time","total_duration"};
writer.writeNext(entries);
List<String[]> data = new ArrayList<String[]>();
......@@ -177,7 +177,8 @@ public class SA1CompleteScreen extends AppCompatActivity {
Sustained gameData = dataList.get(i);
data.add(new String[]{ String.valueOf(gameData.getId()),
String.valueOf(gameData.getChildID()),
String.valueOf(String.valueOf(gameData.getChildID()).charAt(0)),
String.valueOf(String.valueOf(gameData.getChildID()).charAt(1)),
String.valueOf(gameData.getTotalCorrectResponses()),
String.valueOf(gameData.getNoOfCorrectResponses()),
String.valueOf(gameData.getNoOfCommissionErrors()),
......@@ -257,7 +258,7 @@ public class SA1CompleteScreen extends AppCompatActivity {
canvas.drawText("Age : " + AgeActivity.age, 150, 250, title);
String gender;
if (GenderActivity.gender == 0) {
if (GenderActivity.gender == 2) {
gender = "Male";
}
else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment