Example #1
0
 private void setContents(Quiz quiz) {
   removeAllContent();
   titleTxt.setText(quiz.getTitle());
   authorTxt.setText(quiz.getAuthor());
   for (Question question : quiz.getQuestionList()) {
     addQuestion(question);
   }
 }
Example #2
0
 public String getJSONFromContents() {
   Quiz quiz = getQuizFromContents();
   StringBuilder stringBuilder = new StringBuilder();
   quiz.encodeAsJSONItem().appendJSON(stringBuilder);
   return stringBuilder.toString();
 }