public CourseRole(AbstractRole copyRole) { this.Anonymized = copyRole.Anonymized; this.CanGrade = copyRole.CanGrade; this.CanModify = copyRole.CanModify; this.CanSeeAll = copyRole.CanSeeAll; this.CanSubmit = copyRole.CanSubmit; this.CanUploadFiles = copyRole.CanUploadFiles; this.ID = copyRole.ID; this.Name = copyRole.Name; }
public string DisplayNameFirstLast(AbstractRole viewerRole) { if (viewerRole.Anonymized) // observer { // will want to change this.ID to this.ID % with course size return("Anonymous " + this.ID); } else { return(this.UserProfile.FirstName + " " + this.UserProfile.LastName); } }
public string DisplayName(AbstractRole viewerRole, string separator = ", ") { // not observer if (viewerRole.Anonymized == false) { return(this.UserProfile.LastName + separator + this.UserProfile.FirstName); } else { // will want to change this.ID to this.ID % with course size return("Anonymous " + this.ID); } }