[LON-CAPA-cvs] cvs: loncom /html/adm/help/tex Docs_About_Group_Files.tex /interface londocs.pm portfolio.pm
raeburn
lon-capa-cvs@mail.lon-capa.org
Wed, 22 Nov 2006 03:56:42 -0000
raeburn Tue Nov 21 22:56:42 2006 EDT
Added files:
/loncom/html/adm/help/tex Docs_About_Group_Files.tex
Modified files:
/loncom/interface portfolio.pm londocs.pm
Log:
Show information about how to get to get viewable group portfolio files
Add "Group Files" button to Course Documents Editor to allow iaddition of a course's "aboutme" page which includes information about group files
Add documentation for "Group Files" button
Index: loncom/interface/portfolio.pm
diff -u loncom/interface/portfolio.pm:1.173 loncom/interface/portfolio.pm:1.174
--- loncom/interface/portfolio.pm:1.173 Tue Nov 21 16:38:44 2006
+++ loncom/interface/portfolio.pm Tue Nov 21 22:56:36 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network
# portfolio browser
#
-# $Id: portfolio.pm,v 1.173 2006/11/21 21:38:44 raeburn Exp $
+# $Id: portfolio.pm,v 1.174 2006/11/22 03:56:36 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -101,7 +101,6 @@
# FIXME: This line should be deleted once Portfolio uses breadcrumbs
$r->print(&Apache::loncommon::help_open_topic('Portfolio About', 'Help on the portfolio'));
-
$r->print(<<"TABLE");
<table id="LC_portfolio_actions">
<tr id="LC_portfolio_upload">
@@ -762,9 +761,16 @@
$info .= '<br /><ul><li>'.&mt('Public files are available to anyone without the need for login.');
$info .= '</li><li>'.&mt('Passphrase-protected files do not require log-in, but will require the viewer to enter the passphrase you set.');
$info .= '</li><li>'.&explain_conditionals();
- $info .= '</li></ul>';
+ $info .= '</li></ul>'.
+ &mt('A listing of files viewable without log-in is available at: ')."<a href=\"/adm/$udom/$uname/aboutme/portfolio\">http://$ENV{'SERVER_NAME'}/adm/$udom/$uname/aboutme/portfolio</a>.<br />";
if ($group eq '') {
- $info .= (&mt("A listing of files viewable without log-in is available at: <a href='/adm/$udom/$uname/aboutme/portfolio'>http://$ENV{'SERVER_NAME'}/adm/$udom/$uname/aboutme/portfolio</a>.<br />For logged in users a 'Display file listing' link will also appear (when there are viewable files) on your personal information page:<br /><a href='/adm/$udom/$uname/aboutme'>http://$ENV{'SERVER_NAME'}/adm/$udom/$uname/aboutme</a><br />"));
+ $info .= &mt("For logged in users a 'Display file listing' link will also appear (when there are viewable files) on your personal information page:");
+ } else {
+ $info .= &mt("For logged in users a 'Display file listing' link will also appear (when there are viewable files) on the course information page:");
+ }
+ $info .= "<br /><a href=\"/adm/$udom/$uname/aboutme\">http://$ENV{'SERVER_NAME'}/adm/$udom/$uname/aboutme</a><br />";
+ if ($group ne '') {
+ $info .= &mt("Users with privileges to edit course contents may add a course information page to a course using the 'Course Info' button in DOCS").'<br />';
}
} else {
$header = '<h3>'.&mt('Conditional access controls for file: [_1]',$port_path.$env{'form.currentpath'}.$env{'form.access'}).'</h3>'.
@@ -1748,19 +1754,7 @@
my ($r,$url,$group)=@_;
my $fname=$env{'form.uploaddoc.filename'};
my $filesize = (length($env{'form.uploaddoc'})) / 1000; #express in k (1024?)
- my $disk_quota;
- if (defined($group)) {
- my $grp_quota = &get_group_quota($group); # quota expressed in k
- if ($grp_quota ne '') {
- $disk_quota = $grp_quota;
- } else {
- $disk_quota = 0;
- }
- } else {
- $disk_quota = &Apache::loncommon::get_user_quota($env{'user.name'},
- $env{'user.domain'}); #expressed in Mb
- $disk_quota = 1000 * $disk_quota; # convert from Mb to kb
- }
+ my $disk_quota = &get_quota($group);
$fname=&Apache::lonnet::clean_filename($fname);
my $portfolio_root=&get_portfolio_root();
@@ -2026,6 +2020,24 @@
return $output;
}
+sub get_quota {
+ my ($group) = @_;
+ my $disk_quota;
+ if (defined($group)) {
+ my $grp_quota = &get_group_quota($group); # quota expressed in k
+ if ($grp_quota ne '') {
+ $disk_quota = $grp_quota;
+ } else {
+ $disk_quota = 0;
+ }
+ } else {
+ $disk_quota = &Apache::loncommon::get_user_quota($env{'user.name'},
+ $env{'user.domain'}); #expressed in Mb
+ $disk_quota = 1000 * $disk_quota; # convert from Mb to kb
+ }
+ return $disk_quota;
+}
+
sub handler {
# this handles file management
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.254 loncom/interface/londocs.pm:1.255
--- loncom/interface/londocs.pm:1.254 Mon Nov 20 12:45:11 2006
+++ loncom/interface/londocs.pm Tue Nov 21 22:56:36 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.254 2006/11/20 17:45:11 albertel Exp $
+# $Id: londocs.pm,v 1.255 2006/11/22 03:56:36 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2359,6 +2359,7 @@
'Docs_About_Bulletin_Board,Docs_Editing_Templated_Pages');
$help{'My Personal Info'} = &Apache::loncommon::help_open_topic(
'Docs_About_My_Personal_Info,Docs_Editing_Templated_Pages');
+ $help{'Group Files'} = &Apache::loncommon::help_open_topic('Docs_About_Group_Files');
$help{'Caching'} = &Apache::loncommon::help_open_topic('Caching');
# does this user have privileges to modify docs
@@ -2553,6 +2554,7 @@
'scuf' => 'Score Upload Form',
'bull' => 'Bulletin Board',
'mypi' => 'My Personal Info',
+ 'grpo' => 'Group Files',
'abou' => 'About User',
'imsf' => 'Import IMS package',
'file' => 'File',
@@ -2817,6 +2819,15 @@
onClick="javascript:makeabout();" />
</nobr>
</form>
+<br /><form action="/adm/coursedocs" method="post" name="newgroupfiles">
+$uploadtag
+<input type=hidden name="importdetail"
+value="Group Files=/adm/$coursedom/$coursenum/aboutme">
+<nobr>
+<input name="newgroupfiles" type="submit" value="$lt{'grpo'}" />
+$help{'Group Files'}
+</nobr>
+</form>
ENDFORM
}
if ($env{'form.pagepath'}) {
Index: loncom/html/adm/help/tex/Docs_About_Group_Files.tex
+++ loncom/html/adm/help/tex/Docs_About_Group_Files.tex
\label{Docs_About_Group_Files}
\textbf{Group Files}\index{Group Files} adds a page with information
about files located in file repositories within course groups.
Which files are listed as viewable will depend on the types of access controls set for individual files, and the identity of the person viewing the Group Files page.