[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface loncoursequeueadmin.pm
raeburn
raeburn at source.lon-capa.org
Sun Oct 23 16:55:41 EDT 2016
raeburn Sun Oct 23 20:55:41 2016 EDT
Modified files: (Branch: version_2_11_X)
/loncom/interface loncoursequeueadmin.pm
Log:
- For 2.11
- Backport 1.56
Index: loncom/interface/loncoursequeueadmin.pm
diff -u loncom/interface/loncoursequeueadmin.pm:1.52.2.1 loncom/interface/loncoursequeueadmin.pm:1.52.2.2
--- loncom/interface/loncoursequeueadmin.pm:1.52.2.1 Wed Aug 31 23:28:05 2016
+++ loncom/interface/loncoursequeueadmin.pm Sun Oct 23 20:55:41 2016
@@ -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.1 2016/08/31 23:28:05 raeburn Exp $
+# $Id: loncoursequeueadmin.pm,v 1.52.2.2 2016/10/23 20:55:41 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -396,6 +396,8 @@
if ($context eq 'pending') {
$disposition = 'pending';
$nextphase = 'requestvalidation';
+ } elsif ($context eq 'displaypending') {
+ $disposition = 'pending';
}
%requesthash = &Apache::lonnet::dump_dom($namespace,$dom,'_'.$disposition);
$nextelement = '<input type="hidden" name="phase" value="'.$nextphase.'" />';
@@ -422,7 +424,7 @@
my ($cnum,$disposition) = split('_',$item);
$entry = $cnum.':'.$requesthash{$item}{'ownername'}.':'.
$requesthash{$item}{'ownerdom'}.':';
- if ($context eq 'pending') {
+ if (($context eq 'pending') || ($context eq 'displaypending')) {
$entry .= $requesthash{$item}{'instcode'};
} else {
$entry .= $requesthash{$item}{'crstype'};
@@ -441,10 +443,12 @@
if (keys(%queue_by_date) > 0) {
if ($context eq 'course') {
$output .= '<h3>'.&mt('Self-enrollment requests queued pending approval by a Coordinator').'</h3>';
- } elsif ($context eq 'pending') {
+ } elsif (($context eq 'pending') || ($context eq 'displaypending')) {
$output .= '<h3>'.&mt('Requests for official courses queued pending validation').'</h3>'.
'<p>'.&mt('Requests are validated against institutional data to confirm that the requestor is an instructor of record.').'<br />'.
- &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.').'</p>';
+ &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.').'</p>';
} elsif ($context eq 'requestauthor') {
$output .= '<h3>'.&mt('Requests for Authoring Space queued pending approval by a Domain Coordinator').'</h3>';
} elsif ($context eq 'requestusername') {
@@ -472,8 +476,9 @@
if ($context eq 'pending') {
$output .= '<br /><input type="submit" name="validationcheck" value="'.
&mt('Validate').'" /><br />'."\n".
- '<p>'.&mt('Any course/community requests which are successfully validated will be created immediately.').' '.&mt('Unvalidated requests will be listed for manual approval/rejection.').'</p>';
- } else {
+ '<p>'.&mt('Any course/community requests which are successfully validated will be created immediately.').' '.
+ &mt('Unvalidated requests will be listed for manual approval/rejection.').'</p>';
+ } elsif (($context ne 'helpdesk') && ($context ne 'displaypending')) {
$output .= '<br /><input type="submit" name="processqueue" value="'.&mt('Save').'" />';
}
$output .= '</form>';
@@ -481,7 +486,7 @@
$output .= '<div class="LC_info">';
if ($context eq 'course') {
$output .= &mt('There are currently no enrollment requests awaiting approval.');
- } elsif ($context eq 'pending') {
+ } elsif (($context eq 'pending') || ($context eq 'displaypending')) {
$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.');
@@ -501,7 +506,7 @@
my %crstypes;
my $output = &Apache::loncommon::start_data_table().
&Apache::loncommon::start_data_table_header_row();
- unless ($context eq 'pending') {
+ unless (($context eq 'pending') || ($context eq 'displaypending') || ($context eq 'helpdesk')) {
$output .= '<th>'.&mt('Action').'</th>';
}
$output .= '<th>'.&mt('Requestor').'</th>';
@@ -513,7 +518,7 @@
} elsif ($context eq 'requestusername') {
$output .= '<th>'.&mt('Date requested').'</th>'.
'<th>'.&mt('Details').'</th>';
- } elsif ($context eq 'pending' || $context eq 'stillpending') {
+ } elsif ($context eq 'pending' || $context eq 'displaypending' || $context eq 'stillpending') {
$output .= '<th>'.&mt('Institutional code').'</th>'.
'<th>'.&mt('Date requested').'</th>'.
'<th>'.&mt('Details').'</th>';
@@ -568,7 +573,7 @@
} else {
my ($cnum,$ownername,$ownerdom,$type,$cdesc);
my $queued = 'approval';
- if ($context eq 'pending' || $context eq 'stillpending') {
+ if ($context eq 'pending' || $context eq 'displaypending' || $context eq 'stillpending') {
($cnum,$ownername,$ownerdom,$instcode,$cdesc)=split(/:/,$request,5);
$queued = 'pending';
} else {
@@ -586,7 +591,7 @@
&Apache::loncommon::plainname($ownername,$ownerdom),
$ownername,$ownerdom);
}
- unless ($context eq 'pending') {
+ unless (($context eq 'pending') || ($context eq 'displaypending') || ($context eq 'helpdesk')) {
$row = '<td><span class="LC_nobreak"><label>'.
'<input type="radio" value="'.$approve.'" name="'.$count.'radioreq" />'.&mt('Approve').'</label>'.
'<label>'.(' 'x2).
@@ -604,8 +609,8 @@
} elsif ($context eq 'requestusername') {
$row .= '<td>'.$showtime.'</td>'."\n".
'<td>'.$detailslink.'</td>'."\n";
- } else {
- if ($context eq 'pending' || $context eq 'stillpending') {
+ } else {
+ if ($context eq 'pending' || $context eq 'displaypending' || $context eq 'stillpending') {
$row .= '<td>'.$instcode.'</td>'."\n";
} else {
$row .= '<td>'.$crstype.'</td>'."\n";
@@ -1603,7 +1608,7 @@
$keysmsg,$domdefs,$longroles,$coderef,$customhash) = @_;
unless ((ref($details) eq 'HASH') && (ref($domdefs) eq 'HASH') &&
(ref($longroles) eq 'HASH')) {
- return 'error: Invalid request';
+ return ('error: Invalid request');
}
my ($result,$ownername,$ownerdom);
my $crstype = $details->{'crstype'};
More information about the LON-CAPA-cvs
mailing list