Ejemplo n.º 1
0
        public EditModel(WumpWeb.Models.ScoreContext context)
        {
            _context = context;
            string fileContent;

            using (var reader = System.IO.File.OpenText("scoring_rubric.json")) {
                fileContent = reader.ReadToEnd();
            }
            var config = JObject.Parse(fileContent);

            foreach (var item in config["judges"])
            {
                judges.Add(item["name"].ToString());
            }
            foreach (var item in config["teams"])
            {
                teams.Add(item["name"].ToString());
            }
            foreach (var item in config["judging_criteria"])
            {
                var qna = new QuestionAndAnswers(item);
                if (!category_qna.ContainsKey(qna.question.category))
                {
                    category_qna.Add(qna.question.category, new List <QuestionAndAnswers>());
                }
                category_qna[qna.question.category].Add(qna);
            }
        }
Ejemplo n.º 2
0
 public DetailsModel(WumpWeb.Models.ScoreContext context)
 {
     _context = context;
 }
Ejemplo n.º 3
0
 public IndexModel(WumpWeb.Models.ScoreContext context)
 {
     _context = context;
 }
Ejemplo n.º 4
0
 public DeleteModel(WumpWeb.Models.ScoreContext context)
 {
     _context = context;
 }
Ejemplo n.º 5
0
 public CreateModel(WumpWeb.Models.ScoreContext context)
 {
     _context = context;
 }