Diff for /loncom/interface/londocs.pm between versions 1.345 and 1.355

version 1.345, 2009/02/17 10:02:59 version 1.355, 2009/03/10 22:15:43
Line 1223  sub update_paste_buffer { Line 1223  sub update_paste_buffer {
         &Apache::lonnet::appenv({'docs.markedcopy_supplemental' => $title});          &Apache::lonnet::appenv({'docs.markedcopy_supplemental' => $title});
  ($title) = &parse_supplemental_title($title);   ($title) = &parse_supplemental_title($title);
     } elsif ($env{'docs.markedcopy_supplemental'}) {      } elsif ($env{'docs.markedcopy_supplemental'}) {
         &Apache::lonnet::delenv('docs\\.markedcopy_supplemental');          &Apache::lonnet::delenv('docs.markedcopy_supplemental');
     }      }
     $url=~s{http(:|:)//https(:|:)//}{https$2//};      $url=~s{http(:|:)//https(:|:)//}{https$2//};
   
Line 1327  sub do_paste_from_buffer { Line 1327  sub do_paste_from_buffer {
     }      }
 # published maps can only exists once, so remove it from paste buffer when done  # published maps can only exists once, so remove it from paste buffer when done
     if (($url=~/\.(page|sequence)$/) && ($url=~m {^/res/})) {      if (($url=~/\.(page|sequence)$/) && ($url=~m {^/res/})) {
  &Apache::lonnet::delenv('docs\\.markedcopy');   &Apache::lonnet::delenv('docs.markedcopy');
     }      }
     if ($url=~ m{/smppg$}) {      if ($url=~ m{/smppg$}) {
  my $db_name = &Apache::lonsimplepage::get_db_name($url);   my $db_name = &Apache::lonsimplepage::get_db_name($url);
Line 2538  sub handler { Line 2538  sub handler {
     'Option_Response_Simple');      'Option_Response_Simple');
     $help{'Bulletin Board'} = &Apache::loncommon::help_open_topic(      $help{'Bulletin Board'} = &Apache::loncommon::help_open_topic(
     'Docs_About_Bulletin_Board,Docs_Editing_Templated_Pages');      'Docs_About_Bulletin_Board,Docs_Editing_Templated_Pages');
     $help{'My Personal Homepage'} = &Apache::loncommon::help_open_topic(      $help{'My Personal Information Page'} = &Apache::loncommon::help_open_topic(
   'Docs_About_My_Personal_Info,Docs_Editing_Templated_Pages');    'Docs_About_My_Personal_Info,Docs_Editing_Templated_Pages');
     $help{'Group Files'} = &Apache::loncommon::help_open_topic('Docs_About_Group_Files');      $help{'Group Portfolio'} = &Apache::loncommon::help_open_topic('Docs_About_Group_Files');
     $help{'Caching'} = &Apache::loncommon::help_open_topic('Caching');      $help{'Caching'} = &Apache::loncommon::help_open_topic('Caching');
   
 # does this user have privileges to modify docs  # does this user have privileges to modify docs
Line 2766  sub handler { Line 2766  sub handler {
                 'drbx' => 'Drop Box',                  'drbx' => 'Drop Box',
                 'scuf' => 'Score Upload Form',                  'scuf' => 'Score Upload Form',
                 'bull' => 'Discussion Board',                  'bull' => 'Discussion Board',
                 'mypi' => 'My Personal Homepage',                  'mypi' => 'My Personal Information Page',
                 'grpo' => 'Group Files',                  'grpo' => 'Group Portfolio',
                 'rost' => 'Course Roster',                  'rost' => 'Course Roster',
  'abou' => 'About User',   'abou' => 'Personal Information Page for a User',
                 'imsf' => 'Import IMS package',                  'imsf' => 'Import IMS package',
                 'file' =>  'File',                  'file' =>  'File',
                 'title' => 'Title',                  'title' => 'Title',
Line 2889  HIDDENFORM Line 2889  HIDDENFORM
     }      }
 # --------------------------------------------------------- Main tab structure  # --------------------------------------------------------- Main tab structure
     my $activeClass = 1;      my $activeClass = 1;
       my $active = '';
     $r->print('<ul class="LC_TabContentBigger" id="mainnav">');      $r->print('<ul class="LC_TabContentBigger" id="mainnav">');
     if (($standard) && ($allowed) && (!$forcesupplement)) {      if (($standard) && ($allowed) && (!$forcesupplement) && (!$env{'form.suppactive'})) {
  my $active = '';  
         if($activeClass == 1){          if($activeClass == 1){
            $active = 'class="active"';             $active = 'class="active"';
    $activeClass = 0;     $activeClass = 0;
  }   }
  $r->print('<li '.$active.'onclick="javascript:showPage(this,\'Main Course Documents\',\'mainnav\',\'maincoursedoc\');">'.&mt('Main Course Documents').'</li>');  
     }      }
     if (!$forcestandard) {      $r->print('<li '.$active.'onclick="javascript:showPage(this,\'Main Course Documents\',\'mainnav\',\'maincoursedoc\');">'.&mt('Main Course Documents').'</li>');
  my $active = '';      $active = '';
       if (!$forcestandard || $env{'form.suppactive'} ) {
         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 onclick="javascript:showPage(this,\'Special Admin Options\',\'mainnav\',\'maincoursedoc\');">'.&mt('Special Admin Options').'</li>');      $r->print('<li '.$active.'onclick="javascript:showPage(this,\'Supplemental Course Documents\',\'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_ContentBoxSpecial" style="margin:0 0;padding:0 0;"><div id="maincoursedoc" style="margin:0 0;padding:0 0;">');
 # --------------------------------------------------------- Standard documents  # --------------------------------------------------------- Standard documents
     if (($standard) && ($allowed) && (!$forcesupplement)) {      if (($standard) && ($allowed) && (!$forcesupplement)) {
Line 3030  NBFORM Line 3029  NBFORM
  value="$plainname=/adm/$udom/$uname/aboutme" />   value="$plainname=/adm/$udom/$uname/aboutme" />
  <span class="LC_nobreak">   <span class="LC_nobreak">
  <input name="newaboutme" type="submit" value="$lt{'mypi'}" />   <input name="newaboutme" type="submit" value="$lt{'mypi'}" />
  $help{'My Personal Homepage'}   $help{'My Personal Information Page'}
  </span>   </span>
  </form>   </form>
 NAMFORM  NAMFORM
Line 3060  NASOFORM Line 3059  NASOFORM
 NROSTFORM  NROSTFORM
   
 my $specialdocumentsform;  my $specialdocumentsform;
   my $newfolderform;
   
        unless ($env{'form.pagepath'}) {         unless ($env{'form.pagepath'}) {
    my $path = &HTML::Entities::encode($env{'form.folderpath'},'<>&"');     my $path = &HTML::Entities::encode($env{'form.folderpath'},'<>&"');
Line 3076  my $specialdocumentsform; Line 3076  my $specialdocumentsform;
  </form>   </form>
 NPFORM  NPFORM
   
  my $newfolderform=(<<NFFORM);   $newfolderform=(<<NFFORM);
  <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="" />
Line 3107  NSYLFORM Line 3107  NSYLFORM
  value="$lt{'grpo'}=/adm/$coursedom/$coursenum/aboutme" />   value="$lt{'grpo'}=/adm/$coursedom/$coursenum/aboutme" />
  <span class="LC_nobreak">   <span class="LC_nobreak">
  <input name="newgroupfiles" type="submit" value="$lt{'grpo'}" />   <input name="newgroupfiles" type="submit" value="$lt{'grpo'}" />
  $help{'Group Files'}   $help{'Group Portfolio'}
  </span>   </span>
  </form>   </form>
 NGFFORM  NGFFORM
   
  $specialdocumentsform="<br />$newfolderform<br />$newpageform<br />$newsylform<br />$newgroupfileform";   $specialdocumentsform="<br />$newpageform<br />$newsylform<br />$newgroupfileform";
       }        }
  $specialdocumentsform.="<br />$newnavform<br />$newsmppageform   $specialdocumentsform.="<br />$newnavform<br />$newsmppageform
  <br />$newsmpproblemform<br />$newdropboxform   <br />$newsmpproblemform<br />$newdropboxform
Line 3127  my %orderhash = ( Line 3127  my %orderhash = (
                 'aa' => 'New Document',                  'aa' => 'New Document',
                 'bb' => 'Published Documents',                  'bb' => 'Published Documents',
                 'cc' => 'Special Documents',                  'cc' => 'Special Documents',
  'dd' => 'More Options',   'dd' => 'More Tools',
                 'zz' => 'Hide all Options',                  'zz' => 'Hide all Options',
                 );                  );
 my %namehash = (  my %namehash = (
                 'New Document' => $fileuploadform,                  'New Document' => $fileuploadform.'<br />'.$newfolderform,
                 'Published Documents' => $simpleeditdefaultform,                  'Published Documents' => $simpleeditdefaultform,
                 'Special Documents' => $specialdocumentsform,                  'Special Documents' => $specialdocumentsform,
  'More Options' => $extresourcesform.'<br />'.$imspform.'<br />'.$recoverform,   'More Tools' => $extresourcesform.'<br />'.$imspform.'<br />'.$recoverform.'<br />'.&generate_admin_options($containertag,$uploadtag,\%help,\%env),
                 );                  );
 my $tid='1';  my $tid='1';
 my $content='content';  my $content='content';
Line 3192  $r->print('</div>'); Line 3192  $r->print('</div>');
  </textarea>   </textarea>
  <br />   <br />
  <input type="hidden" name="folderpath" value="$path" />   <input type="hidden" name="folderpath" value="$path" />
    <input type="hidden" name="suppactive" value="true" />
  <input type="hidden" name="cmd" value="upload_supplemental" />   <input type="hidden" name="cmd" value="upload_supplemental" />
  <span class="LC_nobreak">   <span class="LC_nobreak">
  <input type="submit" value="$lt{'upld'}" />   <input type="submit" value="$lt{'upld'}" />
Line 3204  SUPDOCFORM Line 3205  SUPDOCFORM
  <form action="/adm/coursedocs" method="post" name="supnewfolder">   <form action="/adm/coursedocs" method="post" name="supnewfolder">
  <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="suppactive" value="true" />
  <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 3217  SNFFORM Line 3219  SNFFORM
  <form action="/adm/coursedocs" method="post" name="supnewext">   <form action="/adm/coursedocs" method="post" name="supnewext">
  <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="suppactive" value="true" />
  <span class="LC_nobreak">   <span class="LC_nobreak">
  <input name="newext" type="button"    <input name="newext" type="button" 
  onClick="javascript:makenewext('supnewext');"   onClick="javascript:makenewext('supnewext');"
Line 3230  SNEFORM Line 3233  SNEFORM
  <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" />
    <input type="hidden" name="suppactive" value="true" />
  <span class="LC_nobreak">   <span class="LC_nobreak">
  <input name="newsyl" type="submit" value="$lt{'syll'}" />   <input name="newsyl" type="submit" value="$lt{'syll'}" />
  $help{'Syllabus'}   $help{'Syllabus'}
Line 3242  SNSFORM Line 3246  SNSFORM
  <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" />
    <input type="hidden" name="suppactive" value="true" />
  <span class="LC_nobreak">   <span class="LC_nobreak">
  <input name="newaboutme" type="submit" value="$lt{'mypi'}" />   <input name="newaboutme" type="submit" value="$lt{'mypi'}" />
  $help{'My Personal Homepage'}   $help{'My Personal Information Page'}
  </span>   </span>
  </form>   </form>
 SNAMFORM  SNAMFORM
Line 3258  my %suporderhash = ( Line 3263  my %suporderhash = (
                 );                  );
   
 my %supnamehash = (  my %supnamehash = (
                 'New Document' => $supupdocform,                  'New Document' => $supupdocform.'<br />'.$supnewfolderform,
                 'Special Documents' => $supnewfolderform.'<br />'.$supnewextform.'<br />'.$supnewsylform.'<br />'.$supnewaboutmeform,                  'Special Documents' => $supnewextform.'<br />'.$supnewsylform.'<br />'.$supnewaboutmeform,
                 );                  );
   
 my $tid='2';  my $tid='2';
Line 3275  my $error = &editor($r,$coursenum,$cours Line 3280  my $error = &editor($r,$coursenum,$cours
 $r->print('</div>');  $r->print('</div>');
  }    } 
    }     }
 $r->print('<div class="LC_ContentBox" id="Special Admin Options" style="display: none;">');  
 $r->print(&generate_admin_options($containertag,$uploadtag,\%help,\%env));  
 $r->print('</div>');  
 $r->print('</div>');  $r->print('</div>');
     if ($allowed) {      if ($allowed) {
  $r->print('   $r->print('
Line 3316  sub generate_admin_options { Line 3318  sub generate_admin_options {
   my $exportbut=&exportbutton();    my $exportbut=&exportbutton();
   return (<<ENDOPTIONFORM);    return (<<ENDOPTIONFORM);
  <form action="/adm/coursedocs" method="post" name="courseverify">   <form action="/adm/coursedocs" method="post" name="courseverify">
    <ul style="list-style-type:none">             <input type="submit" name="verify" value="$lt{'vc'}" />$help{'Verify_Content'}<br />
        <li>  
            <input type="submit" name="verify" value="$lt{'vc'}" />$help{'Verify_Content'}  
        </li>  
        <li>  
            <input type="submit" name="versions" value="$lt{'cv'}" />$help{'Check_Resource_Versions'}             <input type="submit" name="versions" value="$lt{'cv'}" />$help{'Check_Resource_Versions'}
        </li>             $dumpbut<br />
        <li>             $exportbut<br />
            $dumpbut  
        </li>  
        <li>  
            $exportbut  
        </li>  
        <li>  
           <input type="submit" name="listsymbs" value="$lt{'ls'}" />            <input type="submit" name="listsymbs" value="$lt{'ls'}" />
         </li>            <input type="hidden" name="folder" value="$env{'form.folder'}" /><br />
         <li>  
           <input type="hidden" name="folder" value="$env{'form.folder'}" />  
           <input type="submit" name="docslog" value="$lt{'sl'}" />            <input type="submit" name="docslog" value="$lt{'sl'}" />
         </li>  
    </ul>  
  </form>   </form>
 <!-- <div style="clear: both; height: 0px;">&nbsp;</div>-->  
 ENDOPTIONFORM  ENDOPTIONFORM
   
 }  }
Line 3354  sub generate_edit_table { Line 3341  sub generate_edit_table {
     $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 .= '<li onclick="javascript:hideAll(this, \''.$navigation.$tid.'\' ,\''.$content.$tid.'\');" class="active">'.&mt($orderhash{$name}).'</li>';              $form .= '<span class="LC_Right"><li onclick="javascript:hideAll(this, \''.$navigation.$tid.'\' ,\''.$content.$tid.'\');" class="active">'.&mt($orderhash{$name}).'</li></span>';
         }else{          }else{
             $form .= '<li onclick="javascript:showPage(this, \''.$tid.$orderhash{$name}.'\', \''.$navigation.$tid.'\',\''.$content.$tid.'\');">'.&mt($orderhash{$name}).'</li>';              $form .= '<li onclick="javascript:showPage(this, \''.$tid.$orderhash{$name}.'\', \''.$navigation.$tid.'\',\''.$content.$tid.'\');">'.&mt($orderhash{$name}).'</li>';
         }          }
Line 3378  sub editing_js { Line 3365  sub editing_js {
                                           p_mnp => 'Name of New Page',                                            p_mnp => 'Name of New Page',
                                           t_mnp => 'New Page',                                            t_mnp => 'New Page',
                                           p_mxu => 'Title for the Uploaded Score',                                            p_mxu => 'Title for the Uploaded Score',
                                           p_msp => 'Title for the Page',                                            p_msp => 'Name of Simple Course Page',
                                           p_msb => 'Title for the Problem',                                            p_msb => 'Title for the Problem',
                                           p_mdb => 'Title for the Drop Box',                                            p_mdb => 'Title for the Drop Box',
                                           p_mbb => 'Title for the Discussion Board',                                            p_mbb => 'Title for the Discussion Board',
                                           p_mab => "Enter user:domain for User's 'About Me' Page",                                            p_mab => "Enter user:domain for User's Personal Information Page",
                                           p_mab2 => "About [_99]",                                            p_mab2 => 'Personal Information Page of ',
                                           p_mab_alrt1 => 'Not a valid user:domain',                                            p_mab_alrt1 => 'Not a valid user:domain',
                                           p_mab_alrt2 => 'Please enter both user and domain in the format user:domain',                                            p_mab_alrt2 => 'Please enter both user and domain in the format user:domain',
                                           p_chn => 'New Title',                                            p_chn => 'New Title',

Removed from v.1.345  
changed lines
  Added in v.1.355


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