public static int createQuiz(Connection con, String title, String description,int user_id,
			boolean randomized, boolean multiple_pages,
			boolean immediate_feedback, boolean practice_mode) throws SQLException {
		Statement statement = con.createStatement();
		String created_on = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(Calendar.getInstance().getTime());
		PreparedStatement pStmt = con.prepareStatement("INSERT INTO quizzes(title, created_by, created_on, " +
				"description, randomized, multiple_pages, immediate_feedback, " +
		"practice_mode) VALUES (?, ?, ?, ?, ?, ?, ?, ?)");
		pStmt.setString(1, title);
		pStmt.setInt(2, user_id);
		pStmt.setString(3, created_on);
		pStmt.setString(4, description);
		pStmt.setBoolean(5, randomized);
		pStmt.setBoolean(6, multiple_pages);
		pStmt.setBoolean(7, immediate_feedback);
		pStmt.setBoolean(8, practice_mode);
		pStmt.executeUpdate();
		ResultSet rs = statement.executeQuery("SELECT LAST_INSERT_ID()");
		rs.first();

		return rs.getInt("LAST_INSERT_ID()");
	}