version 1.127.2.1, 2017/03/19 17:59:15
|
version 1.132, 2023/07/29 20:33:25
|
Line 36 use Apache::lonlocal;
|
Line 36 use Apache::lonlocal;
|
use Apache::lonnavmaps(); |
use Apache::lonnavmaps(); |
use Apache::longroup(); |
use Apache::longroup(); |
use Apache::portfolio(); |
use Apache::portfolio(); |
|
use Apache::lonuserutils(); |
use Apache::Constants qw(:common :http); |
use Apache::Constants qw(:common :http); |
use HTML::Entities; |
use HTML::Entities; |
use LONCAPA::map(); |
use LONCAPA::map(); |
Line 335 END
|
Line 336 END
|
$link = '<a href="'.&HTML::Entities::encode($actionlinks{$action}.$group,'<>&"'). |
$link = '<a href="'.&HTML::Entities::encode($actionlinks{$action}.$group,'<>&"'). |
'">'.$lt{$action}.'</a>'; |
'">'.$lt{$action}.'</a>'; |
} else { |
} else { |
$link = |
$link = |
&Apache::longroup::get_group_link($cdom,$cnum,$group,$navmap); |
&Apache::longroup::get_group_link($cdom,$cnum,$group,$navmap, |
|
$view_permission); |
if ($link) { |
if ($link) { |
$link = '<a href="'.$link; |
$link = '<a href="'.$link; |
$link .= (($link=~/\?/)?'&':'?').'ref=grouplist'; |
$link .= (($link=~/\?/)?'&':'?').'ref=grouplist'; |
Line 400 END
|
Line 402 END
|
} else { |
} else { |
my @coursegroups = split(/:/,$env{'request.course.groups'}); |
my @coursegroups = split(/:/,$env{'request.course.groups'}); |
if (@coursegroups > 0) { |
if (@coursegroups > 0) { |
|
my $numlinks = 0; |
$r->print('<br /><br />'); |
$r->print('<br /><br />'); |
my %curr_groups = &Apache::longroup::coursegroups($cdom,$cnum); |
my %curr_groups = &Apache::longroup::coursegroups($cdom,$cnum); |
if (%curr_groups) { |
if (%curr_groups) { |
Line 416 END
|
Line 419 END
|
$curr_groups{$group}); |
$curr_groups{$group}); |
my $description = &unescape( |
my $description = &unescape( |
$group_info{description}); |
$group_info{description}); |
my $link = |
my ($link,$hidden) = |
&Apache::longroup::get_group_link($cdom,$cnum,$group,$navmap). |
&Apache::longroup::get_group_link($cdom,$cnum,$group,$navmap, |
'&ref=grouplist'; |
$view_permission); |
$r->print('<span style="font-size: larger"><a href="'.$link.'">'.$group,'</a></span><br /><small>'.$description.'</small><br /><br />'); |
if ($link) { |
|
$link .= '&ref=grouplist'; |
|
$r->print('<span style="font-size: larger"><a href="'.$link.'">'. |
|
$description.'</a></span><br /><br />'); |
|
$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('<span style="font-size: larger">'.$description.'</a></span>'. |
|
'<br />'.$output.'<br /><br />'); |
|
$numlinks ++; |
|
} |
|
} |
} |
} |
} |
} |
|
if (!$numlinks) { |
|
$r->print( |
|
'<p class="LC_info">' |
|
.&mt('You do not currently have access to any '.$gpterm.'s' |
|
.' in this '.lc($crstype).'.') |
|
.'</p>' |
|
); |
|
} |
} else { |
} else { |
$r->print( |
$r->print( |
'<p class="LC_info">' |
'<p class="LC_info">' |
Line 915 function changeSort(caller) {
|
Line 942 function changeSort(caller) {
|
if ($env{'form.refpage'} eq 'grouplist') { |
if ($env{'form.refpage'} eq 'grouplist') { |
&Apache::lonhtmlcommon::add_breadcrumb |
&Apache::lonhtmlcommon::add_breadcrumb |
({href=>"/adm/$cdom/$cnum/$env{'form.groupname'}/smppg?ref=grouplist", |
({href=>"/adm/$cdom/$cnum/$env{'form.groupname'}/smppg?ref=grouplist", |
text=>"Group: $description",}); |
text=>&mt('Group').": $description", |
|
no_mt=>1}); |
} |
} |
} |
} |
|
|
Line 1791 sub get_quota_constraints {
|
Line 1819 sub get_quota_constraints {
|
my ($crsquota,$freespace,$maxposs); |
my ($crsquota,$freespace,$maxposs); |
$crsquota = $env{'course.'.$env{'request.course.id'}.'.internal.coursequota'}; |
$crsquota = $env{'course.'.$env{'request.course.id'}.'.internal.coursequota'}; |
if ($crsquota eq '') { |
if ($crsquota eq '') { |
$crsquota = 20; |
my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
|
my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; |
|
my $crstype = &Apache::loncommon::course_type(); |
|
my %domdefs = &Apache::lonnet::get_domain_defaults($cdom); |
|
my %coursehash = ( |
|
'internal.coursecode' => $env{'course.'.$env{'request.course.id'}.'.internal.coursecode'}, |
|
'internal.textbook' => $env{'course.'.$env{'request.course.id'}.'.internal.textbook'}, |
|
); |
|
my %staticdefaults = ( |
|
coursequota => 20, |
|
); |
|
my $quotatype = &Apache::lonuserutils::get_extended_type($cdom,$cnum,$crstype,\%coursehash); |
|
if ($crsquota eq '') { |
|
$crsquota = $domdefs{$quotatype.'coursequota'}; |
|
if ($crsquota eq '') { |
|
$crsquota = $staticdefaults{'coursequota'}; |
|
} |
|
} |
} |
} |
$freespace = $crsquota - &Apache::longroup::sum_quotas(); |
$freespace = $crsquota - &Apache::longroup::sum_quotas(); |
if ($action eq 'create') { |
if ($action eq 'create') { |