overhangio / tutor-mfe

This plugin makes it possible to easily add micro frontend (MFE) applications on top of an Open edX platform that runs with Tutor.
GNU Affero General Public License v3.0
22 stars 95 forks source link

feat: Add support for the ORA Grading MFE #89

Closed arbrandes closed 1 year ago

arbrandes commented 2 years ago

The MFE is accessible by instructors in ORA exercises that have explicit staff grading steps.

The corresponding waffle flag is installed and enabled by default.

Depends on:

arbrandes commented 1 year ago

For the record, we need this fix to land before we can merge this.

arbrandes commented 1 year ago

This has also been rebased, but at a reduced priority since we haven't gotten the blocking upstream PR merged, yet.

arbrandes commented 1 year ago

This is now:

vunguyen-dmt commented 1 year ago

Hi @arbrandes, I've tried ORA grading MFE, there was one issue I found, could you check it in this release. In Local deployment, when viewing individual submissions, I noticed that file download URLs were relative paths, because of that it could not be displayed, the url was https://{MFE_HOST}/openassessment/fileupload/submissions_attachments/... instead of https://{LMS_HOST}/openassessment/fileupload/submissions_attachments/... I think the problem could be from this file

  const rendererProps = {
    fileName: file.name,
    url: file.downloadUrl,
    onError: stopLoading,
    onSuccess: () => stopLoading(),
  };

I'm not sure this is an optimal way to fix the problem, but it could be

  const rendererProps = {
    fileName: file.name,
    url: file.downloadUrl && file.downloadUrl.startsWith("/") ? `${baseUrl}${file.downloadUrl}` :  file.downloadUrl,
    onError: stopLoading,
    onSuccess: () => stopLoading(),
  };
vunguyen-dmt commented 1 year ago

This may not affect files uploaded to S3, only files uploaded to local storage I think.

arbrandes commented 1 year ago

@vunguyen-dmt, do you mind opening an issue in https://github.com/openedx/frontend-app-ora-grading describing the problem you observed, including instructions to reproduce? It's not readily apparent - at least to me - that this is a problem with tutor-mfe.

In any case, I don't think that is a blocker to releasing in Palm, so I'm going to go ahead and merge this.