--- loncom/interface/londocs.pm 2009/10/23 17:21:03 1.403 +++ loncom/interface/londocs.pm 2009/10/30 20:24:39 1.407 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.403 2009/10/23 17:21:03 raeburn Exp $ +# $Id: londocs.pm,v 1.407 2009/10/30 20:24:39 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2582,7 +2582,7 @@ sub init_breadcrumbs { my ($form,$text)=@_; &Apache::lonhtmlcommon::clear_breadcrumbs(); &Apache::lonhtmlcommon::add_breadcrumb({href=>"/adm/coursedocs", - text=>"Edit ".&Apache::loncommon::course_type(), + text=>&Apache::loncommon::course_type().' Editor', faq=>273, bug=>'Instructor Interface', help => 'Docs_Adding_Course_Doc'}); @@ -3016,7 +3016,16 @@ HIDDENFORM my $activeClass = 1; my $active = ''; - + 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) { $r->print(''); } else { $r->print('
'); @@ -3051,7 +3060,7 @@ HIDDENFORM if ($folder eq '' || $folder=~/^supplemental/) { $folder='default'; $savefolderpath = $env{'form.folderpath'}; - $env{'form.folderpath'}='default&'.&escape(&mt('Main '.$type.' Documents')); + $env{'form.folderpath'}='default&'.&escape($tabtitles{'main'}{$type}); $uploadtag = ''; } @@ -3275,7 +3284,6 @@ my %orderhash = ( 'dd' => ['Tools', create_form_ul(create_list_elements(@tools)).&generate_admin_options($containertag,$uploadtag,\%help,\%env)], ); my $tid='1'; -my $varcd = 'Main Course Documents'; $hadchanges=0; my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type); if ($error) { @@ -3286,7 +3294,7 @@ my $varcd = 'Main Course Documents'; } &changewarning($r,''); -$r->print(&generate_edit_table($tid,$varcd,\%orderhash)); +$r->print(&generate_edit_table($tid,\%orderhash)); $r->print(''); } @@ -3395,8 +3403,7 @@ my %suporderhash = ( $r->print('

'.$error.'

'); } my $tid='2'; - my $varscd = 'Supplemental Course Documents'; - $r->print(&generate_edit_table($tid,$varscd,\%suporderhash)); + $r->print(&generate_edit_table($tid,\%suporderhash)); } else { my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type); if ($error) { @@ -3461,7 +3468,8 @@ sub generate_admin_options { sub generate_edit_table { - my ($tid,$varcd,$orderhash_ref) = @_; + my ($tid,$orderhash_ref) = @_; + return unless(ref($orderhash_ref) eq 'HASH'); my %orderhash = %{$orderhash_ref}; my $form; my $activetab;