--- loncom/interface/londocs.pm 2007/01/09 19:10:46 1.269
+++ loncom/interface/londocs.pm 2007/06/15 19:12:56 1.277
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.269 2007/01/09 19:10:46 albertel Exp $
+# $Id: londocs.pm,v 1.277 2007/06/15 19:12:56 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -235,7 +235,6 @@ sub dumpcourse {
my ($ext)=($_=~/\.(\w+)$/);
my $title=$hash{'title_'.$hash{
'ids_/uploaded/'.$origcrsdata{'domain'}.'/'.$origcrsdata{'num'}.'/'.$_}};
- $title=~s/:/:/g;
$r->print('
'.($title?$title:' ').' | ');
if (!$title) {
$title=$_;
@@ -905,15 +904,16 @@ sub store_template {
# Imports the given (name, url) resources into the course
# coursenum, coursedom, and folder must precede the list
sub group_import {
- my $coursenum = shift;
- my $coursedom = shift;
- my $folder = shift;
- my $container = shift;
- my $caller = shift;
- while (@_) {
- my $name = shift;
- my $url = shift;
- if (($url =~ m{^/uploaded/\Q$coursedom\E/\Q$coursenum\E/(default_\d+\.)(page|sequence)$}) && ($caller eq 'londocs')) {
+ my ($coursenum, $coursedom, $folder, $container, $caller, @files) = @_;
+
+ while (@files) {
+ my $name = shift(@files);
+ my $url = shift(@files);
+ #FIXME check if file exists before overwriting, might be restoring it
+ if (($url =~ m{^/uploaded/\Q$coursedom\E/\Q$coursenum\E/(default_\d+\.)(page|sequence)$})
+ && ($caller eq 'londocs')
+ && (!&Apache::lonnet::stat_file($url))) {
+
my $errtext = '';
my $fatal = 0;
my $newmapstr = '