--- loncom/interface/loncreatecourse.pm 2009/09/28 19:21:38 1.127 +++ loncom/interface/loncreatecourse.pm 2009/10/31 18:23:30 1.132 @@ -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.132 2009/10/31 18:23:30 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -172,7 +172,7 @@ function validate(formname) { 'stco' => "standard courses only", 'blnk' => "Blank", 'sllb' => "Syllabus", - 'navi' => "Navigate Contents", + 'navi' => "Course Contents", 'cid' => "Course ID", 'dmn' => "Domain", 'dsh' => "Date Shift", @@ -787,10 +787,14 @@ sub create_course { # Make the requested user a course coordinator or group coordinator # if (($ccdomain) && ($ccuname)) { + my $ccrole = 'cc'; + if ($crstype eq 'Community') { + $ccrole = 'co'; + } $r->print(&mt('Assigning role of '.$crstype.' Coordinator to [_1]:', ,''.$ccuname.':'.$ccdomain.'') .&Apache::lonnet::assignrole($ccdomain,$ccuname,$courseid, - 'cc','','','','','createcourse').'

'); + $ccrole,'','','','','createcourse').'

'); } if ($env{'form.setkeys'}) { $r->print( @@ -979,13 +983,17 @@ sub print_creation_logs { &Apache::loncommon::start_data_table_header_row(). ' '.&mt('Creation Date').''. ''.&mt('Creator').''.&mt('Description').''. - ''.&mt('Course Owner(s)').''; + ''.&mt('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 +1114,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().'
'); @@ -1222,7 +1236,7 @@ sub creation_display_filter { # Server version info $output .= '

'. - &mt('Only courses created from servers running LON-CAPA [_1] or later are displayed.','2.9.0'); + &mt('Only courses and communities created from servers running LON-CAPA [_1] or later are displayed.','2.9.0'); if ($version) { $output .= ' '.&mt('This LON-CAPA server is version [_1]',$version); } @@ -1241,13 +1255,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 => 'Course or community created by Dom. Coord.', + requestcourses => 'Processing of submitted course request', ); return (\@contexts,\%contextnames); } @@ -1386,8 +1400,8 @@ sub handler { &syllabuslink_javascript()."\n". '// ]]>'."\n". ''; - my $start_page=&Apache::loncommon::start_page('Course Creation Logs',$js); - my $crumbs = &Apache::lonhtmlcommon::breadcrumbs('Created Courses','Creation_Log',undef,'Creation_Log'); + my $start_page=&Apache::loncommon::start_page('Course/Community Creation Logs',$js); + my $crumbs = &Apache::lonhtmlcommon::breadcrumbs('Created Courses/Communities','Creation_Log',undef,'Creation_Log'); $r->print($start_page.$crumbs."\n".'

'); &print_creation_logs($r); $r->print('
'.&Apache::loncommon::end_page());