Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace File References #949

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open

Conversation

taheralfayad
Copy link
Contributor

Presently, whenever a user attempts to replace a file using the file replacement modal, it only allows them to upload the new file to the files section and delete the previous version. However, the application does not account for references where the previous file may be used (assignments, pages, modules, etc...), and so the user ends up with a few broken links on their hands. This PR seeks to address this issue. The code in this pull request will replace all instances of the previous file in assignments, modules, wiki pages, syllabus, quizzes, and individual quiz questions, with the the new file. It also removes the deleting functionality to maintain links that the CanvasAPI does not permit us to change (announcements for example).

@taheralfayad taheralfayad added bug enhancement javascript Pull requests that update Javascript code php Pull requests that update Php code labels May 16, 2024
@taheralfayad taheralfayad requested a review from dmols May 16, 2024 16:01
Copy link
Contributor

@dmols dmols left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this is a canvas issue or something on our end, but uploading identical files with different names or renaming files after uploading, does not translate well over to the 'Review Files' tab on UDOIT. It looks to read as if there's instances of the same file in the course,

Screenshot 2024-07-23 at 3 50 12 PM

even though they're actually different in name:

Screenshot 2024-07-23 at 3 50 34 PM

I also noticed that while I can upload, say a pptx file to replace a ppt file, it doesn't actually replace it in the Files page on the course. I vaguely remember this being something we talked about in the past but I don't recall if it's something we can change on our end.

Lastly, while I can follow through with the upload on a course I create through our Dev, if I export a Canvas course of mine (need to do it like this to link a file to an assignment/module/etc) to our dev instance, the process stalls during the upload page and I get a 500 error on the console.

Not sure why it works this way but I'm happy to help addressing these issues when you have a chance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug enhancement javascript Pull requests that update Javascript code php Pull requests that update Php code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants