You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First things first - I love CanvasSync and really appreciate the work put in to make such a great time-saving tool. Cheers!
The are a number of single courses at my uni which are run for different majors and as such, a single course may have numerous course codes associated with it. Instructors will often delimit these with forward slashes (ie "courseCode1/courseCode2/courseName") - as such there are a number of my courses which seem to be skipped even if I've selected them for syncing; each of these skipped courses has a forward slash in the name.
I've attempted to look at the source code and I've noticed a couple places where "/" is supposed to be removed in order to ensure it doesn't mess with the creation of directories, however I'm not sure why in my case instead of the course name string being cleansed, these units are just being skipped.
Please let me know if you need more info. Thanks!
The text was updated successfully, but these errors were encountered:
Hey @jarkinber your issue comes from the settings module, when initiating the settings CanvasSync makes an array stating the courses to sync called courses_to_sync, this array doesn't ever have the get_corrected_name() function run on it's elements so later when the code tries to check the courses to be synced and the corrected courses they don't line up and it assumes they should be skipped, a proper solution would be to correct the courses as they're added to the array in the settings module but I couldn't really organise it neatly so instead I cleaned it up in the main canvas.py, code below, could be neater but this should work for most, if not all of the edge cases that CanvasSync was already correcting for.
TLDR:
Throw this code in the do_sync() function in canvas.py before synchronizer = Synchronizer(settings=settings, api=api), I have it at line 171, indentation is done with a (Indent) because I've never answered a question on Github and I can't figure out how to indent:
# Correct settings.courses_to_sync corrected_names = [] for x in settings.courses_to_sync: (Indent)corrected_name = helpers.get_corrected_name(x) (indent)corrected_names.append(corrected_name) settings.courses_to_sync = [] settings.courses_to_sync = corrected_names[:]
Thanks for that @Luckinber, yeah that definitely works for now, much appreciated! @perslev would this fix or some variant thereof be worth merging into a new release?
First things first - I love CanvasSync and really appreciate the work put in to make such a great time-saving tool. Cheers!
The are a number of single courses at my uni which are run for different majors and as such, a single course may have numerous course codes associated with it. Instructors will often delimit these with forward slashes (ie "courseCode1/courseCode2/courseName") - as such there are a number of my courses which seem to be skipped even if I've selected them for syncing; each of these skipped courses has a forward slash in the name.
I've attempted to look at the source code and I've noticed a couple places where "/" is supposed to be removed in order to ensure it doesn't mess with the creation of directories, however I'm not sure why in my case instead of the course name string being cleansed, these units are just being skipped.
Please let me know if you need more info. Thanks!
The text was updated successfully, but these errors were encountered: