[LON-CAPA-cvs] cvs: loncom /interface loncreatecourse.pm
raeburn
raeburn@source.lon-capa.org
Fri, 02 Oct 2009 18:31:36 -0000
raeburn Fri Oct 2 18:31:36 2009 EDT
Modified files:
/loncom/interface loncreatecourse.pm
Log:
- Creation logs display.
- Do not show type or context if filters for these set to specific values.
- Fix: context for course created from requests is requestcourses not requestcrs.
Index: loncom/interface/loncreatecourse.pm
diff -u loncom/interface/loncreatecourse.pm:1.127 loncom/interface/loncreatecourse.pm:1.128
--- loncom/interface/loncreatecourse.pm:1.127 Mon Sep 28 19:21:38 2009
+++ loncom/interface/loncreatecourse.pm Fri Oct 2 18:31:36 2009
@@ -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 @@
'<th>'.&mt('Course Owner(s)').'</th>';
if (($curr{'type'} eq 'official') || ($curr{'type'} eq 'any')) {
$tablehdr .= '<th>'.&mt('Institutional Code').'</th>';
- }
- $tablehdr .= '<th>'.&mt('Course Type').'</th>'.
- '<th>'.&mt('Creation Context').'</th>'.
- &Apache::loncommon::end_data_table_header_row();
+ }
+ if ($curr{'type'} eq 'any') {
+ $tablehdr .= '<th>'.&mt('Course Type').'</th>';
+ }
+ if ($curr{'context'} eq 'any')
+ $tablehdr .= '<th>'.&mt('Creation Context').'</th>';
+ }
+ $tablehdr .= &Apache::loncommon::end_data_table_header_row();
my ($minshown,$maxshown);
$minshown = 1;
my $count = 0;
@@ -1106,7 +1110,13 @@
if (($curr{'type'} eq 'official') || ($curr{'type'} eq 'any')) {
$r->print('<td>'.$courses{$cid}{'inst_code'}.'</td>');
}
- $r->print('<td>'.$showtype.'</td><td>'.$showcontext.'</td><td>'.&Apache::loncommon::end_data_table_row()."\n");
+ if ($curr{'type'} eq 'any') {
+ $r->print('<td>'.$showtype.'</td>');
+ }
+ if ($curr{'context'} eq 'any') {
+ $r->print('<td>'.$showcontext.'</td>');
+ }
+ $r->print('<td>'.&Apache::loncommon::end_data_table_row()."\n");
}
if ($showntablehdr) {
$r->print(&Apache::loncommon::end_data_table().'<br />');
@@ -1241,13 +1251,13 @@
}
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);
}