--- loncom/interface/lontrackstudent.pm 2007/02/12 23:58:42 1.22 +++ loncom/interface/lontrackstudent.pm 2008/12/20 04:31:55 1.25 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lontrackstudent.pm,v 1.22 2007/02/12 23:58:42 albertel Exp $ +# $Id: lontrackstudent.pm,v 1.25 2008/12/20 04:31:55 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -316,10 +316,11 @@ sub output_results { $title = $nav_res->compTitle(); $src = $nav_res->src(); } else { - if ($src =~ m|^/res|) { - $title = $src; - } elsif ($values =~ /^\s*$/ && - (! defined($src) || $src =~ /^\s*$/)) { + $src = $symb; + if ($src !~ m{/adm}) { + $title = &Apache::lonnet::gettitle($src); + } elsif ($values =~ /^\s*$/ && + (! defined($src) || $src =~ /^\s*$/)) { next; } elsif ($values =~ /^\s*$/) { $values = $src; @@ -359,14 +360,14 @@ sub output_results { my $tablerow = qq{}.($count+1).qq{}; if ($src =~ m|^/adm/|) { $tablerow .= - ''.$title.''; + ''.$title.''; } else { $tablerow .= - ''. + ''. ''.$title.''. - ''; + ''; } - $tablerow .= ''.$timestamp.''; + $tablerow .= ''.$timestamp.''; if ($mode eq 'full_class') { $tablerow.=''.$student.''; } @@ -397,8 +398,11 @@ sub display_values { } $result.=''; } elsif ($action eq 'POST') { - my %values= - map {split('=',&unescape($_),-1)} split(/\&/,$values); + my %values; + foreach my $pair (split(/\&/,$values)) { + my ($key,$value) = split('=',&unescape($pair),-1); + $values{$key} = $value; + } foreach my $key (sort(keys(%values))) { if ($key eq 'counter') { next; } $result.=''.$key.''. @@ -512,6 +516,11 @@ sub handler { # # We will almost always need this... my $navmap = Apache::lonnavmaps::navmap->new(); + if (!defined($navmap)) { + my $requrl = $r->uri; + $env{'user.error.msg'} = "$requrl:bre:0:0:Navmap initialization failed."; + return HTTP_NOT_ACCEPTABLE; + } # &Apache::lonhtmlcommon::clear_breadcrumbs(); &Apache::lonhtmlcommon::add_breadcrumb({href=>'/adm/studentactivity',