--- loncom/interface/loncreatecourse.pm 2009/09/28 19:21:38 1.127 +++ loncom/interface/loncreatecourse.pm 2009/10/02 18:31:36 1.128 @@ -1,7 +1,7 @@ # The LearningOnline Network # Create a course # -# $Id: loncreatecourse.pm,v 1.127 2009/09/28 19:21:38 raeburn Exp $ +# $Id: loncreatecourse.pm,v 1.128 2009/10/02 18:31:36 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -982,10 +982,14 @@ sub print_creation_logs { ''.&mt('Course Owner(s)').''; if (($curr{'type'} eq 'official') || ($curr{'type'} eq 'any')) { $tablehdr .= ''.&mt('Institutional Code').''; - } - $tablehdr .= ''.&mt('Course Type').''. - ''.&mt('Creation Context').''. - &Apache::loncommon::end_data_table_header_row(); + } + if ($curr{'type'} eq 'any') { + $tablehdr .= ''.&mt('Course Type').''; + } + if ($curr{'context'} eq 'any') + $tablehdr .= ''.&mt('Creation Context').''; + } + $tablehdr .= &Apache::loncommon::end_data_table_header_row(); my ($minshown,$maxshown); $minshown = 1; my $count = 0; @@ -1106,7 +1110,13 @@ sub print_creation_logs { if (($curr{'type'} eq 'official') || ($curr{'type'} eq 'any')) { $r->print(''.$courses{$cid}{'inst_code'}.''); } - $r->print(''.$showtype.''.$showcontext.''.&Apache::loncommon::end_data_table_row()."\n"); + if ($curr{'type'} eq 'any') { + $r->print(''.$showtype.''); + } + if ($curr{'context'} eq 'any') { + $r->print(''.$showcontext.''); + } + $r->print(''.&Apache::loncommon::end_data_table_row()."\n"); } if ($showntablehdr) { $r->print(&Apache::loncommon::end_data_table().'
'); @@ -1241,13 +1251,13 @@ sub course_types { } sub context_names { - my @contexts = qw(auto web dc_create requestcrs); + my @contexts = qw(auto web dc_create requestcourses); my %contextnames = &Apache::lonlocal::texthash ( - auto => 'Automated creation from batch file', - web => 'Batch creation from uploaded file', - dc_create => 'Single course created by Domain Coordinator', - requestcrs => 'Processing of submitted course request', + auto => 'Automated creation from batch file', + web => 'Batch creation from uploaded file', + dc_create => 'Single course created by Domain Coordinator', + requestcourses => 'Processing of submitted course request', ); return (\@contexts,\%contextnames); }