CORS error in SCORM XBlock

Following up on this Topic, originally created by @Andres.Aulasneo . @Daniel_Litvak and I resolved this problem using a CORS policy of the following form:

[
    {
        "AllowedHeaders": [
            "*"
        ],
        "AllowedMethods": [
            "POST",
            "GET",
            "HEAD",
            "PUT"
        ],
        "AllowedOrigins": [
            "https://discovery.example.com",
            "http://example.com",
            "https://apps.example.com",
            "http://apps.example.com",
            "https://example.com",
            "https://studio.example.com",
            "http://studio.example.com",
            "http://preview.example.com",
            "https://preview.example.com",
            "http://discovery.example.com"
        ],
        "ExposeHeaders": [
            "Access-Control-Allow-Method",
            "Access-Control-Allow-Origin",
            "Access-Control-Allow-Header"
        ],
        "MaxAgeSeconds": 3000
    }
]
2 Likes

Hi @lpm0073, were you able to make a graded scorm? I could insert it but it does not grade.

@Andres.Aulasneo lets catch up offline. i think i can help but i’m not 100% certain and so i don’t want to accidentally lead anyone astray in this thread by leaving incorrect info.

hey @lpm0073 , thanks for following up!

Actually the problem of grading SCORM was not only a CORS issue, but the way it is embedded from an external site like S3. I was able to fix it based on a discussion in Slack by creating a Tutor plugin for SCORM in S3. Just in case someone else comes to this, the readme has more details of the problem and alternatives.

1 Like

i’ll add this to the Cookiecutter default deployment workflow

I took a look at Tutor plugin for SCORM in S3 . It’s similar to an addition we recently made to tutor-contrib-k8s-deploy-tasks/, a project maintained by cookiecutter-openedx that deals with small nuances of this nature when deploying to Kubernetes rather than directly to an Ubuntu instance.

See this patch: openedx-common-settings contributed by @Donato_Bracuto. It’s similar, albeit it handles the very specific case of SCORM storage configuration. It is designed to leverage this custom kubernetes ExternalService and ingress created by Cookiecutter for supporting AWS S3 storage for Xblocks

Would you be interested in contributing your solution to this repo?

1 Like