Example #1
0
        protected void btnCompleteExam_Click(object sender, EventArgs e)
        {
            Label     lblLoggedInUser = this.Master.FindControl("lblLoggedInUser") as Label;
            ClassExam recordAnswers   = new ClassExam();

            recordAnswers.RecordExamAnswers(this, lblLoggedInUser);
        }
        protected void btnSaveAndNext_Click(object sender, EventArgs e)
        {
            if (rbListQuestion13.SelectedIndex == -1)
            {
                Session["btn13Color"] = "btn btn-danger btn-circle";
            }
            else
            {
                Session["btn13Color"] = "btn btn-success btn-circle";
                string    studentId        = Session["loggedInUser"].ToString();
                string    questionId       = hf13.Value;
                int       questionAttempt  = Convert.ToInt32(Session["questionAttempt"]);
                int       providedAnswer   = rbListQuestion13.SelectedIndex + 1;
                int       correctAnswer    = Convert.ToInt32(hfCorrectAns13.Value);
                string    selectedModuleId = Session["selectedModule"].ToString();
                ClassExam record           = new ClassExam();
                record.RecordExamAnswers(studentId, questionId, questionAttempt, providedAnswer, selectedModuleId, correctAnswer);
            }

            Response.Redirect("QuestionPage14.aspx");
        }