private static HashMap<String, Integer> names = new HashMap<>();
- public static final String ASSURER_CHALLANGE_NAME = "Assurer's Challenge";
+ public static final String ASSURER_CHALLENGE_NAME = "Assurer's Challenge";
- public static final int ASSURER_CHALLANGE_ID;
+ public static final int ASSURER_CHALLENGE_ID;
private CATS() {
names.put(res.getString(2), res.getInt(1));
}
}
- ASSURER_CHALLANGE_ID = getID(ASSURER_CHALLANGE_NAME);
+ ASSURER_CHALLENGE_ID = getID(ASSURER_CHALLENGE_NAME);
}
public static synchronized int getID(String name) {
return i;
}
- public static void enterResult(User user, String testType, Date passDate) {
- try (GigiPreparedStatement ps = new GigiPreparedStatement("INSERT INTO `cats_passed` SET `user_id`=?, `variant_id`=?, `pass_date`=?")) {
+ public static void enterResult(User user, String testType, Date passDate, String language, String version) {
+ try (GigiPreparedStatement ps = new GigiPreparedStatement("INSERT INTO `cats_passed` SET `user_id`=?, `variant_id`=?, `pass_date`=?, `language`=?, `version`=?")) {
ps.setInt(1, user.getId());
ps.setInt(2, getID(testType));
ps.setTimestamp(3, new Timestamp(passDate.getTime()));
+ ps.setString(4, language);
+ ps.setString(5, version);
ps.execute();
}
}