Diff for /loncom/interface/londocs.pm between versions 1.350 and 1.357

version 1.350, 2009/03/03 16:57:24 version 1.357, 2009/03/17 14:50:53
Line 2540  sub handler { Line 2540  sub handler {
     'Docs_About_Bulletin_Board,Docs_Editing_Templated_Pages');      'Docs_About_Bulletin_Board,Docs_Editing_Templated_Pages');
     $help{'My Personal Information Page'} = &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 2767  sub handler { Line 2767  sub handler {
                 'scuf' => 'Score Upload Form',                  'scuf' => 'Score Upload Form',
                 'bull' => 'Discussion Board',                  'bull' => 'Discussion Board',
                 'mypi' => 'My Personal Information Page',                  'mypi' => 'My Personal Information Page',
                 'grpo' => 'Group Files',                  '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' => 'Import IMS package',
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.folderpath'}=~/^default/)) {
  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.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 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)) {         my $savefolderpath;
        my $active = 'style="display: none;"';         my $active = 'style="display: none;"';
        if($activeClass == 0){         if($activeClass == 0){
           $active = 'style="display: block;"';            $active = 'style="display: block;"';
Line 2917  HIDDENFORM Line 2916  HIDDENFORM
         $r->print(&Apache::loncommon::help_open_topic('Docs_Adding_Course_Doc',          $r->print(&Apache::loncommon::help_open_topic('Docs_Adding_Course_Doc',
                      &mt('Editing the Table of Contents for your '.$type)));                       &mt('Editing the Table of Contents for your '.$type)));
        my $folder=$env{'form.folder'};         my $folder=$env{'form.folder'};
        if ($folder eq '' || $folder eq 'supplemental') {         if ($folder eq '' || $folder=~/^supplemental/) {
            $folder='default';             $folder='default';
      $savefolderpath = $env{'form.folderpath'};
    $env{'form.folderpath'}='default&'.&escape(&mt('Main '.$type.' Documents'));     $env{'form.folderpath'}='default&'.&escape(&mt('Main '.$type.' Documents'));
            $uploadtag = '<input type="hidden" name="folderpath" value="'.             $uploadtag = '<input type="hidden" name="folderpath" value="'.
        &HTML::Entities::encode($env{'form.folderpath'},'<>&"').'" />';         &HTML::Entities::encode($env{'form.folderpath'},'<>&"').'" />';
Line 3060  NASOFORM Line 3060  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 3077  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 3108  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 3128  my %orderhash = (
                 'aa' => 'New Document',                  'aa' => 'New Document',
                 'bb' => 'Published Documents',                  'bb' => 'Published Documents',
                 'cc' => 'Special Documents',                  'cc' => 'Special Documents',
  'dd' => 'More Options',   'dd' => '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,   '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 3154  $r->print(&generate_edit_table($tid,$con Line 3155  $r->print(&generate_edit_table($tid,$con
 $r->print('</div>');  $r->print('</div>');
        if ($env{'form.pagepath'}) {         if ($env{'form.pagepath'}) {
        }         }
     }  
 # ----------------------------------------------------- Supplemental documents  # ----------------------------------------------------- Supplemental documents
     if (!$forcestandard) {  
        my $active = 'style="display: none;"';         my $active = 'style="display: none;"';
        if($activeClass == 1){         if($activeClass == 1){
           $active = 'style="display: block;"';            $active = 'style="display: block;"';
Line 3170  $r->print('</div>'); Line 3169  $r->print('</div>');
    (($env{'form.folderpath'} =~ /^default\&/) || ($env{'form.folderpath'} eq ''))) {     (($env{'form.folderpath'} =~ /^default\&/) || ($env{'form.folderpath'} eq ''))) {
           $env{'form.folderpath'} = 'supplemental&'.            $env{'form.folderpath'} = 'supplemental&'.
                                     &escape(&mt('Supplemental '.$type.' Documents'));                                      &escape(&mt('Supplemental '.$type.' Documents'));
          }else{
     $env{'form.folderpath'} = $savefolderpath;
        }         }
        if ($allowed) {         if ($allowed) {
    my $folderseq=     my $folderseq=
Line 3258  my %suporderhash = ( Line 3259  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 3274  my $error = &editor($r,$coursenum,$cours Line 3275  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 3313  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="versions" value="$lt{'cv'}" />$help{'Check_Resource_Versions'}<br />
            <input type="submit" name="verify" value="$lt{'vc'}" />$help{'Verify_Content'}             $dumpbut<br />
        </li>             $exportbut<br />
        <li>  
            <input type="submit" name="versions" value="$lt{'cv'}" />$help{'Check_Resource_Versions'}  
        </li>  
        <li>  
            $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 3383  sub editing_js { Line 3365  sub editing_js {
                                           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 Personal Information Page",                                            p_mab => "Enter user:domain for User's Personal Information Page",
                                           p_mab2 => "Personal Information Page [_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.350  
changed lines
  Added in v.1.357


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