<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_course_current_grades(self, course_id):
 """ Returns a CurrentGradesByCourse object for all users in the specified course. Args: course_id (str):
 an edX course ids. Returns: CurrentGradesByCourse: object representing the student current grades Authorization: The authenticated user must have staff permissions to see grades for all users in a course. """

        resp = self.requester.get(
            urljoin(
                self.base_url,
                '/api/grades/v1/courses/{course_key}/'.format(course_key=course_id)
            )
        )
        resp.raise_for_status()
        resp_json = resp.json()
        if 'results' in resp_json:
            grade_entries = [CurrentGrade(entry) for entry in resp_json["results"]]
            while resp_json['next'] is not None:
                resp = self.requester.get(resp_json['next'])
                resp.raise_for_status()
                resp_json = resp.json()
                grade_entries.extend((CurrentGrade(entry) for entry in resp_json["results"]))
        else:
            grade_entries = [CurrentGrade(entry) for entry in resp_json]

        return CurrentGradesByCourse(grade_entries)