public IActionResult StudentsSubjects(string id)
        {
            var model = new StudentStudents();

            model.Students = _courseStudentData.FindAllByCourse(id);
            model.CourseID = id;
            model.Mod      = new List <StudentStudentsMod>();
            model.Mod.Add(new StudentStudentsMod("Passed", "0"));
            model.Mod.Add(new StudentStudentsMod("All students", "1"));
            model.Mod.Add(new StudentStudentsMod("Failed", "2"));

            model.Course = _courseData.Find(id);
            return(View(model));
        }
        public IActionResult Add(string courseID, string activityTypeID, string professorID, string studentID)
        {
            ActivityAdd model = new ActivityAdd();

            model.ActivityTypeID = activityTypeID;
            model.CourseID       = courseID;
            model.StudentID      = studentID;
            model.ProfessorID    = professorID;
            model.Professors     = _professorData.FindAll();
            if (studentID == null || studentID == "null")
            {
                model.Courses = _courseData.FindAll();
            }
            else
            {
                model.Courses = CoursesForCB(studentID);
            }
            if (courseID != "undefined")
            {
                model.ActivityTypes = _courseData.Find(courseID).ActivityTypes;
            }
            else
            {
                model.ActivityTypes = _activityTypeData.FindAll();
            }
            if (courseID == null || courseID == "null")
            {
                model.Students = _studentData.FindAll();
            }
            else
            {
                model.Students = StudentsForCB(courseID);
            }
            return(View(model));
        }
Exemple #3
0
        public IActionResult ShowCourse(string id)
        {
            Course course = _courseData.Find(id);

            return(View(course));
        }