For Developers

Submitting Grades

This guide will walk you through the process of submitting grades.

There are three suggested ways to submit grades

  1. Authenticate the teacher via Edlink on your platform and allow them to submit grades directly from your platform using their Edlink token.
  2. Use the Edlink User API to submit grades on behalf of the teacher. This requires that you store the teacher's Edlink token ahead of time.
  3. Use the Edlink Graph API to submit grades as the school administrator. This is only reccomended if you are unable to store the teacher's Edlink token ahead of time or as a fallback method.

Some providers will require you to finalize and return a grade. You can read more about this here.

Submit using the User API

First update the grade:

PATCH https://ed.link/api/v2/my/classes/:class_id/assignments/:assignment_id/submissions/:submission_id

In order to update the grade or any metadata on an assignment you must PATCH your updates to this route. It requires you to provide a partial Submission object with any of the following properties you wish to update: grader_id, flags, grade_comment, grade_points, grade, extra_attempts, override_due_date.

axios.patch(`https://ed.link/api/v2/my/classes/${class_id}/assignments/${assignment_id}/submissions/${submission_id}`, {
    data: {
        'grade_points': 95,
        'grade_comment': 'Great job!'
    }
    headers: {
        authorization: `Bearer ${teacher_access_token}`
    }
});

Then finalize the grade:

POST https://ed.link/api/v2/my/classes/:class_id/assignments/:assignment_id/submissions/:submission_id/return

Some providers will require you to finalize and return a grade. You can read more about this here

axios.post(`https://ed.link/api/v2/my/classes/${class_id}/assignments/${assignment_id}/submissions/${submission_id}`, {
    headers: {
        authorization: `Bearer ${teacher_access_token}`
    }
});

Submit using the Graph API

First update the grade:

PATCH https://ed.link/api/v2/graph/classes/:class_id/assignments/:assignment_id/submissions/:submission_id

In order to update the grade or any metadata on an assignment you must PATCH your updates to this route. It requires you to provide a partial Submission object with any of the following properties you wish to update: rubric_grade, grader_id, flags, grade_comment, grade_points, grade, extra_attempts, override_due_date.

axios.patch(`https://ed.link/api/v2/graph/classes/${class_id}/assignments/${assignment_id}/submissions/${submission_id}`, {
    data: {
        'grade_points': 95,
        'grade_comment': 'Great job!'
    }
    headers: {
        authorization: `Bearer ${integration_access_token}`
    }
});

Then finalize the grade:

PATCH https://ed.link/api/v2/graph/classes/:class_id/assignments/:assignment_id/submissions/:submission_id

Some providers will require you to finalize and return a grade. You can read more about this here

axios.patch(`https://ed.link/api/v2/graph/classes/${class_id}/assignments/${assignment_id}/submissions/${submission_id}`, {
    headers: {
        authorization: `Bearer ${teacher_access_token}`
    },
    data: {
        state: 'returned'
    }
});