'.
- 'Actions Name Size Last Modified Current Access Status ');
+ 'Actions Name Size Last Modified Current Access Status ');
}
$r->print("\n".&group_form_data()."\n");
@@ -249,13 +295,21 @@ sub display_directory {
$show_versions = 'true';
}
if (exists($versioned{$filename})) {
+ my %anchor_fields = (
+ 'selectfile' => $filename,
+ 'continue' => 'false',
+ 'currentpath' => $current_path,
+ );
if ($show_versions) {
- $version_flag{$filename} = ' ';
+ $version_flag{$filename} = &make_anchor('portfolio',\%anchor_fields,
+ ' ');
} else {
- $version_flag{$filename} = ' ';
+ $anchor_fields{'showversions'} = $filename;
+ $version_flag{$filename} = &make_anchor('portfolio',\%anchor_fields,
+ ' ');
}
} else {
- $version_flag{$filename} = '';
+ $version_flag{$filename} = ' ';
}
if ($dirptr&$testdir) {
my $colspan='colspan="2"';
@@ -264,7 +318,14 @@ sub display_directory {
}
$r->print(' ');
$r->print('Go to ... ');
- $r->print(''.$version_flag{$filename}.&make_anchor($url,$filename.'/',$current_path.$filename.'/',$env{'form.mode'},$env{"form.fieldname"},$env{'form.continue'}).'/ ');
+ my %anchor_fields = (
+ 'selectfile' => $filename.'/',
+ 'currentpath' => $current_path.$filename.'/',
+ 'mode' => $env{"form.mode"},
+ 'fieldname' => $env{"form.fieldname"},
+ 'continue' => $env{"form.continue"}
+ );
+ $r->print(''.$version_flag{$filename}.' '.&make_anchor($url,\%anchor_fields,$filename.'/').' ');
$r->print(' ');
} else {
my $css_class = 'LC_browser_file';
@@ -279,7 +340,10 @@ sub display_directory {
$line.=' />';
} else {
if (exists $locked_files{$fullpath}) {
- $line.='Locked ';
+ my %anchor_fields = (
+ 'lockinfo' => $current_path.$filename
+ );
+ $line.=''.&make_anchor($url,\%anchor_fields,'Locked').' ';
$css_class= 'LC_browser_file_locked';
} else {
if (!$can_modify) {
@@ -291,10 +355,15 @@ sub display_directory {
$line .= ' ';
}
if ($can_modify) {
- my $cat=' ';
- $line .= 'Rename ';
- $line .= ''.$version_flag{$filename}.''.$cat.' ';
+ my %anchor_fields = (
+ 'rename' => $filename,
+ currentpath => $current_path
+ );
+ $line .= &make_anchor($url,\%anchor_fields,'Rename');
+ $line .= ' '.&make_anchor($href_edit_location.$filename.'.meta',undef,$cat);
+ # ''.$cat.' ';
}
$line .= ' ';
}
@@ -432,12 +501,12 @@ sub done {
unless (defined $message) {
$message='Done';
}
- my $result = '';
+ my %anchor_fields = (
+ 'currentpath' => $env{'form.currentpath'},
+ 'fieldname' => $env{'form.fieldname'},
+ 'mode' => $env{'form.mode'}
+ );
+ my $result = ''.&make_anchor($url,\%anchor_fields,&mt($message)).' ';
return $result;
}
@@ -573,8 +642,12 @@ sub display_access {
my %access_controls = &Apache::lonnet::get_access_controls($current_permissions,$group,$file_name);
my $aclcount = keys(%access_controls);
my $header = ''.&mt('Allowing others to retrieve file: [_1]',$port_path.$env{'form.currentpath'}.$env{'form.access'}).' ';
- my $info .= &mt('Access to this file by others can be set to be one or more of the following types: public, passphrase-protected or conditional.').''.&mt('Public files are available to anyone without the need for login.').' '.&mt('Passphrase-protected files do not require log-in, but will require the viewer to enter the passphrase you set.').' '.&mt('Conditional files are accessible to logged-in users with accounts in the LON-CAPA network, who satisfy the conditions you set.').' '.&mt('The conditions can include affiliation with a particular course or group, or a user account in a specific domain.').' '.&mt('Alternatively access can be granted to people with specific LON-CAPA usernames and domains.').' ';
-
+ my $info .= &mt('Access to this file by others can be set to be one or more of the following types: public, passphrase-protected or conditional.');
+ $info .= ''.&mt('Public files are available to anyone without the need for login.');
+ $info .= ' '.&mt('Passphrase-protected files do not require log-in, but will require the viewer to enter the passphrase you set.');
+ $info .= ' '.&mt('Conditional files are accessible to logged-in users with accounts in the LON-CAPA network, who satisfy the conditions you set.').' ';
+ $info .= &mt('The conditions can include affiliation with a particular course or group, or a user account in a specific domain.').' ';
+ $info .= &mt('Alternatively access can be granted to people with specific LON-CAPA usernames and domains.').' ';
if ($group eq '') {
$info .= (&mt("Direct others to the 'Display file listing' link (shown when there are viewable files) on your personal information page:http://$ENV{'SERVER_NAME'}/adm/$udom/$uname/aboutme "));
}
@@ -619,8 +692,10 @@ sub view_access_settings {
} else {
$r->print(&mt('No access control settings currently exist for this file. ' ));
}
- $r->print(''.&mt('Return to directory listing').' ');
+ my %anchor_fields = (
+ 'currentpath' => $env{'form.currentpath'}
+ );
+ $r->print(' '.&make_anchor($url, \%anchor_fields, &mt('Return to directory listing')));
return;
}
@@ -844,12 +919,13 @@ sub update_access {
}
&close_form($r,$url);
} else {
- $r->print(''.
- &mt('Display all access settings for this file').' '.
- ' '.
- ''.&mt('Return to directory listing').' ');
+ my %anchor_fields = (
+ 'currentpath' => $env{'form.currentpath'},
+ 'access' => $env{'form.selectfile'}
+ );
+ $r->print(' '.&make_anchor($url, \%anchor_fields, &mt('Display all access settings for this file')));
+ delete $anchor_fields{'access'};
+ $r->print(' '.&make_anchor($url,\%anchor_fields,&mt('Return to directory listing')));
}
return;
}
@@ -1476,6 +1552,7 @@ sub upload {
}
}
$fname=&Apache::lonnet::clean_filename($fname);
+
my $portfolio_root=&get_portfolio_root();
my ($uname,$udom) = &get_name_dom();
my $port_path = &get_port_path();
@@ -1540,13 +1617,24 @@ sub lock_info {
} else {
$filetext = ''.$file_name.' ';
}
- $r->print(&mt('[_1] was submitted in response to problem: ',
+ if ($$array_item[(@$array_item - 1)] eq 'graded') {
+ $r->print(&mt('[_1] was submitted in response to problem: ',
+ $filetext).
+ ''.&Apache::lonnet::gettitle($$array_item[0]).
+ ' ');
+ my %course_description = &Apache::lonnet::coursedescription($$array_item[1]);
+ $r->print(&mt('In the course: [_1] ',
+ $course_description{'description'}));
+ } elsif ($$array_item[(@$array_item - 1)] eq 'handback') {
+ $r->print(&mt('[_1] was handed back in response to problem: ',
$filetext).
''.&Apache::lonnet::gettitle($$array_item[0]).
' ');
- my %course_description = &Apache::lonnet::coursedescription($$array_item[1]);
- $r->print(&mt('In the course: [_1] ',
+ my %course_description = &Apache::lonnet::coursedescription($$array_item[1]);
+ $r->print(&mt('In the course: [_1] ',
$course_description{'description'}));
+
+ }
# $r->print('the third is '.$$array_item[2].' ');
# $r->print("item is $$array_item[0] and $$array_item[0]");
}
@@ -1595,10 +1683,7 @@ sub createdir {
}
sub get_portfolio_root {
- my ($udom,$uname) = @_;
- if (!defined($uname) || !defined($udom)) {
- ($uname,$udom) = &get_name_dom();
- }
+ my ($uname,$udom) = &get_name_dom();
my $path;
if (defined($env{'form.group'})) {
$path = '/userfiles/groups/'.$env{'form.group'}.'/portfolio';