--- loncom/interface/loncoursequeueadmin.pm 2016/10/23 20:55:41 1.52.2.2
+++ loncom/interface/loncoursequeueadmin.pm 2016/04/04 01:09:48 1.53
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Utilities to administer domain course requests and course self-enroll requests
#
-# $Id: loncoursequeueadmin.pm,v 1.52.2.2 2016/10/23 20:55:41 raeburn Exp $
+# $Id: loncoursequeueadmin.pm,v 1.53 2016/04/04 01:09:48 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -396,8 +396,6 @@ sub display_queued_requests {
if ($context eq 'pending') {
$disposition = 'pending';
$nextphase = 'requestvalidation';
- } elsif ($context eq 'displaypending') {
- $disposition = 'pending';
}
%requesthash = &Apache::lonnet::dump_dom($namespace,$dom,'_'.$disposition);
$nextelement = ' ';
@@ -424,7 +422,7 @@ sub display_queued_requests {
my ($cnum,$disposition) = split('_',$item);
$entry = $cnum.':'.$requesthash{$item}{'ownername'}.':'.
$requesthash{$item}{'ownerdom'}.':';
- if (($context eq 'pending') || ($context eq 'displaypending')) {
+ if ($context eq 'pending') {
$entry .= $requesthash{$item}{'instcode'};
} else {
$entry .= $requesthash{$item}{'crstype'};
@@ -443,12 +441,10 @@ sub display_queued_requests {
if (keys(%queue_by_date) > 0) {
if ($context eq 'course') {
$output .= '
'.&mt('Self-enrollment requests queued pending approval by a Coordinator').' ';
- } elsif (($context eq 'pending') || ($context eq 'displaypending')) {
+ } elsif ($context eq 'pending') {
$output .= ''.&mt('Requests for official courses queued pending validation').' '.
''.&mt('Requests are validated against institutional data to confirm that the requestor is an instructor of record.').' '.
- &mt('Validation is attempted when the request is submitted.').' '.
- &mt('If unvalidated, the request will be held in a queue.').' '.
- &mt('Validation of pending requests is automatically repeated daily.').'
';
+ &mt('Validation is attempted when the request is submitted.').' '.&mt('If unvalidated, the request will be held in a queue.').' '.&mt('Validation of pending requests is automatically repeated daily.').'';
} elsif ($context eq 'requestauthor') {
$output .= ''.&mt('Requests for Authoring Space queued pending approval by a Domain Coordinator').' ';
} elsif ($context eq 'requestusername') {
@@ -476,9 +472,8 @@ sub display_queued_requests {
if ($context eq 'pending') {
$output .= ' '."\n".
- ''.&mt('Any course/community requests which are successfully validated will be created immediately.').' '.
- &mt('Unvalidated requests will be listed for manual approval/rejection.').'
';
- } elsif (($context ne 'helpdesk') && ($context ne 'displaypending')) {
+ ''.&mt('Any course/community requests which are successfully validated will be created immediately.').' '.&mt('Unvalidated requests will be listed for manual approval/rejection.').'
';
+ } else {
$output .= ' ';
}
$output .= '';
@@ -486,7 +481,7 @@ sub display_queued_requests {
$output .= '';
if ($context eq 'course') {
$output .= &mt('There are currently no enrollment requests awaiting approval.');
- } elsif (($context eq 'pending') || ($context eq 'displaypending')) {
+ } elsif ($context eq 'pending') {
$output .= &mt('There are currently no requests for official courses awaiting validation.');
} elsif ($context eq 'requestauthor') {
$output .= &mt('There are currently no requests for Authoring Space awaiting approval.');
@@ -506,7 +501,7 @@ sub build_queue_display {
my %crstypes;
my $output = &Apache::loncommon::start_data_table().
&Apache::loncommon::start_data_table_header_row();
- unless (($context eq 'pending') || ($context eq 'displaypending') || ($context eq 'helpdesk')) {
+ unless ($context eq 'pending') {
$output .= '
'.&mt('Action').' ';
}
$output .= ''.&mt('Requestor').' ';
@@ -518,7 +513,7 @@ sub build_queue_display {
} elsif ($context eq 'requestusername') {
$output .= ''.&mt('Date requested').' '.
''.&mt('Details').' ';
- } elsif ($context eq 'pending' || $context eq 'displaypending' || $context eq 'stillpending') {
+ } elsif ($context eq 'pending' || $context eq 'stillpending') {
$output .= ''.&mt('Institutional code').' '.
''.&mt('Date requested').' '.
''.&mt('Details').' ';
@@ -528,6 +523,7 @@ sub build_queue_display {
unofficial => 'Unofficial course',
community => 'Community',
textbook => 'Textbook course',
+ placement => 'Placement test',
);
$output .= ''.&mt('Type').' '.
''.&mt('Date requested').' '.
@@ -573,7 +569,7 @@ sub build_queue_display {
} else {
my ($cnum,$ownername,$ownerdom,$type,$cdesc);
my $queued = 'approval';
- if ($context eq 'pending' || $context eq 'displaypending' || $context eq 'stillpending') {
+ if ($context eq 'pending' || $context eq 'stillpending') {
($cnum,$ownername,$ownerdom,$instcode,$cdesc)=split(/:/,$request,5);
$queued = 'pending';
} else {
@@ -591,7 +587,7 @@ sub build_queue_display {
&Apache::loncommon::plainname($ownername,$ownerdom),
$ownername,$ownerdom);
}
- unless (($context eq 'pending') || ($context eq 'displaypending') || ($context eq 'helpdesk')) {
+ unless ($context eq 'pending') {
$row = ''.
' '.&mt('Approve').' '.
''.(' 'x2).
@@ -609,8 +605,8 @@ sub build_queue_display {
} elsif ($context eq 'requestusername') {
$row .= ''.$showtime.' '."\n".
''.$detailslink.' '."\n";
- } else {
- if ($context eq 'pending' || $context eq 'displaypending' || $context eq 'stillpending') {
+ } else {
+ if ($context eq 'pending' || $context eq 'stillpending') {
$row .= ''.$instcode.' '."\n";
} else {
$row .= ''.$crstype.' '."\n";
@@ -1679,6 +1675,8 @@ sub build_batchcreatehash {
$batchhash{'authparam'} = $domdefs->{'auth_arg_def'};
if ($details->{'crstype'} eq 'community') {
$batchhash{'crstype'} = 'Community';
+ } elsif ($details->{'crstype'} eq 'placement') {
+ $batchhash{'crstype'} = 'Placement';
} else {
if ($details->{'crstype'} eq 'textbook') {
if ($details->{'clonecrs'} && $details->{'clonedom'}) {
@@ -1724,7 +1722,6 @@ sub build_batchcreatehash {
$batchhash{'users'}{$owner}{lastname} = $owner_lastname;
$batchhash{'users'}{$owner}{emailenc} = $emailenc;
$batchhash{'users'}{$owner}{owneremail} = $owneremail;
- $batchhash{'setcomment'} = 1;
}
return %batchhash;
}