Class CourseStaffService
java.lang.Object
edu.ucsb.cs156.frontiers.services.CourseStaffService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidensureInstructorIsStaff(Course course) Makes sure the instructor of a course is on that course's staff list.
-
Constructor Details
-
CourseStaffService
public CourseStaffService()
-
-
Method Details
-
ensureInstructorIsStaff
Makes sure the instructor of a course is on that course's staff list. If the instructor is already a staff member, nothing happens, so this is safe to call more than once.The staff member's name is taken from the instructor's User record if they have logged in before; otherwise it is left blank. The org status follows the same rule as adding a staff member by hand: JOINCOURSE if the course is linked to a GitHub org, PENDING if not.
- Parameters:
course- the course whose instructor should be on staff
-