--- loncom/interface/londocs.pm 2007/08/31 20:27:54 1.297
+++ loncom/interface/londocs.pm 2008/01/17 18:42:31 1.302
@@ -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.302 2008/01/17 18:42:31 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -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);
}
@@ -3124,10 +3132,32 @@ ENDSUPFORM
sub editing_js {
my ($udom,$uname) = @_;
my $now = time();
+ my %lt = &Apache::lonlocal::texthash(
+ p_mnf => 'Name of New Folder',
+ t_mnf => 'New Folder',
+ p_mnp => 'Name of New Page',
+ t_mnp => 'New Page',
+ p_mxu => 'Listed Title for the Uploaded Score',
+ p_msp => 'Listed Title for the Page',
+ p_msb => 'Listed Title for the Problem',
+ p_mdb => 'Listed Title for the Drop Box',
+ p_mbb => 'Listed Title for the Bulletin Board',
+ p_mab => "Enter user:domain for User's 'About Me' Page",
+ p_mab2 => "About [_99]",
+ p_mab_alrt1 => 'Not a valid user:domain',
+ p_mab_alrt2 => 'Please enter both user and domain in the format user:domain',
+ p_chn => 'New Title',
+ p_rmr1 => 'WARNING: Removing a resource makes associated grades and scores inaccessible!',
+ p_rmr2a => 'Remove[_99]',
+ p_rmr2b => '?[_99]',
+ p_ctr1 => 'WARNING: Cutting a resource makes associated grades and scores inaccessible!\\nGrades remain inaccessible if resource is pasted into another folder.',
+ p_ctr2a => 'Cut[_98]',
+ p_ctr2b => '?[_98]'
+ );
return <