version 1.10, 2018/05/08 00:44:14
|
version 1.12, 2018/05/14 20:10:15
|
Line 294 sub handler {
|
Line 294 sub handler {
|
$protocol = 'https'; |
$protocol = 'https'; |
} |
} |
|
|
|
if (exists($params->{'oauth_callback'})) { |
|
$Net::OAuth::PROTOCOL_VERSION = Net::OAuth::PROTOCOL_VERSION_1_0A; |
|
} else { |
|
$Net::OAuth::PROTOCOL_VERSION = Net::OAuth::PROTOCOL_VERSION_1_0; |
|
} |
|
|
my ($itemid,$consumer_key,$secret); |
my ($itemid,$consumer_key,$secret); |
$consumer_key = $params->{'oauth_consumer_key'}; |
$consumer_key = $params->{'oauth_consumer_key'}; |
if (ref($lti_by_key{$consumer_key}) eq 'ARRAY') { |
if (ref($lti_by_key{$consumer_key}) eq 'ARRAY') { |
Line 432 sub handler {
|
Line 438 sub handler {
|
my @lcroleorder = ('cc','in','ta','ep','st'); |
my @lcroleorder = ('cc','in','ta','ep','st'); |
my @ltiroleorder = ('Instructor','TeachingAssistant','Mentor','Learner'); |
my @ltiroleorder = ('Instructor','TeachingAssistant','Mentor','Learner'); |
if ($params->{'roles'} =~ /,/) { |
if ($params->{'roles'} =~ /,/) { |
my @possltiroles = split(/\s*,\s*/,$params->{'role'}); |
my @possltiroles = split(/\s*,\s*/,$params->{'roles'}); |
foreach my $ltirole (@ltiroleorder) { |
foreach my $ltirole (@ltiroleorder) { |
if (grep(/^\Q$ltirole\E$/,@possltiroles)) { |
if (grep(/^\Q$ltirole\E$/,@possltiroles)) { |
push(@ltiroles,$ltirole); |
push(@ltiroles,$ltirole); |