Diff for /loncom/interface/londocs.pm between versions 1.325.2.3 and 1.325.2.5

version 1.325.2.3, 2010/01/22 00:49:08 version 1.325.2.5, 2010/01/22 01:23:34
Line 265  sub dumpcourse { Line 265  sub dumpcourse {
   
 sub exportbutton {  sub exportbutton {
     my $type = &Apache::loncommon::course_type();      my $type = &Apache::loncommon::course_type();
     return '<div>'.      return '<input type="submit" name="exportcourse"'
             '<input type="submit" name="exportcourse" value="'.            .' value="'.&mt('IMS Export').'"'
             &mt('Export '.$type.' to IMS').'" />'.            .' title="'.&mt('Export '.$type.' to IMS Package').'" />'.
     &Apache::loncommon::help_open_topic('Docs_Export_Course_Docs').'</div>';      &Apache::loncommon::help_open_topic('Docs_Export_Course_Docs').'<br />';
 }  }
   
   
Line 281  sub exportcourse { Line 281  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 '.$crstype.' to IMS Package').          $r->print(&Apache::loncommon::start_page('Export '.$type.' to IMS Package').
                   '<h2>'.&mt('IMS Export Failed').'</h2>'.                    '<h2>'.&mt('IMS Export Failed').'</h2>'.
                   '<div class="LC_error">');                    '<div class="LC_error">');
         if ($crstype eq 'Community') {          if ($crstype eq 'Community') {
Line 312  sub exportcourse { Line 312  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 346  sub exportcourse { Line 356  sub exportcourse {
                                .'</p>';                                 .'</p>';
                 }                  }
             } else {              } else {
                 $outcome = '<br />'.&mt('Unfortunately you will not be able to retrieve an IMS archive of your course 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 500  function containerCheck(item) { Line 518  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('Export '.lc($type).' to IMS content package'));
  $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 1679  sub process_file_upload { Line 1697  sub process_file_upload {
             return 'failed';              return 'failed';
         } else {          } else {
             if ($parseaction eq 'parse') {              if ($parseaction eq 'parse') {
                 my $total_embedded = keys(%{$allfiles});                  my $total_embedded = scalar(keys(%{$allfiles}));
                 if ($total_embedded > 0) {                  if ($total_embedded > 0) {
                     my $num = 0;                      my $num = 0;
     my $state = '      my $state = '
Line 2534  sub init_breadcrumbs { Line 2552  sub init_breadcrumbs {
     my ($form,$text)=@_;      my ($form,$text)=@_;
     &Apache::lonhtmlcommon::clear_breadcrumbs();      &Apache::lonhtmlcommon::clear_breadcrumbs();
     &Apache::lonhtmlcommon::add_breadcrumb({href=>"/adm/coursedocs",      &Apache::lonhtmlcommon::add_breadcrumb({href=>"/adm/coursedocs",
     text=>"Edit ".&Apache::loncommon::course_type(),      text=>&Apache::loncommon::course_type().' Editor',
     faq=>273,      faq=>273,
     bug=>'Instructor Interface',      bug=>'Instructor Interface',
                                             help => 'Docs_Adding_Course_Doc'});                                              help => 'Docs_Adding_Course_Doc'});
Line 2595  sub handler { Line 2613  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 2807  sub handler { Line 2825  sub handler {
                 'grpo' => 'Group Portfolios',                  'grpo' => 'Group Portfolios',
                 'rost' => 'Course Roster',                  'rost' => 'Course Roster',
  'abou' => 'About User',   'abou' => 'About User',
                 'imsf' => 'Import IMS package',                  'imsf' => 'IMS Import',
                   'imsl' => 'Import IMS package',
                 'file' =>  'File',                  'file' =>  'File',
                 'title' => 'Title',                  'title' => 'Title',
                 'comment' => 'Comment',                  'comment' => 'Comment',
                 'parse' => 'If HTML file, upload embedded images/multimedia files'                  'parse' => 'If HTML file, upload embedded images/multimedia files'
   );    );
 # -----------------------------------------------------------------------------  # -----------------------------------------------------------------------------
       my %tabtitles = (
                          main => {
                                    Course => &mt('Main Course Documents'),
                                    Community => &mt('Main Community Documents'),
                                  },
                          supplemental => {
                                    Course => &mt('Supplemental Course Documents'),        
                                    Community => &mt('Supplemental Community Documents'),
                                  },
                       );
     if ($allowed) {      if ($allowed) {
  &update_paste_buffer($coursenum,$coursedom);   &update_paste_buffer($coursenum,$coursedom);
        my $dumpbut=&dumpbutton();         my $dumpbut=&dumpbutton();
Line 2829  sub handler { Line 2858  sub handler {
        if (!$folderpath) {         if (!$folderpath) {
    if ($env{'form.folder'} eq '' ||     if ($env{'form.folder'} eq '' ||
        $env{'form.folder'} eq 'supplemental') {         $env{'form.folder'} eq 'supplemental') {
        $folderpath='default&'.         $folderpath='default&'.&escape($tabtitles{'main'}{$type});
    &escape(&mt('Main '.$type.' Documents'));  
    }     }
        }         }
        unless ($env{'form.pagepath'}) {         unless ($env{'form.pagepath'}) {
Line 2990  value="$lt{'extr'}" /> $help{'Adding_Ext Line 3018  value="$lt{'extr'}" /> $help{'Adding_Ext
 </form>  </form>
 <br /><form action="/adm/imsimportdocs" method="post" name="ims">  <br /><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>
 ENDFORM  ENDFORM
        }         }
Line 3150  ENDBLOCK Line 3178  ENDBLOCK
        if ($folder =~ /^supplemental$/ &&         if ($folder =~ /^supplemental$/ &&
    (($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($tabtitles{'supplemental'}{$type});
        }         }
        my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type);         my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type);
        if ($error) {         if ($error) {

Removed from v.1.325.2.3  
changed lines
  Added in v.1.325.2.5


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