--- loncom/homework/structuretags.pm 2004/11/30 23:28:57 1.273 +++ loncom/homework/structuretags.pm 2004/12/17 21:42:50 1.278 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.273 2004/11/30 23:28:57 albertel Exp $ +# $Id: structuretags.pm,v 1.278 2004/12/17 21:42:50 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -91,6 +91,7 @@ sub page_start { if (!defined($found{'body'}) && $ENV{'request.state'} eq 'construct' && $ENV{'environment.remote'} eq 'off') { $body_tag_start=&Apache::loncommon::bodytag(); + $body_tag_start.=&Apache::lonxml::message_location(); } elsif (!defined($found{'body'})) { $body_tag_start=''; @@ -580,6 +581,8 @@ sub start_problem { $allow_print_points=1; } } + my $maxtries = &Apache::lonnet::EXT("resource.$id.maxtries"); + if (defined($maxtries) && $maxtries < 0) { $allow_print_points=0; } my $duedate = &Apache::lonnet::EXT("resource.$id.duedate"); $duedate = POSIX::strftime("%c",localtime($duedate)); my $temp_file; @@ -1126,6 +1129,10 @@ sub start_part { if ($1 ne '0') {$allow_print_points=1;} } } + my $maxtries = &Apache::lonnet::EXT("resource.$id.maxtries"); + if (defined($maxtries) && $maxtries < 0) { + $allow_print_points=0; + } if (($Apache::lonhomework::type eq 'exam') && ($allow_print_points)) { $result .= '\fbox{\textit{'.$weight.' pt}}';} } elsif ($target eq 'web') { $result.=''; @@ -1368,8 +1375,9 @@ sub start_simpleeditbutton { (&Apache::lonnet::allowed('srm',$ENV{'request.course.id'}))) { my $url=$ENV{'request.noversionuri'}; $url=~s/\?.*$//; + my ($symb) = &Apache::lonxml::whichuser(); $result='
'. - ''.&mt('Edit').' - '.&mt('Note: it can take up to 10 minutes for changes to take effect for all users.'). + ''.&mt('Edit').' - '.&mt('Note: it can take up to 10 minutes for changes to take effect for all users.'). &Apache::loncommon::help_open_topic('Caching').'

'; } return $result;