Method: CanvasSync.provisioning_sync

Defined in:
lib/canvas_sync.rb

.provisioning_sync(models, **kwargs) ⇒ Object

Runs a standard provisioning sync job with no extra report types. Terms will be synced first using the API. If you are syncing users/roles/admins and have also specified a Term scope, Users/Roles/Admins will by synced first, before every other model (as Users/Roles/Admins are never scoped to Term).

Parameters:

  • models (Array<String>)

    A list of models to sync. e.g., [‘users’, ‘courses’]. must be one of SUPPORTED_MODELS

  • term_scope (Symbol, nil)

    An optional symbol representing a scope that exists on the Term model. The provisioning report will be run for each of the terms contained in that scope.

  • legacy_support (Boolean | Array<String>, false)

    This enables legacy_support, where rows are not bulk inserted. For this to work your models must have a ‘create_or_udpate_from_csv` class method that takes a row and inserts it into the database. If an array of model names is provided then only those models will use legacy support.

  • account_id (Integer, nil)

    This optional parameter can be used if your Term creation and canvas_sync_client methods require an account ID.



96
97
98
99
# File 'lib/canvas_sync.rb', line 96

def provisioning_sync(models, **kwargs)
  validate_models!(models)
  default_provisioning_report_chain(models, **kwargs).process!
end