--- loncom/interface/londocs.pm 2013/08/16 23:27:31 1.559 +++ loncom/interface/londocs.pm 2013/09/21 13:55:41 1.564 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.559 2013/08/16 23:27:31 raeburn Exp $ +# $Id: londocs.pm,v 1.564 2013/09/21 13:55:41 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -410,6 +410,8 @@ END unless ($fatal) { if ($folder =~ /^supplemental/) { &Apache::lonnet::get_numsuppfiles($coursenum,$coursedom,1); + my ($errtext,$fatal) = &mapread($coursenum,$coursedom, + $folder.'.'.$container); } } return ($errtext,$fatal,$fixuperrors); @@ -710,7 +712,7 @@ sub update_paste_buffer { my $url = $env{'docs.markedcopy_url_'.$suffix}; if (($cid =~ /^$match_domain(?:_)$match_courseid$/) && ($url ne '')) { - $pasteurls{$cid.'_'.$url}; + $pasteurls{$cid.'_'.$url} = 1; } } } @@ -1107,8 +1109,7 @@ sub do_paste_from_buffer { } my (%msgs,%before,%after,@dopaste,%is_map,%notinsupp,%notincrs,%duplicate, - %prefixchg,%srcdom,%srcnum,%marktomove,$save_err,$lockerrors,$allresult, - %msgs); + %prefixchg,%srcdom,%srcnum,%marktomove,$save_err,$lockerrors,$allresult); foreach my $suffix (@topaste) { my $url=&LONCAPA::map::qtescape($env{'docs.markedcopy_url_'.$suffix}); @@ -1559,7 +1560,7 @@ sub get_newmap_url { sub dbcopy { my ($dbref,$coursedom,$coursenum,$lockerrorsref) = @_; my ($url,$result,$errtext); - my $url = $dbref->{'src'}; + $url = $dbref->{'src'}; if (ref($dbref) eq 'HASH') { if ($url =~ m{/(smppg|bulletinboard)$}) { my $prefix = $1; @@ -1624,12 +1625,14 @@ sub dbcopy { '
'. &mt('There was a problem removing a lockfile.'); if ($prefix eq 'smppg') { - $lockerrorsref->{$prefix} .= + $lockerrorsref->{$prefix} .= ' '.&mt('This will prevent creation of additional simple pages in this course.'); } else { $lockerrorsref->{$prefix} .= ' '.&mt('This will prevent creation of additional bulletin boards in this course.'); } - $lockerrorsref->{$prefix} .= ' '.&mt('Please contact the domain coordinator for your LON-CAPA domain.').'
'; + $lockerrorsref->{$prefix} .= ' '.&mt('Please contact the [_1]helpdesk[_2] for assistance.', + '',''). + ''; } } } elsif ($url =~ m{/syllabus$}) { @@ -3290,7 +3293,7 @@ $form_common."\n". push(@{$filtersref->{'randomorder'}},$orderidx); } } - my $formname = 'edit_rorder_'.$orderidx; + $formname = 'edit_rorder_'.$orderidx; $rand_order_text = '
'."\n". $form_param."\n". @@ -3516,7 +3519,8 @@ sub new_timebased_suffix { } unless ($type eq 'paste') { $locknotfreed .= - ' '.&mt('Please contact the domain coordinator for your LON-CAPA domain.'); + ' '.&mt('Please contact the [_1]helpdesk[_2] for assistance.', + '',''); } $locknotfreed .= ''; } @@ -4181,9 +4185,9 @@ sub handler { # supplementalflag=0: show standard documents # toolsflag=1: show utilities - $env{'form.folderpath'} = &unescape($env{'form.folderpath'}); - my $supplementalflag=($env{'form.folderpath'}=~/^supplemental/); - if (($env{'form.folderpath'}=~/^default/) || ($env{'form.folderpath'} eq "")) { + my $unesc_folderpath = &unescape($env{'form.folderpath'}); + my $supplementalflag=($unesc_folderpath=~/^supplemental/); + if (($unesc_folderpath=~/^default/) || ($unesc_folderpath eq "")) { $supplementalflag=0; } if ($env{'form.forcesupplement'}) { $supplementalflag=1; } @@ -5145,8 +5149,8 @@ sub remove_archive { } else { my $currcmd = $env{'form.cmd'}; my $position = $env{'form.position'}; - if ($position > 0) { - $env{'form.cmd'} = 'del_'.$position; + if ($position > 0) { + $env{'form.cmd'} = 'remove_'.$position; my ($title,$url,@rrest) = split(/:/,$LONCAPA::map::resources[$LONCAPA::map::order[$position]]); if (&handle_edit_cmd($docuname,$docudom)) { @@ -5181,13 +5185,13 @@ sub generate_admin_menu { my ($crstype) = @_; my $lc_crstype = lc($crstype); my ($home,$other,%outhash)=&authorhosts(); - my %lt=&Apache::lonlocal::texthash ( + my %lt= ( # do not translate here 'vc' => 'Verify Content', 'cv' => 'Check/Set Resource Versions', 'ls' => 'List Resource Identifiers', 'imse' => 'Export contents to IMS Archive', 'dcd' => "Dump $crstype Content to Authoring Space", - ); + ); my ($candump,$dumpurl); if ($home + $other > 0) { $candump = 'F';