--- loncom/interface/londocs.pm 2013/04/03 02:00:19 1.543 +++ loncom/interface/londocs.pm 2013/05/21 19:30:11 1.550 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.543 2013/04/03 02:00:19 raeburn Exp $ +# $Id: londocs.pm,v 1.550 2013/05/21 19:30:11 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -340,10 +340,8 @@ sub group_import { } my $initialtext = &mt('Replace with your own content.'); my $newhtml = < - + - $name @@ -490,7 +488,7 @@ sub docs_change_log { } my $folderpath=$env{'form.folderpath'}; if ($folderpath eq '') { - $folderpath = 'default&'.&escape(&mt('Main '.$crstype.' Content').':::::'); + $folderpath = 'default&'.&escape(&mt('Main Content').':::::'); } $pathitem = ''; @@ -2332,7 +2330,7 @@ sub editor { my $jumpto; unless ($supplementalflag) { - $jumpto = "'uploaded/$coursedom/$coursenum/$folder.$container'"; + $jumpto = "uploaded/$coursedom/$coursenum/$folder.$container"; } unless ($allowed) { @@ -2630,7 +2628,9 @@ sub editor { my $need_save; if (($allowed) || ($supplementalflag && $folder eq 'supplemental')) { - my $toolslink = '
' + my $toolslink; + if ($allowed || &Apache::lonnet::allowed('mdc',$env{'request.course.id'})) { + $toolslink = '' @@ -2640,6 +2640,7 @@ sub editor { .'class="LC_toolbarItem" ' .'title="'.&mt('Supplemental Content Editor').'">' .'
' .&Apache::loncommon::help_open_menu('Navigation Screen', 'Navigation_Screen',undef,'RAT') .''.&mt('Tools:').'

'; + } if ($shown) { if ($allowed) { $to_show = &Apache::loncommon::start_scrollbox('900px','880px','400px','contentscroll') @@ -2703,7 +2704,7 @@ sub editor { } $to_show .= &Apache::loncommon::start_scrollbox('400px','380px','200px','contentscroll') .'
' - .&mt('Currently no documents.') + .&mt('Currently empty') .'
' .&Apache::loncommon::end_scrollbox(); } @@ -2716,7 +2717,7 @@ sub editor { .''; } else { $to_show = '
' - .&mt('Currently no documents.') + .&mt('Currently empty') .'
' } } @@ -3650,8 +3651,8 @@ sub list_symbs { sub verifycontent { my ($r) = @_; my $crstype = &Apache::loncommon::course_type(); - $r->print(&Apache::loncommon::start_page('Verify '.$crstype.' Documents')); - $r->print(&Apache::lonhtmlcommon::breadcrumbs('Verify '.$crstype.' Documents')); + $r->print(&Apache::loncommon::start_page('Verify '.$crstype.' Content')); + $r->print(&Apache::lonhtmlcommon::breadcrumbs('Verify '.$crstype.' Content')); $r->print(&startContentScreen('tools')); $r->print('

'.&mt($crstype.' content verification').'

'); $hashtied=0; @@ -3753,7 +3754,7 @@ sub checkversions { &changewarning($r,''); if ($env{'form.timerange'} eq 'all') { # show all documents - $header=&mt('All Documents in '.$crstype); + $header=&mt('All content in '.$crstype); $allsel=' selected="selected"'; foreach my $key (keys(%hash)) { if ($key=~/^ids\_(\/res\/.+)$/) { @@ -4031,7 +4032,7 @@ sub startContentScreen { $output .= '      '.&mt('Content Index').'      '."\n"; $output .= '
  • '.&mt('Supplemental Content').'
  • '; } else { - $output .= '
  •       '.&mt('Content Editor').'      
  • '."\n"; + $output .= '
  •       '.&mt('Main Content Editor').'      
  • '."\n"; $output .= '
  • '.&mt('Supplemental Content Editor').'
  • '."\n"; $output .= '
  •       '.&mt('Content Utilities').'      
  • '."\n"; '>      '.&mt('Content Utilities').'      '; @@ -4052,7 +4053,7 @@ sub endContentScreen { } sub supplemental_base { - return 'supplemental&'.&escape(&mt('Supplemental '.&Apache::loncommon::course_type().' Content')); + return 'supplemental&'.&escape(&mt('Supplemental Content')); } sub handler { @@ -4185,7 +4186,7 @@ sub handler { } } elsif ($env{'form.command'} eq 'editdocs') { $env{'form.folderpath'} = 'default&'. - &escape(&mt('Main '.$crstype.' Content').':::::'); + &escape(&mt('Main Content').':::::'); &Apache::lonnet::appenv({'docs.exit.'.$env{'request.course.id'} => $env{'form.command'}}); } elsif ($env{'form.command'} eq 'editsupp') { $env{'form.folderpath'} = 'supplemental&'. @@ -4230,7 +4231,7 @@ sub handler { if ($supplementalflag) { $env{'form.folderpath'}=&supplemental_base(); } else { - $env{'form.folderpath'}='default'.&escape(&mt('Main '.$crstype.' Content'). + $env{'form.folderpath'}='default&'.&escape(&mt('Main Content'). ':::::'); } } @@ -4256,7 +4257,7 @@ sub handler { if ($env{'form.folder'} eq '' || $env{'form.folder'} eq 'supplemental') { $folderpath='default&'. - &escape(&mt('Main '.$crstype.' Content').':::::'); + &escape(&mt('Main Content').':::::'); } } $containertag = ''; @@ -4581,7 +4582,7 @@ HIDDENFORM if ($folder eq '' || $supplementalflag) { $folder='default'; $savefolderpath = $env{'form.folderpath'}; - $env{'form.folderpath'}='default&'.&escape(&mt('Content')); + $env{'form.folderpath'}='default&'.&escape(&mt('Main Content')); $pathitem = ''; } @@ -5234,7 +5235,7 @@ sub generate_edit_table { $form = '
    '. '