[LON-CAPA-cvs] cvs: loncom(GCI_3) /interface loncoursequeueadmin.pm
raeburn
raeburn@source.lon-capa.org
Mon, 07 Dec 2009 02:04:25 -0000
raeburn Mon Dec 7 02:04:25 2009 EDT
Modified files: (Branch: GCI_3)
/loncom/interface loncoursequeueadmin.pm
Log:
- Customization for GCI. (same change as in 1.9.2.1 and 1.9.2.2 for GCI_2).
- Users for whom self-enrollment is approved in the GCI Concept Inventory, automatically receive the right to create unlimited Concept Test courses in the gcitest domain.
Index: loncom/interface/loncoursequeueadmin.pm
diff -u loncom/interface/loncoursequeueadmin.pm:1.12 loncom/interface/loncoursequeueadmin.pm:1.12.2.1
--- loncom/interface/loncoursequeueadmin.pm:1.12 Wed Nov 18 19:15:45 2009
+++ loncom/interface/loncoursequeueadmin.pm Mon Dec 7 02:04:25 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Utilities to administer domain course requests and course self-enroll requests
#
-# $Id: loncoursequeueadmin.pm,v 1.12 2009/11/18 19:15:45 raeburn Exp $
+# $Id: loncoursequeueadmin.pm,v 1.12.2.1 2009/12/07 02:04:25 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -366,7 +366,8 @@
@existing,@missingreq,@invalidusers,@limitexceeded,@completed,
@processing_errors,@warn_approves,@warn_rejects,@approvals,
@rejections,@rejectionerrors,@nopermissions,%courseroles,
- %communityroles,%domdefs,%approvalmsg,%rejectionmsg,$crstype);
+ %communityroles,%domdefs,%approvalmsg,%rejectionmsg,$crstype,
+ @warn_coursereqs);
@approvals = &Apache::loncommon::get_env_multiple('form.approvereq');
@rejections = &Apache::loncommon::get_env_multiple('form.rejectreq');
$now = time;
@@ -501,6 +502,15 @@
&Apache::lonnet::put($namespace,\%userrequest,$udom,$uname);
if ($userresult ne 'ok') {
push(@warn_approves,$uname.':'.$udom);
+ } elsif ($udom eq 'gci') {
+ my %changehash = (
+ 'reqcrsotherdom.unofficial' => 'gcitest:autolimit=',
+ );
+ my $reqresult = &Apache::lonnet::put('environment',\%changehash,
+ $udom,$uname);
+ if ($reqresult ne 'ok') {
+ push(@warn_coursereqs,$uname.':'.$udom);
+ }
}
} else {
push(@processing_errors,$uname.':'.$udom);
@@ -885,6 +895,13 @@
$output .= '</ul></p>';
}
}
+ if (@warn_coursereqs) {
+ $output .= '<p>'..&mt("For the following users, an error occurred when setting rights to request creation of Concept Test courses:").'<ul>';
+ foreach my $user (@warn_coursereqs) {
+ $output .= '<li>'.$user.'</li>';
+ }
+ $output .= '</ul></p>';
+ }
return $output;
}