def get_scores(course_id, student_id):
try:<EOL><INDENT>score_summaries = ScoreSummary.objects.filter(<EOL>student_item__course_id=course_id,<EOL>student_item__student_id=student_id,<EOL>).select_related('<STR_LIT>', '<STR_LIT>', '<STR_LIT>')<EOL><DEDENT>except DatabaseError:<EOL><INDENT>msg = u"<STR_LIT>".format(<EOL>course_id, student_id<EOL>)<EOL>logger.exception(msg)<EOL>raise SubmissionInternalError(msg)<EOL><DEDENT>scores = {<EOL>summary.student_item.item_id: UnannotatedScoreSerializer(summary.latest).data<EOL>for summary in score_summaries if not summary.latest.is_hidden()<EOL>}<EOL>return scores<EOL>
Return a dict mapping item_ids to scores.

    Scores are represented by serialized Score objects in JSON-like dict
    format.

    This method would be used by an LMS to find all the scores for a given
    student in a given course.

    Scores that are "hidden" (because they have points earned set to zero)
    are excluded from the results.

    Args:
        course_id (str): Course ID, used to do a lookup on the `StudentItem`.
        student_id (str): Student ID, used to do a lookup on the `StudentItem`.

    Returns:
        dict: The keys are `item_id`s (`str`) and the values are tuples of
        `(points_earned, points_possible)`. All points are integer values and
        represent the raw, unweighted scores. Submissions does not have any
        concept of weights. If there are no entries matching the `course_id` or
        `student_id`, we simply return an empty dictionary. This is not
        considered an error because there might be many queries for the progress
        page of a person who has never submitted anything.

    Raises:
        SubmissionInternalError: An unexpected error occurred while resetting scores.