# In Open edX

Follow the steps below to create a new CodeGrade assignment in Open edX:

1. Edit the unit in which you want to add CodeGrade and select **Advanced** from the **Add New Component** section. Select *LTI Consumer*.
2. Select **Edit** in the component that appears. This should open a modal in which you can set up the CodeGrade assignment.
3. Set the **Display Name** to the name of the assignment.
4. The value for **LTI ID** depends on the configuration that your administrator set, however this will probably be `codegrade`.
5. The **LTI URL** is `https://app.codegra.de/api/v1/lti/launch/1` for most CodeGrade instances, if you use a custom CodeGrade URL replace `app` with your custom URL prefix.
6. Now scroll all the way to the bottom and make sure the following options are all set to **True**:&#x20;
   * Scored, this option allows to passback a grade for the assignment&#x20;
   * Request user’s email&#x20;
   * Request user's full name&#x20;
   * Request user’s username
7. Click the save button.

{% hint style="success" %}
Grades are automatically sent back to Open edX after setting [the **assignment state** to **Done** in CodeGrade.](/faq/releasing-grades-and-feedback.md) While the assignment is in the **Done** state, all grades and changes to grades are immediately sent back to Open edX.
{% endhint %}

Now, go ahead and set up the General Settings:

{% content-ref url="/pages/F0zZ1aj7XLlwCqbDZYOz" %}
[General settings](/setup-assignment/build-assignment/general-settings.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.codegrade.com/setup-assignment/build-assignment/creating-an-assignment/in-open-edx.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
