Esempio n. 1
0
        public async Task <IHttpActionResult> GetTeachersStudents(TeacherStudentsRequestModel request)
        {
            // Get the teacherUSI from the security principal.
            var teacher = SecurityPrincipal.Current;

            if (request.StaffUsi == 0)
            {
                request.StaffUsi = teacher.PersonUSI;
            }

            var model = await _teachersService.GetStudentsInSection(request.StaffUsi, request, teacher.PersonUniqueId, teacher.PersonTypeId);

            if (model == null)
            {
                return(NotFound());
            }

            return(Ok(model));
        }