marcelreppi / moodle-buddy

Moodle Buddy is a browser plugin that offers mass download and notification functionality to the Moodle learning management platform
https://moodlebuddy.com
GNU Affero General Public License v3.0
40 stars 3 forks source link

Feature request: get last modified date and use it to check for resource updates #18

Open GRBaset opened 2 years ago

GRBaset commented 2 years ago

Hello, it'd be nice to have the option to check for updates in already downloaded resources, which is quite a common occurrence in my university's Moodle, and there's no indication in the frontend that they have been updated.

This could be done by sending a HEAD request to get the headers for all files and comparing the last-modified header with the previously stored date (I tried it and it works, at least on my Moodle). Then when downloaded, depending on configuration, either store it with another name as a new version or replace the existing file.

An additional feature that could be derived from this would be to set the dowloaded file's last modified date, or append it to the name if not possible.

Thanks.

marcelreppi commented 2 years ago

Thanks for this suggestion! Once I find some time I can look into it :) I will let you know once I made any progress.

marcelreppi commented 2 years ago

This feature is now available in version 1.52. Look for "Detect updates for previously scanned files" and "Prepend Moodle's last modified timestamp to each file name" in the options. Hope this helps!

GRBaset commented 2 years ago

I tested it and it seems to be working mostly OK, thank you. However, the last modified timestamp is only prepended when the resource updated, but not in the first download.

marcelreppi commented 2 years ago

Alright I will look into it when I find some time :)