--- loncom/interface/lonviewclasslist.pm 2014/10/26 15:20:25 1.16
+++ loncom/interface/lonviewclasslist.pm 2024/07/04 02:15:00 1.18.2.1
@@ -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.18.2.1 2024/07/04 02:15:00 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -270,7 +270,7 @@ sub html_classlist {
}
if ($env{'form.action'} eq 'setenv') {
- $Str .= &process_student_prefs();
+ $Str .= &process_student_prefs($crstype);
}
$Str .= '
'.$heading.'
';
@@ -279,7 +279,6 @@ sub html_classlist {
$cdom = $env{'course.'.$cid.'.domain'};
$cnum = $env{'course.'.$cid.'.num'};
- my $title;
if ($viewsettings->{'limit_to_section'}) {
if ($env{'request.course.sec'} eq '') {
$title = &mt($titleplural.' with no section');
@@ -293,11 +292,13 @@ sub html_classlist {
} else {
$title = &mt($titleplural.' in any section');
$listtype = 'in the course';
+ if ($crstype eq 'Community') {
+ $listtype = 'in the community';
+ }
}
-
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 +429,7 @@ sub html_classlist {
}
sub print_roster_form {
+ my ($crstype) = @_;
my $cid = $env{'request.course.id'};
my $showinroster = $env{'environment.internal.'.$cid.'.showinroster'};
my ($showoff,$showon);
@@ -438,13 +440,17 @@ sub print_roster_form {
$showoff = ' checked="checked" ';
$showon = ' ';
}
+ my $singular = 'student';
+ if ($crstype eq 'Community') {
+ $singular = 'member';
+ }
my $output =
''
.'