--- loncom/homework/lonhomework.pm 2023/04/02 03:16:28 1.375 +++ loncom/homework/lonhomework.pm 2023/06/02 01:20:27 1.376 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Homework handler # -# $Id: lonhomework.pm,v 1.375 2023/04/02 03:16:28 raeburn Exp $ +# $Id: lonhomework.pm,v 1.376 2023/06/02 01:20:27 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1930,17 +1930,19 @@ sub do_ltipassback { if (ref($item) eq 'HASH') { if ((ref($item->{'lti'}) eq 'HASH') && ($item->{'cid'} =~ /^($match_domain)_($match_courseid)$/)) { my ($cdom,$cnum) = ($1,$2); - my $ckey = $item->{'lti'}->{'key'}; - my $secret = $item->{'lti'}->{'secret'}; my $msgformat = $item->{'lti'}->{'passbackformat'}; my $sigmethod = 'HMAC-SHA1'; + my $ltinum = $item->{'ltinum'}; my $id = $item->{'pbid'}; my $url = $item->{'pburl'}; + my $type = $item->{'pbtype'}; my $scope = $item->{'scope'}; my $map = $item->{'ltimap'}; my $symb = $item->{'ltisymb'}; my $uname = $item->{'uname'}; my $udom = $item->{'udom'}; + my $keynum = $item->{'lti'}->{'cipher'}; + my $crsdef = $item->{'crsdef'}; my $scoretype = $item->{'format'}; my ($total,$possible); if ($scope eq 'resource') { @@ -1951,9 +1953,8 @@ sub do_ltipassback { } elsif ($scope eq 'course') { ($total,$possible) = &get_lti_score($uname,$udom); } - if (($ckey ne '') && ($secret ne '') && ($id ne '') && ($url ne '') && ($possible)) { - &LONCAPA::ltiutils::send_grade($id,$url,$ckey,$secret,$scoretype,$sigmethod, - $msgformat,$total,$possible); + if (($id ne '') && ($url ne '') && ($possible)) { + &LONCAPA::ltiutils::send_grade($cdom,$cnum,$crsdef,$type,$ltinum,$keynum,$id,$url,$scoretype,$sigmethod,$msgformat,$total,$possible); } } }