Diff for /loncom/interface/londocs.pm between versions 1.369 and 1.381

version 1.369, 2009/06/05 10:51:13 version 1.381, 2009/07/14 17:33:43
Line 262  sub dumpcourse { Line 262  sub dumpcourse {
   
 sub exportbutton {  sub exportbutton {
     my $type = &Apache::loncommon::course_type();      my $type = &Apache::loncommon::course_type();
     return '<input type="submit" name="exportcourse" value="'.      return '<input type="submit" name="exportcourse"'
             &mt('Export '.$type.' to IMS').'" />'.            .' value="'.&mt('IMS Export').'"'
             .' title="'.&mt('Export '.$type.' to IMS Package').'" />'.
     &Apache::loncommon::help_open_topic('Docs_Export_Course_Docs').'<br />';      &Apache::loncommon::help_open_topic('Docs_Export_Course_Docs').'<br />';
 }  }
   
Line 277  sub exportcourse { Line 278  sub exportcourse {
     my $numdisc = keys(%discussiontime);      my $numdisc = keys(%discussiontime);
     my $navmap = Apache::lonnavmaps::navmap->new();      my $navmap = Apache::lonnavmaps::navmap->new();
     if (!defined($navmap)) {      if (!defined($navmap)) {
         $r->print(&Apache::loncommon::start_page('Export '.lc($type).' to IMS content package').          $r->print(&Apache::loncommon::start_page('Export '.$type.' to IMS Package').
                   '<h2>IMS Export Failed</h2>'.                    '<h2>'.&mt('IMS Export Failed').'</h2>'.
                   '<div class="LC_error">'.                    '<div class="LC_error">'.
                   &mt('Unable to retrieve information about course contents').                    &mt('Unable to retrieve information about course contents').
                   '</div><a href="/adm/coursedocs">'.&mt('Return to Course Editor').'</a>');                    '</div><a href="/adm/coursedocs">'.&mt('Return to Course Editor').'</a>');
Line 298  sub exportcourse { Line 299  sub exportcourse {
         my @exportitems = &Apache::loncommon::get_env_multiple('form.archive');          my @exportitems = &Apache::loncommon::get_env_multiple('form.archive');
         my @discussions = &Apache::loncommon::get_env_multiple('form.discussion');          my @discussions = &Apache::loncommon::get_env_multiple('form.discussion');
         if (@exportitems == 0 && @discussions == 0) {          if (@exportitems == 0 && @discussions == 0) {
             $outcome = '<br />As you did not select any content items or discussions for export, an IMS package has not been created.  Please <a href="javascript:history.go(-1)">go back</a> to select either content items or discussions for export';              $outcome = 
                   '<p class="LC_warning">'
                  .&mt('As you did not select any content items or discussions'
                      .' for export, an IMS package has not been created.')
                  .'</p>'
                  .'<p>'
                  .&mt('Please [_1]go back[_2] to select either content items'
                      .' or discussions for export.'
                          ,'<a href="javascript:history.go(-1)">'
                          ,'</a>')
                  .'</p>';
         } else {          } else {
             my $now = time;              my $now = time;
             my %symbs;              my %symbs;
Line 321  sub exportcourse { Line 332  sub exportcourse {
                 open(OUTPUT, "zip -r $imszip *  2> /dev/null |");                  open(OUTPUT, "zip -r $imszip *  2> /dev/null |");
                 close(OUTPUT);                  close(OUTPUT);
                 chdir $cwd;                  chdir $cwd;
                 $outcome .= '<p>'  
                            .&mt('Download the zip file from [_1]IMS '.lc($type).' archive[_2]'  
                                ,'<a href="'.$imszipfile.'">','</a>')  
                            .'</p>';  
                 if ($copyresult) {                  if ($copyresult) {
                     $outcome .= '<p class="LC_error">'                      $outcome .= '<p class="LC_error">'
                                .&mt('The following errors occurred during export - [_1]'                                 .&mt('The following errors occurred during export - [_1]'
                                    ,$copyresult)                                     ,$copyresult)
                                .'</p>';                                 .'</p>';
                 }                  }
                   $outcome .= '<p>'
                              .&mt('[_1]Your IMS package[_2] is ready for download.'
                                  ,'<a href="'.$imszipfile.'">','</a>')
                              .'</p>';
             } else {              } else {
                 $outcome = '<br />'.&mt('Unfortunately you will not be able to retrieve an IMS archive of this posts at this time, because there was a problem creating a manifest file.').'<br />';                  $outcome = '<p class="LC_error">'
                             .&mt('Unfortunately you will not be able to retrieve'
                                 .' an IMS archive of this posts at this time,'
                                 .' because there was a problem creating a'
                                 .' manifest file.')
                             .'</p>'
                             .'<p><a href="javascript:history.go(-1)">'
                             .&mt('Go Back')
                             .'</a></p>';
             }              }
         }          }
         $r->print(&Apache::loncommon::start_page('Export '.lc($type).' to IMS content package'));          $r->print(&Apache::loncommon::start_page('Export '.$type.' to IMS Package'));
  $r->print(&Apache::lonhtmlcommon::breadcrumbs('Export '.lc($type).' to IMS content package'));   $r->print(&Apache::lonhtmlcommon::breadcrumbs('IMS Export'));
         $r->print($outcome);          $r->print($outcome);
         $r->print(&Apache::loncommon::end_page());          $r->print(&Apache::loncommon::end_page());
     } else {      } else {
Line 489  function containerCheck(item) { Line 508  function containerCheck(item) {
 // ]]>  // ]]>
 </script>  </script>
         |;          |;
  $r->print(&Apache::loncommon::start_page('Export '.lc($type).' to IMS content package',   $r->print(&Apache::loncommon::start_page('Export '.$type.' to IMS Package',
  $scripttag));   $scripttag));
  $r->print(&Apache::lonhtmlcommon::breadcrumbs('Export '.lc($type).' to IMS content package'));   $r->print(&Apache::lonhtmlcommon::breadcrumbs('IMS Export'));
  $r->print($display.   $r->print($display.
                   '<p><input type="hidden" name="finishexport" value="1" />'.                    '<p><input type="hidden" name="finishexport" value="1" />'.
                   '<input type="submit" name="exportcourse" value="'.                    '<input type="submit" name="exportcourse" value="'.
                   &mt('Export '.$type.' DOCS').'" /></p></form>');                    &mt('Export').'" /></p></form>');
     }      }
 }  }
   
Line 1030  sub breadcrumbs { Line 1049  sub breadcrumbs {
     }      }
     $plain=~s/\&gt\;\s*$//;      $plain=~s/\&gt\;\s*$//;
     return (&Apache::lonhtmlcommon::breadcrumbs(undef,undef,0,'nohelp',      return (&Apache::lonhtmlcommon::breadcrumbs(undef,undef,0,'nohelp',
        'LC_docs_path', undef, 1 ),$randompick,$ishidden,$isencrypted,$plain,$is_random_order);         undef, undef, 1 ),$randompick,$ishidden,$isencrypted,$plain,$is_random_order);
 }  }
   
 sub log_docs {  sub log_docs {
Line 1254  sub print_paste_buffer { Line 1273  sub print_paste_buffer {
     my ($r,$container) = @_;      my ($r,$container) = @_;
     return if (!defined($env{'docs.markedcopy_url'}));      return if (!defined($env{'docs.markedcopy_url'}));
   
     $r->print(<<ENDPASTE);      $r->print('<fieldset>'
 <form name="pasteform" action="/adm/coursedocs" method="post"><p>               .'<legend>'.&mt('Clipboard').'</legend>'
 ENDPASTE               .'<form name="pasteform" action="/adm/coursedocs" method="post">'
     $r->print('<input type="submit" name="pastemarked" value="'.&mt('Paste').'" /> ');               .'<input type="submit" name="pastemarked" value="'.&mt('Paste').'" /> '
       );
   
     my $type;      my $type;
     if ($env{'docs.markedcopy_url'} =~ m{^(?:/adm/wrapper/ext|(?:http|https)(?:&colon;|:))//} ) {      if ($env{'docs.markedcopy_url'} =~ m{^(?:/adm/wrapper/ext|(?:http|https)(?:&colon;|:))//} ) {
Line 1271  ENDPASTE Line 1291  ENDPASTE
  if ($extension eq 'sequence' &&   if ($extension eq 'sequence' &&
     $env{'docs.markedcopy_url'} =~ m{/default_\d+\.sequence$ }x) {      $env{'docs.markedcopy_url'} =~ m{/default_\d+\.sequence$ }x) {
     $icon = &Apache::loncommon::lonhttpdurl($r->dir_config('lonIconsURL'));      $icon = &Apache::loncommon::lonhttpdurl($r->dir_config('lonIconsURL'));
     $icon .= '/folder_closed.gif';      $icon .= '/navmap.folder.closed.gif';
  }   }
  $icon = '<img src="'.$icon.'" alt="" class="LC_icon" />';   $icon = '<img src="'.$icon.'" alt="" class="LC_icon" />';
  $r->print($icon.$type.': '.  &parse_supplemental_title(&LONCAPA::map::qtescape($env{'docs.markedcopy_title'})));   $r->print($icon.$type.': '.  &parse_supplemental_title(&LONCAPA::map::qtescape($env{'docs.markedcopy_title'})));
Line 1286  ENDPASTE Line 1306  ENDPASTE
         <input type="hidden" name="folderpath" value="'.&HTML::Entities::encode($env{'form.folderpath'},'<>&"').'" />          <input type="hidden" name="folderpath" value="'.&HTML::Entities::encode($env{'form.folderpath'},'<>&"').'" />
 ');  ');
     }      }
     $r->print('</p></form>');      $r->print('</form></fieldset>');
 }  }
   
 sub do_paste_from_buffer {  sub do_paste_from_buffer {
Line 1569  sub editor { Line 1589  sub editor {
     my $idx=0;      my $idx=0;
     my $shown=0;      my $shown=0;
     if (($ishidden) || ($isencrypted) || ($randompick>=0) || ($is_random_order)) {      if (($ishidden) || ($isencrypted) || ($randompick>=0) || ($is_random_order)) {
  $r->print('<p>'.&mt('Parameters').':<ul>'.   $r->print('<div class="LC_Box">'.
   ($randompick>=0?'<li>'.&mt('randomly pick [_1] resources',$randompick).'</li>':'').            '<p>'.&mt('Parameters:').
             '<ul>'.
     ($randompick>=0?'<li>'.&mt('randomly pick [quant,_1,resource]',$randompick).'</li>':'').
   ($ishidden?'<li>'.&mt('contents hidden').'</li>':'').    ($ishidden?'<li>'.&mt('contents hidden').'</li>':'').
   ($isencrypted?'<li>'.&mt('URLs hidden').'</li>':'').    ($isencrypted?'<li>'.&mt('URLs hidden').'</li>':'').
     ($is_random_order?'<li>'.&mt('random order').'</li>':'').
   '</ul></p>');    '</ul></p>');
           if ($randompick>=0) {
               $r->print('<p class="LC_warning">'
                    .&mt('Caution: this folder is set to randomly pick a subset'
                        .' of resources. Adding or removing resources from this'
                        .' folder will change the set of resources that the'
                        .' students see, resulting in spurious or missing credit'
                        .' for completed problems, not limited to ones you'
                        .' modify. Do not modify the contents of this folder if'
                        .' it is in active student use.')
                    .'</p>'
               );
           }
           if ($is_random_order) {
               $r->print('<p class="LC_warning">'
                    .&mt('Caution: this folder is set to randomly order its'
                        .' contents. Adding or removing resources from this folder'
                        .' will change the order of resources shown.')
                    .'</p>'
               );
           }
           $r->print('</div>');
     }      }
     if ($randompick>=0) {  
  $r->print('<p>'.&mt('Caution: this folder is set to randomly pick a subset of resources. Adding or removing resources from this folder will change the set of resources that the students see, resulting in spurious or missing credit for completed problems, not limited to ones you modify. Do not modify the contents of this folder if it is in active student use.').'</p>');      my $output;
     }  
     if ($is_random_order) {  
  $r->print('<p>'.&mt('Caution: this folder is set to randomly order its contents. Adding or removing resources from this folder will change the order of resources shown.').'</p>');  
     }  
     $r->print('<table class="LC_docs_editor">');  
     foreach my $res (@LONCAPA::map::order) {      foreach my $res (@LONCAPA::map::order) {
  my ($name,$url)=split(/\:/,$LONCAPA::map::resources[$res]);          my ($name,$url)=split(/\:/,$LONCAPA::map::resources[$res]);
  $name=&LONCAPA::map::qtescape($name);          $name=&LONCAPA::map::qtescape($name);
  $url=&LONCAPA::map::qtescape($url);          $url=&LONCAPA::map::qtescape($url);
  unless ($name) {  $name=(split(/\//,$url))[-1]; }          unless ($name) {  $name=(split(/\//,$url))[-1]; }
  unless ($name) { $idx++; next; }          unless ($name) { $idx++; next; }
  $r->print(&entryline($idx,$name,$url,$folder,$allowed,$res,          $output .= &entryline($idx,$name,$url,$folder,$allowed,$res,
      $coursenum));                                $coursenum);
  $idx++;          $idx++;
  $shown++;          $shown++;
     }      }
     unless ($shown) {      if ($shown) {
  $r->print('<tr><td>'.&mt('Currently no documents.').'</td></tr>');      $r->print(&Apache::loncommon::start_data_table()
                .&Apache::loncommon::start_data_table_header_row()
                .'<th colspan="2">'.&mt('Move').'</th>'
                .'<th>'.&mt('Actions').'</th>'
                .'<th colspan="2">'.&mt('Document').'</th>'
                .'<th colspan="4">'.&mt('Settings').'</th>'
                .&Apache::loncommon::end_data_table_header_row()
                .$output
                .&Apache::loncommon::end_data_table()
       )
       } else {
           $r->print('<p class="LC_info">'
                    .&mt('Currently no documents.')
                    .'</p>'
           );
     }      }
     $r->print("\n</table>\n");  
     if ($allowed) {      if ($allowed) {
         &print_paste_buffer($r,$container);          &print_paste_buffer($r,$container);
     }      }
Line 1759  sub entryline { Line 1811  sub entryline {
     $renametitle=~s/\\/\\\\/g;      $renametitle=~s/\\/\\\\/g;
     $renametitle=~s/\&quot\;/\\\"/g;      $renametitle=~s/\&quot\;/\\\"/g;
     $renametitle=~s/ /%20/g;      $renametitle=~s/ /%20/g;
     my $line='<tr>';      my $line=&Apache::loncommon::start_data_table_row();
     my ($form_start,$form_end);      my ($form_start,$form_end);
 # Edit commands  # Edit commands
     my ($container, $type, $esc_path, $path, $symb);      my ($container, $type, $esc_path, $path, $symb);
Line 1790  sub entryline { Line 1842  sub entryline {
      ne '')) {       ne '')) {
     $selectbox=      $selectbox=
  '<input type="hidden" name="currentpos" value="'.$incindex.'" />'.   '<input type="hidden" name="currentpos" value="'.$incindex.'" />'.
  '<select name="newpos" onChange="this.form.submit()">';   '<select name="newpos" onchange="this.form.submit()">';
     for (my $i=1;$i<=$#LONCAPA::map::order+1;$i++) {      for (my $i=1;$i<=$#LONCAPA::map::order+1;$i++) {
  if ($i==$incindex) {   if ($i==$incindex) {
     $selectbox.='<option value="" selected="selected">('.$i.')</option>';      $selectbox.='<option value="" selected="selected">('.$i.')</option>';
Line 1862  END Line 1914  END
         $form_end = '</form>';          $form_end = '</form>';
  $line.=(<<END);   $line.=(<<END);
 <td>  <td>
    <table class="LC_docs_entry_move">  <div class="LC_docs_entry_move">
       <tr>    <a href='/adm/coursedocs?cmd=up_$index&amp;${type}path=$esc_path&amp;${type}symb=$symb$cpinfo'>
          <td>      <img src="${iconpath}move_up.gif" alt='$lt{'up'}' class="LC_icon" />
             <a href='/adm/coursedocs?cmd=up_$index&amp;${type}path=$esc_path&amp;${type}symb=$symb$cpinfo'><img src="${iconpath}move_up.gif" alt='$lt{'up'}' class="LC_icon" /></a>    </a>
          </td>  </div>
       </tr>  <div class="LC_docs_entry_move">
       <tr>    <a href='/adm/coursedocs?cmd=down_$index&amp;${type}path=$esc_path&amp;${type}symb=$symb$cpinfo'>
         <td>      <img src="${iconpath}move_down.gif" alt='$lt{'dw'}' class="LC_icon" />
            <a href='/adm/coursedocs?cmd=down_$index&amp;${type}path=$esc_path&amp;${type}symb=$symb$cpinfo'><img src="${iconpath}move_down.gif" alt='$lt{'dw'}' class="LC_icon" /></a>    </a>
         </td>  </div>
       </tr>  
     </table>  
 </td>  </td>
 <td>  <td>
    $form_start     $form_start
Line 1900  END Line 1950  END
     my $pagefile;      my $pagefile;
     if ($uploaded) {      if ($uploaded) {
  if ($extension eq 'sequence') {   if ($extension eq 'sequence') {
     $icon=$iconpath.'/folder_closed.gif';      $icon=$iconpath.'/navmap.folder.closed.gif';
     $url=~/\Q$coursenum\E\/([\/\w]+)\.sequence$/;      $url=~/\Q$coursenum\E\/([\/\w]+)\.sequence$/;
     $url='/adm/coursedocs?';      $url='/adm/coursedocs?';
     $folderarg=$1;      $folderarg=$1;
Line 1972  END Line 2022  END
                                               'parameter_randomorder'))[0]=~/^yes$/i);                                                'parameter_randomorder'))[0]=~/^yes$/i);
  $url.='folderpath='.&escape($folderpath).$cpinfo;   $url.='folderpath='.&escape($folderpath).$cpinfo;
  $parameterset='<label>'.&mt('Randomly Pick: ').   $parameterset='<label>'.&mt('Randomly Pick: ').
     '<input type="text" size="4" onChange="this.form.changeparms.value='."'randompick'".';this.form.submit()" name="randompick_'.$orderidx.'" value="'.      '<input type="text" size="4" onchange="this.form.changeparms.value='."'randompick'".';this.form.submit()" name="randompick_'.$orderidx.'" value="'.
     (&LONCAPA::map::getparameter($orderidx,      (&LONCAPA::map::getparameter($orderidx,
                                               'parameter_randompick'))[0].                                                'parameter_randompick'))[0].
                                               '" />'.                                                '" />'.
Line 2007  END Line 2057  END
  undef($external);   undef($external);
     }      }
     $line.='      $line.='
   <td class="LC_docs_entry_icon">    <td>
     '.($url?'<a href="'.$url.'">':'').'<img src="'.$icon.'" alt="" class="LC_icon" />'.($url?'</a>':'').'      '.($url?'<a href="'.$url.'">':'').'<img src="'.$icon.'" alt="" class="LC_icon" />'.($url?'</a>':'').'
   </td>    </td>
   <td class="LC_docs_entry_title">    <td>
     '.($url?"<a href=\"$url\">":'').$title.($url?'</a>':' <span class="LC_docs_reinit_warn">'.&mt('(re-initialize course to access)').'</span>').$external."      '.($url?"<a href=\"$url\">":'').$title.($url?'</a>':' <span class="LC_docs_reinit_warn">'.&mt('(re-initialize course to access)').'</span>').$external."
   </td>";    </td>";
     if (($allowed) && ($folder!~/^supplemental/)) {      if (($allowed) && ($folder!~/^supplemental/)) {
Line 2036  END Line 2086  END
   <td class="LC_docs_entry_parameter">$form_start $parameterset $form_end</td>    <td class="LC_docs_entry_parameter">$form_start $parameterset $form_end</td>
 ENDPARMS  ENDPARMS
     }      }
     $line.="</tr>";      $line.=&Apache::loncommon::end_data_table_row();
     return $line;      return $line;
 }  }
   
Line 2502  sub changewarning { Line 2552  sub changewarning {
  $message='Changes will become active for your current session after [_1], or the next time you log in.';   $message='Changes will become active for your current session after [_1], or the next time you log in.';
     }      }
     $r->print("\n\n".      $r->print("\n\n".
 '<script type="text/javascript">'.  '<script type="text/javascript">'."\n".
 '// <![CDATA['.  '// <![CDATA['."\n".
 'function reinit(tf) { tf.submit();'.$postexec.' }'.  'function reinit(tf) { tf.submit();'.$postexec.' }'."\n".
 '// ]]>'.  '// ]]>'."\n".
 '</script>'."\n".  '</script>'."\n".
 '<form name="reinitform" method="post" action="/adm/roles" target="loncapaclient">'.  '<form name="reinitform" method="post" action="/adm/roles" target="loncapaclient">'.
 '<input type="hidden" name="orgurl" value="'.$url.  '<input type="hidden" name="orgurl" value="'.$url.
 '" /><input type="hidden" name="selectrole" value="1" /><h3><span class="LC_warning">'.  '" /><input type="hidden" name="selectrole" value="1" /><p class="LC_warning">'.
 &mt($message,' <input type="hidden" name="'.  &mt($message,' <input type="hidden" name="'.
     $env{'request.role'}.'" value="1" /><input type="button" value="'.      $env{'request.role'}.'" value="1" /><input type="button" value="'.
     &mt('re-initializing '.$course_type).'" onclick="reinit(this.form)" />').      &mt('re-initializing '.$course_type).'" onclick="reinit(this.form)" />').
 $help{'Caching'}.'</span></h3></form>'."\n\n");  $help{'Caching'}.'</p></form>'."\n\n");
 }  }
   
   
Line 2583  sub handler { Line 2633  sub handler {
       &init_breadcrumbs('dumpcourse','Dump '.&Apache::loncommon::course_type().' DOCS to Construction Space');        &init_breadcrumbs('dumpcourse','Dump '.&Apache::loncommon::course_type().' DOCS to Construction Space');
       &dumpcourse($r);        &dumpcourse($r);
   } elsif ($allowed && $env{'form.exportcourse'}) {    } elsif ($allowed && $env{'form.exportcourse'}) {
       &init_breadcrumbs('exportcourse','Export '.&Apache::loncommon::course_type().' to IMS');        &init_breadcrumbs('exportcourse','IMS Export');
       &exportcourse($r);        &exportcourse($r);
   } else {    } else {
 # is this a standard course?  # is this a standard course?
Line 2670  sub handler { Line 2720  sub handler {
     }      }
 # -------------------------------------------------------------------- Body tag  # -------------------------------------------------------------------- Body tag
     $script = '<script type="text/javascript">'."\n"      $script = '<script type="text/javascript">'."\n"
               .'// <![CDATA['                .'// <![CDATA['."\n"
               .$script                .$script."\n"
               .'// ]]>'                .'// ]]>'."\n"
               ."\n".'</script>';                .'</script>'."\n";
     my $brcrum = [{href=>"/adm/createuser",text=>"$type Documents"}];      my $brcrum = [{href=>"/adm/createuser",text=>"$type Documents"}];
     $r->print(&Apache::loncommon::start_page("$type Documents", $script,      $r->print(&Apache::loncommon::start_page("$type Documents", $script,
     {'force_register' => $showdoc,      {'force_register' => $showdoc,
Line 2773  sub handler { Line 2823  sub handler {
                 'uplm' => 'Upload a new main '.lc($type).' document',                  'uplm' => 'Upload a new main '.lc($type).' document',
                 'upls' => 'Upload a new supplemental '.lc($type).' document',                  'upls' => 'Upload a new supplemental '.lc($type).' document',
                 'impp' => 'Import a document',                  'impp' => 'Import a document',
                 'pubd' => 'Published Documents',  
  'copm' => 'All documents out of a published map into this folder',   'copm' => 'All documents out of a published map into this folder',
                 'upld' => 'Upload Document',                  'upld' => 'Upload Document',
                 'srch' => 'Search',                  'srch' => 'Search',
Line 2796  sub handler { Line 2845  sub handler {
                 'grpo' => 'Group Portfolio',                  'grpo' => 'Group Portfolio',
                 'rost' => 'Course Roster',                  'rost' => 'Course Roster',
  'abou' => 'Personal Information Page for a User',   'abou' => 'Personal Information Page for a User',
                 'imsf' => 'Import IMS package',                  'imsf' => 'IMS Import',
                   'imsl' => 'Import IMS package',
                 'file' =>  'File',                  'file' =>  'File',
                 'title' => 'Title',                  'title' => 'Title',
                 'comment' => 'Comment',                  'comment' => 'Comment',
Line 2805  sub handler { Line 2855  sub handler {
  'pm' => 'Published Map',   'pm' => 'Published Map',
  'sd' => 'Special Document',   'sd' => 'Special Document',
  'mo' => 'More Options',   'mo' => 'More Options',
  'hao' => 'Hide all Options'  
   );    );
 # -----------------------------------------------------------------------------  # -----------------------------------------------------------------------------
  my $fileupload=(<<FIUP);   my $fileupload=(<<FIUP);
Line 2824  CHBO Line 2873  CHBO
   
  my $fileuploadform=(<<FUFORM);   my $fileuploadform=(<<FUFORM);
  <form name="uploaddocument" action="/adm/coursedocs" method="post" enctype="multipart/form-data">   <form name="uploaddocument" action="/adm/coursedocs" method="post" enctype="multipart/form-data">
    <input type="hidden" name="active" value="aa" />
  $fileupload   $fileupload
  <br />   <br />
  $lt{'title'}:<br />   $lt{'title'}:<br />
Line 2845  FUFORM Line 2895  FUFORM
   
  my $simpleeditdefaultform=(<<SEDFFORM);   my $simpleeditdefaultform=(<<SEDFFORM);
  <form action="/adm/coursedocs" method="post" name="simpleeditdefault">   <form action="/adm/coursedocs" method="post" name="simpleeditdefault">
  $lt{'pubd'}<br />   <input type="hidden" name="active" value="bb" />
  $uploadtag   $uploadtag
  <input type="button" onclick="javascript:groupsearch()" value="$lt{'srch'}" />   <input type="button" onclick="javascript:groupsearch()" value="$lt{'srch'}" />
  <br />   <br />
Line 2917  HIDDENFORM Line 2967  HIDDENFORM
     my $activeClass = 1;      my $activeClass = 1;
     my $active = '';      my $active = '';
     $r->print('<ul class="LC_TabContentBigger" id="mainnav">');      $r->print('<ul class="LC_TabContentBigger" id="mainnav">');
     if (($standard) && ($allowed) && (!$forcesupplement) && (($env{'form.folderpath'}=~/^default/) || ($env{'form.pagepath'}))) {      if (($standard) && ($allowed) && (!$forcesupplement) && (($env{'form.folderpath'}=~/^default/) || $env{'form.folderpath'}eq"" || ($env{'form.pagepath'}))) {
         if($activeClass == 1){          if($activeClass == 1){
            $active = 'class="active"';             $active = 'class="active"';
    $activeClass = 0;     $activeClass = 0;
  }   }
     }      }
     $r->print('<li '.$active.'onclick="javascript:showPage(this,\'mainCourseDocuments\',\'mainnav\',\'maincoursedoc\');">'.&mt('Main Course Documents').'</li>');      $r->print('<li '.$active.' onclick="javascript:showPage(this,\'mainCourseDocuments\',\'mainnav\',\'maincoursedoc\');">'.&mt('Main Course Documents').'</li>');
     $active = '';      $active = '';
     if (!$forcestandard || ($env{'form.folderpath'}=~/^supplemental/)) {      if (!$forcestandard || ($env{'form.folderpath'}=~/^supplemental/)) {
         if($activeClass == 1){          if($activeClass == 1){
            $active = 'class="active"';             $active = 'class="active"';
         }          }
     }      }
     $r->print('<li '.$active.'onclick="javascript:showPage(this,\'Supplemental Course Documents\',\'mainnav\',\'maincoursedoc\');">'.&mt('Supplemental Course Documents').'</li>');      $r->print('<li '.$active.' onclick="javascript:showPage(this,\'supplCourseDocuments\',\'mainnav\',\'maincoursedoc\');">'.&mt('Supplemental Course Documents').'</li>');
     $r->print('</ul><div class="LC_ContentBoxSpecial" style="margin:0 0;padding:0 0;"><div id="maincoursedoc" style="margin:0 0;padding:0 0;">');      $r->print('</ul>'
                .'<div class="LC_Box" style="clear:both;margin:0;">'
                .'<div id="maincoursedoc" style="margin:0 0;padding:0 0;">');
 # --------------------------------------------------------- Standard documents  # --------------------------------------------------------- Standard documents
        my $savefolderpath;         my $savefolderpath;
        my $active = 'style="display: none;"';         my $active = 'style="display: none;"';
Line 2939  HIDDENFORM Line 2991  HIDDENFORM
           $active = 'style="display: block;"';            $active = 'style="display: block;"';
        }         }
        $r->print('<div class="LC_ContentBox" id="mainCourseDocuments" '.$active.'>');         $r->print('<div class="LC_ContentBox" id="mainCourseDocuments" '.$active.'>');
         $r->print(&Apache::loncommon::help_open_topic('Docs_Adding_Course_Doc',  
                      &mt('Editing the Table of Contents for your '.$type)));  
        my $folder=$env{'form.folder'};         my $folder=$env{'form.folder'};
        if ($folder eq '' || $folder=~/^supplemental/) {         if ($folder eq '' || $folder=~/^supplemental/) {
            $folder='default';             $folder='default';
Line 2951  HIDDENFORM Line 3001  HIDDENFORM
        }         }
        my $postexec='';         my $postexec='';
        if ($folder eq 'default') {         if ($folder eq 'default') {
            $r->print('<script type="text/javascript">'             $r->print('<script type="text/javascript">'."\n"
                     .'// <![CDATA['                      .'// <![CDATA['."\n"
                     .'this.window.name="loncapaclient";'                      .'this.window.name="loncapaclient";'."\n"
                     .'// ]]>'                      .'// ]]>'."\n"
                     .'</script>'                      .'</script>'."\n"
        );         );
        } else {         } else {
            #$postexec='self.close();';             #$postexec='self.close();';
Line 2981  RFORM Line 3031  RFORM
  my $imspform=(<<IMSPFORM);   my $imspform=(<<IMSPFORM);
  <form action="/adm/imsimportdocs" method="post" name="ims">   <form action="/adm/imsimportdocs" method="post" name="ims">
  <input type="hidden" name="folder" value="$folder" />   <input type="hidden" name="folder" value="$folder" />
  <input name="imsimport" type="button" value="$lt{'imsf'}" onclick="javascript:makeims();" />   <input name="imsimport" type="button" value="$lt{'imsf'}" title="$lt{imsl}"  onclick="javascript:makeims();" />
  </form>   </form>
 IMSPFORM  IMSPFORM
   
  my $newnavform=(<<NNFORM);   my $newnavform=(<<NNFORM);
  <form action="/adm/coursedocs" method="post" name="newnav">   <form action="/adm/coursedocs" method="post" name="newnav">
    <input type="hidden" name="active" value="cc" />
  $uploadtag   $uploadtag
  <input type="hidden" name="importdetail"    <input type="hidden" name="importdetail" 
  value="$lt{'navc'}=/adm/navmaps" />   value="$lt{'navc'}=/adm/navmaps" />
Line 2998  IMSPFORM Line 3049  IMSPFORM
 NNFORM  NNFORM
  my $newsmppageform=(<<NSPFORM);   my $newsmppageform=(<<NSPFORM);
  <form action="/adm/coursedocs" method="post" name="newsmppg">   <form action="/adm/coursedocs" method="post" name="newsmppg">
    <input type="hidden" name="active" value="cc" />
  $uploadtag   $uploadtag
  <input type="hidden" name="importdetail" value="" />   <input type="hidden" name="importdetail" value="" />
  <span class="LC_nobreak">   <span class="LC_nobreak">
Line 3009  NSPFORM Line 3061  NSPFORM
   
  my $newsmpproblemform=(<<NSPROBFORM);   my $newsmpproblemform=(<<NSPROBFORM);
  <form action="/adm/coursedocs" method="post" name="newsmpproblem">   <form action="/adm/coursedocs" method="post" name="newsmpproblem">
    <input type="hidden" name="active" value="cc" />
  $uploadtag   $uploadtag
  <input type="hidden" name="importdetail" value="" />   <input type="hidden" name="importdetail" value="" />
  <span class="LC_nobreak">   <span class="LC_nobreak">
Line 3021  NSPROBFORM Line 3074  NSPROBFORM
   
  my $newdropboxform=(<<NDBFORM);   my $newdropboxform=(<<NDBFORM);
  <form action="/adm/coursedocs" method="post" name="newdropbox">   <form action="/adm/coursedocs" method="post" name="newdropbox">
    <input type="hidden" name="active" value="cc" />
  $uploadtag   $uploadtag
  <input type="hidden" name="importdetail" value="" />   <input type="hidden" name="importdetail" value="" />
  <span class="LC_nobreak">   <span class="LC_nobreak">
Line 3032  NDBFORM Line 3086  NDBFORM
   
  my $newexuploadform=(<<NEXUFORM);   my $newexuploadform=(<<NEXUFORM);
  <form action="/adm/coursedocs" method="post" name="newexamupload">   <form action="/adm/coursedocs" method="post" name="newexamupload">
    <input type="hidden" name="active" value="cc" />
  $uploadtag   $uploadtag
  <input type="hidden" name="importdetail" value="" />   <input type="hidden" name="importdetail" value="" />
  <span class="LC_nobreak">   <span class="LC_nobreak">
Line 3044  NEXUFORM Line 3099  NEXUFORM
   
  my $newbulform=(<<NBFORM);   my $newbulform=(<<NBFORM);
  <form action="/adm/coursedocs" method="post" name="newbul">   <form action="/adm/coursedocs" method="post" name="newbul">
    <input type="hidden" name="active" value="cc" />
  $uploadtag   $uploadtag
  <input type="hidden" name="importdetail" value="" />   <input type="hidden" name="importdetail" value="" />
  <span class="LC_nobreak">   <span class="LC_nobreak">
Line 3056  NBFORM Line 3112  NBFORM
   
  my $newaboutmeform=(<<NAMFORM);   my $newaboutmeform=(<<NAMFORM);
  <form action="/adm/coursedocs" method="post" name="newaboutme">   <form action="/adm/coursedocs" method="post" name="newaboutme">
    <input type="hidden" name="active" value="cc" />
  $uploadtag   $uploadtag
  <input type="hidden" name="importdetail"    <input type="hidden" name="importdetail" 
  value="$plainname=/adm/$udom/$uname/aboutme" />   value="$plainname=/adm/$udom/$uname/aboutme" />
Line 3068  NAMFORM Line 3125  NAMFORM
   
  my $newaboutsomeoneform=(<<NASOFORM);   my $newaboutsomeoneform=(<<NASOFORM);
  <form action="/adm/coursedocs" method="post" name="newaboutsomeone">   <form action="/adm/coursedocs" method="post" name="newaboutsomeone">
    <input type="hidden" name="active" value="cc" />
  $uploadtag   $uploadtag
  <input type="hidden" name="importdetail" value="" />   <input type="hidden" name="importdetail" value="" />
  <span class="LC_nobreak">   <span class="LC_nobreak">
Line 3080  NASOFORM Line 3138  NASOFORM
   
  my $newrosterform=(<<NROSTFORM);   my $newrosterform=(<<NROSTFORM);
  <form action="/adm/coursedocs" method="post" name="newroster">   <form action="/adm/coursedocs" method="post" name="newroster">
    <input type="hidden" name="active" value="cc" />
  $uploadtag   $uploadtag
  <input type="hidden" name="importdetail"    <input type="hidden" name="importdetail" 
  value="$lt{'rost'}=/adm/viewclasslist" />   value="$lt{'rost'}=/adm/viewclasslist" />
Line 3100  my $newfolderform; Line 3159  my $newfolderform;
  <form action="/adm/coursedocs" method="post" name="newpage">   <form action="/adm/coursedocs" method="post" name="newpage">
  <input type="hidden" name="folderpath" value="$path" />   <input type="hidden" name="folderpath" value="$path" />
  <input type="hidden" name="importdetail" value="" />   <input type="hidden" name="importdetail" value="" />
    <input type="hidden" name="active" value="cc" />
  <span class="LC_nobreak">   <span class="LC_nobreak">
  <input name="newpage" type="button"   <input name="newpage" type="button"
  onclick="javascript:makenewpage(this.form,'$pageseq');"   onclick="javascript:makenewpage(this.form,'$pageseq');"
Line 3112  NPFORM Line 3172  NPFORM
  <form action="/adm/coursedocs" method="post" name="newfolder">   <form action="/adm/coursedocs" method="post" name="newfolder">
  <input type="hidden" name="folderpath" value="$path" />   <input type="hidden" name="folderpath" value="$path" />
  <input type="hidden" name="importdetail" value="" />   <input type="hidden" name="importdetail" value="" />
    <input type="hidden" name="active" value="aa" />
  <span class="LC_nobreak">   <span class="LC_nobreak">
  <input name="newfolder" type="button"   <input name="newfolder" type="button"
  onclick="javascript:makenewfolder(this.form,'$folderseq');"   onclick="javascript:makenewfolder(this.form,'$folderseq');"
Line 3122  NFFORM Line 3183  NFFORM
   
  my $newsylform=(<<NSYLFORM);   my $newsylform=(<<NSYLFORM);
  <form action="/adm/coursedocs" method="post" name="newsyl">   <form action="/adm/coursedocs" method="post" name="newsyl">
    <input type="hidden" name="active" value="cc" />
  $uploadtag   $uploadtag
  <input type="hidden" name="importdetail"    <input type="hidden" name="importdetail" 
  value="$lt{'syll'}=/public/$coursedom/$coursenum/syllabus" />   value="$lt{'syll'}=/public/$coursedom/$coursenum/syllabus" />
Line 3134  NSYLFORM Line 3196  NSYLFORM
   
  my $newgroupfileform=(<<NGFFORM);   my $newgroupfileform=(<<NGFFORM);
  <form action="/adm/coursedocs" method="post" name="newgroupfiles">   <form action="/adm/coursedocs" method="post" name="newgroupfiles">
    <input type="hidden" name="active" value="cc" />
  $uploadtag   $uploadtag
  <input type="hidden" name="importdetail"   <input type="hidden" name="importdetail"
  value="$lt{'grpo'}=/adm/$coursedom/$coursenum/aboutme" />   value="$lt{'grpo'}=/adm/$coursedom/$coursenum/aboutme" />
Line 3157  if($env{'form.pagepath'}) { Line 3220  if($env{'form.pagepath'}) {
   
 my %orderhash = (  my %orderhash = (
                 'aa' => ['Upload Document',$fileuploadform.'<br />'.$newfolderform],                  'aa' => ['Upload Document',$fileuploadform.'<br />'.$newfolderform],
                 'bb' => ['Published Documents',$simpleeditdefaultform],                  'bb' => ['Published Resources',$simpleeditdefaultform],
                 'cc' => ['Special Documents',$specialdocumentsform],                  'cc' => ['Special Documents',$specialdocumentsform],
  'dd' => ['Tools',$extresourcesform.'<br />'.$imspform.'<br />'.$recoverform.'<br />'.&generate_admin_options($containertag,$uploadtag,\%help,\%env)],   'dd' => ['Tools',$extresourcesform.'<br />'.$imspform.'<br />'.$recoverform.'<br />'.&generate_admin_options($containertag,$uploadtag,\%help,\%env)],
                 'zz' => ['Hide all Options'],                  'zz' => ['Hide'],
                 );                  );
 my $tid='1';  my $tid='1';
 my $varcd = 'Main Course Documents';  my $varcd = 'Main Course Documents';
Line 3175  $r->print(&generate_edit_table($tid,$var Line 3238  $r->print(&generate_edit_table($tid,$var
        }         }
   
        &changewarning($r,'');         &changewarning($r,'');
    $r->print(&Apache::loncommon::help_open_topic('Docs_Adding_Course_Doc',
                        &mt('Editing the Table of Contents for your '.$type)));
 $r->print('</div>');  $r->print('</div>');
        if ($env{'form.pagepath'}) {         if ($env{'form.pagepath'}) {
        }         }
Line 3183  $r->print('</div>'); Line 3248  $r->print('</div>');
        if($activeClass == 1){         if($activeClass == 1){
           $active = 'style="display: block;"';            $active = 'style="display: block;"';
        }         }
        $r->print('<div class="LC_ContentBox" id="Supplemental Course Documents" '.$active.'>');         $r->print('<div class="LC_ContentBox" id="supplCourseDocuments" '.$active.'>');
        my $folder=$env{'form.folder'};         my $folder=$env{'form.folder'};
        unless ($folder=~/^supplemental/) {         unless ($folder=~/^supplemental/) {
    $folder='supplemental';     $folder='supplemental';
Line 3205  $r->print('</div>'); Line 3270  $r->print('</div>');
   
  my $supupdocform=(<<SUPDOCFORM);   my $supupdocform=(<<SUPDOCFORM);
  <form action="/adm/coursedocs" method="post" enctype="multipart/form-data">   <form action="/adm/coursedocs" method="post" enctype="multipart/form-data">
    <input type="hidden" name="active" value="ee" />
  $fileupload   $fileupload
  <br />   <br />
  <br />   <br />
Line 3227  SUPDOCFORM Line 3293  SUPDOCFORM
   
  my $supnewfolderform=(<<SNFFORM);   my $supnewfolderform=(<<SNFFORM);
  <form action="/adm/coursedocs" method="post" name="supnewfolder">   <form action="/adm/coursedocs" method="post" name="supnewfolder">
    <input type="hidden" name="active" value="ee" />
  <input type="hidden" name="folderpath" value="$path" />   <input type="hidden" name="folderpath" value="$path" />
  <input type="hidden" name="importdetail" value="" />   <input type="hidden" name="importdetail" value="" />
  <span class="LC_nobreak">   <span class="LC_nobreak">
Line 3240  SNFFORM Line 3307  SNFFORM
   
  my $supnewextform=(<<SNEFORM);   my $supnewextform=(<<SNEFORM);
  <form action="/adm/coursedocs" method="post" name="supnewext">   <form action="/adm/coursedocs" method="post" name="supnewext">
    <input type="hidden" name="active" value="ff" />
  <input type="hidden" name="folderpath" value="$path" />   <input type="hidden" name="folderpath" value="$path" />
  <input type="hidden" name="importdetail" value="" />   <input type="hidden" name="importdetail" value="" />
  <span class="LC_nobreak">   <span class="LC_nobreak">
Line 3252  SNEFORM Line 3320  SNEFORM
   
  my $supnewsylform=(<<SNSFORM);   my $supnewsylform=(<<SNSFORM);
  <form action="/adm/coursedocs" method="post" name="supnewsyl">   <form action="/adm/coursedocs" method="post" name="supnewsyl">
    <input type="hidden" name="active" value="ff" />
  <input type="hidden" name="folderpath" value="$path" />   <input type="hidden" name="folderpath" value="$path" />
  <input type="hidden" name="importdetail"    <input type="hidden" name="importdetail" 
  value="Syllabus=/public/$coursedom/$coursenum/syllabus" />   value="Syllabus=/public/$coursedom/$coursenum/syllabus" />
Line 3264  SNSFORM Line 3333  SNSFORM
   
  my $supnewaboutmeform=(<<SNAMFORM);   my $supnewaboutmeform=(<<SNAMFORM);
  <form action="/adm/coursedocs" method="post" name="subnewaboutme">   <form action="/adm/coursedocs" method="post" name="subnewaboutme">
    <input type="hidden" name="active" value="ff" />
  <input type="hidden" name="folderpath" value="$path" />   <input type="hidden" name="folderpath" value="$path" />
  <input type="hidden" name="importdetail"    <input type="hidden" name="importdetail" 
  value="$plainname=/adm/$udom/$uname/aboutme" />   value="$plainname=/adm/$udom/$uname/aboutme" />
Line 3279  SNAMFORM Line 3349  SNAMFORM
 my %suporderhash = (  my %suporderhash = (
                 'ee' => ['Upload Document',$supupdocform.'<br />'.$supnewfolderform],                  'ee' => ['Upload Document',$supupdocform.'<br />'.$supnewfolderform],
                 'ff' => ['Special Documents',$supnewextform.'<br />'.$supnewsylform.'<br />'.$supnewaboutmeform],                  'ff' => ['Special Documents',$supnewextform.'<br />'.$supnewsylform.'<br />'.$supnewaboutmeform],
                 'zz' => ['Hide all Options'],                  'zz' => ['Hide'],
                 );                  );
   
 my $tid='2';  my $tid='2';
Line 3347  sub generate_edit_table { Line 3417  sub generate_edit_table {
     my ($tid,$varcd,$orderhash_ref) = @_;      my ($tid,$varcd,$orderhash_ref) = @_;
     my %orderhash = %{$orderhash_ref};      my %orderhash = %{$orderhash_ref};
     my $form;      my $form;
       my $activetab;
     $form = '<div class="LC_ContentBoxSpecial"><h4 class="LC_hcell">'.&mt($varcd).'</h4>';      my $active;
       if($env{'form.active'} ne ''){
           $activetab = $env{'form.active'};
       }
       $form = '<div class="LC_Box"><h4 class="LC_hcell">'.&mt($varcd).'</h4>';
     $form .= '<ul id="navigation'.$tid.'" class="LC_TabContent">';      $form .= '<ul id="navigation'.$tid.'" class="LC_TabContent">';
     foreach my $name (sort(keys(%orderhash))){      foreach my $name (sort(keys(%orderhash))){
         if($name eq 'zz'){          if($name eq 'zz'){
             $form .= '<span class="LC_Right"><li onclick="javascript:hideAll(this, \'navigation'.$tid.'\' ,\'content'.$tid.'\');" class="active">'.&mt(${$orderhash{$name}}[0]).'</li></span>';              if($activetab ne ''){
                  $active = 'class="right"';
               }else{
                  $active = 'class="right active"';
               }
               $form .= '<li onclick="javascript:hideAll(this, \'navigation'.$tid.'\' ,\'content'.$tid.'\');" '.$active.'>'.&mt(${$orderhash{$name}}[0]).'</li>';
         }else{          }else{
             $form .= '<li onclick="javascript:showPage(this, \''.substr(${$orderhash{$name}}[0],0,3).$tid.'\', \'navigation'.$tid.'\',\'content'.$tid.'\');">'.&mt(${$orderhash{$name}}[0]).'</li>';              if($activetab eq '' || $activetab ne $name){
                  $active = '';
               }elsif($activetab eq $name){
                  $active = 'class="active"';
               }
               $form .= '<li '.$active.' onclick="javascript:showPage(this, \''.$name.$tid.'\', \'navigation'.$tid.'\',\'content'.$tid.'\');">'.&mt(${$orderhash{$name}}[0]).'</li>';
         }          }
     }      }
     $form .= '</ul>';      $form .= '</ul>';
     $form .= '<div id="content'.$tid.'" style="padding: 0 0; margin: 0 0;">';      $form .= '<div id="content'.$tid.'" style="padding: 0 0; margin: 0 0;">';
     foreach my $field (keys(%orderhash)){      foreach my $field (keys(%orderhash)){
  if($field ne 'zz'){   if($field ne 'zz'){
            $form .= '<div id="'.substr(${$orderhash{$field}}[0],0,3).$tid.'" class="LC_ContentBox" style="display: none;">'.${$orderhash{$field}}[1].'</div>';          if($activetab eq '' || $activetab ne $field){
                   $active = 'style="display: none;"';
           }elsif($activetab eq $field){
                   $active = 'style="display:block;"';
           }
              $form .= '<div id="'.$field.$tid.'"'
                      .' class="LC_ContentBox" '.$active.'>'.${$orderhash{$field}}[1]
                      .'</div>';
         }          }
     }      }
     $form .= '</div></div>';      $form .= '</div></div>';
Line 3574  function unselectInactive(nav) { Line 3665  function unselectInactive(nav) {
 currentNav = document.getElementById(nav);  currentNav = document.getElementById(nav);
 currentLis = currentNav.getElementsByTagName('LI');  currentLis = currentNav.getElementsByTagName('LI');
 for (i = 0; i < currentLis.length; i++) {  for (i = 0; i < currentLis.length; i++) {
  currentLis[i].className = 'i';   if(currentLis[i].className == 'right active' || currentLis[i].className == 'right'){
    currentLis[i].className = 'right';
    }else{
    currentLis[i].className = 'i';
    }
 }  }
 }  }
   
 function hideAll(current, nav, data) {  function hideAll(current, nav, data) {
 unselectInactive(nav);  unselectInactive(nav);
 current.className = 'active';  if(current.className == 'right'){
    current.className = 'right active'
    }else{
    current.className = 'active';
   }
 currentData = document.getElementById(data);  currentData = document.getElementById(data);
 currentDivs = currentData.getElementsByTagName('DIV');  currentDivs = currentData.getElementsByTagName('DIV');
 for (i = 0; i < currentDivs.length; i++) {  for (i = 0; i < currentDivs.length; i++) {
Line 3590  for (i = 0; i < currentDivs.length; i++) Line 3689  for (i = 0; i < currentDivs.length; i++)
 }  }
 }  }
   
   function openTabs(pageId) {
    tabnav = document.getElementById(pageId).getElementsByTagName('UL');
    if(tabnav.length > 0 ){
    currentNav = document.getElementById(tabnav[0].id);
    currentLis = currentNav.getElementsByTagName('LI');
    for(i = 0; i< currentLis.length; i++){
    if(currentLis[i].className == 'active') {
    funcString = currentLis[i].onclick.toString();
    tab = funcString.split('"');
    currentData = document.getElementById(tab[1]);
           currentData.style.display = 'block';
    }
    }
    }
   }
   
 function showPage(current, pageId, nav, data) {  function showPage(current, pageId, nav, data) {
  hideAll(current, nav, data);   hideAll(current, nav, data);
    openTabs(pageId);
  unselectInactive(nav);   unselectInactive(nav);
  current.className = 'active';   current.className = 'active';
  currentData = document.getElementById(pageId);   currentData = document.getElementById(pageId);

Removed from v.1.369  
changed lines
  Added in v.1.381


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