def get_grade_book_page(request, course, course_key):
 current_offset = request.GET.get('offset', 0)
 enrolled_students = User.objects.filter(courseenrollment__course_id=course_key, courseenrollment__is_active=1).order_by('username').select_related('profile')
 total_students = enrolled_students.count()
 page = calculate_page_info(current_offset, total_students)
 offset = page['offset']
 total_pages = page['total_pages']
 if (total_pages > 1):
  enrolled_students = enrolled_students[offset:(offset + MAX_STUDENTS_PER_PAGE_GRADE_BOOK)]
 with modulestore().bulk_operations(course.location.course_key):
  student_info = [{'username': student.username, 'id': student.id, 'email': student.email, 'grade_summary': CourseGradeFactory().create(student, course).summary} for student in enrolled_students]
 return (student_info, page)

def get_grade_book_page ( request , course , course_key ) : current_offset = request . GET . get ( 'offset' , 0 ) enrolled_students = User . objects . filter ( courseenrollment__course_id = course_key , courseenrollment__is_active = 1 ) . order_by ( 'username' ) . select_related ( 'profile' ) total_students = enrolled_students . count ( ) page = calculate_page_info ( current_offset , total_students ) offset = page [ 'offset' ] total_pages = page [ 'total_pages' ] if ( total_pages > 1 ) : enrolled_students = enrolled_students [ offset : ( offset + MAX_STUDENTS_PER_PAGE_GRADE_BOOK ) ] with modulestore ( ) . bulk_operations ( course . location . course_key ) : student_info = [ { 'username' : student . username , 'id' : student . id , 'email' : student . email , 'grade_summary' : CourseGradeFactory ( ) . create ( student , course ) . summary } for student in enrolled_students ] return ( student_info , page )
get student records per page along with page information i .