Diff for /loncom/interface/londocs.pm between versions 1.484.2.72.2.6 and 1.484.2.72.4.1

version 1.484.2.72.2.6, 2019/02/06 16:41:42 version 1.484.2.72.4.1, 2020/04/07 18:21:04
Line 43  use Apache::lonnavdisplay(); Line 43  use Apache::lonnavdisplay();
 use Apache::lonextresedit();  use Apache::lonextresedit();
 use Apache::lontemplate();  use Apache::lontemplate();
 use Apache::lonsimplepage();  use Apache::lonsimplepage();
 use Apache::loncourserespicker();  
 use HTML::Entities;  use HTML::Entities;
 use HTML::TokeParser;  use HTML::TokeParser;
 use GDBM_File;  use GDBM_File;
Line 657  sub group_import { Line 656  sub group_import {
                 my $marker = $2;                  my $marker = $2;
                 my $info = $3;                  my $info = $3;
                 my ($toolid,%toolhash,%toolsettings);                  my ($toolid,%toolhash,%toolsettings);
                 my @extras = ('linktext','explanation','crslabel','crstitle');                   my @extras = ('linktext','explanation','crslabel','crstitle');
                 my @toolinfo = split(/:/,$info);                  my @toolinfo = split(/:/,$info);
                 if ($residx) {                  if ($residx) {
                     %toolsettings=&Apache::lonnet::dump('exttool_'.$marker,$coursedom,$coursenum);                      %toolsettings=&Apache::lonnet::dump('exttool_'.$marker,$coursedom,$coursenum);
Line 1326  sub print_paste_buffer { Line 1325  sub print_paste_buffer {
                         }                          }
                         $is_uploaded_map = 1;                          $is_uploaded_map = 1;
                     }                      }
                 } elsif (($url =~ m{^/res/lib/templates/\w+\.problem$}) ||                  } elsif ($url =~ m{^/adm/($match_domain)/($match_username)/\d+/(bulletinboard|smppg|ext\.tool)$}) {
                          ($url =~ m{^/adm/($match_domain)/($match_username)/\d+/(bulletinboard|smppg|ext\.tool)$})) {  
                     if ($cid ne $env{'request.course.id'}) {                      if ($cid ne $env{'request.course.id'}) {
                         my ($srcdom,$srcnum) = split(/_/,$cid);                          my ($srcdom,$srcnum) = split(/_/,$cid);
                         if ($env{"user.priv.cm./$srcdom/$srcnum"} =~ /\Q:mdc&F\E/) {                          if ($env{"user.priv.cm./$srcdom/$srcnum"} =~ /\Q:mdc&F\E/) {
Line 1348  sub print_paste_buffer { Line 1346  sub print_paste_buffer {
                push(@pasteable,$suffix);                 push(@pasteable,$suffix);
             }              }
             my $buffer;              my $buffer;
             if ($is_external) {               if ($is_external) {
                 $buffer = &mt('External Resource').': '.                  $buffer = &mt('External Resource').': '.
                     &LONCAPA::map::qtescape($env{'docs.markedcopy_title_'.$suffix}).' ('.                      &LONCAPA::map::qtescape($env{'docs.markedcopy_title_'.$suffix}).' ('.
                     &LONCAPA::map::qtescape($url).')';                      &LONCAPA::map::qtescape($url).')';
Line 1661  sub do_paste_from_buffer { Line 1659  sub do_paste_from_buffer {
             }              }
             $srcdom{$suffix} = $srcd;              $srcdom{$suffix} = $srcd;
             $srcnum{$suffix} = $srcn;              $srcnum{$suffix} = $srcn;
         } elsif ($url =~ m{^/adm/$match_domain/$match_courseid/\d+/ext\.tool$}) {          } elsif (($url =~ m{^/adm/$match_domain/$match_username/\d+/(bulletinboard|smppg)$}) || 
                    ($url =~ m{^/adm/$match_domain/$match_courseid/\d+/ext\.tool$})) {
             my ($srcd,$srcn) = split(/_/,$cid);              my ($srcd,$srcn) = split(/_/,$cid);
 # When paste buffer was populated using an active role in a different course  # When paste buffer was populated using an active role in a different course
 # check for mdc privilege in the course from which the resource was pasted  # check for mdc privilege in the course from which the resource was pasted
Line 1729  sub do_paste_from_buffer { Line 1728  sub do_paste_from_buffer {
     %msgs = &Apache::lonlocal::texthash (      %msgs = &Apache::lonlocal::texthash (
                 notinsupp => 'Paste failed: content type is not supported within Supplemental Content',                  notinsupp => 'Paste failed: content type is not supported within Supplemental Content',
                 notincrs  => 'Paste failed: Item is from a different course which you do not have rights to edit.',                  notincrs  => 'Paste failed: Item is from a different course which you do not have rights to edit.',
                 notindom  => 'Paste failed: Item is an external tool from a course in a different donain.',                   notindom  => 'Paste failed: Item is an external tool from a course in a different domain.',
                 duplicate => 'Paste failed: only one instance of a particular published sequence or page is allowed within each course.',                  duplicate => 'Paste failed: only one instance of a particular published sequence or page is allowed within each course.',
             );              );
   
Line 1838  sub do_paste_from_buffer { Line 1837  sub do_paste_from_buffer {
                 }                  }
             }              }
         }          }
         if ($url=~ m{/(ext\.tool)$}) {          if ($url=~ m{/(bulletinboard|smppg|ext\.tool)$}) {
             my $prefix = $1;              my $prefix = $1;
             my $fromothercrs;              my $fromothercrs;
             #need to copy the db contents to a new one, unless this is a move.              #need to copy the db contents to a new one, unless this is a move.
Line 1862  sub do_paste_from_buffer { Line 1861  sub do_paste_from_buffer {
                     $url = $newurl;                      $url = $newurl;
                     $title=&mt('Copy of').' '.$title;                      $title=&mt('Copy of').' '.$title;
                 } else {                  } else {
                     if ($prefix eq 'ext.tool') {                      if ($prefix eq 'smppg') {
                           $msg = &mt('Paste failed: An error occurred when copying the simple page.').' '.$errtext;
                       } elsif ($prefix eq 'bulletinboard') {
                           $msg = &mt('Paste failed: An error occurred when copying the discussion board.').' '.$errtext;
                       } elsif ($prefix eq 'ext.tool') {
                         $msg = &mt('Paste failed: An error occurred when copying the external tool.').' '.$errtext;                          $msg = &mt('Paste failed: An error occurred when copying the external tool.').' '.$errtext;
                     }                      }
                     $results{$suffix} = $result;                      $results{$suffix} = $result;
Line 2599  sub apply_fixups { Line 2602  sub apply_fixups {
                     }                      }
                 }                  }
             }              }
             my $total = scalar(@LONCAPA::map::order) - 1;              for (my $i=0; $i<@LONCAPA::map::order; $i++) {
             for (my $i=$total; $i>=0; $i--) {  
                 my $idx = $LONCAPA::map::order[$i];                  my $idx = $LONCAPA::map::order[$i];
                 if (defined($LONCAPA::map::resources[$idx])) {                  if (defined($LONCAPA::map::resources[$idx])) {
                     my $changed;                      my $changed;
Line 2610  sub apply_fixups { Line 2612  sub apply_fixups {
                         splice(@LONCAPA::map::order,$i,1);                          splice(@LONCAPA::map::order,$i,1);
                         if (ref($currparam{$idx}) eq 'ARRAY') {                          if (ref($currparam{$idx}) eq 'ARRAY') {
                             foreach my $name (@{$currparam{$idx}}) {                              foreach my $name (@{$currparam{$idx}}) {
                                 &LONCAPA::map::delparameter($idx,$name);                                  &LONCAPA::map::delparameter($idx,'parameter_'.$name);
                             }                              }
                         }                          }
                         next;                          next;
Line 2652  sub apply_fixups { Line 2654  sub apply_fixups {
             foreach my $idx (keys(%remparam)) {              foreach my $idx (keys(%remparam)) {
                 if (ref($remparam{$idx}) eq 'ARRAY') {                  if (ref($remparam{$idx}) eq 'ARRAY') {
                     foreach my $name (@{$remparam{$idx}}) {                         foreach my $name (@{$remparam{$idx}}) {   
                         &LONCAPA::map::delparameter($idx,$name);                          &LONCAPA::map::delparameter($idx,'parameter_'.$name);
                     }                      }
                 }                  }
             }              }
Line 3927  END Line 3929  END
                     }                      }
                 }                  }
                 if ($url ne '') {                  if ($url ne '') {
                     $url.=(($url=~/\?/)?'&':'?').'symb='.&escape($shownsymb);                      $url.=(($url=~/\?/)?'&':'?').'symb='.&HTML::Entities::encode($shownsymb,'"<>&');
                 }                  }
             } elsif (!$env{'request.role.adv'}) {              } elsif (!$env{'request.role.adv'}) {
                 my $checkencrypt;                  my $checkencrypt;
Line 3948  END Line 3950  END
                     my $shownsymb = &Apache::lonenc::encrypted($symb);                      my $shownsymb = &Apache::lonenc::encrypted($symb);
                     my $shownurl = &Apache::lonenc::encrypted($url);                      my $shownurl = &Apache::lonenc::encrypted($url);
                     if (&Apache::lonnet::symbverify($shownsymb,$shownurl)) {                      if (&Apache::lonnet::symbverify($shownsymb,$shownurl)) {
                         $url = $shownurl.(($shownurl=~/\?/)?'&':'?').'symb='.&escape($shownsymb);                          $url = $shownurl.(($shownurl=~/\?/)?'&':'?').'symb='.&HTML::Entities::encode($shownsymb,'"<>&');
                         if ($env{'request.enc'} ne '') {                          if ($env{'request.enc'} ne '') {
                             delete($env{'request.enc'});                              delete($env{'request.enc'});
                         }                          }
Line 4088  $form_end; Line 4090  $form_end;
         if ($isexternal) {          if ($isexternal) {
             ($editlink,$extresform) =               ($editlink,$extresform) = 
                 &Apache::lonextresedit::extedit_form(0,$residx,$orig_url,$title,$pathitem,                  &Apache::lonextresedit::extedit_form(0,$residx,$orig_url,$title,$pathitem,
                                                      undef,undef,undef,$disabled);                                                       undef,undef,undef,undef,undef,undef,
                                                        undef,$disabled);
         } elsif ($orig_url =~ m{^/adm/$coursedom/$coursenum/\d+/ext\.tool$}) {          } elsif ($orig_url =~ m{^/adm/$coursedom/$coursenum/\d+/ext\.tool$}) {
             ($editlink,$extresform) =              ($editlink,$extresform) =
                 &Apache::lonextresedit::extedit_form(0,$residx,$orig_url,$title,$pathitem,                  &Apache::lonextresedit::extedit_form(0,$residx,$orig_url,$title,$pathitem,
Line 4497  sub list_symbs { Line 4500  sub list_symbs {
     $r->print(&endContentScreen());      $r->print(&endContentScreen());
 }  }
   
 sub short_urls {  
     my ($r,$canedit) = @_;  
     my $crstype = &Apache::loncommon::course_type();  
     my $formname = 'shortenurl';  
     $r->print(&Apache::loncommon::start_page('Display/Set Shortened URLs'));  
     $r->print(&Apache::lonhtmlcommon::breadcrumbs('Shortened URLs'));  
     $r->print(&startContentScreen('tools'));  
     my ($navmap,$errormsg) =  
         &Apache::loncourserespicker::get_navmap_object($crstype,'shorturls');  
     my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};  
     my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};  
     my (%maps,%resources,%titles);  
     if (!ref($navmap)) {  
         $r->print($errormsg.  
                   &endContentScreen());  
         return '';  
     } else {  
         $r->print('<h4 class="LC_info">'.&mt('Tiny URLs for deep-linking into course').'</h4>'."\n");  
         $r->rflush();  
         my $readonly;  
         if ($canedit) {  
             my ($numnew,$errors) = &Apache::loncommon::make_short_symbs($cdom,$cnum,$navmap);  
             if ($numnew) {  
                 $r->print('<p class="LC_info">'.&mt('Created [quant,_1,URL]',$numnew).'</p>');  
             }  
             if ((ref($errors) eq 'ARRAY') && (@{$errors} > 0)) {  
                 $r->print(&mt('The following errors occurred when processing your request to create shortened URLs:').'<br /><ul>');  
                 foreach my $error (@{$errors}) {  
                     $r->print('<li>'.$error.'</li>');  
                 }  
                 $r->print('</ul><br />');  
             }  
         } else {  
             $readonly = 1;  
         }  
         my %currtiny = &Apache::lonnet::dump('tiny',$cdom,$cnum);  
         $r->print(&Apache::loncourserespicker::create_picker($navmap,'shorturls',$formname,$crstype,undef,  
                                                              undef,undef,undef,undef,undef,\%currtiny,$readonly));  
     }  
     $r->print(&endContentScreen());  
 }  
   
 sub verifycontent {  sub verifycontent {
     my ($r) = @_;      my ($r) = @_;
Line 4994  sub handler { Line 4956  sub handler {
                'Adding_External_Resource','Adding_External_Tool',                 'Adding_External_Resource','Adding_External_Tool',
                        'Navigate_Content','Adding_Folders','Docs_Overview',                         'Navigate_Content','Adding_Folders','Docs_Overview',
                'Load_Map','Supplemental','Score_Upload_Form',                 'Load_Map','Supplemental','Score_Upload_Form',
                        'Adding_Pages','Importing_LON-CAPA_Resource',                 'Adding_Pages','Importing_LON-CAPA_Resource',
                        'Importing_IMS_Course','Uploading_From_Harddrive',                 'Importing_IMS_Course','Uploading_From_Harddrive',
                        'Course_Roster','Web_Page','Dropbox','Simple_Problem') {                         'Course_Roster','Web_Page','Dropbox','Simple_Problem') {
  $help{$topic}=&Apache::loncommon::help_open_topic('Docs_'.$topic);   $help{$topic}=&Apache::loncommon::help_open_topic('Docs_'.$topic);
     }      }
Line 5028  sub handler { Line 4990  sub handler {
         $disabled = ' disabled="disabled"';          $disabled = ' disabled="disabled"';
     }      }
     &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['inhibitmenu']);      &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['inhibitmenu']);
     if ($env{'form.inhibitmenu'}) {  
         unless ($env{'form.inhibitmenu'} eq 'yes') {  
             delete($env{'form.inhibitmenu'});  
         }  
     }  
   if ($allowed && $env{'form.verify'}) {    if ($allowed && $env{'form.verify'}) {
       &init_breadcrumbs('verify','Verify Content','Docs_Verify_Content');        &init_breadcrumbs('verify','Verify Content','Docs_Verify_Content');
       &verifycontent($r);        &verifycontent($r);
   } elsif ($allowed && $env{'form.listsymbs'}) {    } elsif ($allowed && $env{'form.listsymbs'}) {
       &init_breadcrumbs('listsymbs','List Content IDs');        &init_breadcrumbs('listsymbs','List Content IDs');
       &list_symbs($r);        &list_symbs($r);
   } elsif ($allowed && $env{'form.shorturls'}) {  
       &init_breadcrumbs('shorturls','Set/Display Shortened URLs','Docs_Short_URLs');  
       &short_urls($r,$canedit);  
   } elsif ($allowed && $env{'form.docslog'}) {    } elsif ($allowed && $env{'form.docslog'}) {
       &init_breadcrumbs('docslog','Show Log');        &init_breadcrumbs('docslog','Show Log');
       my $folder = $env{'form.folder'};        my $folder = $env{'form.folder'};
Line 5069  sub handler { Line 5023  sub handler {
                                              'forcesupplement','forcestandard',                                               'forcesupplement','forcestandard',
                                              'tools','symb','command','supppath']);                                               'tools','symb','command','supppath']);
   
     foreach my $item ('forcesupplement','forcestandard','tools') {  
         next if ($env{'form.'.$item} eq '');  
         unless ($env{'form.'.$item} eq '1') {  
             delete($env{'form.'.$item});  
         }  
     }  
   
     if ($env{'form.command'}) {  
         unless ($env{'form.command'} =~ /^(direct|directnav|editdocs|editsupp|contents|home)$/) {  
             delete($env{'form.command'});  
         }  
     }  
   
     if ($env{'form.symb'}) {  
         my ($mapurl,$id,$resurl) = &Apache::lonnet::decode_symb($env{'form.symb'});  
         unless (($id =~ /^\d+$/) && (&Apache::lonnet::is_on_map($resurl))) {  
             delete($env{'form.symb'});  
         }  
     }  
 # standard=1: this is a "new-style" course with an uploaded map as top level  # standard=1: this is a "new-style" course with an uploaded map as top level
 # standard=2: this is a "old-style" course, and there is nothing we can do  # standard=2: this is a "old-style" course, and there is nothing we can do
   
Line 5110  sub handler { Line 5045  sub handler {
     my $toolsflag=0;      my $toolsflag=0;
     if ($env{'form.tools'}) { $toolsflag=1; }      if ($env{'form.tools'}) { $toolsflag=1; }
   
     if ($env{'form.folderpath'} ne '') {  
         my @items = split(/\&/,$env{'form.folderpath'});  
         my $badpath;  
         for (my $i=0; $i<@items; $i++) {  
             my $odd = $i%2;  
             if (($odd) && (!$supplementalflag) && ($items[$i] !~ /^[^:]*:(|\d+):(|1):(|1):(|1):(|1)$/)) {  
                 $badpath = 1;  
             } elsif ((!$odd) && ($items[$i] !~ /^(default|supplemental)(|_\d+)$/)) {  
                 $badpath = 1;  
             }  
             last if ($badpath);  
         }  
         if ($badpath) {  
             delete($env{'form.folderpath'});  
         }  
     }  
   
     if ($env{'form.supppath'} ne '') {  
         my @items = split(/\&/,$env{'form.supppath'});  
         my $badpath;  
         for (my $i=0; $i<@items; $i++) {  
             my $odd = $i%2;  
             if ((!$odd) && ($items[$i] !~ /^supplemental(|_\d+)$/)) {  
                 $badpath = 1;  
             }  
             last if ($badpath);  
         }  
         if ($badpath) {  
             delete($env{'form.supppath'});  
         }  
     }  
   
     my $script='';      my $script='';
     my $showdoc=0;      my $showdoc=0;
     my $addentries = {};      my $addentries = {};
Line 5411  sub handler { Line 5314  sub handler {
   undef($hadchanges);    undef($hadchanges);
           $uploadphase = &process_file_upload(\$upload_output,$coursenum,$coursedom,            $uploadphase = &process_file_upload(\$upload_output,$coursenum,$coursedom,
                                               \%allfiles,\%codebase,$context,$crstype);                                                \%allfiles,\%codebase,$context,$crstype);
           undef($navmap);  
   if ($hadchanges) {    if ($hadchanges) {
       &mark_hash_old();        &mark_hash_old();
   }    }
Line 5639  SEDFFORM Line 5541  SEDFFORM
         my $extresourcesform =          my $extresourcesform =
             &Apache::lonextresedit::extedit_form(0,0,undef,undef,$pathitem,              &Apache::lonextresedit::extedit_form(0,0,undef,undef,$pathitem,
                                                  $help{'Adding_External_Resource'},                                                   $help{'Adding_External_Resource'},
                                                  undef,undef,$disabled);                                                   undef,undef,undef,undef,undef,undef,$disabled);
         my $exttoolform =          my $exttoolform =
             &Apache::lonextresedit::extedit_form(0,0,undef,undef,$pathitem,              &Apache::lonextresedit::extedit_form(0,0,undef,undef,$pathitem,
                                                  $help{'Adding_External_Tool'},undef,                                                   $help{'Adding_External_Tool'},undef,
Line 5945  unless ($container eq 'page') { Line 5847  unless ($container eq 'page') {
              $r->print('<p><span class="LC_error">'.$error.'</span></p>');               $r->print('<p><span class="LC_error">'.$error.'</span></p>');
           }            }
           if ($hadchanges) {            if ($hadchanges) {
              unless (&is_hash_old()) {               &mark_hash_old();
                  &mark_hash_old();  
              }  
           }            }
   
           &changewarning($r,'');            &changewarning($r,'');
         }          }
     }      }
Line 6007  SNFFORM Line 5908  SNFFORM
         my $supextform =          my $supextform =
             &Apache::lonextresedit::extedit_form(1,0,undef,undef,$pathitem,              &Apache::lonextresedit::extedit_form(1,0,undef,undef,$pathitem,
                                                  $help{'Adding_External_Resource'},                                                   $help{'Adding_External_Resource'},
                                                  undef,undef,$disabled);                                                   undef,undef,undef,undef,undef,undef,
                                                    $disabled);
   
         my $supexttoolform =          my $supexttoolform =
             &Apache::lonextresedit::extedit_form(1,0,undef,undef,$pathitem,              &Apache::lonextresedit::extedit_form(1,0,undef,undef,$pathitem,
Line 6141  my %suporderhash = ( Line 6043  my %suporderhash = (
 sub embedded_form_elems {  sub embedded_form_elems {
     my ($phase,$primaryurl,$newidx) = @_;      my ($phase,$primaryurl,$newidx) = @_;
     my $folderpath = &HTML::Entities::encode($env{'form.folderpath'},'<>&"');      my $folderpath = &HTML::Entities::encode($env{'form.folderpath'},'<>&"');
     $newidx =~s /\D+//g;  
     return <<STATE;      return <<STATE;
     <input type="hidden" name="folderpath" value="$folderpath" />      <input type="hidden" name="folderpath" value="$folderpath" />
     <input type="hidden" name="cmd" value="upload_embedded" />      <input type="hidden" name="cmd" value="upload_embedded" />
Line 6162  sub embedded_destination { Line 6063  sub embedded_destination {
     } elsif ($folder =~ /^(default|supplemental)_(\d+)$/) {      } elsif ($folder =~ /^(default|supplemental)_(\d+)$/) {
         $destination .=  $2.'/';          $destination .=  $2.'/';
     }      }
     my $newidx = $env{'form.newidx'};      $destination .= $env{'form.newidx'};
     $newidx =~s /\D+//g;  
     if ($newidx) {  
         $destination .= $newidx;  
     }  
     my $dir_root = '/userfiles';      my $dir_root = '/userfiles';
     return ($destination,$dir_root);      return ($destination,$dir_root);
 }  }
Line 6192  sub decompression_info { Line 6089  sub decompression_info {
     }      }
     unshift(@hiddens,$pathitem);      unshift(@hiddens,$pathitem);
     foreach my $item (@hiddens) {      foreach my $item (@hiddens) {
         if ($item eq 'newidx') {  
             next if ($env{'form.'.$item} =~ /\D/);  
         }  
         if ($env{'form.'.$item}) {          if ($env{'form.'.$item}) {
             $hiddenelem .= '<input type="hidden" name="'.$item.'" value="'.              $hiddenelem .= '<input type="hidden" name="'.$item.'" value="'.
                            &HTML::Entities::encode($env{'form.'.$item},'<>&"').'" />'."\n";                             &HTML::Entities::encode($env{'form.'.$item},'<>&"').'" />'."\n";
Line 6307  sub generate_admin_menu { Line 6201  sub generate_admin_menu {
                                          'vc'   => 'Verify Content',                                           'vc'   => 'Verify Content',
                                          'cv'   => 'Check/Set Resource Versions',                                           'cv'   => 'Check/Set Resource Versions',
                                          'ls'   => 'List Resource Identifiers',                                           'ls'   => 'List Resource Identifiers',
                                          'ct'   => 'Display/Set Shortened URLs for Deep-linking',            
                                          'imse' => 'Export contents to IMS Archive',                                           'imse' => 'Export contents to IMS Archive',
                                          'dcd'  => "Copy $crstype Content to Authoring Space",                                           'dcd'  => "Copy $crstype Content to Authoring Space",
             );              );
Line 6358  sub generate_admin_menu { Line 6251  sub generate_admin_menu {
                     icon       => 'symbs.png',                      icon       => 'symbs.png',
                     linktitle  => "List the unique identifier used for each resource instance in your $lc_crstype"                      linktitle  => "List the unique identifier used for each resource instance in your $lc_crstype"
                 },                  },
                 {   linktext   => $lt{'ct'},  
                     url        => "javascript:injectData(document.courseverify,'dummy','shorturls','$lt{'ct'}')",  
                     permission => 'F',  
                     help       => 'Docs_Short_URLs',  
                     icon       => 'shorturls.png',  
                     linktitle  => "Set shortened URLs for a resource or folder in your $lc_crstype for use in deep-linking"  
                 },  
                 ]                  ]
         });          });
     if ($canedit) {      if ($canedit) {
Line 6567  sub editing_js { Line 6453  sub editing_js {
                 } else {                  } else {
                     $url = $res;                      $url = $res;
                 }                  }
                 $backtourl = &HTML::Entities::encode(&Apache::lonnet::clutter($url),'<>&"');                  $backtourl = &HTML::Entities::encode(&Apache::lonnet::clutter($url),'<>&"').'?symb='.
                 if ($backtourl =~ m{^\Q/uploaded/$coursedom/$coursenum/\Edefault_\d+\.sequence$}) {                               &HTML::Entities::encode($caller,'<>&"');
                     $backtourl .= '?navmap=1';  
                 } else {  
                     $backtourl .= '?symb='.  
                                   &HTML::Entities::encode($caller,'<>&"');  
                 }  
                 if ($anchor ne '') {                  if ($anchor ne '') {
                     $backtourl .= '#'.&HTML::Entities::encode($anchor,'<>&"');                      $backtourl .= '#'.&HTML::Entities::encode($anchor,'<>&"');
                 }                  }
Line 7788  check on this Line 7669  check on this
   
 Verify Content  Verify Content
   
 =item devalidateversioncache()   =item devalidateversioncache() & checkversions()
   
 =item checkversions()  
   
 Check Versions  Check Versions
   

Removed from v.1.484.2.72.2.6  
changed lines
  Added in v.1.484.2.72.4.1


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