app/services/create_collaboration.rb
# Output, these variables are initialized after successful call.
Output, these variables are initialized after successful call.
Output these variables are initialized after successful call .
def process_collaborators_data(collaborators)
    collaborators.each do |c|
      unless User.exists?(email: c['email'])
        user = User.create!(
          email:    c['email'],
          password: User.get_random_password
        )
      else
        user = User.find_by_email(c['email'])
      end
      portal_endpoint = RemotePortal.new(
        returnUrl: c['endpoint_url'],
        externalId: c['learner_id'],
        platform_id: c['platform_id'],
        platform_user_id: c['platform_user_id'],
        resource_link_id: c['resource_link_id'],
        context_id: c['context_id'],
        class_info_url: c['class_info_url']
      )
      add_activity_run(user, portal_endpoint) if @activity
      add_sequence_runs(user, portal_endpoint) if @sequence
    end
  end
def process_collaborators_data ( collaborators ) collaborators . each do | c | unless User . exists? ( email : c [ 'email' ] ) user = User . create! ( email : c [ 'email' ] , password : User . get_random_password ) else user = User . find_by_email ( c [ 'email' ] ) end portal_endpoint = RemotePortal . new ( returnUrl : c [ 'endpoint_url' ] , externalId : c [ 'learner_id' ] , platform_id : c [ 'platform_id' ] , platform_user_id : c [ 'platform_user_id' ] , resource_link_id : c [ 'resource_link_id' ] , context_id : c [ 'context_id' ] , class_info_url : c [ 'class_info_url' ] ) add_activity_run ( user , portal_endpoint ) if @activity add_sequence_runs ( user , portal_endpoint ) if @sequence end end
Output, these variables are initialized after successful call.
Output these variables are initialized after successful call .
# Well, RemotePortal is a single endpoint in fact. Naming isn't consistent at all. # Platform info
collaborators
<not_specific>