Beispiel #1
0
 private void ucRubric_RubricSelect(object sender, RubricViewSelectEventArgs e)
 {
     Rubric rub = e.SelectedRubric;
     if (rub.EvalID >= 0) {
         Evaluation eval = new Evaluations(Globals.CurrentIdentity).GetInfo(rub.EvalID);
         if (eval.ResultType == Result.AUTO_TYPE)
             BindAuto(rub);
         else if (eval.ResultType == Result.SUBJ_TYPE)
             BindSubj(rub);
     }
     else if (!new Rubrics(Globals.CurrentIdentity).IsHeading(rub))
         BindSubj(rub);
     else {
         if (!IsStudent())
             mpViews.SelectedIndex = 4;
         else
             mpViews.SelectedIndex = 1;
     }
 }
Beispiel #2
0
        private void ucRubric_RubricSelect(object sender, RubricViewSelectEventArgs args)
        {
            Rubrics rubda = new Rubrics(Globals.CurrentIdentity);
            Rubric rub = args.SelectedRubric;

            ddlType.Items.Clear();
            ddlComments.Items.Clear();
            txtLines.Text = ""; txtCustom.Text = ""; txtPoints.Text = "";
            if (rubda.IsHeading(rub))
                cmdCreate.Enabled = false;
            else {
                CannedResponse.CannedResponseList cans = rubda.GetCannedResponses(rub.ID);
                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());
                    ddlComments.Items.Add(item);
                }
                ddlComments.Items.Add(new ListItem("Custom", "-1"));
                cmdCreate.Enabled = true;

                ddlType.Items.Add(new ListItem("Error", Rubric.ERROR.ToString()));
                ddlType.Items.Add(new ListItem("Warning", Rubric.WARNING.ToString()));
                ddlType.Items.Add(new ListItem("Good", Rubric.GOOD.ToString()));
            }

            BindData(GetWindow());
        }