diff --git a/app/src/main/java/edu/uco/schambers/classmate/Fragments/TeacherQuestion.java b/app/src/main/java/edu/uco/schambers/classmate/Fragments/TeacherQuestion.java index fb36c0a..2f74532 100644 --- a/app/src/main/java/edu/uco/schambers/classmate/Fragments/TeacherQuestion.java +++ b/app/src/main/java/edu/uco/schambers/classmate/Fragments/TeacherQuestion.java @@ -134,13 +134,19 @@ private void callTime() { getActivity().startService(intent); + ArrayList answerList = new ArrayList<>(); + + //SHOULD BE COMPILING THE LIST OF ANSWERED QUESTIONS for (IQuestion q : TeacherQuestionService.answerList) { - adapter.add("Student answered: " + q.getAnswer()); + // adapter.add("Student answered: " + q.getAnswer()); //For displaying on this fragment + answerList.add(q); //Portion for sending } + Bundle bundle = new Bundle(); - bundle.putSerializable("inputList", getMockData()); // replace getMockData() with TeacherQuestionService.answerlist + bundle.putSerializable("inputList", answerList); + //bundle.putSerializable("inputList", getMockData()); // replace getMockData() with TeacherQuestionService.answerlist Fragment newFragment = new TeacherQuestionResults(); newFragment.setArguments(bundle); FragmentTransaction transaction = getFragmentManager().beginTransaction(); @@ -191,6 +197,7 @@ private ArrayList getMockData() { mockQuestion.answerQuestion(mockQuestion.getQuestionChoices().get(4)); inputList.add(mockQuestion); } + return inputList; }