Examples of QuestionaryResult


Examples of org.webcamp.results.dto.QuestionaryResult

      PreparedStatement ps = conn.prepareStatement("select id, date, questionary_name, user_id, result from results where user_id=?");
      ps.setInt(1, userId);
      ResultSet rs = ps.executeQuery();
      while (rs.next()) {
        QuestionaryResult qr = new QuestionaryResult();
        qr.setDate(rs.getDate("date"));
        qr.setQuestionaryName(rs.getString("questionary_name"));
        qr.setResult(rs.getString("result"));
        qr.setId(rs.getInt("id"));
        qr.setUserId(rs.getInt("user_id"));
        res.add(qr);
      }
      System.out.println("All users were loaded");
      return res;
    } catch (SQLException e) {
View Full Code Here

Examples of org.webcamp.results.dto.QuestionaryResult

      PercentileScore ps = new PercentileScore();
      Score score = ps.evaluate(progress.getQuestionary(), progress.getAnswers());

      User user = (User) session.getAttribute("user");
      QuestionaryResult result = new QuestionaryResult();
      result.setUserId(user.getId());
      result.setDate(new Date());
      result.setQuestionaryName(progress.getQuestionary().getName());
      result.setResult(score.getValue());
      resultsService.addResult(result);

      return new ModelAndView("results", "score", score);
    } else {
      progress.setCurrentQuestionIndex(progress.getCurrentQuestionIndex() + 1);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.