--- loncom/homework/structuretags.pm 2017/09/15 17:05:32 1.512.2.13.4.2 +++ loncom/homework/structuretags.pm 2018/09/14 23:09:43 1.512.2.15 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.512.2.13.4.2 2017/09/15 17:05:32 raeburn Exp $ +# $Id: structuretags.pm,v 1.512.2.15 2018/09/14 23:09:43 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -651,9 +651,9 @@ sub setup_rndseed { $questiontype = $Apache::lonhomework::type; } if (($env{'request.state'} eq "construct") - || ($symb eq '') + || ($symb eq '') || ($Apache::lonhomework::type eq 'practice') - || ($Apache::lonhomework::history{'resource.CODE'}) + || ($Apache::lonhomework::history{'resource.CODE'}) || (($env{'form.code_for_randomlist'}) && ($target eq 'analyze'))) { &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, ['rndseed']); @@ -1532,8 +1532,7 @@ sub start_problem { $target eq 'tex') { if ($env{'form.markaccess'}) { my @interval=&Apache::lonnet::EXT("resource.0.interval"); - my ($timelimit) = ($interval[0] =~ /^(\d+)/); - &Apache::lonnet::set_first_access($interval[1],$timelimit); + &Apache::lonnet::set_first_access($interval[1],$interval[0]); } ($status,$accessmsg,$slot_name,$slot) = @@ -2017,6 +2016,8 @@ sub end_library { && ($#$tagstack eq 0 && $$tagstack[0] eq 'library') && $env{'request.state'} eq "construct") { $result.=''.&Apache::loncommon::end_page({'discussion' => 1}); + } elsif ($target eq 'meta') { + $result.=&Apache::response::meta_response_order(); } if ( $#$tagstack eq 0 && $$tagstack[0] eq 'library') { &reset_problem_globals('library');