--- loncom/interface/londocs.pm 2013/09/22 02:24:27 1.484.2.41
+++ loncom/interface/londocs.pm 2013/01/09 17:22:51 1.530
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.484.2.41 2013/09/22 02:24:27 raeburn Exp $
+# $Id: londocs.pm,v 1.530 2013/01/09 17:22:51 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -56,7 +56,6 @@ my $hashtied;
my %alreadyseen=();
my $hadchanges;
-my $suppchanges;
my %help=();
@@ -80,11 +79,7 @@ sub storemap {
$map,1,$report);
if ($errtext) { return ($errtext,2); }
- if ($map =~ /^default/) {
- $hadchanges=1;
- } else {
- $suppchanges=1;
- }
+ $hadchanges=1;
return ($errtext,0);
}
@@ -157,7 +152,7 @@ sub dumpcourse {
$r->print(&endContentScreen());
return '';
}
- my ($ca,$cd)=split(/\:/,$env{'form.authorspace'});
+ my ($ca,$cd)=split(/\@/,$env{'form.authorspace'});
$r->print('
'.&mt('Copying Files').'
');
my $title=$env{'form.authorfolder'};
$title=&clean($title);
@@ -294,7 +289,7 @@ sub group_import {
$env{'form.output'}=$newmapstr;
my $result=&Apache::lonnet::finishuserfileupload($coursenum,$coursedom,
'output',$1.$2);
- if ($result !~ m{^/uploaded/}) {
+ if ($result != m|^/uploaded/|) {
$errtext.='Map not saved: A network error occurred when trying to save the new map. ';
$fatal = 2;
}
@@ -305,7 +300,7 @@ sub group_import {
if ($url) {
if (($caller eq 'londocs') &&
($folder =~ /^default/)) {
- if (($url =~ /\.(page|sequence)$/) && (!$donechk)) {
+ unless ($donechk) {
my $chome = &Apache::lonnet::homeserver($coursenum,$coursedom);
my $cid = $coursedom.'_'.$coursenum;
$allmaps =
@@ -328,48 +323,8 @@ sub group_import {
}
my $ext = 'false';
if ($url=~m{^http://} || $url=~m{^https://}) { $ext = 'true'; }
+ $url = &LONCAPA::map::qtunescape($url);
$name = &LONCAPA::map::qtunescape($name);
- if ($name eq '') {
- $name = &LONCAPA::map::qtunescape(&mt('Web Page'));
- }
- if ($url =~ m{^/uploaded/$coursedom/$coursenum/((?:docs|supplemental)/(?:default|\d+))/new\.html$}) {
- my $filepath = $1;
- my $fname = $name;
- if ($fname =~ /^\W+$/) {
- $fname = 'web';
- } else {
- $fname =~ s/\W/_/g;
- }
- if (length($fname > 15)) {
- $fname = substr($fname,0,14);
- }
- my $initialtext = &mt('Replace with your own content.');
- my $newhtml = <
-
-$name
-
-
-$initialtext
-
-