--- loncom/interface/londocs.pm 2013/12/18 18:56:41 1.571
+++ loncom/interface/londocs.pm 2014/03/11 00:57:23 1.580
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.571 2013/12/18 18:56:41 raeburn Exp $
+# $Id: londocs.pm,v 1.580 2014/03/11 00:57:23 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -46,6 +46,7 @@ use Apache::lonsimplepage();
use HTML::Entities;
use HTML::TokeParser;
use GDBM_File;
+use File::MMagic;
use Apache::lonlocal;
use Cwd;
use LONCAPA qw(:DEFAULT :match);
@@ -301,14 +302,14 @@ ENDJS
if ($contents{content}) {
$content .= '
-
Content
'.
+'.&mt('Content').'
'.
$contents{content}.'
';
}
if ($contents{webreferences}) {
$content .= '
-
Web References
'.
+'.&mt('Web References').'
'.
$contents{webreferences}.'
';
}
@@ -1087,6 +1088,7 @@ sub update_paste_buffer {
}
&Apache::lonnet::appenv(\%addtoenv);
delete($env{'form.markcopy'});
+ return;
}
sub recurse_uploaded_maps {
@@ -1124,6 +1126,7 @@ sub print_paste_buffer {
my @currpaste = split(/,/,$env{'docs.markedcopies'});
my ($pasteitems,@pasteable);
+ my $clipboardcount = 0;
# Construct identifiers for current contents of user's paste buffer
foreach my $suffix (@currpaste) {
@@ -1132,6 +1135,7 @@ sub print_paste_buffer {
my $url = $env{'docs.markedcopy_url_'.$suffix};
if (($cid =~ /^$match_domain\_$match_courseid$/) &&
($url ne '')) {
+ $clipboardcount ++;
my ($is_external,$othercourse,$fromsupp,$is_uploaded_map,$parent,
$canpaste,$nopaste,$othercrs,$areachange);
my $extension = (split(/\./,$env{'docs.markedcopy_url_'.$suffix}))[-1];
@@ -1225,11 +1229,23 @@ sub print_paste_buffer {
$pasteitems .= '';
$form_start = '';
+ $buttons .= ''.(' 'x2);
+ if ($clipboardcount > 1) {
+ $buttons .=
+ ''.(' 'x20).''.(' 'x2).
+ ''.
+ (' 'x2).
+ ''.
+ (' 'x2);
+ }
+ $form_end = ''.
+ '';
} else {
$pasteitems = &mt('Clipboard is empty');
}
@@ -1383,6 +1399,24 @@ function validateClipboard() {
}
}
+function checkClipboard() {
+ if (document.pasteform.pasting.length > 1) {
+ for (var i=0; i1) {
+ for (var i=0; i';
}
$$upload_output = ''.$$upload_output.'
';
- } elsif (&Apache::loncommon::is_archive_file($mimetype)) {
+ } elsif ((&Apache::loncommon::is_archive_file($mimetype)) &&
+ ($env{'form.uploaddoc.filename'} =~ /\.(zip|tar|bz2|gz|tar.gz|tar.bz2|tgz)$/i)) {
$nextphase = 'decompress_uploaded';
my $position = scalar(@LONCAPA::map::order)-1;
my $noextract = &return_to_editor();
@@ -3320,6 +3358,7 @@ sub entryline {
$renametitle=~s/\\/\\\\/g;
$renametitle=~s/\"\;/\\\"/g;
+ $renametitle=~s/\'/\\\'/g;
$renametitle=~s/ /%20/g;
my $line=&Apache::loncommon::start_data_table_row();
my ($form_start,$form_end,$form_common,$form_param);
@@ -4444,7 +4483,7 @@ sub handler {
'Supplemental','Score_Upload_Form','Adding_Pages',
'Importing_LON-CAPA_Resource','Importing_IMS_Course',
'Uploading_From_Harddrive','Course_Roster','Web_Page',
- 'Dropbox') {
+ 'Dropbox','Simple_Problem') {
$help{$topic}=&Apache::loncommon::help_open_topic('Docs_'.$topic);
}
# Composite help files
@@ -4452,8 +4491,6 @@ sub handler {
'Docs_About_Syllabus,Docs_Editing_Templated_Pages');
$help{'Simple Page'} = &Apache::loncommon::help_open_topic(
'Docs_About_Simple_Page,Docs_Editing_Templated_Pages');
- $help{'Simple Problem'} = &Apache::loncommon::help_open_topic(
- 'Option_Response_Simple');
$help{'Bulletin Board'} = &Apache::loncommon::help_open_topic(
'Docs_About_Bulletin_Board,Docs_Editing_Templated_Pages');
$help{'My Personal Information Page'} = &Apache::loncommon::help_open_topic(
@@ -4815,7 +4852,11 @@ sub handler {
'title' => 'Title',
'comment' => 'Comment',
'parse' => 'Upload embedded images/multimedia files if HTML file',
- );
+ 'bb5' => 'Blackboard 5',
+ 'bb6' => 'Blackboard 6',
+ 'angel5' => 'ANGEL 5.5',
+ 'webctce4' => 'WebCT 4 Campus Edition',
+ );
# -----------------------------------------------------------------------------
my $fileupload=(<
@@ -4846,10 +4887,10 @@ CHBO
$lt{'cms'}:
@@ -5001,7 +5042,7 @@ NSPFORM
$pathitem
- $help{'Simple Problem'}
+ $help{'Simple_Problem'}
NSPROBFORM
@@ -6654,7 +6695,7 @@ ENDINJECT
sub dump_switchserver_js {
my @hosts = @_;
my %lt = &Apache::lonlocal::texthash(
- dump => 'Copying Content to Authoring Space requires switching server.',
+ dump => 'Copying content to Authoring Space requires switching server.',
swit => 'Switch server?',
duco => 'Copying Content to Authoring Space',
yone => 'You need to switch to a server housing an Authoring Space for which you are author or co-author.',