[LON-CAPA-cvs] cvs: loncom /interface lonhtmlcommon.pm
raeburn
raeburn@source.lon-capa.org
Fri, 30 Oct 2009 05:10:03 -0000
raeburn Fri Oct 30 05:10:03 2009 EDT
Modified files:
/loncom/interface lonhtmlcommon.pm
Log:
- Accommodate Communities:
- appropriate role titles for course type in &role_select_row().
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.235 loncom/interface/lonhtmlcommon.pm:1.236
--- loncom/interface/lonhtmlcommon.pm:1.235 Tue Sep 8 20:48:34 2009
+++ loncom/interface/lonhtmlcommon.pm Fri Oct 30 05:10:03 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.235 2009/09/08 20:48:34 raeburn Exp $
+# $Id: lonhtmlcommon.pm,v 1.236 2009/10/30 05:10:03 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1590,6 +1590,10 @@
sub role_select_row {
my ($roles,$title,$css_class,$show_separate_custom,$cdom,$cnum) = @_;
+ my $crstype = 'Course';
+ if ($cdom ne '' && $cnum ne '') {
+ $crstype = &Apache::loncommon::course_type($cdom.'_'.$cnum);
+ }
my $output;
if (defined($title)) {
$output = &row_title($title,$css_class);
@@ -1614,7 +1618,7 @@
$plrole = &mt('Custom Role');
}
} else {
- $plrole=&Apache::lonnet::plaintext($role);
+ $plrole=&Apache::lonnet::plaintext($role,$crstype);
}
if (($role ne 'cr') || (!$show_separate_custom)) {
$output .= ' <option value="'.$role.'">'.$plrole.'</option>';