public JSONObject getJSON(JSONObject jo) { Problem p = null; try { p = ProblemMgr.getProblem(getProbId()); } catch (SQLException e) { e.printStackTrace(); // To change body of catch statement use File | Settings | File // Templates. } if (p != null && p.isQuickAuth() && p.isMultiChoice()) { jo.element(letter, val); } return jo; }
/** * Return all the ready problems in the database . Orders them by id. Forwards the request to the * database problem magager. * * @param smgr * @return a List of Problem objects * @throws Exception */ protected List<Problem> getAllProblems(SessionManager smgr) throws Exception { return ProblemMgr.getAllProblems(); // return dbProblemMgr.getAllProblems(smgr.getConnection()); }
public List<Problem> getProblemsInTopic(Connection conn, int probGroupID) throws SQLException { // return dbProblemMgr.getProblemsInTopic(conn,probGroupID); return ProblemMgr.getTopicProblems(probGroupID); }