Skip to content

WIP: Adding Caliper support#296

Open
jbasdf wants to merge 2 commits intomainfrom
jb_caliper
Open

WIP: Adding Caliper support#296
jbasdf wants to merge 2 commits intomainfrom
jb_caliper

Conversation

@jbasdf
Copy link
Copy Markdown
Contributor

@jbasdf jbasdf commented May 22, 2019

No description provided.

canvas_api_domain: "$Canvas.api.domain",
customer_caliper_endpoint_url: "$Caliper.url",
canvas_course_section_ids: "$Canvas.course.sectionIds",
canvas_term_start_at: "$Canvas.term.startAt",,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lint/Syntax: unexpected token tCOMMA

# def self.from_canvas_lti(event, params)

# event.group = Caliper::Entities::LIS::CourseSection.new(
# id: "https://#{params[:custom_canvas_api_domain]}/courses/#{params[:custom_canvas_course_id]}/sections/#{params[:custom_canvas_section_id]}",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/LineLength: Line is too long. [151/120]

)
end

#return from_canvas_lti(event, params) if params[:custom_canvas_api_domain].present?
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout/LeadingCommentSpace: Missing space after #.

actor: @actor,
action: Caliper::Actions::USED,
edApp: @ed_app,
eventTime: event_time
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/TrailingCommaInArguments: Put a comma after the last parameter of a multiline method call.

requestor = Caliper::Request::HttpRequestor.new({
'host' => "http://learncaliper.herokuapp.com/api/consumer/events/1ebb1f70-5e82-0137-e4ac-4a8f9eeae0c8",
'auth_token' => "1ebb1f70-5e82-0137-e4ac-4a8f9eeae0c8",
})
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout/IndentHash: Indent the right brace the same as the first position after the preceding left parenthesis.

sensor = Caliper::Sensor.new('https://www.atomicjolt.com/sensors/1', options)
requestor = Caliper::Request::HttpRequestor.new({
'host' => "http://learncaliper.herokuapp.com/api/consumer/events/1ebb1f70-5e82-0137-e4ac-4a8f9eeae0c8",
'auth_token' => "1ebb1f70-5e82-0137-e4ac-4a8f9eeae0c8",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

options = Caliper::Options.new
sensor = Caliper::Sensor.new('https://www.atomicjolt.com/sensors/1', options)
requestor = Caliper::Request::HttpRequestor.new({
'host' => "http://learncaliper.herokuapp.com/api/consumer/events/1ebb1f70-5e82-0137-e4ac-4a8f9eeae0c8",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout/IndentHash: Use 2 spaces for indentation in a hash, relative to the first position after the preceding left parenthesis.
Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

params: params,
)
options = Caliper::Options.new
sensor = Caliper::Sensor.new('https://www.atomicjolt.com/sensors/1', options)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

Gemfile.lock Outdated

BUNDLED WITH
1.17.3
2.0.1
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to stick with 1.17.3 for the time being.

@user = user

@actor = Caliper::Entities::Agent::Person.new(
id: "#{@application_instance.domain}/users/#{@user.id}",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably need to generate a different user id and include the sis id in the actor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants