--- loncom/homework/structuretags.pm 2010/08/09 23:39:50 1.461.2.1 +++ loncom/homework/structuretags.pm 2010/03/10 21:25:36 1.466 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.461.2.1 2010/08/09 23:39:50 raeburn Exp $ +# $Id: structuretags.pm,v 1.466 2010/03/10 21:25:36 droeschl Exp $ # # Copyright Michigan State University Board of Trustees # @@ -209,9 +209,6 @@ sub page_start { } elsif (!defined($found{'body'}) && $env{'request.state'} eq 'construct') { if ($target eq 'web' || $target eq 'edit') { - if ($env{'environment.remote'} ne 'off') { - $body_args{'only_body'} = 1; - } # Breadcrumbs for Construction Space &Apache::lonhtmlcommon::clear_breadcrumbs(); &Apache::lonhtmlcommon::add_breadcrumb({ @@ -245,8 +242,7 @@ sub page_start { # $body_args{'no_title'} = 1; $body_args{'force_register'} = 1; $body_args{'add_entries'} = \%add_entries; - if ($env{'environment.remote'} eq 'off' - && $env{'request.state'} eq 'construct') { + if ( $env{'request.state'} eq 'construct') { $body_args{'only_body'} = 1; } } @@ -254,18 +250,15 @@ sub page_start { my $page_start = &Apache::loncommon::start_page($name,$extra_head, \%body_args); $page_start .= $pageheader; - - unless ($env{'request.gcicontext'} eq 'buildtest') { - if (!defined($found{'body'}) - && $env{'request.state'} ne 'construct' - && ($target eq 'web' || $target eq 'webgrade')) { - - my ($symb,undef,undef,undef,$publicuser)= &Apache::lonnet::whichuser(); - if ($symb eq '' && !$publicuser) { - $page_start .= '

' - .&mt('Browsing resource, all submissions are temporary.') - .'

'; - } + if (!defined($found{'body'}) + && $env{'request.state'} ne 'construct' + && ($target eq 'web' || $target eq 'webgrade')) { + + my ($symb,undef,undef,undef,$publicuser)= &Apache::lonnet::whichuser(); + if ($symb eq '' && !$publicuser) { + $page_start .= '

' + .&mt('Browsing resource, all submissions are temporary.') + .'

'; } } @@ -276,8 +269,9 @@ sub page_start { my $form_tag_start; if (!defined($found{'form'})) { $form_tag_start='
".&option('problem','problemtype').&mt("Homework Problem")." ".&option('survey' ,'problemtype').&mt("Survey Question")." + ".&option('surveycred' ,'problemtype').&mt("Survey Question (with credit)")." + ".&option('anonsurvey' ,'problemtype').&mt("Anonymous Survey Question")." + ".&option('anonsurveycred' ,'problemtype').&mt("Anonymous Survey Question (with credit)")." ".&option('practice' ,'problemtype').&mt("Practice Problem")." @@ -654,11 +651,7 @@ item store_aggregates() sub store_aggregates { my ($symb,$courseid) = @_; - my (%aggregate,%subtracker); - my $tracksub; - if ($symb =~ m{^uploaded/gcitest/$LONCAPA::match_courseid/default_1261144274.sequence___\d+___gci/gci/}) { - $tracksub = 1; - } + my %aggregate; my @parts; my $cdomain = $env{'course.'.$env{'request.course.id'}.'.domain'}; my $cname = $env{'course.'.$env{'request.course.id'}.'.num'}; @@ -673,9 +666,6 @@ sub store_aggregates { $Apache::lonhomework::results{'resource.'.$part.'.award'} eq 'EXACT_ANS') { $aggregate{$symb."\0".$part."\0correct"} = 1; - if ($tracksub) { - $subtracker{$env{'user.name'}.':'.$env{'user.domain'}."\0correct"} ++; - } } if ($Apache::lonhomework::results{'resource.'.$part.'.tries'} == 1) { $aggregate{$symb."\0".$part."\0users"} = 1; @@ -688,22 +678,11 @@ sub store_aggregates { } } $aggregate{$symb."\0".$part."\0attempts"} = 1; - if ($tracksub) { - if ($Apache::lonhomework::type eq 'survey') { - $subtracker{$env{'user.name'}.':'.$env{'user.domain'}."\0surveysubs"} ++; - } else { - $subtracker{$env{'user.name'}.':'.$env{'user.domain'}."\0attempts"} ++; - } - } } if (keys (%aggregate) > 0) { &Apache::lonnet::cinc('nohist_resourcetracker',\%aggregate, $cdomain,$cname); } - if (keys(%subtracker) > 0) { - &Apache::lonnet::cinc('nohist_submissiontracker',\%subtracker, - $cdomain,$cname); - } } sub checkout_msg { @@ -935,34 +914,28 @@ sub start_problem { if ($env{'request.state'} ne "construct" && ($symb eq '' || $Apache::lonhomework::type eq 'practice')) { $form_tag_start.=''; - unless ($env{'request.gcicontext'} eq 'buildtest') { - $form_tag_start .= ''; - } + $rndseed.'" />'. + ''; if (exists($env{'form.username'})) { $form_tag_start.= ''; } - unless ($env{'request.gcicontext'} eq 'buildtest') { - if ($env{'request.role.adv'}) { - $form_tag_start.= '