public static Quiz getQuiz(int quizId)
    {
        try {
            String query = String.format("SELECT * FROM QUIZ where quizid = %d", quizId);
        ResultSet rs = getQueryResults(query);
        Quiz q;
        if (rs.next())
        {
            q = new Quiz(rs.getString("QUIZTITLE"), rs.getInt("QUIZID"));
            q.timeLimit = rs.getInt("TimeAllowed");
            q.available = rs.getBoolean("Available");
            q.feedbackAvailable = rs.getBoolean("FeedbackAvailable");
            q.timeOutBehaviour = rs.getInt("TimeOutBehaviour");
            q.showPracticeQuestion = rs.getBoolean("ShowPracticeQuestion");
            q.navigationEnabled = rs.getBoolean("NAVIGATIONENABLED");
            q.randomiseQuestions = rs.getBoolean("RANDOMISEQUESTIONS");
            q.questionList = getQuizQuestions(q.quizDBId);
            return q;
            
        }
            return null;
        }
        catch(SQLException se)
                {
                    return null;
                }
            
        
    }