public void getCourseSectionsAPITest() { Course course = proxy.getCourse(1); Section[] sections = this.proxy.getCourseSections(course); Assert.IsNotNull(sections); }
public ActionResult CourseDetail(int courseID) { if (!loggedIn()) { return(RedirectToAction("Index", "Login", new { redirectAction = "CourseList", redirectController = "Course" })); } Course course = proxy.getCourse(courseID); ViewData["Title"] = "Course Detail"; ViewData["Role"] = Session["role"]; return(View(course)); }
private SectionDisplay getSectionData(Section section) { string fName = proxy.getUser(section.InstructorID).FirstName; string lName = proxy.getUser(section.InstructorID).LastName; int buildingNum = proxy.getLocation(section.LocationID).BuildingID; int roomNum = proxy.getLocation(section.LocationID).RoomNumber; SectionDisplay sectionData = new SectionDisplay(); sectionData.sectionID = section.ID; sectionData.instructorName = fName + " " + lName; sectionData.courseName = proxy.getCourse(section.CourseID).Name; sectionData.locationName = "Building " + buildingNum + ", Room " + roomNum; return(sectionData); }
public ActionResult SectionList(int courseID) { ViewData["Title"] = "Sections of " + (proxy.getCourse(courseID)).Name; return(PartialView(proxy.getCourseSections(proxy.getCourse(courseID)))); }