--- loncom/interface/loncoursegroups.pm 2013/12/18 01:31:43 1.122 +++ loncom/interface/loncoursegroups.pm 2020/09/09 00:23:50 1.127.2.3 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: loncoursegroups.pm,v 1.122 2013/12/18 01:31:43 raeburn Exp $ +# $Id: loncoursegroups.pm,v 1.127.2.3 2020/09/09 00:23:50 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -37,6 +37,7 @@ use Apache::lonnavmaps(); use Apache::longroup(); use Apache::portfolio(); use Apache::Constants qw(:common :http); +use HTML::Entities; use LONCAPA::map(); use lib '/home/httpd/lib/perl/'; use LONCAPA; @@ -135,7 +136,7 @@ function changeSort(caller) { } function openGroupRoster(group,status) { var url = '/adm/grouproster?'; - url += 'group='+group+'&status='+status+'&ref=popup'; + url += 'group='+group+'&status='+status+'&ref=popup'; var title = 'Group_Membership'; var options = 'scrollbars=1,resizable=1,menubar=0'; options += ',width=700,height=600'; @@ -169,13 +170,13 @@ sub display_groups { my %curr_groups = (); my %grp_info = (); my %actionlinks = ( - modify => ' ' '/adm/coursegroups?action=modify&refpage='. + $env{'form.refpage'}.'&state=pick_task&groupname=', + view => '', + delete => '/adm/coursegroups?action=delete&refpage='. + $env{'form.refpage'}.'&state=verify&groupname=', + reenable => '/adm/coursegroups?action=reenable&refpage='. + $env{'form.refpage'}.'&state=verify&groupname=', ); my %lt = &Apache::lonlocal::texthash( modify => 'Modify', @@ -226,7 +227,7 @@ sub display_groups { if (!defined($navmap)) { $r->print(''); return; } @@ -249,7 +250,7 @@ sub display_groups {
' + .&mt('You do not currently have access to any '.$gpterm.'s' + .' in this '.lc($crstype).'.') + .'
' + ); + } } else { $r->print( '' @@ -831,7 +863,7 @@ sub group_administration { } } if (warn_zero == 1) { - alert("You have indicated that the group portfolio should be enabled, but you have set the respository quota to 0 MB.\nThis will prevent any upload of files.\nPlease set a value or disable the repository feature."); + alert("You have indicated that the group portfolio should be enabled, but you have set the repository quota to 0 MB.\nThis will prevent any upload of files.\nPlease set a value or disable the repository feature."); return; } } @@ -897,7 +929,7 @@ function changeSort(caller) { faq=>9,bug=>'Instructor Interface',}); if ($action eq 'modify' || $action eq 'delete') { &Apache::lonhtmlcommon::add_breadcrumb - ({href=>"/adm/coursegroups?refpage=cusr&action=$action", + ({href=>"/adm/coursegroups?refpage=cusr&action=$action", text=>"Groups", faq=>9,bug=>'Instructor Interface',}); } @@ -909,7 +941,8 @@ function changeSort(caller) { if ($env{'form.refpage'} eq 'grouplist') { &Apache::lonhtmlcommon::add_breadcrumb ({href=>"/adm/$cdom/$cnum/$env{'form.groupname'}/smppg?ref=grouplist", - text=>"Group: $description",}); + text=>&mt('Group').": $description", + no_mt=>1}); } } @@ -1587,7 +1620,7 @@ sub group_members { future => 0, ); my $totalmembers = 0; - foreach my $member (keys %memberhash) { + foreach my $member (keys(%memberhash)) { $totalmembers ++; my ($end,$start) = split(/:/,$memberhash{$member}); unless ($start == -1) { @@ -1702,7 +1735,7 @@ sub groupsettings_options { if ($remnum) { $halfnum ++; } - my @allfunctions = sort(keys (%{$functions})); + my @allfunctions = sort(keys(%{$functions})); $r->print(&Apache::lonhtmlcommon::row_title($lt{'func'}) .'
' + .&mt('There are no active, future or previous group members to modify.') + .'
'); } return $numcurrent; } @@ -2802,7 +2839,7 @@ sub change_privs_form { } } if (!$exp_or_del) { - $r->print($lt{'nome'}.''.$lt{'nome'}.'
'); } $r->print(&Apache::lonhtmlcommon::topic_bar(4,&mt('Setting optional privileges for specific group members'))); @@ -3365,10 +3402,10 @@ sub write_group_data { &Apache::lonnet::logthis("Failed to store $gpterm $groupname ". 'in '.lc($crstype).': '.$cnum. ' in domain: '.$cdom); - $r->print('' + .&mt('An error occurred when '.$actiontype{$action}.' the '.$gpterm.'. ' + .'Please try again.') + .'
'; + $message .= &mt($tmsg.':').'