--- loncom/interface/lonhtmlcommon.pm 2010/03/10 20:26:09 1.267
+++ loncom/interface/lonhtmlcommon.pm 2010/05/30 18:30:52 1.273
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.267 2010/03/10 20:26:09 faziophi Exp $
+# $Id: lonhtmlcommon.pm,v 1.273 2010/05/30 18:30:52 droeschl Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1356,7 +1356,7 @@ sub htmlareaselectactive {
';
$output.="\nwindow.status='Activated Editfields';\n"
.'// ]]>'."\n"
- .'
'.
+ .'
';
return $output;
}
@@ -1438,8 +1438,9 @@ returns: nothing
if ($menulink) {
my $description = 'Menu';
my $no_mt_descr = 0;
- if (exists($env{'request.course.id'}) &&
- $env{'request.course.id'} ne '') {
+ if ((exists($env{'request.course.id'})) &&
+ ($env{'request.course.id'} ne '') &&
+ ($env{'course.'.$env{'request.course.id'}.'.description'} ne '')) {
$description =
$env{'course.'.$env{'request.course.id'}.'.description'};
$no_mt_descr = 1;
@@ -1480,7 +1481,7 @@ returns: nothing
my $lasttext = $last->{'no_mt'} ? $last->{'text'}
: mt( $last->{'text'} );
- $links .= htmltag( 'li', htmltag('b', $lasttext), {title => $lasttext});
+ $links .= htmltag( 'li', htmltag('h1', $lasttext), {title => $lasttext});
my $icons = '';
$faq = $last->{'faq'} if (exists($last->{'faq'}));
@@ -1766,7 +1767,6 @@ ENDTWO
} # End: row_count block for pick_box
-
sub role_select_row {
my ($roles,$title,$css_class,$show_separate_custom,$cdom,$cnum) = @_;
my $crstype = 'Course';
@@ -1989,6 +1989,29 @@ sub course_custom_roles {
}
+sub resource_info_box {
+ my ($symb,$onlyfolderflag)=@_;
+ my $return='';
+ if ($symb) {
+ $return=&Apache::loncommon::start_data_table();
+ my ($map,$id,$resource)=&Apache::lonnet::decode_symb($symb);
+ my $folder=&Apache::lonnet::gettitle($map);
+ $return.=&Apache::loncommon::start_data_table_row().
+ '
'.&mt('No context provided.').'
'; + } + return $return; + +} + ############################################## ############################################## @@ -2369,6 +2392,7 @@ returns: XHTML list as String. # \@items, {listattr => { class => 'abc', id => 'xyx' }, itemattr => {class => 'abc', id => 'xyx'}} sub list_from_array { my ($items, $args) = @_; + return unless scalar @$items; my ($ul, $li) = inittags( qw(ul li) ); my $listitems = join '', map { $li->($_, $args->{itemattr}) } @$items; return $ul->( $listitems, $args->{listattr} );