Diff for /loncom/interface/londocs.pm between versions 1.562 and 1.565

version 1.562, 2013/08/21 15:42:23 version 1.565, 2013/09/23 17:35:07
Line 712  sub update_paste_buffer { Line 712  sub update_paste_buffer {
              my $url = $env{'docs.markedcopy_url_'.$suffix};               my $url = $env{'docs.markedcopy_url_'.$suffix};
              if (($cid =~ /^$match_domain(?:_)$match_courseid$/) &&               if (($cid =~ /^$match_domain(?:_)$match_courseid$/) &&
                  ($url ne '')) {                   ($url ne '')) {
                  $pasteurls{$cid.'_'.$url};                   $pasteurls{$cid.'_'.$url} = 1;
              }               }
         }          }
     }      }
Line 1109  sub do_paste_from_buffer { Line 1109  sub do_paste_from_buffer {
     }      }
   
     my (%msgs,%before,%after,@dopaste,%is_map,%notinsupp,%notincrs,%duplicate,      my (%msgs,%before,%after,@dopaste,%is_map,%notinsupp,%notincrs,%duplicate,
         %prefixchg,%srcdom,%srcnum,%marktomove,$save_err,$lockerrors,$allresult,          %prefixchg,%srcdom,%srcnum,%marktomove,$save_err,$lockerrors,$allresult);
         %msgs);  
   
     foreach my $suffix (@topaste) {      foreach my $suffix (@topaste) {
         my $url=&LONCAPA::map::qtescape($env{'docs.markedcopy_url_'.$suffix});          my $url=&LONCAPA::map::qtescape($env{'docs.markedcopy_url_'.$suffix});
Line 1311  sub do_paste_from_buffer { Line 1310  sub do_paste_from_buffer {
                     if ($prefix eq 'smppg') {                      if ($prefix eq 'smppg') {
                         $msg = &mt('Paste failed: An error occurred when copying the simple page.').' '.$errtext;                          $msg = &mt('Paste failed: An error occurred when copying the simple page.').' '.$errtext;
                     } elsif ($prefix eq 'bulletinboard') {                      } elsif ($prefix eq 'bulletinboard') {
                         $msg = &mt('Paste failed: An error occurred when copying the bulletin board.').' '.$errtext;                          $msg = &mt('Paste failed: An error occurred when copying the discussion board.').' '.$errtext;
                     }                      }
                     $results{$suffix} = $result;                      $results{$suffix} = $result;
                     $msgerrs{$suffix} = $msg;                      $msgerrs{$suffix} = $msg;
Line 1561  sub get_newmap_url { Line 1560  sub get_newmap_url {
 sub dbcopy {  sub dbcopy {
     my ($dbref,$coursedom,$coursenum,$lockerrorsref) = @_;      my ($dbref,$coursedom,$coursenum,$lockerrorsref) = @_;
     my ($url,$result,$errtext);      my ($url,$result,$errtext);
     my $url = $dbref->{'src'};      $url = $dbref->{'src'};
     if (ref($dbref) eq 'HASH') {      if (ref($dbref) eq 'HASH') {
         if ($url =~ m{/(smppg|bulletinboard)$}) {          if ($url =~ m{/(smppg|bulletinboard)$}) {
             my $prefix = $1;              my $prefix = $1;
Line 1586  sub dbcopy { Line 1585  sub dbcopy {
                     if ($prefix eq 'smppg') {                      if ($prefix eq 'smppg') {
                         $errtext = &mt('Failed to acquire a unique timestamp-based suffix when copying a simple page [_1].',$url);                          $errtext = &mt('Failed to acquire a unique timestamp-based suffix when copying a simple page [_1].',$url);
                     } else {                      } else {
                         $errtext = &mt('Failed to acquire a unique timestamp-based suffix when copying a bulletin board [_1].',$url);                          $errtext = &mt('Failed to acquire a unique timestamp-based suffix when copying a discussion board [_1].',$url);
                     }                      }
                     if ($error) {                      if ($error) {
                         $errtext .= '<br />'.$error;                          $errtext .= '<br />'.$error;
Line 1629  sub dbcopy { Line 1628  sub dbcopy {
                         $lockerrorsref->{$prefix} .=                          $lockerrorsref->{$prefix} .=
                             ' '.&mt('This will prevent creation of additional simple pages in this course.');                              ' '.&mt('This will prevent creation of additional simple pages in this course.');
                     } else {                      } else {
                         $lockerrorsref->{$prefix} .= ' '.&mt('This will prevent creation of additional bulletin boards in this course.');                          $lockerrorsref->{$prefix} .= ' '.&mt('This will prevent creation of additional discussion boards in this course.');
                     }                      }
                     $lockerrorsref->{$prefix} .= ' '.&mt('Please contact the [_1]helpdesk[_2] for assistance.',                      $lockerrorsref->{$prefix} .= ' '.&mt('Please contact the [_1]helpdesk[_2] for assistance.',
                                                      '<a href="/adm/helpdesk" target="_helpdesk">','</a>').                                                       '<a href="/adm/helpdesk" target="_helpdesk">','</a>').
Line 3294  $form_common."\n". Line 3293  $form_common."\n".
                     push(@{$filtersref->{'randomorder'}},$orderidx);                      push(@{$filtersref->{'randomorder'}},$orderidx);
                 }                  }
             }              }
             my $formname = 'edit_rorder_'.$orderidx;              $formname = 'edit_rorder_'.$orderidx;
     $rand_order_text =       $rand_order_text = 
 '<form action="/adm/coursedocs" method="post" name="'.$formname.'">'."\n".  '<form action="/adm/coursedocs" method="post" name="'.$formname.'">'."\n".
 $form_param."\n".  $form_param."\n".
Line 3497  sub new_timebased_suffix { Line 3496  sub new_timebased_suffix {
         } elsif ($type eq 'smppg') {          } elsif ($type eq 'smppg') {
             $errtext = &mt('Failed to acquire a unique timestamp-based suffix for the new simple page.');              $errtext = &mt('Failed to acquire a unique timestamp-based suffix for the new simple page.');
         } else {          } else {
             $errtext = &mt('Failed to acquire a unique timestamp-based suffix for the new bulletin board.');              $errtext = &mt('Failed to acquire a unique timestamp-based suffix for the new discussion board.');
         }          }
         if ($error) {          if ($error) {
             $errtext .= '<br />'.$error;              $errtext .= '<br />'.$error;
Line 3516  sub new_timebased_suffix { Line 3515  sub new_timebased_suffix {
                 &mt('This will prevent creation of additional simple pages in this course.');                  &mt('This will prevent creation of additional simple pages in this course.');
         } else {          } else {
             $locknotfreed .=              $locknotfreed .=
                 &mt('This will prevent creation of additional bulletin boards in this course.');                  &mt('This will prevent creation of additional discussion boards in this course.');
         }          }
         unless ($type eq 'paste') {          unless ($type eq 'paste') {
             $locknotfreed .=              $locknotfreed .=
Line 5150  sub remove_archive { Line 5149  sub remove_archive {
     } else {      } else {
         my $currcmd = $env{'form.cmd'};          my $currcmd = $env{'form.cmd'};
         my $position = $env{'form.position'};          my $position = $env{'form.position'};
         if ($position > 0) {           if ($position > 0) {
             $env{'form.cmd'} = 'del_'.$position;              $env{'form.cmd'} = 'remove_'.$position;
             my ($title,$url,@rrest) =               my ($title,$url,@rrest) = 
                 split(/:/,$LONCAPA::map::resources[$LONCAPA::map::order[$position]]);                  split(/:/,$LONCAPA::map::resources[$LONCAPA::map::order[$position]]);
             if (&handle_edit_cmd($docuname,$docudom)) {              if (&handle_edit_cmd($docuname,$docudom)) {

Removed from v.1.562  
changed lines
  Added in v.1.565


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>