[LON-CAPA-cvs] cvs: loncom /interface lonindexer.pm lonmeta.pm
www
lon-capa-cvs@mail.lon-capa.org
Thu, 02 Mar 2006 20:16:14 -0000
www Thu Mar 2 15:16:14 2006 EDT
Modified files:
/loncom/interface lonindexer.pm lonmeta.pm
Log:
Bug #4546: show courses in RES
Index: loncom/interface/lonindexer.pm
diff -u loncom/interface/lonindexer.pm:1.138 loncom/interface/lonindexer.pm:1.139
--- loncom/interface/lonindexer.pm:1.138 Tue Feb 7 14:46:30 2006
+++ loncom/interface/lonindexer.pm Thu Mar 2 15:16:10 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Directory Indexer
#
-# $Id: lonindexer.pm,v 1.138 2006/02/07 19:46:30 albertel Exp $
+# $Id: lonindexer.pm,v 1.139 2006/03/02 20:16:10 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1057,6 +1057,7 @@
&dynmetaprint($r,$filelink,'comefrom_list');
&dynmetaprint($r,$filelink,'sequsage_list');
&dynmetaprint($r,$filelink,'dependencies');
+ &dynmetaprint($r,$filelink,'course_list');
$r->print('</td>');
}
if ($hash{'display_attrs_7'} == 1) {
Index: loncom/interface/lonmeta.pm
diff -u loncom/interface/lonmeta.pm:1.150 loncom/interface/lonmeta.pm:1.151
--- loncom/interface/lonmeta.pm:1.150 Wed Jan 4 00:43:19 2006
+++ loncom/interface/lonmeta.pm Thu Mar 2 15:16:10 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Metadata display handler
#
-# $Id: lonmeta.pm,v 1.150 2006/01/04 05:43:19 albertel Exp $
+# $Id: lonmeta.pm,v 1.151 2006/03/02 20:16:10 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -71,7 +71,7 @@
if (! defined($authordom) || ! defined($author)) {
return ();
}
- my @Fields = ('url','count','course',
+ my @Fields = ('url','count','course','course_list',
'goto','goto_list',
'comefrom','comefrom_list',
'sequsage','sequsage_list',
@@ -447,7 +447,7 @@
($type eq 'comefrom_list') ||
($type eq 'sequsage_list') ||
($type eq 'dependencies')) {
- return '<ul><font size="-1">'.join("\n",map {
+ return '<font size="-1"><ul>'.join("\n",map {
my $url = &Apache::lonnet::clutter($_);
my $title = &Apache::lonnet::gettitle($url);
if ($title eq '') {
@@ -484,18 +484,17 @@
# List of courses
if ($type=~/\_list/) {
my @Courses = split(/\s*\,\s*/,$value);
- my $Str;
+ my $Str='<font size="-1"><ul>';
foreach my $course (@Courses) {
my %courseinfo = &Apache::lonnet::coursedescription($course);
if (! exists($courseinfo{'num'}) || $courseinfo{'num'} eq '') {
next;
}
- if ($Str ne '') { $Str .= '<br />'; }
- $Str .= '<a href="/public/'.$courseinfo{'domain'}.'/'.
+ $Str .= '<li><a href="/public/'.$courseinfo{'domain'}.'/'.
$courseinfo{'num'}.'/syllabus" target="preview">'.
- $courseinfo{'description'}.'</a>';
+ $courseinfo{'description'}.'</a></li>';
}
- return $Str;
+ return $Str.'</ul></font>';
}
# No pretty print found
return $value;