Пример #1
0
        public async Task <ActionResult> Index(int courseId)
        {
            ViewBag.stats = await statclient.GetAllStatisticsByAssignment(courseId);

            ViewBag.stats2 = await statclient.GetAllStatisticsByQuestion(courseId);

            var students = await sclient.GetAll(courseId);

            //var AllTemp = new List<StudentApiModel>();

            //var st1 = new StudentApiModel();
            //st1.AUBID = 201804703;
            //st1.email = "*****@*****.**";
            //st1.FirstName = "Ahmad";
            //st1.LastName = "Ali";
            //st1.CourseTitle = "CMPS 253";
            //st1.CourseOfferingID = courseId;
            //st1.Picture = "https://d3gyiijzpk1c44.cloudfront.net/upload/product_photos/base/0/44/127/original1.2916102.1.jpg";


            //var st2 = new StudentApiModel();
            //st2.AUBID = 201804704;
            //st2.email = "*****@*****.**";
            //st2.FirstName = "Ali";
            //st2.LastName = "Ahmad";
            //st2.CourseTitle = "CMPS 253";
            //st2.CourseOfferingID = courseId;
            //st2.Picture = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRAWwHitpUedO7G_p51pYMJG0ozWS612COS-m-E6-ETExnE9EV19Q";

            //AllTemp.Add(st1);
            //AllTemp.Add(st2);

            //var students = AllTemp;
            ViewBag.students = students;
            var randstudent = students.FirstOrDefault();

            ViewBag.CourseTitle   = randstudent.CourseTitle;
            ViewBag.CourseId      = randstudent.CourseOfferingID;
            ViewBag.SemesterTitle = randstudent.SemesterTitle;

            ViewBag.att = await aclient.GetAll(randstudent.CourseOfferingID);

            //   ViewBag.grades = await gclient.GetAll(randstudent.CourseOfferingID); ;
            var CourseClo = await cclient.GetAllCOU(randstudent.CourseOfferingID);

            ViewBag.Clos  = CourseClo;
            ViewBag.Notes = await nclient.GetAll();;
            return(View());
        }
Пример #2
0
        public async Task <ActionResult> Index(int Id)
        {
            var students = await client.GetAll(Id);

            ViewBag.students = students;
            return(View());
        }