> For the complete documentation index, see [llms.txt](https://docs.annoto.net/troubleshooting/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.annoto.net/troubleshooting/grading.md).

# Grading

## Why do I get a grade passback warning?

If you are getting a warning such as:

<figure><img src="/files/e5y6nE9nF0o9J3sa2bfQ" alt=""><figcaption></figcaption></figure>

This is probably because the activity is in LMS context (type of activity) that does not support grading, such as Canvas LMS Page.

## Why after completing graded activity such as quizzes I get error when accessing it again

{% hint style="info" %}
This applies only for direct LTI integration of Annoto in the LMS
{% endhint %}

After completing a graded activity, on each reload of the activity we check if the grade still not synced to the LMS and if not we attempt to push it to the LMS before showing the activity. If the grading push fails an error is shown in place of the activity.

The most common cases of grade sync to fail are:

### Firewall blocking grade sync attempt

Please check with your IT that requests coming from the following IPs are whitelisted and not blocked:

* EU region:
  * `16.170.96.99`
* US region
  * `54.227.146.98`

If request is blocked, after a timeout you may see an error of `504 Gateway Time-Out error for example:`

<figure><img src="/files/h2SqeMDKnQTHW4XArTmX" alt=""><figcaption></figcaption></figure>

### Misconfigured LMS certificate (missing intermediate certificate)

When we attempt to sync the grade to the LMS the validity of the LMS server certificate is checked to make sure it's safe. It is a similar check every browser does when you are browsing the web.

In case we are not able to validate the certificate, the most common error you will see is `Error: unhandled: unable to verify the first certificate`

<figure><img src="/files/zbuXbmET3ICp2X7rBKvN" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Alternative way to check if the issue you are having is misconfigured LMS certificate is to browse to the LMS site using the Mozilla Firefox Browser, if this is the issue, you will receive a certificate warning that the site is not safe.

{% endhint %}

<figure><img src="/files/gCSjOvZ6zjmkAfhCkwUg" alt=""><figcaption></figcaption></figure>

Each provider has their manual on how to configure the certificate on your servers. For example: <https://support.sectigo.com/articles/Knowledge/Sectigo-Intermediate-Certificates>

## Why are the grades not syncing to the LMS

{% hint style="info" %}
This applies only for direct LTI integration of Annoto in the LMS
{% endhint %}

The most common causes are covered in [#why-after-completing-graded-activity-such-as-quizzes-i-get-error-when-accessing-it-again](#why-after-completing-graded-activity-such-as-quizzes-i-get-error-when-accessing-it-again "mention")

The easiest way to test if this is the cause, after completing a graded activity, please refresh the page and visit it again if you experience one of the mentioned errors, this is the cause.

## Apache blocks grade pass back in Moodle

In many cases Apache may strip (remove) the Authorization header for "security reasons" from the incoming requests.

In this case, the error message can look like this:&#x20;

<figure><img src="/files/pVe06v77AuA7Ies9sDc9" alt=""><figcaption></figcaption></figure>

There are many resources on this available on the internet and official dos (can be .htaccess or one of the apache modules).

\
Moodle is missing the Authorization header, which Annoto sends on each lti outcomes request. Below is a quick way how you can validate that Annoto sends the Authorization header and it is filtered out by Apache on your end.

(or you can skip to suggested solutions below)

### Check if the outcome sync Annoto sends contains the Authorization header

Add to common and combined LogFormat `\"%{Authorization}i\"` so that the Authorization header is printed in the apache access\_log.

Load the assignment page to get the error and check the apache access log.

Look for request made to [https://**\[YOUR DOMAIN\]**/mod/lti/service.php](https://campus.iiep.unesco.org/mod/lti/service.php) and check if Authorization header is present for the request.

### Provide Additional Apache configuration info

Send <contact@annoto.net> the list of installed modules: `apachectl -M`<br>

### Make sure Authorization header is not filtered by Apache

If your have php setup as module (not CGI), make sure you have the below setup under \<directory> for moodle vhost:

```
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
SetEnvIf Content-Type "(.*)" HTTP_CONTENT_TYPE=$1
SetEnvIf Accept "(.*)" HTTP_ACCEPT=$1Copy
```

If you have php setup as CGI:

please make sure to set `CGIPassAuth on`

Additional settings might be needed such as `SetEnvIf Authorization “(.*)” HTTP_AUTHORIZATION=$1`

and adding to rewriterule `E=HTTP_AUTHORIZATION:%{HTTP:Authorization}` and/or`RewriteCond %{HTTP:Authorization} ^(.*)`&#x20;

Please see additional resources for more details.

### Additional resources

Please note, the exact configuration you need depends on if you run php as CGI or module. More info in the attached links:

<https://moodle.org/mod/forum/discuss.php?d=389429&parent=1597517>

<https://stackoverflow.com/questions/40494213/apache-destroying-authorization-header/47031629#47031629>

<https://www.webhostingforbeginners.net/fix-wordpress-rest-api-authentication-in-apache-bitnami/>

<br>

<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.annoto.net/troubleshooting/grading.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
