Skip to content
Snippets Groups Projects
Commit df60830c authored by Christoph Thelen's avatar Christoph Thelen
Browse files

Fixed creating ABCD questions

parent 458f0418
Branches
Tags
No related merge requests found
...@@ -558,7 +558,7 @@ public class CouchDBDao implements IDatabaseDao { ...@@ -558,7 +558,7 @@ public class CouchDBDao implements IDatabaseDao {
q.put("showStatistic", question.isShowStatistic()); q.put("showStatistic", question.isShowStatistic());
q.put("showAnswer", question.isShowAnswer()); q.put("showAnswer", question.isShowAnswer());
try { try {
database.saveDocument(q, null); database.saveDocument(q);
question.set_id(q.getId()); question.set_id(q.getId());
question.set_rev(q.getRev()); question.set_rev(q.getRev());
return question; return question;
......
...@@ -20,9 +20,18 @@ package de.thm.arsnova.entities; ...@@ -20,9 +20,18 @@ package de.thm.arsnova.entities;
public class PossibleAnswer { public class PossibleAnswer {
private String id;
private String text; private String text;
private boolean correct; private boolean correct;
public String getId() {
return this.id;
}
public void setId(String id) {
this.id = id;
}
public String getText() { public String getText() {
return text; return text;
} }
...@@ -41,6 +50,6 @@ public class PossibleAnswer { ...@@ -41,6 +50,6 @@ public class PossibleAnswer {
@Override @Override
public String toString() { public String toString() {
return "PossibleAnswer [text=" + text + ", correct=" + correct + "]"; return "PossibleAnswer [id=" + id + ", text=" + text + ", correct=" + correct + "]";
} }
} }
...@@ -120,11 +120,11 @@ public class Question { ...@@ -120,11 +120,11 @@ public class Question {
public final void setSession(final String session) { public final void setSession(final String session) {
this.sessionId = session; this.sessionId = session;
} }
public final String getSessionKeyword() { public final String getSessionKeyword() {
return this.sessionKeyword; return this.sessionKeyword;
} }
public final void setSessionKeyword(final String keyword) { public final void setSessionKeyword(final String keyword) {
this.sessionKeyword = keyword; this.sessionKeyword = keyword;
} }
...@@ -187,7 +187,6 @@ public class Question { ...@@ -187,7 +187,6 @@ public class Question {
@Override @Override
public final String toString() { public final String toString() {
return "Question type '" + this.type + "': " + this.subject + ";\n" return "Question type '" + this.type + "': " + this.subject + ";\n" + this.text + this.possibleAnswers;
+ this.text + this.possibleAnswers;
} }
} }
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