version 1.53.2.3, 2019/08/14 14:40:21
|
version 1.55, 2016/12/01 16:37:53
|
Line 128 sub advertisefeeds {
|
Line 128 sub advertisefeeds {
|
} |
} |
if ($feeds) { |
if ($feeds) { |
return '<h4>'.&mt('Available RSS Feeds and Blogs').'</h4><ul>'.$feeds.'</ul>'; |
return '<h4>'.&mt('Available RSS Feeds and Blogs').'</h4><ul>'.$feeds.'</ul>'; |
} elsif (!$edit) { |
} else { |
return '<h4>'.&mt('No available RSS Feeds and Blogs').'</h4>'; |
return '<h4>'.&mt('No available RSS Feeds and Blogs').'</h4>'; |
} |
} |
} |
} |
Line 345 sub handler {
|
Line 345 sub handler {
|
# my $title = $displayfeedname?$displayfeedname:"Available RSS Feeds and Blogs"; |
# my $title = $displayfeedname?$displayfeedname:"Available RSS Feeds and Blogs"; |
my $title = "My Space"; |
my $title = "My Space"; |
my $rss_link = &Apache::lonrss::rss_link($uname,$udom); |
my $rss_link = &Apache::lonrss::rss_link($uname,$udom); |
my $head_extra = $rss_link.'<script type="text/javascript" ' |
my $head_extra = $rss_link.'<script type="text/javascript" |
'src="/res/adm/includes/file_upload.js"></script>'; |
src="/res/adm/includes/file_upload.js"></script>'; |
my $brcrumb = [{href=>$rss_link,text=>"Available RSS Feeds and Blogs"}]; |
my $brcrumb = [{href=>$rss_link,text=>"Available RSS Feeds and Blogs"}]; |
$r->print(&Apache::loncommon::start_page($title,$head_extra, |
$r->print(&Apache::loncommon::start_page($title,$head_extra, |
{'bread_crumbs' => $brcrumb, |
{'bread_crumbs' => $brcrumb, |
Line 536 sub handler {
|
Line 536 sub handler {
|
'title' => 'Title', |
'title' => 'Title', |
'link' => 'Link', |
'link' => 'Link', |
'description' => 'Description', |
'description' => 'Description', |
'enc' => 'Podcasted enclosure'); |
'enc' => 'Podcasted enclosure'); |
my $uploadlink; |
my $uploadlink; |
if ($entry==$newid) { |
if ($entry==$newid) { |
# Generate upload link only for last (new) entry |
# Generate upload link only for last (new) entry |
# Calculate the quota space available in the user's portfolio |
# Calculate the quota space available in the user's portfolio |
my $disk_quota = &Apache::loncommon::get_user_quota($env{'user.name'}, |
my $disk_quota = &Apache::loncommon::get_user_quota($env{'user.name'}, |
$env{'user.domain'}); # expressed in MB |
$env{'user.domain'}); # expressed in MB |
my $portfolio_root = '/userfiles/portfolio'; |
my $portfolio_root = '/userfiles/portfolio'; |
my $getpropath = 1; |
my $getpropath = 1; |
my $current_disk_usage = &Apache::lonnet::diskusage( |
my $current_disk_usage = &Apache::lonnet::diskusage( |
$env{'user.domain'}, $env{'user.name'}, |
$env{'user.domain'}, $env{'user.name'}, |
$portfolio_root, $getpropath); # Expressed in kB |
$portfolio_root, $getpropath); # Expressed in kB |
# Convert to MB for use in file_selector() |
# Convert to MB for use in file_selector() |
my $free_space = $disk_quota - ($current_disk_usage / 1024.); |
my $free_space = $disk_quota - ($current_disk_usage / 1024.); |
# Format this number since it will be displayed onscreen |
# Format this number since it will be displayed onscreen |
$free_space = sprintf("%.1f", $free_space); |
$free_space = sprintf("%.1f", $free_space); |
$uploadlink=&Apache::inputtags::file_selector(0,0,'*','both','',$free_space); |
$uploadlink=&Apache::inputtags::file_selector(0,0,'*','both','',$free_space); |
} else { |
} else { |
# Otherwise, display |
# Otherwise, display |
$uploadlink='<tt>'.$newsfeed{$id.'_enclosureurl'}.'</tt>'. |
$uploadlink='<tt>'.$newsfeed{$id.'_enclosureurl'}.'</tt>'. |