fix course token parsing
This commit is contained in:
@ -184,8 +184,10 @@ class ExercisesController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def set_course_token
|
def set_course_token
|
||||||
if @lti_parameters
|
lti_parameters = LtiParameter.find_by(external_users_id: current_user.id,
|
||||||
lti_json = @lti_parameters.lti_parameters[:lis_outcome_service_url]
|
exercises_id: @exercise.id)
|
||||||
|
if lti_parameters
|
||||||
|
lti_json = lti_parameters.lti_parameters[:lis_outcome_service_url]
|
||||||
@course_token =
|
@course_token =
|
||||||
if match = lti_json.match(/^.*courses\/([a-z0-9\-]+)\/sections/)
|
if match = lti_json.match(/^.*courses\/([a-z0-9\-]+)\/sections/)
|
||||||
match.captures.first
|
match.captures.first
|
||||||
|
Reference in New Issue
Block a user