Skip to content

Conversation

loretob30
Copy link

Uploading an update for canvas_test update. This script was tested and proven to work last Friday afternoon in conjunction with RT397972.

CanvasSIS and others added 30 commits January 24, 2024 14:18
-  additional packages and
-  moved env variables value
The functions that execute the SQL statemetns all do exactly the same thing, but with different parameters. So I'm refactoring that data into a data structre, and just writing the code once.
The previous hard coded working_directory variable had a trailing folder
separator. But the directory name generated by TemporaryDirectory does
not have a separator, leading to the script failing.

While here I also fixed the name of the file, as I'd forgotten to add
the .csv file extension, and I corrected the mode used when opening the
csv file, so it's writeable.
I think I had gotten the column handling wrong in the SIS_Datatype
class. And I found that cur.fetch() doesn't exist, hence changed it to
cur.fetchall().
Modify post_data so that a variety of parameters are sent when in diffing mode. Also extend main() to prompt for those parameters.
And store into the global dict the diffing parameters we will use.
This is my re-write of the sis/canvas_synergetic_integration/main.py to implement diffing
I'm also changing the wording slightly on a log message, as I think this phrasing is slightly more correct.
Normally this iterates over all the defined views. This allows an
operator to optionally name the views to run on.
…ration

While working this I've also tried to improve some comments, and I've stopped using "from import" style of imports.
The zip file was not being created in the temporary directory. Instead
it was being created in the operators working directory.
Set a diffing identifier that's based on the view name.
Rachelle Ferrer suggested the diffing_drop_status parameter be changed
from inactive to deleted_last_completed. She explained that this option
is not technically a status, but combines the deleted and completed
statuses. If there is at least one other active enrollment in the
course, enrollments marked as deleted_last_completed will be deleted.
If it is the last enrollment in the course, the deleted_last_completed
enrollment will be set as complete.

Rachelle Ferrer also recommended diffing is only done for enrolments,
but this script has not yet been modified to account for that
recommendation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants