Diff for /loncom/interface/londocs.pm between versions 1.418 and 1.419

version 1.418, 2010/02/02 01:28:10 version 1.419, 2010/02/05 12:46:40
Line 120  sub dumpbutton { Line 120  sub dumpbutton {
     my $crstype = &Apache::loncommon::course_type();      my $crstype = &Apache::loncommon::course_type();
     if ($home+$other==0) { return ''; }      if ($home+$other==0) { return ''; }
     if ($home) {      if ($home) {
  my $link = "<a onclick='javascript:injectData(document.courseverify, \"dummy\", \"dumpcourse\", \"".&mt('Dump '.$crstype.' DOCS to Construction Space')."\")'>".&mt('Dump '.$crstype.' DOCS to Construction Space')."</a>";          my $link =
  return $link.' '.              "<a onclick='javascript:injectData(document.courseverify, \"dummy\", \"dumpcourse\", \""
     &Apache::loncommon::help_open_topic('Docs_Dump_Course_Docs').'<br />';             .&mt('Dump '.$crstype.' Documents to Construction Space')
              ."\")'>"
              .&mt('Dump '.$crstype.' Documents to Construction Space')
              .'</a>';
           return
               $link.' '
              .&Apache::loncommon::help_open_topic('Docs_Dump_Course_Docs')
              .'<br />';
     } else {      } else {
  return &mt('Dump '.$crstype.          return
  ' DOCS to Construction Space: available on other servers');              &mt('Dump '.$crstype.' Documents to Construction Space: available on other servers');
     }      }
 }  }
   
Line 140  sub clean { Line 147  sub clean {
 sub dumpcourse {  sub dumpcourse {
     my ($r) = @_;      my ($r) = @_;
     my $crstype = &Apache::loncommon::course_type();      my $crstype = &Apache::loncommon::course_type();
     $r->print(&Apache::loncommon::start_page('Dump '.$crstype.' DOCS to Construction Space').      $r->print(&Apache::loncommon::start_page('Dump '.$crstype.' Documents to Construction Space').
       '<form name="dumpdoc" action="" method="post">');        '<form name="dumpdoc" action="" method="post">');
     $r->print(&Apache::lonhtmlcommon::breadcrumbs('Dump '.$crstype.' DOCS to Construction Space'));      $r->print(&Apache::lonhtmlcommon::breadcrumbs('Dump '.$crstype.' Documents to Construction Space'));
     my ($home,$other,%outhash)=&authorhosts();      my ($home,$other,%outhash)=&authorhosts();
     unless ($home) { return ''; }      unless ($home) { return ''; }
     my $origcrsid=$env{'request.course.id'};      my $origcrsid=$env{'request.course.id'};
Line 253  sub dumpcourse { Line 260  sub dumpcourse {
  $r->print(&Apache::loncommon::end_data_table());   $r->print(&Apache::loncommon::end_data_table());
  &untiehash();   &untiehash();
  $r->print(   $r->print(
   '<p><input type="submit" name="dumpcourse" value="'.&mt("Dump $crstype DOCS").'" /></p></form>');    '<p><input type="submit" name="dumpcourse" value="'.&mt("Dump $crstype Documents").'" /></p></form>');
     }      }
 }  }
   
Line 2242  sub list_symbs { Line 2249  sub list_symbs {
     } else {      } else {
         $r->print("<pre>\n");          $r->print("<pre>\n");
         foreach my $res ($navmap->retrieveResources()) {          foreach my $res ($navmap->retrieveResources()) {
     $r->print($res->compTitle()."\t".$res->symb()."\n");              $r->print($res->compTitle()."\t".$res->symb()."\n");
         }          }
         $r->print("\n</pre>\n");          $r->print("\n</pre>\n");
     }      }
     $r->print('<a href="/adm/coursedocs">'.&mt('Return to DOCS').'</a>');      $r->print('<hr /><a href="/adm/coursedocs">'.&mt('Back to Course Editor').'</a>');
 }  }
   
   
Line 2265  sub verifycontent { Line 2272  sub verifycontent {
        if ($hash{$key}=~/\.(page|sequence)$/) {         if ($hash{$key}=~/\.(page|sequence)$/) {
    if (($key=~/^src_/) && ($alreadyseen{&unescape($hash{$key})})) {     if (($key=~/^src_/) && ($alreadyseen{&unescape($hash{$key})})) {
        $r->print('<hr /><span class="LC_error">'.         $r->print('<hr /><span class="LC_error">'.
  &mt('The following sequence or page is included more than once in your '.$crstype.': ').   &mt('The following sequence or page is included more than once in your '.$crstype.':').' '.
  &unescape($hash{$key}).'</span><br />'.   &unescape($hash{$key}).'</span><br />'.
  &mt('Note that grading records for problems included in this sequence or folder will overlap.<hr />'));   &mt('Note that grading records for problems included in this sequence or folder will overlap.').'<hr />');
    }     }
        }         }
        if (($key=~/^src\_(.+)$/) && (!$alreadyseen{&unescape($hash{$key})})) {         if (($key=~/^src\_(.+)$/) && (!$alreadyseen{&unescape($hash{$key})})) {
Line 2275  sub verifycontent { Line 2282  sub verifycontent {
        }         }
    }     }
    &untiehash();     &untiehash();
    $r->print('<h1>'.&mt('Done').'.</h1>'.'<a href="/adm/coursedocs">'.     $r->print(
      &mt('Return to DOCS').'</a>');         '<p class="LC_success">'.&mt('Done').'</p>'
         .'<hr />'
         .'<p><a href="/adm/coursedocs">'
     .&mt('Back to Course Editor')
         .'</a></p>'
      );
 }  }
   
   
Line 2526  ENDHEADERS Line 2538  ENDHEADERS
  }   }
     }      }
     $r->print('</table></form>');      $r->print('</table></form>');
     $r->print('<h1>'.&mt('Done').'.</h1>');      $r->print('<p class="LC_success">'.&mt('Done').'</p>');
   
     &untiehash();      &untiehash();
 }  }
Line 2650  sub handler { Line 2662  sub handler {
       &init_breadcrumbs('versions','Check/Set Resource Versions');        &init_breadcrumbs('versions','Check/Set Resource Versions');
       &checkversions($r);        &checkversions($r);
   } elsif ($allowed && $env{'form.dumpcourse'}) {    } elsif ($allowed && $env{'form.dumpcourse'}) {
       &init_breadcrumbs('dumpcourse','Dump '.&Apache::loncommon::course_type().' DOCS to Construction Space');        &init_breadcrumbs('dumpcourse','Dump '.&Apache::loncommon::course_type().' Documents to Construction Space');
       &dumpcourse($r);        &dumpcourse($r);
   } elsif ($allowed && $env{'form.exportcourse'}) {    } elsif ($allowed && $env{'form.exportcourse'}) {
       &init_breadcrumbs('exportcourse','IMS Export');        &init_breadcrumbs('exportcourse','IMS Export');
Line 2897  sub create_form_ul { Line 2909  sub create_form_ul {
  'book' => 'Import Bookmarks',   'book' => 'Import Bookmarks',
                 'selm' => 'Select Map',                  'selm' => 'Select Map',
                 'load' => 'Load Map',                  'load' => 'Load Map',
                 'reco' => 'Recover Deleted Resources',                  'reco' => 'Recover Deleted Documents',
                 'newf' => 'New Folder',                  'newf' => 'New Folder',
                 'newp' => 'New Composite Page',                  'newp' => 'New Composite Page',
                 'extr' => 'External Resource',                  'extr' => 'External Resource',
Line 3472  sub generate_admin_options { Line 3484  sub generate_admin_options {
                                          'ls' => 'List Symbs',                                           'ls' => 'List Symbs',
                                          'sl' => 'Show Log',                                           'sl' => 'Show Log',
                                          'imse' => 'IMS Export',                                           'imse' => 'IMS Export',
                                          'dcd' => 'Dump Course DOCS to Construction Space: available on other servers'                                           'dcd' => 'Dump Course Documents to Construction Space: available on other servers'
                                           );                                            );
   my %help = %{$help_ref};    my %help = %{$help_ref};
   my %env = %{$env_ref};    my %env = %{$env_ref};

Removed from v.1.418  
changed lines
  Added in v.1.419


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