[LON-CAPA-cvs] cvs: loncom /interface lonhtmlcommon.pm lonmodifycourse.pm
raeburn
raeburn@source.lon-capa.org
Mon, 12 Jan 2009 01:37:57 -0000
raeburn Mon Jan 12 01:37:57 2009 EDT
Modified files:
/loncom/interface lonmodifycourse.pm lonhtmlcommon.pm
Log:
- If $component contained course title
&lonhtmlcommon::breadcrumbs() would generate ISE is title included [].
- Do &mt() call before passing $component to lonhtmlcommon::breadcrumbs()
- Additional argument (no_mt) in lonhtmlcommon::breadcrumbs().
- Append course title to "Current automated enrollment settings for " heading.
Index: loncom/interface/lonmodifycourse.pm
diff -u loncom/interface/lonmodifycourse.pm:1.40 loncom/interface/lonmodifycourse.pm:1.41
--- loncom/interface/lonmodifycourse.pm:1.40 Mon Oct 27 14:32:30 2008
+++ loncom/interface/lonmodifycourse.pm Mon Jan 12 01:37:57 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# handler for DC-only modifiable course settings
#
-# $Id: lonmodifycourse.pm,v 1.40 2008/10/27 14:32:30 bisitz Exp $
+# $Id: lonmodifycourse.pm,v 1.41 2009/01/12 01:37:57 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -269,7 +269,7 @@
$disp_table .= &Apache::loncommon::end_data_table()."\n";
&print_header($r,$cdesc);
$r->print('
-<h3>'.$lt{'caes'}.'</h3>
+<h3>'.$lt{'caes'}.$cdesc.'</h3>
<p>
<form action="/adm/modifycourse" method="post" name="viewparms">
'.$lt{'cose'}.'<ul><li>'.&mt('Settings that can be modified by a [_1] using the <a href="/adm/populate">Automated Enrollment Manager</a>.',$cctitle).'</li><li>'.&mt('Settings that may only be modified by a [_1] from this menu.',$dctitle).'</li></ul>
@@ -1009,9 +1009,13 @@
$js,$starthash));
my $bread_text = "View/Modify Courses";
if ($cdesc ne '') {
- $bread_text = "Course Settings: $cdesc";
- }
- $r->print(&Apache::lonhtmlcommon::breadcrumbs($bread_text));
+ $bread_text = &mt('Course Settings: [_1]',$cdesc);
+ my $no_mt = 1;
+ $r->print(&Apache::lonhtmlcommon::breadcrumbs($bread_text,undef,undef,
+ undef,undef,$no_mt));
+ } else {
+ $r->print(&Apache::lonhtmlcommon::breadcrumbs($bread_text));
+ }
return;
}
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.196 loncom/interface/lonhtmlcommon.pm:1.197
--- loncom/interface/lonhtmlcommon.pm:1.196 Wed Dec 17 12:59:49 2008
+++ loncom/interface/lonhtmlcommon.pm Mon Jan 12 01:37:57 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.196 2008/12/17 12:59:49 harmsja Exp $
+# $Id: lonhtmlcommon.pm,v 1.197 2009/01/12 01:37:57 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1278,6 +1278,8 @@
$menulink (boolean, controls whether to include a link to /adm/menu)
$helplink (if 'nohelp' don't include the orange help link)
$css_class (optional name for the class to apply to the table for CSS)
+ $no_mt (optional flag, 1 if &mt() is _not_ to be applied to $component
+ when including the text on the right.
Returns a string containing breadcrumbs for the current page.
=item clear_breadcrumbs
@@ -1303,7 +1305,7 @@
my @Crumbs;
sub breadcrumbs {
- my ($component,$component_help,$menulink,$helplink,$css_class) = @_;
+ my ($component,$component_help,$menulink,$helplink,$css_class,$no_mt) = @_;
#
$css_class ||= 'LC_breadcrumbs';
my $Str = "\n".'<table class="'.$css_class.'"><tr><td><ol id="LC_MenuBreadcrumbs">';
@@ -1383,8 +1385,12 @@
$Str .= $links.'</ol></td>';
#
if (defined($component)) {
- $Str .= '<td class="'.$css_class.'_component">'.
- &mt($component);
+ $Str .= '<td class="'.$css_class.'_component">';
+ if ($no_mt) {
+ $Str .= $component;
+ } else {
+ $Str .= &mt($component);
+ }
if ($icons ne '') {
$Str .= ' '.$icons;
}