--- loncom/interface/lonrequestcourse.pm 2010/03/16 22:40:12 1.47
+++ loncom/interface/lonrequestcourse.pm 2010/03/31 18:58:34 1.51
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Request a course
#
-# $Id: lonrequestcourse.pm,v 1.47 2010/03/16 22:40:12 raeburn Exp $
+# $Id: lonrequestcourse.pm,v 1.51 2010/03/31 18:58:34 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -128,7 +128,7 @@ sub handler {
}
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
- ['action','showdom','cnum','state','crstype']);
+ ['action','showdom','cnum','state','crstype','queue']);
&Apache::lonhtmlcommon::clear_breadcrumbs();
my $dom = &get_course_dom();
my $action = $env{'form.action'};
@@ -138,7 +138,7 @@ sub handler {
$states{'display'} = ['details'];
$states{'view'} = ['pick_request','details','cancel','removal'];
- $states{'log'} = ['filter','display'];
+ $states{'log'} = ['display'];
$states{'new'} = ['courseinfo','enrollment','personnel','review','process'];
if (($action eq 'new') && ($env{'form.crstype'} eq 'official')) {
@@ -166,6 +166,7 @@ sub handler {
details => 'Request Details',
cancel => 'Cancel Request',
removal => 'Outcome',
+ display => 'Request Logs',
);
if (($env{'form.crstype'} eq 'official') && (&Apache::lonnet::auto_run('',$dom))) {
@@ -178,7 +179,8 @@ sub handler {
if (($dom eq $env{'request.role.domain'}) && (&Apache::lonnet::allowed('ccc',$dom))) {
if ($env{'form.cnum'} ne '') {
my $cnum = $env{'form.cnum'};
- my $reqkey = $cnum.'_approval';
+ my $queue = $env{'form.queue'};
+ my $reqkey = $cnum.'_'.$queue;
my $namespace = 'courserequestqueue';
my $domconfig = &Apache::lonnet::get_domainconfiguser($dom);
my %queued =
@@ -316,7 +318,7 @@ sub handler {
} elsif ($action eq 'display') {
if ($warning ne '') {
my $args = { only_body => 1 };
- $r->print(&header('Course/Community Requests','','',$args).$crumb.
+ $r->print(&header('Course/Community Requests','','' ,'',$args).$crumb.
'
'.&mt('Course/Community Request Details').'
'.
'
'.$warning.'
'.
&close_popup_form());
@@ -325,7 +327,24 @@ sub handler {
$loaditems,$crumb,'','','','','',$uname,$udom);
}
} elsif ($action eq 'log') {
- &print_request_logs($jscript,$loaditems,$crumb);
+ if ($state eq 'crstype') {
+ &print_main_menu($r,\%can_request,\%states,$dom,$jscript,'',$crumb,\%request_domains);
+ } else {
+ $jscript .= < 'You are not permitted to request creation of an official course in this domain.',
unofficial => 'You are not permitted to request creation of an unofficial course in this domain.',
community => 'You are not permitted to request creation of a community this domain.',
- all => 'You must choose a specific course type when making a new course request.\\nAll types is not allowed.',
+ all => 'You must choose a specific course type when making a new course request.\\n\"All types\" is not allowed.',
);
$js .= <print('