'.&mt('Currently using [_1] of the [_2] available.',$usage.' MB ('.$percent.'%)',$quota.' MB')."\n".
+'
'."\n".
+' '."\n".
+'
'."\n".
+'
';
+ return &Apache::loncommon::head_subbox($disk_meter);
+}
+
sub display_directory_line {
my ($r,$select_mode, $filename, $mtime, $size, $css_class,
$line, $access_controls, $curr_access, $now, $version_flag,
@@ -195,7 +236,7 @@ sub display_directory_line {
$r->print($line); # contains first two cells of table
my $lock_info;
if ($version_flag) { # versioned can't be versioned, so TRUE when root file
- $r->print('
');
+ $r->print('
');
$r->print('
'.$version_flag.'
');
} else { # this is a graded or handed back file
my ($user,$domain) = &get_name_dom($env{'form.group'});
@@ -271,7 +312,9 @@ sub display_directory {
$display_out = '';
@@ -371,7 +414,7 @@ sub display_directory {
$colspan_fill=' colspan="4"';
}
$r->print('
');
- $r->print('
'
+ $r->print('
'
.'
'.&mt('Go to ...').'
');
my %anchor_fields = (
'selectfile' => $filename.'/',
@@ -410,8 +453,7 @@ sub display_directory {
$line .= '';
}
if ($can_modify) {
- my $cat='';
+ my $cat='';
my %anchor_fields = (
'rename' => $filename,
currentpath => $current_path
@@ -477,16 +519,20 @@ sub display_directory {
-
-
+
+
+
+
');
} else {
$r->print(&Apache::loncommon::end_data_table());
if ($can_delete) {
$r->print('
+
'.&mt('Passphrase-protected files do not require log-in, but will require the viewer to enter the passphrase you set.');
$info .= '
'.&explain_conditionals();
$info .= '
'.
- &mt('A listing of files viewable without log-in is available at: ')."http://$ENV{'SERVER_NAME'}/adm/$udom/$uname/aboutme/portfolio. ";
+ &mt('A listing of files viewable without log-in is available at: ')."".&Apache::lonnet::absolute_url($ENV{'SERVER_NAME'})."/adm/$udom/$uname/aboutme/portfolio. ";
if ($group eq '') {
$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 .= " http://$ENV{'SERVER_NAME'}/adm/$udom/$uname/aboutme ";
+ $info .= " ".&Apache::lonnet::absolute_url($ENV{'SERVER_NAME'})."/adm/$udom/$uname/aboutme ";
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").' ';
}
@@ -834,7 +880,7 @@ sub display_access {
sub explain_conditionals {
return
&mt('Conditional files are accessible to logged-in users with accounts in the LON-CAPA network, who satisfy the conditions you set.').' '."\n".
- &mt('The conditions can include affiliation with a particular course, or a user account in a specific domain.').' '."\n".
+ &mt('The conditions can include affiliation with a particular course or community, or a user account in a specific domain.').' '."\n".
&mt('Alternatively access can be granted to people with specific LON-CAPA usernames and domains.');
}
@@ -875,7 +921,7 @@ sub build_access_summary {
guest => 'Passphrase-protected',
domains => 'Conditional: domain-based',
users => 'Conditional: user-based',
- course => 'Conditional: course-based',
+ course => 'Conditional: course/community-based',
);
my @allscopes = ('public','guest','domains','users','course');
foreach my $scope (@allscopes) {
@@ -900,11 +946,16 @@ sub build_access_summary {
}
}
$r->print('
'.&mt($scope_desc{$scope}));
+ my $crstype;
if ($scope eq 'course') {
if ($chg ne 'delete') {
my $cid = $content->{'domain'}.'_'.$content->{'number'};
my %course_description = &Apache::lonnet::coursedescription($cid);
$r->print(' ('.$course_description{'description'}.')');
+ $crstype = 'Course';
+ if ($course_description{'type'} ne '') {
+ $crstype = $course_description{'type'};
+ }
}
}
$r->print('
'.&mt('Start: ').$showstart.
@@ -924,8 +975,6 @@ sub build_access_summary {
foreach my $item ('role','access','section','group') {
$r->print('
');
if ($item eq 'role') {
- my $ucscope = $scope;
- $ucscope =~ s/^(\w)/uc($1)/e;
my $role_output;
foreach my $role (@{$content->{'roles'}{$id}{$item}}) {
if ($role eq 'all') {
@@ -933,7 +982,7 @@ sub build_access_summary {
} elsif ($role =~ /^cr/) {
$role_output .= (split('/',$role))[3].',';
} else {
- $role_output .= &Apache::lonnet::plaintext($role,$ucscope).',';
+ $role_output .= &Apache::lonnet::plaintext($role,$crstype).',';
}
}
$role_output =~ s/,$//;
@@ -1059,16 +1108,22 @@ sub update_access {
my $totalnew = 0;
my $status = 'new';
my ($firstitem,$lastitem);
- foreach my $newitem ('course','domains','users') {
+ my @types = ('course','domains','users');
+ foreach my $newitem (@types) {
$allnew += $env{'form.new'.$newitem};
}
if ($allnew > 0) {
my $now = time;
my $then = $now + (60*60*24*180); # six months approx.
&open_form($r,$url);
- foreach my $newitem ('course','domains','users') {
+ my %showtypes = &Apache::lonlocal::texthash (
+ course => 'course/community',
+ domains => 'domain',
+ users => 'user',
+ );
+ foreach my $newitem (@types) {
if ($env{'form.new'.$newitem} > 0) {
- $r->print(' '.&mt('Add new [_1]-based access control for portfolio file: [_2]',&mt($newitem),$env{'form.currentpath'}.$env{'form.selectfile'}).'
');
+ $r->print(' '.&mt('Add new [_1]-based[_2] access control for portfolio file: [_3]',''.$showtypes{$newitem},'',''.$env{'form.currentpath'}.$env{'form.selectfile'}.'').'
');
$firstitem = $totalnew;
$lastitem = $totalnew + $env{'form.new'.$newitem};
$totalnew = $lastitem;
@@ -1311,7 +1366,7 @@ sub standard_settings {
&build_access_summary($r,$count,$chg,%conditionals);
$r->print(&Apache::loncommon::end_data_table());
} else {
- $r->print(&make_anchor($url,\%anchor_fields,&mt('Add conditional access')).' '.&mt('based on domain, username, or course affiliation.'));
+ $r->print(&make_anchor($url,\%anchor_fields,&mt('Add conditional access')).' '.&mt('based on domain, username, or course/community affiliation.'));
}
}
@@ -1345,10 +1400,12 @@ sub acl_status {
sub access_element {
my ($r,$type,$acl_count,$items,$access_controls,$now,$then) = @_;
- my $title = $type;
- $title =~ s/s$//;
- $title =~ s/^(\w)/uc($1)/e;
- $r->print('