Skip to content

Commit

Permalink
Merge pull request #116 from colegarien/ca_teacher-question-to-view-r…
Browse files Browse the repository at this point in the history
…esults

Add Wiring to TeacherQuestionResults
  • Loading branch information
symbyte committed Nov 10, 2015
2 parents 1e9690e + e7a7c73 commit d172b1a
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,19 @@ private void callTime() {

getActivity().startService(intent);

ArrayList<IQuestion> 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();
Expand Down Expand Up @@ -191,6 +197,7 @@ private ArrayList<IQuestion> getMockData() {
mockQuestion.answerQuestion(mockQuestion.getQuestionChoices().get(4));
inputList.add(mockQuestion);
}

return inputList;
}

Expand Down

0 comments on commit d172b1a

Please sign in to comment.