             # return student with given id if a string; otherwise, just return student (the input)
             if typeof(student)=='string' then @state.students?.get(student) else student
 
+        get_grade: (assignment, student) =>
+            return @get_assignment(assignment)?.get('grades')?.get(@get_student(student)?.get('student_id'))
+
         get_assignments: => @state.assignments
 
         get_sorted_assignments: =>

                last_assignment    : assignment.get('last_assignment')?.get(student_id)?.toJS()   # important to be undefined if no info -- assumed in code
                last_collect       : assignment.get('last_collect')?.get(student_id)?.toJS()
                last_return_graded : assignment.get('last_return_graded')?.get(student_id)?.toJS()
                grade              : assignment.get('grades')?.get(student_id)
                student_id         : student_id
                assignment_id      : assignment.get('assignment_id')
            return info

            @_update
                set   : {deleted: false}
                where : {assignment_id: assignment.get('assignment_id'), table: 'assignments'}

        set_grade: (assignment, student, grade) =>
            assignment = store.get_assignment(assignment)
            student    = store.get_student(student)
            where      = {table:'assignments', assignment_id:assignment.get('assignment_id')}
            grades     = syncdb.select_one(where:where).grades ? {}
            grades[student.get('student_id')] = grade
            @_update(set:{grades:grades}, where:where)

        # Copy the files for the given assignment_id from the given student to the
        # corresponding collection folder.
