Exemplo n.º 1
0
        private void BindAuto(Rubric rub)
        {
            Rubrics rubda = new Rubrics(Globals.CurrentIdentity);

            Result.ResultList ress = rubda.GetResults(rub.ID, GetSubID());

            lblEvalID.Text = rub.EvalID.ToString();
            if (ress.Count == 0)
            {
                if (!IsStudent())
                {
                    mpViews.SelectedIndex = 2;
                }
                else
                {
                    mpViews.SelectedIndex = 5;
                }
            }
            else
            {
                AutoResult res = ress[0] as AutoResult;

                XmlWizard xmlwiz = new XmlWizard();
                xmlwiz.DisplayDivXslt(res.XmlResult, Path.Combine(Globals.WWWDirectory, "Xml/reshtml.xslt"), divAuto);

                mpViews.SelectedIndex = 3;
            }
        }
Exemplo n.º 2
0
        private void BindSubj(Rubric rub)
        {
            Rubrics rubda = new Rubrics(Globals.CurrentIdentity);

            Result.ResultList ress = rubda.GetResults(rub.ID, GetSubID());

            //Update the rubric
            ucRubric.UpdateRubric();

            //Reset to 0 if page index greater than numpages
            if (dgResults.CurrentPageIndex >= dgResults.PageCount)
            {
                dgResults.CurrentPageIndex = 0;
            }

            dgResults.DataSource = ress;
            dgResults.DataBind();

            if (!IsStudent())
            {
                ddlCanned.Visible            = true;
                lnkCreate.Visible            = true;
                dgResults.Columns[0].Visible = true;
                dgResults.Columns[6].Visible = true;

                dgResults.Style["TOP"] = "58px";

                CannedResponse.CannedResponseList cans = rubda.GetCannedResponses(rub.ID);
                ddlCanned.Items.Clear();

                foreach (CannedResponse can in cans)
                {
                    string canstr = can.Comment.Substring(0, Math.Min(80, can.Comment.Length));
                    if (canstr.Length == 80)
                    {
                        canstr += " ...";
                    }
                    ListItem item = new ListItem(canstr, can.ID.ToString());

                    ddlCanned.Items.Add(item);
                }
                ddlCanned.Items.Add(new ListItem("Custom", "-1"));
            }
            else
            {
                ddlCanned.Visible            = false;
                lnkCreate.Visible            = false;
                dgResults.Columns[0].Visible = false;
                dgResults.Columns[6].Visible = false;

                lnkRefresh.Style["TOP"] = "0px";
                imgRefresh.Style["TOP"] = "0px";
                dgResults.Style["TOP"]  = "20px";
            }

            lblRubID.Text         = rub.ID.ToString();
            mpViews.SelectedIndex = 0;
        }
Exemplo n.º 3
0
        private string GetRubricPoints(Rubric rub, int subID)
        {
            Rubrics rubda = new Rubrics(Globals.CurrentIdentity);

            Result.ResultList ress = rubda.GetResults(rub.ID, subID);
            if (ress.Count == 0 && rub.EvalID >= 0)
            {
                return("??");
            }
            else
            {
                return(rubda.GetPoints(rub.ID, subID).ToString());
            }
        }