[LON-CAPA-cvs] cvs: loncom /interface lontrackstudent.pm

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 13 Feb 2007 01:44:02 -0000


albertel		Mon Feb 12 20:44:02 2007 EDT

  Modified files:              
    /loncom/interface	lontrackstudent.pm 
  Log:
  - BUG#5194, data about resources that aren't in the course directly (linked images et.) weren't displayed in the trackstudent display
  - fix issue where POSTed parms display would get out of sync
  
  
Index: loncom/interface/lontrackstudent.pm
diff -u loncom/interface/lontrackstudent.pm:1.22 loncom/interface/lontrackstudent.pm:1.23
--- loncom/interface/lontrackstudent.pm:1.22	Mon Feb 12 18:58:42 2007
+++ loncom/interface/lontrackstudent.pm	Mon Feb 12 20:44:02 2007
@@ -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.23 2007/02/13 01:44:02 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -316,10 +316,11 @@
                 $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;
@@ -397,8 +398,11 @@
 	}
 	$result.='</table>';
     } 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.='<tr><td align="right">'.$key.'</td>'.