Beispiel #1
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;
        }
Beispiel #2
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;
        }
 public static User.UserList GetFeedbackUsers(string userstr)
 {
     string [] spids = userstr.Split("|".ToCharArray());
     Users userda = new Users(Globals.CurrentIdentity);
     User.UserList users = new User.UserList();
     foreach (string spid in spids)
         if (spid.Length > 0)
             users.Add(userda.GetInfo(spid, null));
     return users;
 }