cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Surveyor

Sync all courses to SIS

Does anyone know if there a way to sync all your courses to your SIS with the push of one button, vs relying on teachers or going in and touching every single class? 

10 Replies
Highlighted
Surveyor

Hi Arnold,

I figured out a way to do this using Python and Selenium. Below is the code for one course. You would need to write a loop and change the second url to cycle through each of your courses.

-Stu

import time
from selenium import webdriver
from selenium.webdriver import Chrome
from selenium.webdriver.firefox.webdriver import FirefoxProfile

print('starting driver')
driver = webdriver.Firefox()
driver.get('https://elhaynes.instructure.com/login/canvas')

login=driver.find_element_by_id('pseudonym_session_unique_id')
login.send_keys("USERNAME")

pw=driver.find_element_by_id('pseudonym_session_password')
pw.send_keys("PASSWORD")

LoginButton=driver.find_element_by_xpath('/html/body/div[2]/div[2]/div/div/div[1]/div/div/div/div/div/div[2]/form[1]/div[3]/div[2]/button')
LoginButton.click()

driver.get("https://elhaynes.instructure.com/courses/822/external_tools/18?display=borderless&launch_type=po...")
time.sleep(5)
PostGrades = driver.find_element_by_xpath('//*[contains(@class,"fOyUs_bGBk fOyUs_fKyb")]')
PostGrades.click()

driver.quit()