--- loncom/interface/portfolio.pm 2006/07/19 21:58:16 1.139
+++ loncom/interface/portfolio.pm 2008/11/17 17:04:20 1.196
@@ -1,7 +1,7 @@
# The LearningOnline Network
# portfolio browser
#
-# $Id: portfolio.pm,v 1.139 2006/07/19 21:58:16 albertel Exp $
+# $Id: portfolio.pm,v 1.196 2008/11/17 17:04:20 schafran Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -66,12 +66,15 @@ sub group_form_data {
# receives a file name and path stub from username/userfiles/portfolio/
# returns an anchor tag consisting encoding filename and currentpath
sub make_anchor {
- my ($url, $filename, $current_path, $current_mode, $field_name,
- $continue_select) = @_;
- if ($continue_select ne 'true') {$continue_select = 'false'};
- my $anchor = '';
+ $anchor .= '">'.$inner_text.'';
return $anchor;
}
@@ -90,8 +93,27 @@ sub display_common {
'Upload file to current directory:',
'createdir' => 'Create Subdirectory',
'createdir_label' =>
- 'Create subdirectory in current directory:');
+ 'Create subdirectory in current directory:',
+ 'parse' => 'If HTML file, upload embedded images/multimedia/css/linked files'
+ );
my $escuri = &HTML::Entities::encode($r->uri,'&<>"');
+ my $help_fileupload = &Apache::loncommon::help_open_topic('Portfolio AddFiles');
+ my $help_createdir = &Apache::loncommon::help_open_topic('Portfolio CreateDirectory');
+
+ # FIXME: This line should be deleted once Portfolio uses breadcrumbs
+ $r->print(&Apache::loncommon::help_open_topic('Portfolio About', &mt('Help on the portfolio')));
+
+ my $parse_check;
+ if (!&suppress_embed_prompt()) {
+ $parse_check = <<"END";
+
+
+
+
+END
+ }
$r->print(<<"TABLE");
'.&mt('Roles').' | '.&mt('[_1] status',$type).' | '.&mt('Sections').' | '.&mt($grouptitle).' |
---|---|---|---|
'.&mt('Roles').' | '.&mt('[_1] status',$type).' | '.&mt('Sections').' | '.&mt('Groups').' |
---|---|---|---|
".&mt("Completed upload of the file. This file contained references to other files. You must upload the referenced files or else the uploaded file may not work properly.")."
"); + $r->print("".&mt("Please select the locations from which the referenced files are to be uploaded.")."
"); + $r->print(&Apache::loncommon::ask_for_embedded_content('/adm/portfolio',$state,\%allfiles,\%codebase, + {'error_on_invalid_names' => 1, + 'ignore_remote_references' => 1,})); + $r->print('Or '.&done('Return to directory',$url).'
'); + } + } else { + $r->print(&done(undef,$url)); + } + } } sub lock_info { my ($r,$url,$group) = @_; - my ($uname,$udom) = &get_name_dom(); + my ($uname,$udom) = &get_name_dom($group); my $current_permissions = &Apache::lonnet::get_portfile_permissions($udom, $uname); my $file_name = $env{'form.lockinfo'}; $file_name = &prepend_group($file_name); if (defined($file_name) && defined($$current_permissions{$file_name})) { foreach my $array_item (@{$$current_permissions{$file_name}}) { - if (ref($array_item) eq 'ARRAY') { - my $filetext; - if (defined($group)) { - $filetext = ''.$env{'form.lockinfo'}. - ' (group: '.$group.')'; - } else { - $filetext = ''.$file_name.''; - } - $r->print(&mt('[_1] was submitted in response to problem: ', - $filetext). - ''.&Apache::lonnet::gettitle($$array_item[0]). - '