Skip to content
Snippets Groups Projects
Commit 56d37665 authored by Axel's avatar Axel
Browse files

Stash

parent 2dba2114
No related branches found
No related tags found
No related merge requests found
...@@ -45,25 +45,8 @@ public class QuizView { ...@@ -45,25 +45,8 @@ public class QuizView {
@POST @POST
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/peerRating/project/{projectId}") @Path("/peerRating/project/{projectId}")
public void postPeerRating(String peerRatings, @PathParam("projectId") String projectId) throws IOException { public void postPeerRating(ArrayList<PeerRating> peerRatings, @PathParam("projectId") String projectId) throws IOException {
ArrayList data = peer.postPeerRating(peerRatings, projectId);
new ObjectMapper().readValue(peerRatings, ArrayList.class);
ArrayList<PeerRating> result = new ArrayList<>();
for (Object peer: data){
try{
//todo: What the fuck? =) kA was dieses getField is supposed to do aber ich hätte gern fromPeer, toPeer und workRating aus dem Objekt
Object what = peer.getClass();
Field[] the = ((Class) what).getFields();
Field from = peer.getClass().getField("0");
Field to = peer.getClass().getField("1");
Field workRating = peer.getClass().getField("2");
}catch(Exception e){
return;
}
PeerRating rating = new PeerRating();
}
peer.postPeerRating(result, projectId);
} }
public void answerQuiz(StudentAndQuiz studentAndQuiz, QuizAnswer quizAnswer) { public void answerQuiz(StudentAndQuiz studentAndQuiz, QuizAnswer quizAnswer) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment