[LON-CAPA-cvs] cvs: loncom /interface lonviewclasslist.pm
raeburn
raeburn at source.lon-capa.org
Mon Mar 16 20:08:49 EDT 2015
raeburn Tue Mar 17 00:08:49 2015 EDT
Modified files:
/loncom/interface lonviewclasslist.pm
Log:
- Text used determined by context (either Community or Course): additional
phrases.
Index: loncom/interface/lonviewclasslist.pm
diff -u loncom/interface/lonviewclasslist.pm:1.16 loncom/interface/lonviewclasslist.pm:1.17
--- loncom/interface/lonviewclasslist.pm:1.16 Sun Oct 26 15:20:25 2014
+++ loncom/interface/lonviewclasslist.pm Tue Mar 17 00:08:48 2015
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to display the classlist
#
-# $Id: lonviewclasslist.pm,v 1.16 2014/10/26 15:20:25 raeburn Exp $
+# $Id: lonviewclasslist.pm,v 1.17 2015/03/17 00:08:48 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -270,7 +270,7 @@
}
if ($env{'form.action'} eq 'setenv') {
- $Str .= &process_student_prefs();
+ $Str .= &process_student_prefs($crstype);
}
$Str .= '<h2>'.$heading.'</h2>';
@@ -297,7 +297,7 @@
if ($viewsettings->{'student_opt_in'}) {
if ($env{'request.role'} =~ /^st/) {
- $Str .= &print_roster_form();
+ $Str .= &print_roster_form($crstype);
}
%publicroster = &Apache::lonnet::dump('publicroster',$cdom,$cnum);
}
@@ -428,6 +428,7 @@
}
sub print_roster_form {
+ my ($crstype) = @_;
my $cid = $env{'request.course.id'};
my $showinroster = $env{'environment.internal.'.$cid.'.showinroster'};
my ($showoff,$showon);
@@ -438,13 +439,17 @@
$showoff = ' checked="checked" ';
$showon = ' ';
}
+ my $singular = 'student';
+ if ($crstype eq 'Community') {
+ $singular = 'member';
+ }
my $output =
'<div class="LC_left_float">'
.'<fieldset><legend>'.&mt('Your roster setting').'</legend>';
if ($showinroster) {
- $output .= &mt('You are currently listed in the student-viewable roster.');
+ $output .= &mt("You are currently listed in the $singular-viewable roster.");
} else {
- $output .= &mt('You are currently [_1]not[_2] listed in the student-viewable roster.','<b>','</b>');
+ $output .= &mt("You are currently [_1]not[_2] listed in the $singular-viewable roster.",'<b>','</b>');
}
$output .= '<br />'.&mt('Include yourself in the roster?').' '.
'<form name="studentparm" method="post" action="">'.
@@ -458,6 +463,7 @@
}
sub process_student_prefs {
+ my ($crstype) = @_;
my $cid = $env{'request.course.id'};
my $cdom = $env{'course.'.$cid.'.domain'};
my $cnum = $env{'course.'.$cid.'.num'};
@@ -474,6 +480,11 @@
if ($pubroster{$student}) {
$sturoster = 1;
}
+
+ my $singular = 'student';
+ if ($crstype eq 'Community') {
+ $singular = 'member';
+ }
my $output;
if ($sturoster ne $showinroster) {
my %changeHash = (
@@ -487,7 +498,7 @@
if ($result eq 'ok') {
$output .=
&Apache::lonhtmlcommon::confirm_success(
- &mt('Display of your name in the student-viewable roster set to [_1].','<b>'.$visibility.'</b>'));
+ &mt("Display of your name in the $singular-viewable roster set to [_1].",'<b>'.$visibility.'</b>'));
} else {
$output .=
&Apache::lonhtmlcommon::confirm_success(
@@ -501,7 +512,7 @@
} else {
$output .=
&Apache::lonhtmlcommon::confirm_success(
- &mt('Display of your name in the student-viewable roster unchanged (set to [_1]).','<b>'.$visibility.'</b>'));
+ &mt("Display of your name in the $singular-viewable roster unchanged (set to [_1]).",'<b>'.$visibility.'</b>'));
}
$output = &Apache::loncommon::confirmwrapper($output);
return $output;
More information about the LON-CAPA-cvs
mailing list