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

matthew lon-capa-cvs@mail.lon-capa.org
Tue, 27 Apr 2004 15:45:04 -0000


matthew		Tue Apr 27 11:45:04 2004 EDT

  Modified files:              
    /loncom/interface	lonsearchcat.pm 
  Log:
  &detailed_citation_view now shows more data.
  
  
Index: loncom/interface/lonsearchcat.pm
diff -u loncom/interface/lonsearchcat.pm:1.217 loncom/interface/lonsearchcat.pm:1.218
--- loncom/interface/lonsearchcat.pm:1.217	Tue Apr 27 11:24:09 2004
+++ loncom/interface/lonsearchcat.pm	Tue Apr 27 11:45:04 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Search Catalog
 #
-# $Id: lonsearchcat.pm,v 1.217 2004/04/27 15:24:09 matthew Exp $
+# $Id: lonsearchcat.pm,v 1.218 2004/04/27 15:45:04 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1150,7 +1150,6 @@
                        'modifyinguser','standards','mime');
     my @StatsFields = ('stdno','avetries','difficulty','disc');
     my @EvalFields = ('clear','depth','helpful','correct','technical');
-    my @ContextFields = ('courses','dependencies');
     my $fillflag=0;
     my $pretty_search_string = "<br />\n";
     # Clean up fields for safety
@@ -2783,26 +2782,54 @@
 ######################################################################
 sub detailed_citation_view {
     my ($prefix,%values) = @_;
-    my $icon=&Apache::loncommon::icon($values{'url'});
-    my $result=<<END;
-<b>$prefix<img src="$icon" /><a href="http://$ENV{'HTTP_HOST'}$values{'url'}" 
-    target='search_preview'>$values{'title'}</a></b>
-<p>
-<b>$values{'author'}</b>, <i>$values{'owner'}</i><br />
-
-<b>Subject:       </b> $values{'subject'}<br />
-<b>Keyword(s):    </b> $values{'keywords'}<br />
-<b>Notes:         </b> $values{'notes'}<br />
-<b>MIME Type:     </b> $values{'mimetag'}<br />
-<b>Language:      </b> $values{'language'}<br />
-<b>Copyright/Distribution:</b> $values{'copyrighttag'}<br />
-</p>
-$values{'extrashow'}
-<p>
-$values{'shortabstract'}
-</p>
-<hr align='left' width='200' noshade />
-END
+    my $icon=
+    my $result;
+    $result .= '<b>'.$prefix.
+        '<img src="'.&Apache::loncommon::icon($values{'url'}).' " />'.
+        '<a href="http://'.$ENV{'HTTP_HOST'}.$values{'url'}.'" '.
+        'target="search_preview">'.$values{'title'}."</a></b>\n";
+    $result .= "<p>\n";
+    $result .= '<b>'.$values{'author'}.'</b>,'.
+        ' <i>'.$values{'owner'}.'</i><br />';
+    foreach my $field 
+        (
+         { name=>'subject',
+           translate => '<b>Subject:</b>&nbsp;[_1]',},
+         { name=>'keywords',
+           translate => '<b>Keywords:</b>&nbsp;[_1]',},
+         { name=>'notes',
+           translate => '<b>Notes:</b>&nbsp;[_1]',},
+         { name=>'mimetag',
+           translate => '<b>MIME Type:</b>&nbsp;[_1]',},
+         { name=>'standards',
+           translate => '<b>Standards:</b>[_1]',},
+         { name=>'copyrighttag',
+           translate => '<b>Copyright/Distribution:</b>&nbsp;[_1]',},
+         { name=>'stdno',
+           translate => '<b>Number of Students:</b>&nbsp;[_1]',},
+         { name=>'avetries',
+           translate => '<b>Average Tries:</b>&nbsp;[_1]',},
+         { name=>'disc',
+           translate => '<b>Degree of Discrimination:</b>&nbsp;[_1]',},
+         { name=>'difficulty',
+           translate => '<b>Degree of Difficulty:</b>&nbsp;[_1]',},
+         { name=>'clear',
+           translate => '<b>Clear:</b>&nbsp;[_1]',},
+         { name=>'depth',
+           translate => '<b>Depth:</b>&nbsp;[_1]',},
+         { name=>'helpful',
+           translate => '<b>Helpful:</b>&nbsp;[_1]',},
+         { name=>'correct',
+           translate => '<b>Correcy:</b>&nbsp;[_1]',},
+         { name=>'technical',
+           translate => '<b>Technical:</b>&nbsp;[_1]',},
+         ) {
+        $result.= &mt($field->{'translate'},$values{$field->{'name'}}).
+            "<br />\n";
+    }
+    $result .= "</p>".$values{'extrashow'}.
+        '<p>'.$values{'shortabstract'}.'</p>';
+    $result .= '<hr align="left" width="200" noshade />'."\n";
     return $result;
 }