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

www lon-capa-cvs@mail.lon-capa.org
Tue, 15 Apr 2003 00:53:04 -0000


www		Mon Apr 14 20:53:04 2003 EDT

  Modified files:              
    /loncom/interface	lonmeta.pm 
  Log:
  Output of link and course data
  
  
Index: loncom/interface/lonmeta.pm
diff -u loncom/interface/lonmeta.pm:1.30 loncom/interface/lonmeta.pm:1.31
--- loncom/interface/lonmeta.pm:1.30	Mon Apr 14 09:46:53 2003
+++ loncom/interface/lonmeta.pm	Mon Apr 14 20:53:04 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Metadata display handler
 #
-# $Id: lonmeta.pm,v 1.30 2003/04/14 13:46:53 www Exp $
+# $Id: lonmeta.pm,v 1.31 2003/04/15 00:53:04 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -320,16 +320,22 @@
    foreach my $cat ('usage','comefrom','goto') {
        $r->print(
 '<tr><td bgcolor="#AAAAAA">'.$items{$cat}.'</td><td bgcolor="#CCCCCC">'.
-$dynmeta{$_}.'<br />'.join('<br /><font size="-1">',
-      map { '<a href="'.&Apache::lonnet::clutter($_).'">'.
-                        &Apache::lonnet::gettitle($_).' <tt>['.
-			$_.']</tt></a>' }
-      split(/\,/,$dynmeta{$cat.'_list'}))."</font></td></tr>\n");
+$dynmeta{$cat}.'<font size="-1"><ul>'.join("\n",
+      map { my $murl=$_; 
+ '<li><a href="'.&Apache::lonnet::clutter($murl).'" target="preview">'.
+                        &Apache::lonnet::gettitle($murl).' [<tt>'.$murl
+                        .'</tt>]</a></li>' }
+      split(/\,/,$dynmeta{$cat.'_list'}))."</ul></font></td></tr>\n");
    }
-   foreach ('course') {
+   foreach my $cat ('course') {
        $r->print(
-'<tr><td bgcolor="#AAAAAA">'.$items{$_}.'</td><td bgcolor="#CCCCCC">'.
-$dynmeta{$_}."&nbsp;</td></tr>\n");
+'<tr><td bgcolor="#AAAAAA">'.$items{$cat}.'</td><td bgcolor="#CCCCCC">'.
+$dynmeta{$cat}.'<font size="-1"><ul>'.join("\n",
+      map { my %courseinfo=&Apache::lonnet::coursedescription($_);  
+ '<li><a href="/public/'.
+  $courseinfo{'domain'}.'/'.$courseinfo{'num'}.'/syllabus" target="preview">'.
+  $courseinfo{'description'}.'</a></li>' }
+      split(/\,/,$dynmeta{$cat.'_list'}))."</ul></font></td></tr>\n");
    }
        $r->print('</table>');
    if ($uri=~/\.(problem|exam|quiz|assess|survey|form)\.meta$/) {