コード例 #1
0
ファイル: assignments.cs プロジェクト: padilhalino/FrontDesk
 /// <summary>
 /// Get auto evals that are to be run during submission
 /// </summary>
 public Evaluation.EvaluationList GetSubmitAutoEvals(int asstID)
 {
     Evaluation.EvaluationList allevals = GetAutoEvals(asstID);
     Evaluation.EvaluationList sevals = new Evaluation.EvaluationList();
     foreach (Evaluation eval in allevals)
         if (eval.RunOnSubmit)
             sevals.Add(eval);
     return sevals;
 }
コード例 #2
0
ファイル: assignments.cs プロジェクト: padilhalino/FrontDesk
 /// <summary>
 /// Get all evaluations for the assignment that are competitive
 /// </summary>
 public Evaluation.EvaluationList GetCompetitions(int asstID)
 {
     Evaluation.EvaluationList evals = GetEvals(asstID);
     Evaluation.EvaluationList comps = new Evaluation.EvaluationList();
     foreach (Evaluation eval in evals)
         if (eval.Competitive)
             comps.Add(eval);
     return comps;
 }
コード例 #3
0
ファイル: assignments.cs プロジェクト: padilhalino/FrontDesk
        /// <summary>
        /// Get all evaluations for the assignment
        /// </summary>
        public Evaluation.EvaluationList GetEvals(int asstID)
        {
            Evaluation.EvaluationList evals = new Evaluation.EvaluationList();
            evals.AddRange(GetAutoEvals(asstID));

            return evals;
        }
コード例 #4
0
ファイル: evaluations.cs プロジェクト: padilhalino/FrontDesk
            public Evaluation.EvaluationList GetBuildOrder()
            {
                //Build graph
                Hashtable graph = new Hashtable();
                Node root = BuildGraph(new Evaluations(m_ident), m_eval, graph);

                //Order
                ArrayList sort = new ArrayList();
                SortGraph(root, graph, sort);

                //Convert
                int i;
                Evaluation.EvaluationList border = new Evaluation.EvaluationList();
                for (i = sort.Count-1; i > 0; i--)
                    border.Add(((Node)sort[i]).Eval);

                return border;
            }