version 1.370, 2016/01/26 14:30:25
|
version 1.372, 2016/06/10 22:31:27
|
Line 1704 sub show_return_link {
|
Line 1704 sub show_return_link {
|
if ($env{'request.noversionuri'}=~m{^/priv/} || |
if ($env{'request.noversionuri'}=~m{^/priv/} || |
$env{'request.uri'}=~m{^/priv/}) { return 1; } |
$env{'request.uri'}=~m{^/priv/}) { return 1; } |
return if ($env{'request.noversionuri'} eq '/adm/supplemental'); |
return if ($env{'request.noversionuri'} eq '/adm/supplemental'); |
|
return if (($env{'course.'.$env{'request.course.id'}.'.type'} eq 'Placement') && |
|
(!$env{'request.role.adv'})); |
if (($env{'request.noversionuri'} =~ m{^/adm/(viewclasslist|navmaps)($|\?)}) |
if (($env{'request.noversionuri'} =~ m{^/adm/(viewclasslist|navmaps)($|\?)}) |
|| ($env{'request.noversionuri'} =~ m{^/adm/.*/aboutme($|\?)})) { |
|| ($env{'request.noversionuri'} =~ m{^/adm/.*/aboutme($|\?)})) { |
|
|
Line 1868 returns: nothing
|
Line 1869 returns: nothing
|
|
|
sub breadcrumbs { |
sub breadcrumbs { |
my ($component,$component_help,$menulink,$helplink,$css_class,$no_mt, |
my ($component,$component_help,$menulink,$helplink,$css_class,$no_mt, |
$CourseBreadcrumbs,$topic_help,$topic_help_text) = @_; |
$CourseBreadcrumbs,$topic_help,$topic_help_text,$crstype) = @_; |
# |
# |
$css_class ||= 'LC_breadcrumbs'; |
$css_class ||= 'LC_breadcrumbs'; |
|
|
Line 1883 returns: nothing
|
Line 1884 returns: nothing
|
# |
# |
# The first one should be the course or a menu link |
# The first one should be the course or a menu link |
if (!defined($menulink)) { $menulink=1; } |
if (!defined($menulink)) { $menulink=1; } |
|
if ((($crstype eq 'Placement') || (($env{'request.course.id'}) && |
|
($env{'course.'.$env{'request.course.id'}.'.type'} eq 'Placement'))) && |
|
(!$env{'request.role.adv'})) { |
|
undef($menulink); |
|
} |
if ($menulink) { |
if ($menulink) { |
my $description = 'Menu'; |
my $description = 'Menu'; |
my $no_mt_descr = 0; |
my $no_mt_descr = 0; |
Line 2667 sub resource_info_box {
|
Line 2673 sub resource_info_box {
|
# |
# |
|
|
sub display_usage { |
sub display_usage { |
my ($current_disk_usage,$disk_quota) = @_; |
my ($current_disk_usage,$disk_quota,$context) = @_; |
my $usage = $current_disk_usage/1000; |
my $usage = $current_disk_usage/1024; |
my $quota = $disk_quota/1000; |
my $quota = $disk_quota/1024; |
my $percent; |
my $percent; |
if ($disk_quota == 0) { |
if ($disk_quota == 0) { |
$percent = 100.0; |
$percent = 100.0; |
Line 2693 sub display_usage {
|
Line 2699 sub display_usage {
|
if ($prog_width > 100) { |
if ($prog_width > 100) { |
$prog_width = 100; |
$prog_width = 100; |
} |
} |
|
my $display = 'block'; |
|
if ($context eq 'authoring') { |
|
$display = 'inline'; |
|
} |
return ' |
return ' |
<div id="meter1" align="left" '.$cssclass.'>'.&mt('Currently using [_1] of the [_2] available.',$usage.' MB <span style="font-weight:bold;">('.$percent.'%)</span>',$quota.' MB')."\n". |
<div id="meter1" align="left" style="display:'.$display.'" '.$cssclass.'>'.&mt('Currently using [_1] of the [_2] available.',$usage.' MB <span style="font-weight:bold;">('.$percent.'%)</span>',$quota.' MB')."\n". |
' <div id="meter2" style="display:block; margin-top:5px; margin-bottom:5px; margin-left:0px; margin-right:0px; width:400px; border:1px solid #000000; height:10px;">'."\n". |
' <div id="meter2" style="display:block; margin-top:3px; margin-bottom:3px; margin-left:0px; margin-right:0px; width:400px; border:1px solid #000000; height:10px;">'."\n". |
' <div id="meter3" style="display:block; background-color:'.$color.'; width:'.$prog_width.'%; height:10px; color:#000000; margin:0px;"></div>'."\n". |
' <div id="meter3" style="display:block; background-color:'.$color.'; width:'.$prog_width.'%; height:10px; color:#000000; margin:0px;"></div>'."\n". |
' </div>'."\n". |
' </div>'."\n". |
' </div>'; |
' </div>'; |