Beispiel #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     //Authenticate the user
     if (Session["userId"] != null)
     {
         string s = Session["userId"].ToString();
         studentId = Convert.ToInt32(s);
     }
     else
     {
         Response.Redirect("~/Login.aspx");
     }
     if (!IsPostBack)
     {
         lblQuizId.Text = myDecryption(HttpUtility.UrlDecode(Request.QueryString["id"]));
         bool status = proxy1.GetStdudentAttempt(studentId, Convert.ToInt32(lblQuizId.Text));
         professor_Quiz_WCFLib.quizModel qM = proxy.GetQuizById(Convert.ToInt32(lblQuizId.Text));
         weight            = qM.quiz_weightage;
         lblQuizTitle.Text = qM.quiz_title;
         if (status)
         {
             GetQuizData(Convert.ToInt32(lblQuizId.Text));
         }
         else
         {
             lblAlready.Visible = true;
         }
     }
 }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //Authenticate the user
            if (Session["userId"] != null)
            {
                string s = Session["userId"].ToString();
                profId = Convert.ToInt32(s);
            }
            else
            {
                Response.Redirect("~/Login.aspx");
            }
            if (!IsPostBack)
            {
                lblQuizId.Text = myDecryption(HttpUtility.UrlDecode(Request.QueryString["ID"]));
                professor_Quiz_WCFLib.quizModel qModel = proxy.GetQuizById(Convert.ToInt32(lblQuizId.Text));
                if (System.DateTime.Now < qModel.quiz_end_date)
                {
                    GetQuizData(Convert.ToInt32(lblQuizId.Text));


                    lblCurrentQuiz.Text = qModel.quiz_title;
                    txtTitle.Value      = qModel.quiz_title;
                    lblStartDate.Text   = qModel.quiz_date.ToString();
                    lblEndDate.Text     = qModel.quiz_end_date.ToString();
                    if (qModel.isTimeup == 1)
                    {
                        rdbTimeUp.Checked = true;
                    }
                    else
                    {
                        rdbTimeUp1.Checked = false;
                    }
                    moduleId           = qModel.FK_ModuleId;
                    txtLength.Value    = qModel.quiz_length.ToString();
                    txtWeightage.Value = qModel.quiz_weightage.ToString();
                    txtEndDate.Value   = qModel.quiz_end_date.ToString();
                }
                else
                {
                    //btnAddOption.Enabled = false;
                    //btnMultAdd.Enabled = false;
                    //btnMultDelete.Enabled = false;
                    //btnOptionDelete.Enabled = false;
                    //btnSave.Enabled = false;
                    //btnUpdateQuiz.Enabled = false;
                }
            }
            placeHolder();
        }
Beispiel #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //Authenticate the user

            if (Session["userId"] != null)
            {
                string s = Session["userId"].ToString();
                profId = Convert.ToInt32(s);
            }

            else
            {
                Response.Redirect("~/Login.aspx");
            }
            if (!IsPostBack)
            {
                lblQuizId.Text = myDecryption(HttpUtility.UrlDecode(Request.QueryString["ID"]));
                this.GetQuizData(Convert.ToInt32(lblQuizId.Text));
                professor_Quiz_WCFLib.quizModel qM = proxy.GetQuizById(Convert.ToInt32(lblQuizId.Text));
                weight            = qM.quiz_weightage;
                lblQuizTitle.Text = qM.quiz_title;
            }
        }