Skip to content

Canvas Shim Scripts and Tasks

Ali Arehart edited this page Nov 1, 2021 · 3 revisions

To run scripts within the LMS, one must enter the Canvas LMS, then the vendor, and then the scripts directory.

To run scripts, we use a RAKE file, which allows us to run the script from the directory, using rake {scriptname}.

clear_course_content_and_migrations

These can be found in lib/tasks/, i.e. lib/tasks/clear_course_content_and_migration.rake

Fails out when multiple course migration are detected This can happen if someone attempted to manually change the course content, i.e. a teacher add course content. Fails out if any students have done any work Checked through course's submissions having at least a single course_context entry.

SideNote: .exists? looks for the first instance of something. Works better on indexed headers.

Clone this wiki locally