Example #1
0
        public ActionResult Admin()
        {
            var org = GetMyOrganisation();


            var model = new AssessmentOverviewModel
            {
                Organiser   = org,
                Assessments = Db.Assessments.Where(x => x.Curriculum.Organiser.Id == org.Id).ToList()
            };

            ViewBag.UserRights = GetUserRight();

            return(View(model));
        }
Example #2
0
        // GET: Assessment
        public ActionResult Index(Guid?id)
        {
            if (id == null)
            {
                var all = Db.Assessments.ToList();

                return(View("Overview", all));
            }

            var curr = Db.Curricula.SingleOrDefault(x => x.Id == id);

            var model = new AssessmentOverviewModel
            {
                Curriculum  = curr,
                Assessments = Db.Assessments.Where(x => x.Curriculum.Id == curr.Id).ToList()
            };


            return(View(model));
        }