예제 #1
0
 private String getLock(Role role) {
   if (role.isInstructor()) {
     return SectionAwareness.INSTRUCTOR_MARKER;
   } else if (role.isTeachingAssistant()) {
     return SectionAwareness.TA_MARKER;
   } else if (role.isStudent()) {
     return SectionAwareness.STUDENT_MARKER;
   } else {
     return null;
   }
 }
예제 #2
0
 /** @inheritDoc */
 public List getSiteMembersInRole(final String siteContext, final Role role) {
   if (role.isInstructor()) {
     return getSiteInstructors(siteContext);
   } else if (role.isTeachingAssistant()) {
     return getSiteTeachingAssistants(siteContext);
   } else if (role.isStudent()) {
     return getSiteEnrollments(siteContext);
   } else {
     log.error("Can not get site members in role " + role);
     return new ArrayList();
   }
 }