--- loncom/interface/loncoursegroups.pm 2012/12/17 17:27:20 1.116
+++ loncom/interface/loncoursegroups.pm 2016/02/26 21:44:39 1.128
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: loncoursegroups.pm,v 1.116 2012/12/17 17:27:20 raeburn Exp $
+# $Id: loncoursegroups.pm,v 1.128 2016/02/26 21:44:39 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -31,6 +31,7 @@ use strict;
use Apache::lonnet;
use Apache::loncommon();
use Apache::lonhtmlcommon();
+use Apache::lonhtmlgateway;
use Apache::lonlocal;
use Apache::lonnavmaps();
use Apache::longroup();
@@ -188,7 +189,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',
@@ -327,19 +328,23 @@ END
if (!$functionality) {
$functionality = &mt('None available');
}
- my $link = $actionlinks{$action};
+ my $link;
if ($action eq 'modify' || $action eq 'delete' ||
$action eq 'reenable') {
- $link .= $group;
+ $link = $actionlinks{$action}.$group.'">'.$lt{$action}.'';
} else {
- $link .=
- &Apache::longroup::get_group_link($cdom,$cnum,$group,$navmap);
- $link .= (($link=~/\?/)?'&':'?').'ref=grouplist';
- if (exists($env{'form.refpage'})) {
- $link .= '&refpage='.$env{'form.refpage'};
- }
+ $link =
+ &Apache::longroup::get_group_link($cdom,$cnum,$group,$navmap,$view_permission);
+print STDERR "link is ||$link||\n";
+ if ($link) {
+ $link = $actionlinks{$action}.$link;
+ $link .= (($link=~/\?/)?'&':'?').'ref=grouplist';
+ if (exists($env{'form.refpage'})) {
+ $link .= '&refpage='.$env{'form.refpage'};
+ }
+ $link .= '">'.$lt{$action}.'';
+ }
}
- $link .= '">'.$lt{$action}.'';
if ($action eq 'view') {
if ($manage_permission) {
$link .= ' '.$actionlinks{'modify'}.
@@ -393,6 +398,7 @@ END
} else {
my @coursegroups = split(/:/,$env{'request.course.groups'});
if (@coursegroups > 0) {
+ my $numlinks = 0;
$r->print('
');
my %curr_groups = &Apache::longroup::coursegroups($cdom,$cnum);
if (%curr_groups) {
@@ -409,12 +415,36 @@ END
$curr_groups{$group});
my $description = &unescape(
$group_info{description});
- my $link =
- &Apache::longroup::get_group_link($cdom,$cnum,$group,$navmap).
- '&ref=grouplist';
- $r->print(''.$group,'
'.$description.'
');
+ my ($link,$hidden) =
+ &Apache::longroup::get_group_link($cdom,$cnum,$group,$navmap,$view_permission);
+print STDERR "link is ||$link||\n";
+ if ($link) {
+ $link .= '&ref=grouplist';
+ $r->print(''.
+ $description.'
');
+ $numlinks ++;
+ } elsif ($hidden) {
+ my $numtools = 0;
+ my $refarg = '&ref=grouplist';
+ my $output =
+ &Apache::longroup::display_group_links($r,$env{'form.grade_target'},$group,'view',
+ $refarg,\$numtools,$hidden,%group_info);
+ if ($numtools) {
+ $r->print(''.$description.''.
+ '
'.$output.'
');
+ $numlinks ++;
+ }
+ }
}
}
+ if (!$numlinks) {
+ $r->print(
+ '
' + .&mt('You do not currently have access to any '.$gpterm.'s' + .' in this '.lc($crstype).'.') + .'
' + ); + } } else { $r->print( '' @@ -811,7 +841,7 @@ sub group_administration { } var maxposs = '.sprintf("%.2f",$maxposs).'; if (newquota > maxposs) { - alert("The group portfolio 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.'; @@ -830,7 +860,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; } } @@ -1492,7 +1522,7 @@ sub header { {'add_entries' => $loaditems,}); my $output = <<"END"; $start_page -