public Group EditGroup(int groupId, string name) { if (string.IsNullOrEmpty(name)) { throw new ChalkableException("Invalid name param. Name parameter is empty"); } var group = GroupStorage.GetById(groupId); EnsureInGroupModifyPermission(group); group.Name = name; GroupStorage.Update(group); return(group); }
public void UnassignStudentsFromGroup(int groupId, IList <int> studentIds) { DemandStudentIdsParam(studentIds); EnsureInGroupModifyPermission(GroupStorage.GetById(groupId)); StudentGroupStorage.Delete(BuildStudentGroups(groupId, studentIds)); }
public void DeleteGroup(int groupId) { EnsureInGroupModifyPermission(GroupStorage.GetById(groupId)); GroupStorage.Delete(groupId); }