app/models/canvas/ldap.rb
def update_guests
      sync_settings = Canvas::Synchronization.get
      current_time = Time.now.utc
      logger.warn("Querying LDAP for guest updates since #{sync_settings.last_guest_user_sync.utc}")
      guests = search_updated_guests(sync_settings.last_guest_user_sync)
      if guests.count > 0
        user_csv_rows = prepare_guest_user_csv_rows(guests)
        logger.warn("Sending SIS Import for #{user_csv_rows.count} guest users to Canvas")
        result = import_guests(user_csv_rows)
      else
        logger.warn("No updates to import")
      end
      sync_settings.update(:last_guest_user_sync => current_time)
      logger.warn("Guest synchronization completed for #{current_time} at #{Time.now.utc.to_s}")
    end
# Performs Canvas import of updated guest users
Performs Canvas import of updated guest users
Performs Canvas import of updated guest users
def update_guests
      sync_settings = Canvas::Synchronization.get
      current_time = Time.now.utc
      logger.warn("Querying LDAP for guest updates since #{sync_settings.last_guest_user_sync.utc}")
      guests = search_updated_guests(sync_settings.last_guest_user_sync)
      if guests.count > 0
        user_csv_rows = prepare_guest_user_csv_rows(guests)
        logger.warn("Sending SIS Import for #{user_csv_rows.count} guest users to Canvas")
        result = import_guests(user_csv_rows)
      else
        logger.warn("No updates to import")
      end
      sync_settings.update(:last_guest_user_sync => current_time)
      logger.warn("Guest synchronization completed for #{current_time} at #{Time.now.utc.to_s}")
    end
def update_guests sync_settings = Canvas :: Synchronization . get current_time = Time . now . utc logger . warn ( "Querying LDAP for guest updates since #{sync_settings.last_guest_user_sync.utc}" ) guests = search_updated_guests ( sync_settings . last_guest_user_sync ) if guests . count > 0 user_csv_rows = prepare_guest_user_csv_rows ( guests ) logger . warn ( "Sending SIS Import for #{user_csv_rows.count} guest users to Canvas" ) result = import_guests ( user_csv_rows ) else logger . warn ( "No updates to import" ) end sync_settings . update ( :last_guest_user_sync => current_time ) logger . warn ( "Guest synchronization completed for #{current_time} at #{Time.now.utc.to_s}" ) end
Performs Canvas import of updated guest users
Performs Canvas import of updated guest users