//find which question to ask without a count private Question getNextQuestion(string studentEvaluationId) { //how many answers have been submitted to studentevalutaion? StudentEvalution_Processor studentEvalProc = new StudentEvalution_Processor(); Answer_Processor ap = new Answer_Processor(); QuestionNumber = ap.GetNumberOfQuestionsAnswered(studentEvaluationId); //get the next question Question_Processor qp = new Question_Processor(); return qp.GetQuesitonByNumber(EvaluationId, QuestionNumber + 1); }
private void Evaluate() { StudentEvalution_Processor sep = new StudentEvalution_Processor(); StudentEvaluation se = (StudentEvaluation)Session["studentEvaluation"]; //Get Evaluation for User StudentEvaluationId = se.Id; Evaluation_Processor ep = new Evaluation_Processor(); Question q = getNextQuestion(StudentEvaluationId); //Set EvaluationView variables lblTitle.Text = ep.getEvaluationTitle(EvaluationId); lblQuestion.Text = q.QuestionString; }
private void StartEvaluation() { StudentEvalution_Processor sep = new StudentEvalution_Processor(); StudentEvaluation se = sep.GetNewStudentEvaluation(EvaluationId, UserId); //Get Evaluation for User Question_Processor qp = new Question_Processor(); Session.Add("NumberOfQuestions", qp.getNumberOfQuestions(EvaluationId)); Session.Add("studentEvaluation", se); }