--- loncom/homework/lonhomework.pm 2018/05/15 04:59:14 1.371 +++ loncom/homework/lonhomework.pm 2018/09/18 14:30:19 1.373 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Homework handler # -# $Id: lonhomework.pm,v 1.371 2018/05/15 04:59:14 raeburn Exp $ +# $Id: lonhomework.pm,v 1.373 2018/09/18 14:30:19 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -256,7 +256,7 @@ sub check_slot_access { } else { return ($status,$datemsg); } - } + } if ($status eq 'CLOSED' || $status eq 'INVALID_ACCESS' || @@ -266,7 +266,7 @@ sub check_slot_access { if ($env{'request.state'} eq "construct") { return ($status,$datemsg); } - + if ($type eq 'Task') { if ($checkedin && $Apache::lonhomework::history{"resource.$version.0.status"} eq 'pass') { @@ -1879,6 +1879,8 @@ sub do_ltipassback { 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 $id = $item->{'pbid'}; my $url = $item->{'pburl'}; my $scope = $item->{'scope'}; @@ -1897,7 +1899,8 @@ sub do_ltipassback { ($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,$total,$possible); + &LONCAPA::ltiutils::send_grade($id,$url,$ckey,$secret,$scoretype,$sigmethod, + $msgformat,$total,$possible); } } }