--- loncom/homework/lonhomework.pm 2017/04/03 13:11:47 1.344.2.8 +++ loncom/homework/lonhomework.pm 2018/09/21 04:37:36 1.344.2.10 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Homework handler # -# $Id: lonhomework.pm,v 1.344.2.8 2017/04/03 13:11:47 raeburn Exp $ +# $Id: lonhomework.pm,v 1.344.2.10 2018/09/21 04:37:36 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -235,6 +235,12 @@ sub check_slot_access { $Apache::lonhomework::history{"resource.$version.0.status"} eq 'pass') { return ('SHOW_ANSWER'); } + } elsif (($type eq 'problem') && + ($Apache::lonhomework::browse eq 'F') && + ($ENV{'REMOTE_ADDR'} eq '127.0.0.1') && + ($env{'form.grade_courseid'} eq $env{'request.course.id'}) && + (&Apache::lonnet::allowed('mgr',$env{'request.course.id'}))) { + return ($status,$datemsg); } my $availablestudent = &Apache::lonnet::EXT("resource.0.availablestudent",$symb); @@ -311,7 +317,7 @@ sub check_slot_access { $earlyout = 1; } } - if (($currtries == $maxtries) || ($is_correct)) { + if ($currtries == $maxtries) { $earlyout = 1; } else { $numgraded ++; @@ -1665,7 +1671,7 @@ sub helpmenu_datastructure { # filename, title, width, height my $helpers = [ - ['Problem_LON-CAPA_Function.hlp', &mt('Script Functions'), 800, 600], + ['Problem_LON-CAPA_Functions.hlp', &mt('Script Functions'), 800, 600], ['Greek_Symbols.hlp', &mt('Greek Symbols'), 500, 600], ['Other_Symbols.hlp', &mt('Other Symbols'), 500, 600], ['Authoring_Output_Tags.hlp', &mt('Output Tags'), 800, 600],