unsupported / canvas Goto Github PK
View Code? Open in Web Editor NEWUnsupported Canvas Tweaks
Unsupported Canvas Tweaks
Hi really love these little JS snippets - lots of great inspiration and I have learnt a lot about how to interact with Canvas this way.
I'm wondering if using MutationObserver would be a good approach here?
I'm trying to interact with a custom button in Canvas Calendar Event descriptions but because of the way it displays the little popup box to show the description I am running in to all sorts of difficulties. I'm concerned it would break if users don't click the description until after the timeout, but don't want it sitting there checking forever.
When I run this script:
canvas/sis/sis_import_standard/bash_curl/sis_script.sh
With the batch_mode option (and term specified in proper format):
./sis_script.sh -b 201920 production
Everything works great - except batch_mode is null in the SisImport JSON response. This is also true when I use curl just by itself to do the equivalent action.
Full output is below (redacted account id and usernames).
[rjbond3rd@localhost canvas_test]$ ./sis_script.sh -b 201920 production
loading config from $CONFIG_FILE_PATH
#############################################################
Starting the SIS import with the following variables:
domain:sfcc.test
BASE_DIRECTORY:/home/rjbond3rd/terra/canvas_test/
CSV_FOLDER:/home/rjbond3rd/terra/canvas_test//csv
creating a folder for this import at /home/rjbond3rd/terra/canvas_test//archive/2019-08-05_16-48/
[2019-08-05 16:48] 1 CSV files exist: do something with them
[2019-08-05 16:48] creating /home/rjbond3rd/terra/canvas_test//2019-08-05_16-48.zip with /home/rjbond3rd/terra/canvas_test//csv./.csv
[2019-08-05 16:48] -------------------------------------------------------------
[2019-08-05 16:48] Starting the import...now
params: extension=zip&import_type=instructure_csv&batch_mode=true&batch_mode_term_id=sis_term_id:201920
[2019-08-05 16:48] -------------------------------------------------------------
{"id":redacted,"created_at":"2019-08-05T22:48:50Z","started_at":null,"ended_at":null,"updated_at":"2019-08-05T22:48:50Z","progress":0,"workflow_state":"created","data":{"import_type":"instructure_csv"},"batch_mode":null,"batch_mode_term_id":null,"multi_term_batch_mode":null,"override_sis_stickiness":null,"add_sis_stickiness":null,"clear_sis_stickiness":null,"diffing_data_set_identifier":null,"diffed_against_import_id":null,"diffing_drop_status":null,"skip_deletes":false,"change_threshold":null,"diff_row_count_threshold":null,"user":{"id":3544315,"name":"redacted","created_at":"2012-12-04T14:22:34-07:00","sortable_name":"redacted","short_name":"redacted","sis_user_id":null,"integration_id":null,"sis_import_id":null,"login_id":"redacted"}}
[2019-08-05 16:48] SIS Import ID:
[2019-08-05 16:48] Initial import was successfull, moving /home/rjbond3rd/terra/canvas_test//csv/.csv
[2019-08-05 16:48] checking status at https://sfcc.test.instructure.com/api/v1/accounts/self/sis_imports/redacted
[2019-08-05 16:48] imported, 100%
[2019-08-05 16:48] -------------------------------------------------------------
[2019-08-05 16:48] Results are in
[2019-08-05 16:48] The final Workflow State for this import is "imported"
[2019-08-05 16:48] -------------------------------------------------------------
[2019-08-05 16:48] All done, now moving /home/rjbond3rd/terra/canvas_test//2019-08-05_16-48.zip to /home/rjbond3rd/terra/canvas_test//archive/2019-08-05_16-48/2019-08-05_16-48.zip
I've tried running this script numerous times, but I always run into a user that has their storage full so I can't upload the photo and it kills the script. Is there a change I can make in the code that can move on to the next user when that happens?
Traceback (most recent call last):
File "F:\PROFILE\avatar-7.py", line 113, in
if ao.get('display_name')==user_image['image_filename']:
AttributeError: 'unicode' object has no attribute 'get'
Hi @snelson82
Thank you for this script! It is great. However, I installed this javascript, but from some reason it does not allow me to expand global navigation on course homepages only. Everywhere else it does. Any reason as to why?
master/api/bulk_course_export
course-export.py has the following line (131)
from bulk_migration.python import course_migrations
Where can I find bulk_migration.python?
I get the following error when running bulk_upoad_avatars.py
'Done prepping Canvas for upload, now sending the data...'
Traceback (most recent call last):
File "upload_avatars.py.", line 89, in
_data[1] = ('upload_params',_data[1][1].items())
IndexError: list index out of range
The csv file contain the headers and references to 2 images for 2 different sis_ids.
Any ideas?
Works well for us sometimes, other times it throws this error.
ulk_course_export.rb:78:in block (2 levels) in <main>': undefined method
[]' for nil:NilClass (NoMethodError)
from /Users//.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/csv.rb:1273:in open' from bulk_course_export.rb:77:in
block in
each' from /Users//.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/csv.rb:1122:in
block in foreach'open' from /Users//.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/csv.rb:1121:in
foreach'A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.