Esempio n. 1
0
 private String convertTestToXML(LectureTestData test) {
   StringBuilder testXML = new StringBuilder();
   for (QuestionData questionData : test.getQuestions()) {
     testXML.append(convertQuestionToXML(questionData));
   }
   return testXML.toString();
 }
Esempio n. 2
0
 public String convertToXML(LectureTestData test) {
   String rez = xmlHeader;
   rez +=
       "\n<"
           + TestElementTypes.TEST.name()
           + " id=\""
           + test.getId()
           + "\" name=\""
           + test.getName()
           + "\" duration=\""
           + test.getDuration()
           + "\" course=\""
           + test.getLectureId()
           + "\">";
   rez += convertTestToXML(test);
   rez += "\n</" + TestElementTypes.TEST.name() + ">";
   return rez;
 }