Example #1
0
        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);
        }
Example #2
0
 public void UnassignStudentsFromGroup(int groupId, IList <int> studentIds)
 {
     DemandStudentIdsParam(studentIds);
     EnsureInGroupModifyPermission(GroupStorage.GetById(groupId));
     StudentGroupStorage.Delete(BuildStudentGroups(groupId, studentIds));
 }
Example #3
0
 public void DeleteGroup(int groupId)
 {
     EnsureInGroupModifyPermission(GroupStorage.GetById(groupId));
     GroupStorage.Delete(groupId);
 }