2020-10-27 00:50:13 +08:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2011-10-13 07:28:30 +08:00
|
|
|
#
|
2017-04-28 04:06:18 +08:00
|
|
|
# Copyright (C) 2011 - present Instructure, Inc.
|
2011-10-13 07:28:30 +08:00
|
|
|
#
|
|
|
|
# This file is part of Canvas.
|
|
|
|
#
|
|
|
|
# Canvas is free software: you can redistribute it and/or modify it under
|
|
|
|
# the terms of the GNU Affero General Public License as published by the Free
|
|
|
|
# Software Foundation, version 3 of the License.
|
|
|
|
#
|
|
|
|
# Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
|
|
# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
|
|
# details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU Affero General Public License along
|
|
|
|
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
#
|
|
|
|
|
2021-10-08 05:19:59 +08:00
|
|
|
require_dependency 'sis'
|
2013-03-05 08:00:01 +08:00
|
|
|
|
2011-10-13 07:28:30 +08:00
|
|
|
module SIS
|
|
|
|
class BaseImporter
|
|
|
|
def initialize(root_account, opts)
|
|
|
|
@root_account = root_account
|
2014-03-19 23:57:19 +08:00
|
|
|
@batch = opts[:batch]
|
2014-03-04 01:28:46 +08:00
|
|
|
@batch_user = opts[:batch_user]
|
2011-10-13 07:28:30 +08:00
|
|
|
@logger = opts[:logger] || Rails.logger
|
|
|
|
@sis_options = {
|
2021-09-23 00:25:11 +08:00
|
|
|
:override_sis_stickiness => opts[:override_sis_stickiness],
|
|
|
|
:add_sis_stickiness => opts[:add_sis_stickiness],
|
|
|
|
:clear_sis_stickiness => opts[:clear_sis_stickiness]
|
|
|
|
}
|
2011-10-13 07:28:30 +08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|