--- loncom/interface/loncoursegroups.pm 2009/02/13 20:20:29 1.93
+++ loncom/interface/loncoursegroups.pm 2023/07/29 20:33:25 1.132
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: loncoursegroups.pm,v 1.93 2009/02/13 20:20:29 schafran Exp $
+# $Id: loncoursegroups.pm,v 1.132 2023/07/29 20:33:25 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -31,11 +31,14 @@ use strict;
use Apache::lonnet;
use Apache::loncommon();
use Apache::lonhtmlcommon();
+use Apache::lonhtmlgateway;
use Apache::lonlocal;
use Apache::lonnavmaps();
use Apache::longroup();
use Apache::portfolio();
+use Apache::lonuserutils();
use Apache::Constants qw(:common :http);
+use HTML::Entities;
use LONCAPA::map();
use lib '/home/httpd/lib/perl/';
use LONCAPA;
@@ -54,7 +57,7 @@ sub handler {
if (! ($env{'request.course.fn'})) {
# Not in a course
$env{'user.error.msg'}=
- "/adm/coursegroups:mdg:0:0:Cannot edit or view course groups";
+ "/adm/coursegroups:mdg:0:0:Cannot edit or view course/community groups";
return HTTP_NOT_ACCEPTABLE;
}
@@ -77,8 +80,8 @@ sub handler {
my %functions = (
email => 'Send Messages',
discussion => 'Discussion Boards',
- chat => 'Chat',
- files => 'File Repository',
+ chat => 'Chat Room',
+ files => 'Group Portfolio',
roster => 'Membership Roster',
homepage => $ucgpterm.' home page',
);
@@ -134,14 +137,14 @@ function changeSort(caller) {
}
function openGroupRoster(group,status) {
var url = '/adm/grouproster?';
- url += 'group='+group+'&status='+status+'&ref=popup';
- var title = 'Group Membership';
+ url += 'group='+group+'&status='+status+'&ref=popup';
+ var title = 'Group_Membership';
var options = 'scrollbars=1,resizable=1,menubar=0';
options += ',width=700,height=600';
rosterbrowser = open(url,title,options,'1');
rosterbrowser.focus();
}\n|;
- $r->print(&header('Groups',$jscript,$action,$state));
+ $r->print(&header('My Space',$jscript,$action,$state));
if ($env{'form.refpage'} eq 'cusr') {
&Apache::lonhtmlcommon::add_breadcrumb
({href=>"/adm/createuser",
@@ -168,13 +171,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',
@@ -188,7 +191,7 @@ sub display_groups {
crtd => 'Created',
last => 'Last Modified',
func => 'Collaborative Tools',
- quot => 'Quota (Mb)',
+ quot => 'Quota (MB)',
memb => 'Members',
file => 'Files',
dibd => 'Discussion Boards',
@@ -221,6 +224,14 @@ sub display_groups {
$status);
if (%curr_groups) {
+ my $navmap=Apache::lonnavmaps::navmap->new();
+ if (!defined($navmap)) {
+ $r->print('
'.
+ &mt('It is recommended that you [_1]re-initialize the course[_2] and then return to this page.','','').
+ '
'.$lt{'crng'}.'');
@@ -240,7 +251,7 @@ sub display_groups {
' + .&mt('You do not currently have access to any '.$gpterm.'s' + .' in this '.lc($crstype).'.') + .'
' + ); + } } else { - $r->print(&mt('You are not currently a member of any active '.$gpterm.'s in this '.lc($crstype).'.')); + $r->print( + '' + .&mt('You are not currently a member of any active '.$gpterm.'s' + .' in this '.lc($crstype).'.') + .'
' + ); } } return; @@ -537,7 +597,7 @@ sub group_administration { if (ref($stored{'autorole'}) eq 'ARRAY') { foreach my $role (@{$stored{'autorole'}}) { - unless ($role eq 'cc') { + unless (($role eq 'cc') || ($role eq 'co')) { $elements{'modify'}{'change_settings'}{'sec_'.$role} = 'selectbox'; } @@ -785,7 +845,7 @@ sub group_administration { } var maxposs = '.sprintf("%.2f",$maxposs).'; if (newquota > maxposs) { - alert("The file repository quota you entered for this group ("+newquota+" Mb) exceeds the maximum possible ("+maxposs+" Mb). Please enter a smaller number."); + alert("The group portfolio quota you entered for this group ("+newquota+" MB) exceeds the maximum possible ("+maxposs+" MB). Please enter a smaller number."); return; } var re_quota = '.$float_check.'; @@ -804,7 +864,7 @@ sub group_administration { } } if (warn_zero == 1) { - alert("You have indicated that the file repository 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; } } @@ -870,7 +930,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',}); } @@ -882,7 +942,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}); } } @@ -1086,7 +1147,7 @@ sub display_control { &add_members_form($r,$cdom,$cnum,$action,$state,$page,$startdate, $enddate,$groupname,$description,$granularity, $quota,$sectioncount,$tools,$functions,$stored, - $states,$navbuttons,$gpterm,$ucgpterm); + $states,$navbuttons,$gpterm,$ucgpterm,$crstype); } elsif ($state eq 'pick_members') { &choose_members_form($r,$cdom,$cnum,$action,$state,$page, $groupname,$description,$granularity,$quota, @@ -1119,31 +1180,36 @@ sub display_control { my %stored = &retrieve_settings($cdom,$cnum,$groupname,$action); if ($state eq 'verify') { &verify_delete($r,$groupname,$state,$action,$page,$states, - \%stored); + \%stored,$crstype); } elsif ($state eq 'result') { - &delete_group($r,$cdom,$cnum,$groupname); + &delete_group($r,$cdom,$cnum,$groupname,$crstype); } } elsif ($action eq 'reenable') { my %stored = &retrieve_settings($cdom,$cnum,$groupname,$action); if ($state eq 'verify') { &verify_reenable($r,$groupname,$state,$action,$page,$states, - \%stored); + \%stored,$crstype); } elsif ($state eq 'result') { - &reenable_group($r,$cdom,$cnum,$groupname); + &reenable_group($r,$cdom,$cnum,$groupname,$crstype); } } } sub verify_delete { - my ($r,$groupname,$formname,$action,$page,$states,$stored) = @_; + my ($r,$groupname,$formname,$action,$page,$states,$stored,$crstype) = @_; $r->print(&Apache::lonhtmlcommon::echo_form_input([])); $r->print(&mt('You have requested deletion of the group [_1].' ,''.$stored->{'description'}.''). '