Пример #1
0
        /// <summary>
        /// Get all staff from a course
        /// </summary>
        public User.UserList GetStaff(int courseID, IProviderTransaction tran)
        {
            User.UserList staff = new User.UserList();
            User.UserList all   = GetMembers(courseID, tran);

            //Filter out students
            foreach (User cm in all)
            {
                if (GetRole(cm.UserName, courseID, tran).Staff)
                {
                    staff.Add(cm);
                }
            }

            return(staff);
        }
Пример #2
0
        /// <summary>
        /// Returns the users in this section who are already graded
        /// </summary>
        public User.UserList GetStudentsBySubStatus(int sectionID, int asstID, int status)
        {
            Principals prinda = new Principals(Globals.CurrentIdentity);

            User.UserList users   = m_dp.GetSectionMembers(sectionID);
            User.UserList retList = new User.UserList();

            foreach (User user in users)
            {
                Components.Submission sub = prinda.GetLatestSubmission(user.PrincipalID, asstID);
                if (sub != null)
                {
                    if (sub.Status == status)
                    {
                        retList.Add(user);
                    }
                }
            }
            return(retList);
        }