--- loncom/interface/londocs.pm 2007/08/31 20:27:54 1.297
+++ loncom/interface/londocs.pm 2008/03/17 14:13:27 1.305
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.297 2007/08/31 20:27:54 albertel Exp $
+# $Id: londocs.pm,v 1.305 2008/03/17 14:13:27 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1205,8 +1205,8 @@ sub update_paste_buffer {
}
$url=~s{http(:|:)//https(:|:)//}{https$2//};
- &Apache::lonnet::appenv('docs.markedcopy_title' => $title,
- 'docs.markedcopy_url' => $url);
+ &Apache::lonnet::appenv({'docs.markedcopy_title' => $title,
+ 'docs.markedcopy_url' => $url});
delete($env{'form.markcopy'});
}
@@ -1227,9 +1227,13 @@ ENDPASTE
&LONCAPA::map::qtescape($env{'docs.markedcopy_url'}).')');
} else {
my $extension = (split(/\./,$env{'docs.markedcopy_url'}))[-1];
- my $type = &Apache::loncommon::filedescription($extension);
- my $icon = '';
+ my $icon = &Apache::loncommon::icon($extension);
+ if ($extension eq 'sequence' &&
+ $env{'docs.markedcopy_url'} =~ m{/default_\d+\.sequence$ }x) {
+ $icon = &Apache::loncommon::lonhttpdurl($r->dir_config('lonIconsURL'));
+ $icon .= '/folder_closed.gif';
+ }
+ $icon = '
';
$r->print($icon.$type.': '. &parse_supplemental_title(&LONCAPA::map::qtescape($env{'docs.markedcopy_title'})));
}
if ($container eq 'page') {
@@ -1750,7 +1754,7 @@ sub entryline {
# no copy for published maps
$nocopy = 1;
} else {
- foreach (&Apache::lonsequence::attemptread(&Apache::lonnet::filelocation('',$url))) {
+ foreach (&Apache::lonsequence::attemptread(&Apache::lonnet::filelocation('',$url),1)) {
my ($title,$url,$ext,$type)=split(/\:/,$_);
if (($url=~/\.(page|sequence)/) && ($type ne 'zombie')) {
$nocopy=1;
@@ -2570,9 +2574,13 @@ sub handler {
if (($env{'form.uploaddoc.filename'}) &&
($env{'form.cmd'}=~/^upload_(\w+)/)) {
# Process file upload - phase one - upload and parse primary file.
+ undef($hadchanges);
$upload_result = &process_file_upload(\$upload_output,$coursenum,
$coursedom,\%allfiles,
\%codebase,$1);
+ if ($hadchanges) {
+ &mark_hash_old();
+ }
if ($upload_result eq 'phasetwo') {
$r->print($upload_output);
}
@@ -2883,7 +2891,7 @@ value="$lt{'newp'}" />$help{'Adding_Page