Diff for /loncom/interface/londocs.pm between versions 1.174 and 1.178

version 1.174, 2005/04/07 06:56:23 version 1.178, 2005/06/08 17:42:01
Line 272  sub exportcourse { Line 272  sub exportcourse {
         &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},          &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
                                             ['archive','discussion']);                                              ['archive','discussion']);
   
         my @exportitems = ();          my @exportitems = &Apache::loncommon::get_env_multiple('form.archive');
         if (defined($env{'form.archive'})) {          my @discussions = &Apache::loncommon::get_env_multiple('form.discussion');
             if (ref($env{'form.archive'}) eq 'ARRAY') {  
                 @exportitems = @{$env{'form.archive'}};  
             } else {  
                 $exportitems[0] = $env{'form.archive'};  
             }  
         }  
         my @discussions = ();  
         if (defined($env{'form.discussion'})) {  
             if (ref($env{'form.discussion'}) eq 'ARRAY') {  
                 @discussions = $env{'form.discussion'};  
             } else {  
                 $discussions[0] = $env{'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 = '<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';
         } else {          } else {
Line 866  sub group_import { Line 852  sub group_import {
             }              }
         }          }
  if ($url) {   if ($url) {
     my $idx = $#Apache::lonratedt::resources + 1;      my $idx = &Apache::lonratedt::getresidx($url);
     $Apache::lonratedt::order[$#Apache::lonratedt::order+1]=$idx;      $Apache::lonratedt::order[$#Apache::lonratedt::order+1]=$idx;
     my $ext = 'false';      my $ext = 'false';
     if ($url=~/^http:\/\//) { $ext = 'true'; }      if ($url=~/^http:\/\//) { $ext = 'true'; }
Line 928  sub editor { Line 914  sub editor {
     ($errtext,$fatal)=      ($errtext,$fatal)=
               &mapread($coursenum,$coursedom,$folder.'.'.$container);                &mapread($coursenum,$coursedom,$folder.'.'.$container);
     if ($#Apache::lonratedt::order<1) {      if ($#Apache::lonratedt::order<1) {
         $Apache::lonratedt::order[0]=1;   my $idx=&Apache::lonratedt::getresidx();
         $Apache::lonratedt::resources[1]='';   if ($idx<=0) { $idx=1; }
           $Apache::lonratedt::order[0]=$idx;
           $Apache::lonratedt::resources[$idx]='';
     }      }
     if (defined($env{'form.markcopy'})) {      if (defined($env{'form.markcopy'})) {
 # Mark for copying  # Mark for copying
Line 1851  sub is_hash_old { Line 1839  sub is_hash_old {
 }  }
   
 sub changewarning {  sub changewarning {
     my ($r,$postexec)=@_;      my ($r,$postexec,$message,$url)=@_;
     if (!&is_hash_old()) { return; }      if (!&is_hash_old()) { return; }
     my $pathvar='folderpath';      my $pathvar='folderpath';
     my $path=&Apache::lonnet::escape($env{'form.folderpath'});      my $path=&Apache::lonnet::escape($env{'form.folderpath'});
     if (defined($env{'form.pagepath'})) {      if (!defined($url)) {
  $pathvar='pagepath';   if (defined($env{'form.pagepath'})) {
  $path=&Apache::lonnet::escape($env{'form.pagepath'});      $pathvar='pagepath';
  $path.='&amp;symb='.&Apache::lonnet::escape($env{'form.pagesymb'});      $path=&Apache::lonnet::escape($env{'form.pagepath'});
       $path.='&amp;symb='.&Apache::lonnet::escape($env{'form.pagesymb'});
    }
    $url='/adm/coursedocs?'.$pathvar.'='.$path;
       }
       if (!defined($message)) {
    $message='Changes will become active for your current session after [_1], or the next time you log in.';
     }      }
     $r->print(      $r->print(
 '<script>function reinit(tf) { tf.submit();'.$postexec.' }</script>'.   '<script>function reinit(tf) { tf.submit();'.$postexec.' }</script>'. 
 '<form method="post" action="/adm/roles" target="loncapaclient">'.  '<form method="post" action="/adm/roles" target="loncapaclient">'.
 '<input type="hidden" name="orgurl" value="/adm/coursedocs?'.  '<input type="hidden" name="orgurl" value="'.$url.
 $pathvar.'='.$path.  
 '" /><input type="hidden" name="selectrole" value="1" /><h3><font color="red">'.  '" /><input type="hidden" name="selectrole" value="1" /><h3><font color="red">'.
 &mt('Changes will become active for your current session after').  &mt($message,' <input type="hidden" name="'.
 ' <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').'" onClick="reinit(this.form)" />').
 &mt('re-initializing course').'" onClick="reinit(this.form)"/>'.&mt(', or the next time you log in.').  
 $help{'Caching'}.'</font></h3></form>');  $help{'Caching'}.'</font></h3></form>');
 }  }
   
Line 1974  sub handler { Line 1966  sub handler {
   
 # graphics settings  # graphics settings
   
     $iconpath = $r->dir_config('lonIconsURL') . "/";      $iconpath = &Apache::loncommon::lonhttpdurl($r->dir_config('lonIconsURL') . "/");
   
     my $now=time;      my $now=time;
   

Removed from v.1.174  
changed lines
  Added in v.1.178


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