--- loncom/interface/lonrequestcourse.pm 2009/09/10 03:00:31 1.34
+++ loncom/interface/lonrequestcourse.pm 2009/09/11 12:53:10 1.35
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Request a course
#
-# $Id: lonrequestcourse.pm,v 1.34 2009/09/10 03:00:31 raeburn Exp $
+# $Id: lonrequestcourse.pm,v 1.35 2009/09/11 12:53:10 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -631,7 +631,7 @@ sub course_types {
official => 'Official course',
unofficial => 'Unofficial course',
community => 'Community',
- );
+ );
return (\@types,\%typename);
}
@@ -725,7 +725,7 @@ END
END
$r->print(&header('Course Requests',$js.$jscript,$loaditems).$crumb.
- '
'.&mt('Request creation of a new course, or review your pending course requests.').'
'.
''.
&Apache::lonhtmlcommon::start_pick_box().
&Apache::lonhtmlcommon::row_title(&mt('Course Domain')).
@@ -757,7 +757,7 @@ END
if ($type eq 'official') {
$selected = ' selected="selected"';
}
- $r->print('
'."\n");
}
}
@@ -1748,14 +1748,8 @@ sub print_request_status {
my ($dom) = @_;
my %statusinfo = &Apache::lonnet::dump('courserequests',$env{'user.domain'},
$env{'user.name'},'^status:'.$dom);
- my ($output,$formname,%queue_by_date,%typenames);
- if ($env{'form.crstype'} eq 'any') {
- %typenames = &Apache::lonlocal::texthash (
- official => 'Official course',
- unofficial => 'Unofficial course',
- community => 'Community',
- );
- }
+ my ($output,$formname,%queue_by_date);
+ my ($types,$typenames) = &course_types();
foreach my $key (keys(%statusinfo)) {
if (($statusinfo{$key} eq 'approval') || ($statusinfo{$key} eq 'pending')) {
(undef,my($cdom,$cnum)) = split(':',$key);
@@ -1826,7 +1820,10 @@ sub print_request_status {
'
'.&unescape($desc).' | '.
'
'.$cdom.' | ';
if ($env{'form.crstype'} eq 'any') {
- my $typename = $typenames{$type};
+ my $typename;
+ if (ref($typenames) eq 'HASH') {
+ $typename = &mt($typenames->{$type});
+ }
if ($typename eq '') {
$typename = &mt('Unknown type');
}
@@ -1979,7 +1976,7 @@ sub print_review {
$crstypename = $env{'form.crstype'};
if (ref($typename) eq 'HASH') {
unless ($typename->{$env{'form.crstype'}} eq '') {
- $crstypename = $typename->{$env{'form.crstype'}};
+ $crstypename = &mt($typename->{$env{'form.crstype'}});
}
}
my $category = 'Course';
@@ -2295,14 +2292,14 @@ sub clone_form {
if ($crstype eq 'community') {
$type = 'Community';
}
- my $cloneform = &Apache::loncommon::select_dom_form($dom,'clonedom').
+ my $cloneform = &Apache::loncommon::select_dom_form($dom,'clonedom').' '.
&Apache::loncommon::selectcourse_link($formname,'clonecrs','clonedom','','','',$type);
my %lt = &clone_text();
my $output .=
&Apache::lonhtmlcommon::row_title($lt{'cid'}).'
'.&Apache::lonhtmlcommon::row_closure(1).'
'.
+ ''.&Apache::lonhtmlcommon::row_closure(1).
+ &Apache::lonhtmlcommon::row_title($lt{'dmn'}).'
'.&Apache::lonhtmlcommon::row_closure(1).
&Apache::lonhtmlcommon::row_title($lt{'dsh'}).'