def __init__(self, options=None): self.SDK_CONTEXT = SessionInactivityExpirationRC( **settings.CANVAS_SDK_SETTINGS) # todo: document options dict, or pull them out into individual params self.options = options if options else {} self.canvas_course_ids = set() self.canvas_courses = [] self.total_count = 0 self.update_courses = [] self.update_count = 0 self.failure_courses = [] self.failure_count = 0 self.skipped_courses = [] self.skipped_count = 0 self.metrics = {}
import logging from django.conf import settings from canvas_sdk.methods.courses import update_course as canvas_update_course from icommons_common.canvas_utils import SessionInactivityExpirationRC SDK_CONTEXT = SessionInactivityExpirationRC(**settings.CANVAS_SDK_SETTINGS) logger = logging.getLogger(__name__) def clear_course_sis_id(canvas_course_id): """ Makes a Canvas SDK call to set the SIS ID to an empty string for the given Canvas course ID """ return canvas_update_course(SDK_CONTEXT, canvas_course_id, course_sis_course_id='')